svn commit: r567371 - in /ofbiz/trunk/applications/product: webapp/facility/WEB-INF/actions/facility/EditFacilityRoles.bsh webapp/facility/facility/EditFacilityRoles.ftl webapp/facility/facility/FacilityForms.xml widget/facility/FacilityScreens.xml

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

svn commit: r567371 - in /ofbiz/trunk/applications/product: webapp/facility/WEB-INF/actions/facility/EditFacilityRoles.bsh webapp/facility/facility/EditFacilityRoles.ftl webapp/facility/facility/FacilityForms.xml widget/facility/FacilityScreens.xml

jacopoc
Author: jacopoc
Date: Sun Aug 19 01:27:43 2007
New Revision: 567371

URL: http://svn.apache.org/viewvc?view=rev&rev=567371
Log:
Edit facility roles screen migrated from  ftl/bsh to widgets. Thanks to Mario Cappellato for the patch OFBIZ-1049.

Removed:
    ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/facility/EditFacilityRoles.bsh
    ofbiz/trunk/applications/product/webapp/facility/facility/EditFacilityRoles.ftl
Modified:
    ofbiz/trunk/applications/product/webapp/facility/facility/FacilityForms.xml
    ofbiz/trunk/applications/product/widget/facility/FacilityScreens.xml

Modified: ofbiz/trunk/applications/product/webapp/facility/facility/FacilityForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/facility/facility/FacilityForms.xml?view=diff&rev=567371&r1=567370&r2=567371
==============================================================================
--- ofbiz/trunk/applications/product/webapp/facility/facility/FacilityForms.xml (original)
+++ ofbiz/trunk/applications/product/webapp/facility/facility/FacilityForms.xml Sun Aug 19 01:27:43 2007
@@ -310,8 +310,35 @@
         <field name="facilityId"><hidden/></field>
         <field name="facilityGroupId">
             <drop-down allow-empty="true">
-                <entity-options entity-name="FacilityGroup" key-field-name="facilityGroupId" description="${facilityGroupName}">
-                </entity-options>
+                <entity-options entity-name="FacilityGroup" key-field-name="facilityGroupId" description="${facilityGroupName}"/>
+            </drop-down>
+        </field>
+        <field name="submitButton" title="${uiLabelMap.CommonSubmit}"><submit button-type="button"/></field>
+    </form>
+    <!-- FacilityRoles -->
+    <form name="EditFacilityRoles" type="list" paginate-target="EditFacilityRoles" title="" list-name="facilityRoles">
+        <auto-fields-entity entity-name="FacilityRole" default-field-type="display"/>
+        <field name="facilityId"><hidden/></field>
+        <field name="partyId">
+            <display-entity description="${groupName} ${firstName} ${lastName} [${partyId}]" entity-name="PartyNameView"/>
+        </field>
+        <field name="roleTypeId">
+            <display-entity entity-name="RoleType" description="${description}"/>
+        </field>
+        <field name="deleteLink" title="${uiLabelMap.CommonEmptyHeader}" widget-style="buttontext">
+            <hyperlink target="removePartyFromFacility?facilityId=${facilityId}&amp;partyId=${partyId}&amp;roleTypeId=${roleTypeId}"
+                description="${uiLabelMap.CommonDelete}" also-hidden="false"/>
+        </field>
+    </form>
+    <form name="AddPartyToFacility" type="single" target="addPartyToFacility" title="">
+        <auto-fields-entity entity-name="FacilityRole"/>
+        <field name="facilityId"><hidden/></field>
+        <field name="partyId">
+            <lookup target-form-name="LookupPartyName"/>
+        </field>
+        <field name="roleTypeId">
+            <drop-down allow-empty="true">
+                <entity-options entity-name="RoleType" description="${description}"/>
             </drop-down>
         </field>
         <field name="submitButton" title="${uiLabelMap.CommonSubmit}"><submit button-type="button"/></field>

Modified: ofbiz/trunk/applications/product/widget/facility/FacilityScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/widget/facility/FacilityScreens.xml?view=diff&rev=567371&r1=567370&r2=567371
==============================================================================
--- ofbiz/trunk/applications/product/widget/facility/FacilityScreens.xml (original)
+++ ofbiz/trunk/applications/product/widget/facility/FacilityScreens.xml Sun Aug 19 01:27:43 2007
@@ -400,18 +400,29 @@
                 <set field="headerItem" value="facility"/>
                 <set field="tabButtonItem" value="EditFacilityRoles"/>
 
-                <script location="component://product/webapp/facility/WEB-INF/actions/facility/EditFacilityRoles.bsh"/>
+                <set field="facilityId" from-field="parameters.facilityId"/>
+                <set field="partyId" from-field="parameters.partyId"/>
+                <set field="roleTypeId" from-field="parameters.roleTypeId"/>
+                <set field="orderByList[]" value="partyId"/>
+                <entity-one entity-name="Facility" value-name="facility"/>
+                <get-related value-name="facility" relation-name="FacilityRole" list-name="facilityRoles" order-by-list-name="orderByList"/>
             </actions>
             <widgets>
                 <decorator-screen name="CommonFacilityDecorator" location="${parameters.commonFacilityDecoratorLocation}">
                     <decorator-section name="body">
-                        <platform-specific>
-                            <html><html-template location="component://product/webapp/facility/facility/EditFacilityRoles.ftl"/></html>
-                        </platform-specific>
+                        <container>
+                            <label style="head1">${uiLabelMap.PartyRoleFor} ${uiLabelMap.CommonFor}:</label>
+                            <label style="head1">${facility.facilityName} [${uiLabelMap.CommonId}:${facilityId}]</label>
+                        </container>
+                        <container><link target="EditFacility" text="${uiLabelMap.ProductNewFacility}" style="buttontext"/></container>
+                        <container><label style="head2">${uiLabelMap.ProductFacilityRoleMemberMaintenance}</label></container>
+                        <include-form name="EditFacilityRoles" location="component://product/webapp/facility/facility/FacilityForms.xml"/>
+                        <container><label style="head2">${uiLabelMap.ProductAddFacilityPartyRole}</label></container>
+                        <include-form name="AddPartyToFacility" location="component://product/webapp/facility/facility/FacilityForms.xml"/>
                     </decorator-section>
                 </decorator-screen>
             </widgets>
-        </section>
+         </section>
     </screen>
     <screen name="ViewContactMechs">
         <section>