svn commit: r704774 - in /ofbiz/trunk/applications/party: entitydef/entitymodel.xml webapp/partymgr/WEB-INF/actions/party/ViewRoles.groovy webapp/partymgr/party/PartyForms.xml webapp/partymgr/party/viewroles.ftl widget/partymgr/PartyScreens.xml

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r704774 - in /ofbiz/trunk/applications/party: entitydef/entitymodel.xml webapp/partymgr/WEB-INF/actions/party/ViewRoles.groovy webapp/partymgr/party/PartyForms.xml webapp/partymgr/party/viewroles.ftl widget/partymgr/PartyScreens.xml

hansbak-2
Author: hansbak
Date: Tue Oct 14 20:59:02 2008
New Revision: 704774

URL: http://svn.apache.org/viewvc?rev=704774&view=rev
Log:
convert from ftl to forms and show an extra field

Removed:
    ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/ViewRoles.groovy
    ofbiz/trunk/applications/party/webapp/partymgr/party/viewroles.ftl
Modified:
    ofbiz/trunk/applications/party/entitydef/entitymodel.xml
    ofbiz/trunk/applications/party/webapp/partymgr/party/PartyForms.xml
    ofbiz/trunk/applications/party/widget/partymgr/PartyScreens.xml

Modified: ofbiz/trunk/applications/party/entitydef/entitymodel.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/entitydef/entitymodel.xml?rev=704774&r1=704773&r2=704774&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/entitydef/entitymodel.xml (original)
+++ ofbiz/trunk/applications/party/entitydef/entitymodel.xml Tue Oct 14 20:59:02 2008
@@ -2513,6 +2513,7 @@
       <member-entity entity-alias="RT" entity-name="RoleType"/>
       <alias entity-alias="PR" name="partyId"/>
       <alias entity-alias="RT" name="roleTypeId"/>
+      <alias entity-alias="RT" name="parentTypeId"/>
       <alias entity-alias="RT" name="description"/>
       <view-link entity-alias="RT" rel-entity-alias="PR">
         <key-map field-name="roleTypeId"/>

Modified: ofbiz/trunk/applications/party/webapp/partymgr/party/PartyForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/webapp/partymgr/party/PartyForms.xml?rev=704774&r1=704773&r2=704774&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/webapp/partymgr/party/PartyForms.xml (original)
+++ ofbiz/trunk/applications/party/webapp/partymgr/party/PartyForms.xml Tue Oct 14 20:59:02 2008
@@ -902,4 +902,30 @@
         <field position="1" name="totalToBePaid" title="To be paid to: ${parameters.partyId}"><display/></field>
         <field position="2" name="totalToBeReceived" title="To be received from: ${parameters.partyId}"><display/></field>
     </form>
+    <form name="ViewPartyRoles" type="list" list-name="partyRoles" target="viewroles"
+        default-title-style="tableheadtext" default-widget-style="tabletext"
+        odd-row-style="alternate-row" default-table-style="basic-table hover-bar"
+        default-tooltip-style="tabletext">
+        <field name="roleTypeId" title="${uiLabelMap.PartyRoleTypeId}"><display/></field>
+        <field name="description" title="${uiLabelMap.PartyRole}"><display/></field>
+        <field name="parentTypeId"><display-entity entity-name="RoleType" key-field-name="roleTypeId" description="${description}"/></field>
+        <field name="remove"><hyperlink target="deleterole?partyId=${partyId}&amp;roleTypeId=${roleTypeId}" description="${uiLabelMap.CommonRemove}"/></field>
+    </form>
+    <form name="AddPartyRole" type="single" title="Add a role to party" target="addrole/viewroles">
+        <field name="partyId"><hidden value="${parameters.partyId}"/></field>
+        <field name="roleTypeId">
+            <drop-down allow-empty="false">
+                <entity-options entity-name="RoleType" description="${description}">
+                    <entity-order-by field-name="description"/>
+                </entity-options>
+            </drop-down>
+        </field>
+        <field name="add" title="${uiLabelMap.CommonAdd}"><submit/></field>
+    </form>
+    <form name="AddRoleType" type="single" title="Add a new roletype" target="createroletype">
+        <field name="roleTypeId" title="${uiLabelMap.PartyRoleTypeId}" required-field="true" entry-name="dummy"><text/></field>
+        <field name="description" title="${uiLabelMap.CommonDescription}" required-field="true"><text/></field>
+        <field name="save" title="${uiLabelMap.CommonSave}"><submit/></field>
+    </form>
+    
 </forms>

Modified: ofbiz/trunk/applications/party/widget/partymgr/PartyScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/widget/partymgr/PartyScreens.xml?rev=704774&r1=704773&r2=704774&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/widget/partymgr/PartyScreens.xml (original)
+++ ofbiz/trunk/applications/party/widget/partymgr/PartyScreens.xml Tue Oct 14 20:59:02 2008
@@ -138,18 +138,40 @@
                 <set field="titleProperty" value="PageTitleViewPartyRole"/>
                 <set field="headerItem" value="find"/>
                 <set field="tabButtonItem" value="viewroles"/>
-
                 <set field="labelTitleProperty" value="PartyMemberRoles"/>
-
-                <script location="component://party/webapp/partymgr/WEB-INF/actions/HasPartyPermissions.groovy"/>
-                <script location="component://party/webapp/partymgr/WEB-INF/actions/party/ViewRoles.groovy"/>
+                <entity-condition entity-name="RoleTypeAndParty" list-name="partyRoles">
+                    <condition-list combine="and">
+                        <condition-expr field-name="partyId" operator="equals" value="${parameters.partyId}"/>
+                        <condition-expr field-name="roleTypeId" operator="not-equals" value="_NA_"/>
+                    </condition-list>
+                </entity-condition>
             </actions>
             <widgets>
                 <decorator-screen name="CommonPartyDecorator" location="${parameters.mainDecoratorLocation}">
                     <decorator-section name="body">
-                        <platform-specific>
-                            <html><html-template location="component://party/webapp/partymgr/party/viewroles.ftl"/></html>
-                        </platform-specific>
+                        <screenlet title="${uiLabelMap.PartyMemberRoles}" navigation-form-name="ViewPartyRoles">
+                            <include-form name="ViewPartyRoles" location="component://party/webapp/partymgr/party/PartyForms.xml"/>
+                        </screenlet>
+                        <section>
+                            <condition>
+                                <if-has-permission permission="PARTYMGR" action="_UPDATE"/>
+                            </condition>
+                            <widgets>
+                                <screenlet title="${uiLabelMap.PartyAddToRole}">
+                                    <include-form name="AddPartyRole" location="component://party/webapp/partymgr/party/PartyForms.xml"/>
+                                </screenlet>
+                            </widgets>
+                        </section>
+                        <section>
+                            <condition>
+                               <if-has-permission permission="PARTYMGR" action="_CREATE"/>
+                            </condition>
+                            <widgets>
+                                <screenlet title="${uiLabelMap.PartyNewRoleType}">
+                                    <include-form name="AddRoleType" location="component://party/webapp/partymgr/party/PartyForms.xml"/>
+                                </screenlet>
+                            </widgets>
+                        </section>
                     </decorator-section>
                 </decorator-screen>
             </widgets>