svn commit: r733630 - in /ofbiz/trunk/framework/common/widget: CommonMenus.xml CommonScreens.xml

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

svn commit: r733630 - in /ofbiz/trunk/framework/common/widget: CommonMenus.xml CommonScreens.xml

hansbak-2
Author: hansbak
Date: Sun Jan 11 21:58:35 2009
New Revision: 733630

URL: http://svn.apache.org/viewvc?rev=733630&view=rev
Log:
only show application buttons when logged in

Modified:
    ofbiz/trunk/framework/common/widget/CommonMenus.xml
    ofbiz/trunk/framework/common/widget/CommonScreens.xml

Modified: ofbiz/trunk/framework/common/widget/CommonMenus.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/widget/CommonMenus.xml?rev=733630&r1=733629&r2=733630&view=diff
==============================================================================
--- ofbiz/trunk/framework/common/widget/CommonMenus.xml (original)
+++ ofbiz/trunk/framework/common/widget/CommonMenus.xml Sun Jan 11 21:58:35 2009
@@ -19,10 +19,13 @@
 -->
 
 <menus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-menu.xsd">
-     <menu name="CommonAppBarMenu" default-menu-item-name="main" id="app-navigation" type="simple"
+    <menu name="CommonAppBarMenu" default-menu-item-name="main" id="app-navigation" type="simple" title="${applicationTitle}&amp;nbsp;"
         default-selected-style="selected" menu-container-style="button-bar tab-bar" selected-menuitem-context-field-name="headerItem">
-         <menu-item name="main" title="${uiLabelMap.CommonMain}"><link target="main"/></menu-item>
-         <menu-item name="Logout" title="${uiLabelMap.CommonLogout}" align-style="opposed">
+        <menu-item name="main" title="${uiLabelMap.CommonMain}">
+            <condition><not><if-empty field-name="userLogin"/></not></condition>
+            <link target="main"/>
+        </menu-item>
+        <menu-item name="Logout" title="${uiLabelMap.CommonLogout}" align-style="opposed">
              <condition><not><if-empty field-name="userLogin"/></not></condition>
              <link target="logout"/>
          </menu-item>

Modified: ofbiz/trunk/framework/common/widget/CommonScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/widget/CommonScreens.xml?rev=733630&r1=733629&r2=733630&view=diff
==============================================================================
--- ofbiz/trunk/framework/common/widget/CommonScreens.xml (original)
+++ ofbiz/trunk/framework/common/widget/CommonScreens.xml Sun Jan 11 21:58:35 2009
@@ -120,7 +120,7 @@
                 <set field="layoutSettings.javaScripts[]" value="/images/fieldlookup.js" global="true"/>
                 <set field="layoutSettings.javaScripts[]" value="/images/calendar_date_select.js" global="true"/>
                 <set field="layoutSettings.commonHeaderImageLinkUrl" from-field="layoutSettings.commonHeaderImageLinkUrl" default-value="main" global="true"/>
-                <service service-name="getUserPreferenceGroup" result-map="prefResult">
+                <service service-name="getUserPreferenceGroup" result-map-name="prefResult">
                     <field-map field-name="userPrefGroupTypeId" value="GLOBAL_PREFERENCES"/>
                 </service>
                 <set field="userPreferences" from-field="prefResult.userPrefMap" global="true"/>
@@ -135,7 +135,7 @@
                 <property-to-field resource="general" property="defaultOrganizationPartyId" field="defaultOrganizationPartyIdProperties"/>
                 <set field="defaultOrganizationPartyId" value="${bsh:&quot;DEFAULT&quot;.equals(userPreferences.get(&quot;ORGANIZATION_PARTY&quot;))?defaultOrganizationPartyIdProperties:userPreferences.get(&quot;ORGANIZATION_PARTY&quot;)}" global="true"/>
                 <property-to-field resource="general" property="currency.uom.id.default" field="defaultCurrencyUomId"/>
-                <entity-one entity-name="PartyAcctgPrefAndGroup" value-field="orgParty">
+                <entity-one entity-name="PartyAcctgPrefAndGroup" value-name="orgParty">
                     <field-map field-name="partyId" env-name="defaultOrganizationPartyId"/>
                 </entity-one>
                 <set field="defaultOrganizationPartyCurrencyUomId" from-field="orgParty.baseCurrencyUomId" default-value="defaultCurrencyUomId" global="true"/>
@@ -150,14 +150,24 @@
                 <!-- render appheader: both menu widget style and ftl template style menus are supported-->
                 <section>
                     <condition>
-                        <if-empty field="applicationMenuName"/>
+                        <not><if-empty field-name="userLogin"/></not>
                     </condition>
                     <widgets>
-                        <platform-specific><html><html-template location="${appheaderTemplate}"/></html></platform-specific>
+                        <section>
+                            <condition>
+                                <if-empty field-name="applicationMenuName"/>
+                            </condition>
+                            <widgets>
+                                <platform-specific><html><html-template location="${appheaderTemplate}"/></html></platform-specific>
+                            </widgets>
+                            <fail-widgets>
+                                <label style="apptitle">${parameters.applicationTitle}</label>
+                                <include-menu name="${applicationMenuName}" location="${applicationMenuLocation}"/>
+                            </fail-widgets>
+                        </section>
                     </widgets>
                     <fail-widgets>
-                        <label style="apptitle">${applicationTitle}</label>
-                        <include-menu name="${applicationMenuName}" location="${applicationMenuLocation}"/>
+                        <include-menu name="CommonAppBarMenu" location="component://common/widget/CommonMenus.xml"/>
                     </fail-widgets>
                 </section>
                 <platform-specific><html><html-template location="component://common/webcommon/includes/messages.ftl"/></html></platform-specific>
@@ -180,7 +190,7 @@
                 <!-- render footer -->
                 <section>
                     <condition>
-                        <if-empty field="applicationFooterTemplate"/>
+                        <if-empty field-name="applicationFooterTemplate"/>
                     </condition>
                     <widgets>
                         <platform-specific><html><html-template location="${footerTemplateLocation}"/></html></platform-specific>
@@ -388,7 +398,7 @@
             <widgets>
                 <section>
                     <condition>
-                        <if-empty field="titleProperty"/>
+                        <if-empty field-name="titleProperty"/>
                     </condition>
                     <widgets>
                         <container style="h1">