Author: jnicolas
Date: Tue Jul 31 14:11:23 2018 New Revision: 1837150 URL: http://svn.apache.org/viewvc?rev=1837150&view=rev Log: Fixed: Unable to create new facility when DB has no facility OFBIZ-10501 Some mistake in facility screens design, I don't know why it doesn't respect OFBiz screen list standard. I only fixed the problem with the creation button, some flying condition and add a new menu action for facility Thanks: to Gil PORTENSEIGNE for is help :) Modified: ofbiz/ofbiz-framework/trunk/applications/product/widget/facility/CommonScreens.xml ofbiz/ofbiz-framework/trunk/applications/product/widget/facility/FacilityMenus.xml ofbiz/ofbiz-framework/trunk/applications/product/widget/facility/FacilityScreens.xml Modified: ofbiz/ofbiz-framework/trunk/applications/product/widget/facility/CommonScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/product/widget/facility/CommonScreens.xml?rev=1837150&r1=1837149&r2=1837150&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/applications/product/widget/facility/CommonScreens.xml (original) +++ ofbiz/ofbiz-framework/trunk/applications/product/widget/facility/CommonScreens.xml Tue Jul 31 14:11:23 2018 @@ -79,11 +79,6 @@ under the License. <label style="h3">${uiLabelMap.ProductErrorFacilityIdNotFound}</label> </fail-widgets> </section> - <section> - <condition> - <if-service-permission service-name="facilityGenericPermission" main-action="CREATE"/> - </condition> - </section> </widgets> <fail-widgets> <label style="h3">${uiLabelMap.ProductFacilityViewPermissionError}</label> @@ -92,15 +87,11 @@ under the License. </decorator-section> <decorator-section name="body"> <section> - <widgets> - <container style="button-bar"><link target="EditFacility" text="${uiLabelMap.ProductCreateNewFacility}" style="buttontext"/></container> - </widgets> - </section> - <section> <condition> <if-service-permission service-name="facilityGenericPermission" main-action="VIEW"/> </condition> <widgets> + <include-menu name="FacilityActionBar" location="component://product/widget/facility/FacilityMenus.xml"/> <section> <condition> <or> Modified: ofbiz/ofbiz-framework/trunk/applications/product/widget/facility/FacilityMenus.xml URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/product/widget/facility/FacilityMenus.xml?rev=1837150&r1=1837149&r2=1837150&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/applications/product/widget/facility/FacilityMenus.xml (original) +++ ofbiz/ofbiz-framework/trunk/applications/product/widget/facility/FacilityMenus.xml Tue Jul 31 14:11:23 2018 @@ -42,6 +42,24 @@ under the License. </menu-item> </menu> + <menu name="FacilityActionBar" menu-container-style="button-bar button-style-2" default-selected-style="selected"> + <menu-item name="createNewFacility" title="${uiLabelMap.ProductCreateNewFacility}"> + <condition> + <if-service-permission service-name="facilityGenericPermission" main-action="CREATE"/> + </condition> + <link target="EditFacility" text="${uiLabelMap.ProductCreateNewFacility}" style="buttontext create"/> + </menu-item> + <menu-item name="calendar" title="${uiLabelMap.CommonViewCalendar}"> + <condition> + <not><if-empty field="facility"/></not> + </condition> + <link target="/workeffort/control/calendar" text="${uiLabelMap.CommonViewCalendar}" url-mode="inter-app"> + <parameter param-name="facilityId"/> + <parameter param-name="externalLoginKey" from-field="parameters.externalLoginKey"/> + </link> + </menu-item> + </menu> + <menu name="FacilityTabBar" extends="CommonTabBarMenu" extends-resource="component://common/widget/CommonMenus.xml" default-menu-item-name="EditFacility"> <menu-item name="EditFacility" title="${uiLabelMap.ProductFacility}"> Modified: ofbiz/ofbiz-framework/trunk/applications/product/widget/facility/FacilityScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/product/widget/facility/FacilityScreens.xml?rev=1837150&r1=1837149&r2=1837150&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/applications/product/widget/facility/FacilityScreens.xml (original) +++ ofbiz/ofbiz-framework/trunk/applications/product/widget/facility/FacilityScreens.xml Tue Jul 31 14:11:23 2018 @@ -51,17 +51,12 @@ under the License. </condition> <widgets> <include-menu name="FacilityTabBar" location="component://product/widget/facility/FacilityMenus.xml"/> + <include-menu name="FacilityActionBar" location="component://product/widget/facility/FacilityMenus.xml"/> <section> <condition> <not><if-empty field="facilityId"/></not> </condition> <widgets> - <container style="button-bar"> - <link target="/workeffort/control/calendar" text="${uiLabelMap.CommonViewCalendar}" style="buttontext" url-mode="inter-app"> - <parameter param-name="facilityId"/> - <parameter param-name="externalLoginKey" from-field="parameters.externalLoginKey"/> - </link> - </container> <label style="h1">${uiLabelMap.ProductEditFacility} ${facility.facilityName} [${facilityId}]</label> <platform-specific><html><html-template location="component://product/template/facility/EditFacility.ftl"/></html></platform-specific> </widgets> @@ -82,6 +77,7 @@ under the License. <if-compare field="showScreen" value="ten" operator="equals"/> </condition> <widgets> + <include-menu name="FacilityActionBar" location="component://product/widget/facility/FacilityMenus.xml"/> <label text="${uiLabelMap.FacilitySelection}" style="h1"/> <screenlet> <include-form name="FindFacility10" location="component://product/widget/facility/FacilityForms.xml"/> @@ -93,6 +89,7 @@ under the License. <if-compare field="showScreen" value="more" operator="equals"/> </condition> <widgets> + <include-menu name="FacilityActionBar" location="component://product/widget/facility/FacilityMenus.xml"/> <decorator-screen name="FindScreenDecorator" location="component://common/widget/CommonScreens.xml"> <decorator-section name="search-options"> <include-form name="FindFacilityOptions" location="component://product/widget/facility/FacilityForms.xml"/> @@ -161,12 +158,6 @@ under the License. <container style="page-title"> <label>${uiLabelMap.ProductEditFacility} ${facility.facilityName} [${facilityId}]</label> </container> - <container style="button-bar button-style-1"> - <link target="/workeffort/control/calendar" text="${uiLabelMap.CommonViewCalendar}" url-mode="inter-app"> - <parameter param-name="facilityId"/> - <parameter param-name="externalLoginKey" from-field="parameters.externalLoginKey"/> - </link> - </container> <platform-specific><html><html-template location="component://product/template/facility/EditFacility.ftl"/></html></platform-specific> </widgets> </section> |
Free forum by Nabble | Edit this page |