Author: adrianc
Date: Tue May 20 15:41:29 2008 New Revision: 658472 URL: http://svn.apache.org/viewvc?rev=658472&view=rev Log: Improved Find Facility screen. Follows layout best practices by using the Find screen decorator, adds search options, uses Ajax for list navigation, uses permission service checking so the screen can be reused. Modified: ofbiz/trunk/applications/product/config/ProductUiLabels.xml ofbiz/trunk/applications/product/webapp/facility/WEB-INF/controller.xml ofbiz/trunk/applications/product/webapp/facility/facility/FacilityForms.xml ofbiz/trunk/applications/product/webapp/facility/lookup/FieldLookupForms.xml ofbiz/trunk/applications/product/widget/facility/FacilityScreens.xml Modified: ofbiz/trunk/applications/product/config/ProductUiLabels.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/config/ProductUiLabels.xml?rev=658472&r1=658471&r2=658472&view=diff ============================================================================== --- ofbiz/trunk/applications/product/config/ProductUiLabels.xml (original) +++ ofbiz/trunk/applications/product/config/ProductUiLabels.xml Tue May 20 15:41:29 2008 @@ -1,4 +1,4 @@ -<?xml version="1.0" encoding="UTF-8"?> +<?xml version="1.0" encoding="UTF-8"?> <!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file @@ -9560,6 +9560,16 @@ <value xml:lang="ru">ÐÑÑилÑÑÑовано даÑам пÑекÑаÑÐµÐ½Ð¸Ñ Ð¿Ñодаж</value> <value xml:lang="th">Filtered by Introduction and Sales Discontinuation Dates</value> </property> + <property key="ProductFindFacilities"> + <value xml:lang="en">Find Facilities</value> + <value xml:lang="es">Lista de Almacenes</value> + <value xml:lang="fr">Liste des lieux de stockage</value> + <value xml:lang="it">Lista Stabilimenti</value> + <value xml:lang="ro">Lista Compartimente</value> + <value xml:lang="ru">СпиÑок обÑекÑов</value> + <value xml:lang="th">รายà¸à¸²à¸£à¸à¸¥à¸±à¸à¸ªà¸´à¸à¸à¹à¸²</value> + <value xml:lang="zh">åºæå表</value> + </property> <property key="ProductFindLocation"> <value xml:lang="en">Find Location</value> <value xml:lang="es">Buscar sitio</value> Modified: ofbiz/trunk/applications/product/webapp/facility/WEB-INF/controller.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/facility/WEB-INF/controller.xml?rev=658472&r1=658471&r2=658472&view=diff ============================================================================== --- ofbiz/trunk/applications/product/webapp/facility/WEB-INF/controller.xml (original) +++ ofbiz/trunk/applications/product/webapp/facility/WEB-INF/controller.xml Tue May 20 15:41:29 2008 @@ -63,7 +63,14 @@ <security https="true" auth="true"/> <response name="success" type="view" value="FindFacility"/> </request-map> - + <request-map uri="FacilitySearchOptions"> + <security https="true" auth="false"/> + <response name="success" type="view" value="FacilitySearchOptions"/> + </request-map> + <request-map uri="FacilitySearchResults"> + <security https="true" auth="false"/> + <response name="success" type="view" value="FacilitySearchResults"/> + </request-map> <request-map uri="EditFacility"> <security https="true" auth="true"/> <response name="success" type="view" value="EditFacility"/> @@ -1100,6 +1107,8 @@ <view-map name="main" type="screen" page="component://product/widget/facility/FacilityScreens.xml#FindFacility"/> <view-map name="FindFacility" type="screen" page="component://product/widget/facility/FacilityScreens.xml#FindFacility"/> + <view-map name="FacilitySearchOptions" type="screen" page="component://product/widget/facility/FacilityScreens.xml#FacilitySearchOptions"/> + <view-map name="FacilitySearchResults" type="screen" page="component://product/widget/facility/FacilityScreens.xml#FacilitySearchResults"/> <view-map name="EditFacility" type="screen" page="component://product/widget/facility/FacilityScreens.xml#EditFacility"/> <view-map name="FindFacilityTransfers" type="screen" page="component://product/widget/facility/FacilityScreens.xml#FindFacilityTransfers"/> <view-map name="FindFacilityLocation" type="screen" page="component://product/widget/facility/FacilityScreens.xml#FindFacilityLocation"/> 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?rev=658472&r1=658471&r2=658472&view=diff ============================================================================== --- ofbiz/trunk/applications/product/webapp/facility/facility/FacilityForms.xml (original) +++ ofbiz/trunk/applications/product/webapp/facility/facility/FacilityForms.xml Tue May 20 15:41:29 2008 @@ -20,9 +20,15 @@ <forms xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-form.xsd"> - <form name="FindFacility" type="list" list-name="facilities" - odd-row-style="alternate-row" default-table-style="basic-table hover-bar"> - <field name="facilityId" widget-style="buttontext"> + <form name="FindFacility" type="list" list-name="listIt" paginate-target="FindFacility" view-size="3" + odd-row-style="alternate-row" header-row-style="header-row-2" default-table-style="basic-table hover-bar"> + <actions> + <service service-name="performFind" result-map-name="result" result-map-list-name="listIt"> + <field-map field-name="inputFields" env-name="parameters"/> + <field-map field-name="entityName" value="Facility"/> + </service> + </actions> + <field name="facilityId"> <hyperlink target="EditFacility?facilityId=${facilityId}" description="${facilityId}"/> </field> <field name="facilityName"><display/></field> @@ -32,9 +38,15 @@ <field name="ownerPartyId" title="${uiLabelMap.ProductFacilityOwner}"><display/></field> <field name="squareFootage" title="${uiLabelMap.ProductSqFt}"><display/></field> <field name="description"><display/></field> +<!-- Is this needed? It duplicates the first field. <field name="editLink" widget-style="buttontext" title="${uiLabelMap.CommonEmptyHeader}"> <hyperlink target="EditFacility?facilityId=${facilityId}" description="${uiLabelMap.CommonEdit}"/> </field> +--> + <on-event-update-area event-type="paginate" area-id="search-results" area-target="FacilitySearchResults"/> + </form> + <form name="FindFacilityOptions" extends="lookupFacility" extends-resource="component://product/webapp/facility/lookup/FieldLookupForms.xml" target="FindFacility"> + <field name="submitButton" title="${uiLabelMap.CommonFind}"><submit button-type="button"/></field> </form> <form name="SearchInventoryItemsParams" type="single" target="EditFacilityInventoryItems" header-row-style="header-row" default-table-style="basic-table"> Modified: ofbiz/trunk/applications/product/webapp/facility/lookup/FieldLookupForms.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/facility/lookup/FieldLookupForms.xml?rev=658472&r1=658471&r2=658472&view=diff ============================================================================== --- ofbiz/trunk/applications/product/webapp/facility/lookup/FieldLookupForms.xml (original) +++ ofbiz/trunk/applications/product/webapp/facility/lookup/FieldLookupForms.xml Tue May 20 15:41:29 2008 @@ -22,7 +22,7 @@ xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-form.xsd"> <form name="lookupFacility" target="LookupFacility" title="" type="single" header-row-style="header-row" default-table-style="basic-table"> - <auto-fields-entity entity-name="Facility" default-field-type="hidden"/> + <!--<auto-fields-entity entity-name="Facility" default-field-type="hidden"/> --> <field name="facilityId"><text-find/></field> <field name="facilityName"><text-find/></field> <field name="facilityTypeId"> @@ -128,4 +128,4 @@ <field name="partyIdFrom" title="${uiLabelMap.PartyPartyFrom}"><display-entity entity-name="PartyNameView" key-field-name="partyId" description="${groupName}${lastName}[${partyId}]"/></field> <field name="partyIdTo" title="${uiLabelMap.PartyPartyTo}"><display-entity entity-name="PartyNameView" key-field-name="partyId" description="${groupName}${lastName}[${partyId}]"/></field> </form> -</forms> \ No newline at end of file +</forms> Modified: ofbiz/trunk/applications/product/widget/facility/FacilityScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/widget/facility/FacilityScreens.xml?rev=658472&r1=658471&r2=658472&view=diff ============================================================================== --- ofbiz/trunk/applications/product/widget/facility/FacilityScreens.xml (original) +++ ofbiz/trunk/applications/product/widget/facility/FacilityScreens.xml Tue May 20 15:41:29 2008 @@ -23,35 +23,73 @@ <screen name="FindFacility"> <section> <actions> - <set field="titleProperty" value="ProductFacilitiesList"/> + <set field="titleProperty" value="ProductFindFacilities"/> <set field="headerItem" value="facility"/> - <entity-condition list-name="facilities" entity-name="Facility"/> </actions> <widgets> <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}"> <decorator-section name="body"> - <container style="screenlet"> - <container style="screenlet-title-bar"> - <container style="h3"> - <label text="${uiLabelMap.ProductFacilitiesList}"/> - </container> - </container> - <container> - <link style="buttontext" target="EditFacility" text="${uiLabelMap.ProductCreateNewFacility}"/> - </container> - <container style="screenlet-body"> - <section> - <widgets> - <include-form name="FindFacility" location="component://product/webapp/facility/facility/FacilityForms.xml"/> - </widgets> - </section> - </container> - </container> + <section> + <condition> + <if-service-permission service-name="facilityGenericPermission" main-action="VIEW"/> + </condition> + <widgets> + <decorator-screen name="FindScreenDecorator" location="component://common/widget/CommonScreens.xml"> + <decorator-section name="menu-bar"> + <section> + <condition> + <if-service-permission service-name="facilityGenericPermission" main-action="CREATE"/> + </condition> + <widgets> + <container style="button-bar"><link target="EditFacility" text="${uiLabelMap.ProductCreateNewFacility}" style="buttontext"/></container> + </widgets> + </section> + </decorator-section> + <decorator-section name="search-options"> + <include-screen name="FacilitySearchOptions"/> + </decorator-section> + <decorator-section name="search-results"> + <include-screen name="FacilitySearchResults"/> + </decorator-section> + </decorator-screen> + </widgets> + <fail-widgets> + <label style="h3">${uiLabelMap.ProductFacilityViewPermissionError}</label> + </fail-widgets> + </section> </decorator-section> </decorator-screen> </widgets> </section> </screen> + <screen name="FacilitySearchOptions"> + <section> + <condition> + <if-service-permission service-name="facilityGenericPermission" main-action="VIEW"/> + </condition> + <actions> + <property-map resource="ProductUiLabels" map-name="uiLabelMap" global="true"/> + <property-map resource="CommonUiLabels" map-name="uiLabelMap" global="true"/> + </actions> + <widgets> + <include-form name="FindFacilityOptions" location="component://product/webapp/facility/facility/FacilityForms.xml"/> + </widgets> + </section> + </screen> + <screen name="FacilitySearchResults"> + <section> + <condition> + <if-service-permission service-name="facilityGenericPermission" main-action="VIEW"/> + </condition> + <actions> + <property-map resource="ProductUiLabels" map-name="uiLabelMap" global="true"/> + <property-map resource="CommonUiLabels" map-name="uiLabelMap" global="true"/> + </actions> + <widgets> + <include-form name="FindFacility" location="component://product/webapp/facility/facility/FacilityForms.xml"/> + </widgets> + </section> + </screen> <screen name="EditFacility"> <section> <actions> |
Free forum by Nabble | Edit this page |