Author: jacopoc
Date: Sun Jun 17 01:37:10 2007 New Revision: 548025 URL: http://svn.apache.org/viewvc?view=rev&rev=548025 Log: Facility groups screens migration to widgets; thanks to Mario Cappellato for the patch (OFBIZ-1047) Removed: ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/group/ ofbiz/trunk/applications/product/webapp/facility/group/EditFacilityGroupMembers.ftl ofbiz/trunk/applications/product/webapp/facility/group/EditFacilityGroupRoles.ftl ofbiz/trunk/applications/product/webapp/facility/group/EditFacilityGroupRollup.ftl Modified: ofbiz/trunk/applications/product/config/ProductUiLabels.properties ofbiz/trunk/applications/product/webapp/facility/group/FacilityGroupForms.xml ofbiz/trunk/applications/product/widget/facility/FacilityGroupScreens.xml Modified: ofbiz/trunk/applications/product/config/ProductUiLabels.properties URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/config/ProductUiLabels.properties?view=diff&rev=548025&r1=548024&r2=548025 ============================================================================== --- ofbiz/trunk/applications/product/config/ProductUiLabels.properties (original) +++ ofbiz/trunk/applications/product/config/ProductUiLabels.properties Sun Jun 17 01:37:10 2007 @@ -256,6 +256,7 @@ ProductAddFacility=Add Facility ProductAddFacilityGroupMember=Add FacilityGroupMember ProductAddFacilityGroupPartyRole=Add FacilityGroup Party Role +ProductMaintenanceFacilityGroupPartyRole=Maintenance FacilityGroup Party Role ProductAddFacilityPartyRole=Add Facility Party Role ProductAddFromItem=Add From Item ProductAddGlAccount=Add GL Account Modified: ofbiz/trunk/applications/product/webapp/facility/group/FacilityGroupForms.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/facility/group/FacilityGroupForms.xml?view=diff&rev=548025&r1=548024&r2=548025 ============================================================================== --- ofbiz/trunk/applications/product/webapp/facility/group/FacilityGroupForms.xml (original) +++ ofbiz/trunk/applications/product/webapp/facility/group/FacilityGroupForms.xml Sun Jun 17 01:37:10 2007 @@ -20,7 +20,7 @@ <forms xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-form.xsd"> - <!-- Forms for FacilityGroup --> + <!-- Forms for FacilityGroups --> <form name="EditFacilityGroup" type="single" target="updateFacilityGroup" title="" default-map-name="facilityGroup"> <alt-target use-when="facilityGroup==null" target="createFacilityGroup"/> <auto-fields-service service-name="updateFacilityGroup"/> @@ -39,5 +39,118 @@ </drop-down> </field> <field name="submitButton" title="${uiLabelMap.CommonSubmit}"><submit button-type="button"/></field> + </form> + <form name="UpdateFacilityGroupRollupTo" type="list" target="updateFacilityGroupToGroup" title="" list-name="currentGroupRollups"> + <auto-fields-service service-name="updateFacilityGroupToGroup"/> + <field name="showFacilityGroupId"><hidden value="${facilityGroupId}"/></field> + <field name="facilityGroupId"><hidden value="${facilityGroupId}"/></field> + <field name="parentFacilityGroupId"> + <display-entity entity-name="FacilityGroup" key-field-name="facilityGroupId" description="${facilityGroupName}"> + <sub-hyperlink target="EditFacilityGroup?facilityGroupId=${parentFacilityGroupId}" description="[${parentFacilityGroupId}]"/> + </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="removeFacilityGroupFromGroup?showFacilityGroupId=${facilityGroupId}&facilityGroupId=${facilityGroupId}&parentFacilityGroupId=${parentFacilityGroupId}&fromDate=${fromDate}" + description="${uiLabelMap.CommonDelete}" also-hidden="false"/> + </field> + </form> + <form name="AddFacilityGroupRollupFrom" target="addFacilityGroupToGroup" title="" type="single"> + <auto-fields-service service-name="addFacilityGroupToGroup"/> + <field name="facilityGroupId"><hidden/></field> + <field name="parentFacilityGroupId"> + <drop-down> + <entity-options entity-name="FacilityGroup" key-field-name="facilityGroupId" description="${facilityGroupName} [${facilityGroupId}]"> + <entity-order-by field-name="facilityGroupName"/> + </entity-options> + </drop-down> + </field> + <field name="submitButton" title="${uiLabelMap.CommonAdd}"><submit button-type="button"/></field> + </form> + <form name="UpdateFacilityGroupRollupFrom" type="list" target="updateFacilityGroupToGroup" title="" list-name="parentGroupRollups"> + <auto-fields-service service-name="updateFacilityGroupToGroup"/> + <field name="showFacilityGroupId"><hidden value="${parentFacilityGroupId}"/></field> + <field name="parentFacilityGroupId"><hidden/></field> + <field name="facilityGroupId"> + <display-entity entity-name="FacilityGroup" 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="removeFacilityGroupFromGroup?showFacilityGroupId=${parentFacilityGroupId}&facilityGroupId=${facilityGroupId}&parentFacilityGroupId=${parentFacilityGroupId}&fromDate=${fromDate}" + description="${uiLabelMap.CommonDelete}" also-hidden="false"/> + </field> + </form> + <form name="AddFacilityGroupRollupTo" target="addFacilityGroupToGroup" title="" type="single"> + <auto-fields-service service-name="addFacilityGroupToGroup"/> + <field name="showFacilityGroupId"><hidden value="${facilityGroupId}"/></field> + <field name="parentFacilityGroupId"><hidden value="${facilityGroupId}"/></field> + <field name="facilityGroupId"> + <drop-down> + <entity-options entity-name="FacilityGroup" description="${facilityGroupName} [${facilityGroupId}]"> + <entity-order-by field-name="facilityGroupName"/> + </entity-options> + </drop-down> + </field> + <field name="submitButton" title="${uiLabelMap.CommonAdd}"><submit button-type="button"/></field> + </form> + <form name="UpdateFacilityGroupMembers" type="list" target="updateFacilityToGroup" title="" list-name="facilityGroupMembers"> + <auto-fields-service service-name="updateFacilityToGroup"/> + <field name="facilityGroupId"><hidden value="${facilityGroupId}"/></field> + <field name="facilityId"> + <display-entity entity-name="Facility" key-field-name="facilityId" description="${facilityName}"> + <sub-hyperlink target="EditFacilityGroup?facilityId=${facilityId}" description="[${facilityId}]"/> + </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="removeFacilityFromGroup?facilityGroupId=${facilityGroupId}&facilityId=${facilityId}&fromDate=${fromDate}" + description="${uiLabelMap.CommonDelete}" also-hidden="false"/> + </field> + </form> + <form name="AddFacilityGroupMember" target="addFacilityToGroup" title="" type="single"> + <auto-fields-service service-name="addFacilityToGroup"/> + <field name="facilityGroupId"><hidden/></field> + <field name="facilityId"> + <drop-down> + <entity-options entity-name="Facility" description="${facilityName} [${facilityId}]"> + <entity-order-by field-name="facilityName"/> + </entity-options> + </drop-down> + </field> + <field name="submitButton" title="${uiLabelMap.CommonAdd}"><submit button-type="button"/></field> + </form> + <form name="UpdateFacilityGroupRoles" type="list" target="removePartyFromFacilityGroup" title="" list-name="facilityRoles"> + <auto-fields-service service-name="removePartyFromFacilityGroup"/> + <field name="facilityGroupId"><hidden value="${facilityGroupId}"/></field> + <field name="partyId"> + <display-entity entity-name="Party" key-field-name="partyId" description="${partyId}"> + <sub-hyperlink target="viewProfile?partyId=${partyId}" description="[${partyId}]"/> + </display-entity> + </field> + <field name="roleTypeId"> + <display-entity entity-name="RoleType" key-field-name="roleTypeId" description="${description}"/> + </field> + <field name="deleteLink" title="" widget-style="buttontext"> + <hyperlink target="removePartyFromFacilityGroup?facilityGroupId=${facilityGroupId}&partyId=${partyId}&roleTypeId=${roleTypeId}" + description="${uiLabelMap.CommonDelete}" also-hidden="false"/> + </field> + </form> + <form name="AddFacilityGroupRole" target="addPartyToFacilityGroup" title="" type="single"> + <auto-fields-service service-name="addPartyToFacilityGroup"/> + <field name="facilityGroupId"><hidden/></field> + <field name="partyId"><lookup target-form-name="LookupPartyName"/></field> + <field name="roleTypeId"> + <drop-down> + <entity-options entity-name="RoleType" description="${description} [${roleTypeId}]"> + <entity-order-by field-name="description"/> + </entity-options> + </drop-down> + </field> + <field name="submitButton" title="${uiLabelMap.CommonAdd}"><submit button-type="button"/></field> </form> </forms> Modified: ofbiz/trunk/applications/product/widget/facility/FacilityGroupScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/widget/facility/FacilityGroupScreens.xml?view=diff&rev=548025&r1=548024&r2=548025 ============================================================================== --- ofbiz/trunk/applications/product/widget/facility/FacilityGroupScreens.xml (original) +++ ofbiz/trunk/applications/product/widget/facility/FacilityGroupScreens.xml Sun Jun 17 01:37:10 2007 @@ -95,15 +95,19 @@ <set field="titleProperty" value="PageTitleEditFacilityGroupMembers"/> <set field="headerItem" value="facilityGroup"/> <set field="tabButtonItem" value="EditFacilityGroupMembers"/> - - <script location="component://product/webapp/facility/WEB-INF/actions/group/EditFacilityGroupMembers.bsh"/> + <entity-one entity-name="FacilityGroup" value-name="facilityGroup"/> + <set field="orderByList[]" value="sequenceNum"/> + <get-related value-name="facilityGroup" relation-name="FacilityGroupMember" list-name="facilityGroupMembers" order-by-list-name="orderByList"/> </actions> <widgets> <decorator-screen name="CommonFacilityGroupDecorator"> <decorator-section name="body"> - <platform-specific> - <html><html-template location="component://product/webapp/facility/group/EditFacilityGroupMembers.ftl"/></html> - </platform-specific> + <container><label style="head1">${uiLabelMap.ProductFacilities} ${uiLabelMap.CommonFor} ${facilityGroup.facilityGroupName} [${facilityGroup.facilityGroupId}]</label></container> + <container><link target="EditFacilityGroup" text="${uiLabelMap.ProductNewGroup}" style="buttontext"/></container> + <label style="head2">${uiLabelMap.ProductFacilityGroupMemberMaintenance}</label> + <include-form name="UpdateFacilityGroupMembers" location="component://product/webapp/facility/group/FacilityGroupForms.xml"/> + <label style="head2">${uiLabelMap.ProductAddFacilityGroupMember}</label> + <include-form name="AddFacilityGroupMember" location="component://product/webapp/facility/group/FacilityGroupForms.xml"/> </decorator-section> </decorator-screen> </widgets> @@ -115,15 +119,18 @@ <set field="titleProperty" value="PageTitleEditFacilityGroupRoles"/> <set field="headerItem" value="facilityGroup"/> <set field="tabButtonItem" value="EditFacilityGroupRoles"/> - - <script location="component://product/webapp/facility/WEB-INF/actions/group/EditFacilityGroupRoles.bsh"/> + <entity-one entity-name="FacilityGroup" value-name="facilityGroup"/> + <get-related value-name="facilityGroup" relation-name="FacilityGroupRole" list-name="facilityRoles"/> </actions> <widgets> <decorator-screen name="CommonFacilityGroupDecorator"> <decorator-section name="body"> - <platform-specific> - <html><html-template location="component://product/webapp/facility/group/EditFacilityGroupRoles.ftl"/></html> - </platform-specific> + <label style="head1">${uiLabelMap.PartyRoles} ${uiLabelMap.CommonFor} ${facilityGroup.facilityGroupName} [${facilityGroup.facilityGroupId}]</label> + <container><link target="EditFacilityGroup" text="${uiLabelMap.ProductNewGroup}" style="buttontext"/></container> + <label style="head2">${uiLabelMap.ProductMaintenanceFacilityGroupPartyRole}</label> + <include-form name="UpdateFacilityGroupRoles" location="component://product/webapp/facility/group/FacilityGroupForms.xml"/> + <label style="head2">${uiLabelMap.ProductAddFacilityGroupPartyRole}</label> + <include-form name="AddFacilityGroupRole" location="component://product/webapp/facility/group/FacilityGroupForms.xml"/> </decorator-section> </decorator-screen> </widgets> @@ -136,14 +143,23 @@ <set field="headerItem" value="facilityGroup"/> <set field="tabButtonItem" value="EditFacilityGroupRollup"/> - <script location="component://product/webapp/facility/WEB-INF/actions/group/EditFacilityGroupRollup.bsh"/> + <set field="parameters.facilityGroupId" from-field="parameters.showFacilityGroupId" default-value="${parameters.facilityGroupId}"/> + <entity-one entity-name="FacilityGroup" value-name="facilityGroup"/> + <get-related relation-name="ParentFacilityGroupRollup" value-name="facilityGroup" list-name="parentGroupRollups"/> + <get-related relation-name="CurrentFacilityGroupRollup" value-name="facilityGroup" list-name="currentGroupRollups"/> + <set field="facilityGroupId" from-field="facilityGroup.facilityGroupId"/> </actions> <widgets> <decorator-screen name="CommonFacilityGroupDecorator"> <decorator-section name="body"> - <platform-specific> - <html><html-template location="component://product/webapp/facility/group/EditFacilityGroupRollup.ftl"/></html> - </platform-specific> + <container><label style="head1">${uiLabelMap.ProductRollups} ${uiLabelMap.CommonFor} ${facilityGroup.facilityGroupName} [${facilityGroup.facilityGroupId}]</label></container> + <container><link target="EditFacilityGroup" text="${uiLabelMap.ProductNewGroup}" style="buttontext"/></container> + <container><label style="head2">${uiLabelMap.ProductFacilityGroupRollupParentGroups}</label></container> + <include-form name="UpdateFacilityGroupRollupTo" location="component://product/webapp/facility/group/FacilityGroupForms.xml"/> + <include-form name="AddFacilityGroupRollupFrom" location="component://product/webapp/facility/group/FacilityGroupForms.xml"/> + <container><label style="head2">${uiLabelMap.ProductGroupRollupChildGroups}</label></container> + <include-form name="UpdateFacilityGroupRollupFrom" location="component://product/webapp/facility/group/FacilityGroupForms.xml"/> + <include-form name="AddFacilityGroupRollupTo" location="component://product/webapp/facility/group/FacilityGroupForms.xml"/> </decorator-section> </decorator-screen> </widgets> |
Free forum by Nabble | Edit this page |