Author: jacopoc
Date: Wed Jun 27 23:38:01 2007 New Revision: 551467 URL: http://svn.apache.org/viewvc?view=rev&rev=551467 Log: Applied patch (with some minor changes) from Mario Cappellato (OFBIZ-1049) to convert the edit facility groups to the widgets. Removed: ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/facility/EditFacilityGroups.bsh ofbiz/trunk/applications/product/webapp/facility/facility/EditFacilityGroups.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=551467&r1=551466&r2=551467 ============================================================================== --- ofbiz/trunk/applications/product/webapp/facility/facility/FacilityForms.xml (original) +++ ofbiz/trunk/applications/product/webapp/facility/facility/FacilityForms.xml Wed Jun 27 23:38:01 2007 @@ -289,4 +289,31 @@ <submit/> </field> </form> + <!-- Forms of FacilityGroups --> + <form name="EditFacilityGroups" type="list" target="updateGroupToFacility" title="" list-name="facilityGroupMembers"> + <auto-fields-entity entity-name="FacilityGroupMember"/> + <field name="facilityId"><hidden/></field> + <field name="facilityGroupId"> + <display-entity entity-name="FacilityGroup" key-field-name="facilityGroupId" description="${facilityGroupName}"> + <sub-hyperlink target="EditFacilityGroup?facilityGroupId=${facilityGroupId}" description="[${facilityGroupId}]"/> + </display-entity> + </field> + <field name="fromDate"><display/></field> + <field name="submitButton" title="${uiLabelMap.CommonUpdate}"><submit button-type="button"/></field> + <field name="deleteLink" title="" widget-style="buttontext"> + <hyperlink target="removeGroupFromFacility?facilityId=${facilityId}&facilityGroupId=${facilityGroupId}&fromDate=${fromDate}" + description="${uiLabelMap.CommonDelete}" also-hidden="false"/> + </field> + </form> + <form name="addGroupToFacility" type="single" target="addGroupToFacility" title=""> + <auto-fields-entity entity-name="FacilityGroupMember"/> + <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> + </drop-down> + </field> + <field name="submitButton" title="${uiLabelMap.CommonSubmit}"><submit button-type="button"/></field> + </form> </forms> 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=551467&r1=551466&r2=551467 ============================================================================== --- ofbiz/trunk/applications/product/widget/facility/FacilityScreens.xml (original) +++ ofbiz/trunk/applications/product/widget/facility/FacilityScreens.xml Wed Jun 27 23:38:01 2007 @@ -370,15 +370,24 @@ <set field="titleProperty" value="PageTitleEditFacilityGroups"/> <set field="headerItem" value="facility"/> <set field="tabButtonItem" value="EditFacilityGroups"/> - - <script location="component://product/webapp/facility/WEB-INF/actions/facility/EditFacilityGroups.bsh"/> + <set field="facilityId" from-field="parameters.facilityId"/> + <set field="facilityGroupId" from-field="parameters.facilityGroupId"/> + <set field="orderByList[]" value="sequenceNum"/> + <entity-one entity-name="Facility" value-name="facility"/> + <get-related value-name="facility" relation-name="FacilityGroupMember" list-name="facilityGroupMembers" 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/EditFacilityGroups.ftl"/></html> - </platform-specific> + <container> + <label style="head1">${uiLabelMap.ProductGroupsFor} ${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.ProductGroupMemberMaintenance}</label></container> + <include-form name="EditFacilityGroups" location="component://product/webapp/facility/facility/FacilityForms.xml"/> + <container><label style="head2">${uiLabelMap.ProductAddFacilityGroupMember}</label></container> + <include-form name="addGroupToFacility" location="component://product/webapp/facility/facility/FacilityForms.xml"/> </decorator-section> </decorator-screen> </widgets> |
Free forum by Nabble | Edit this page |