svn commit: r754642 - in /ofbiz/trunk/themes/bluelight: includes/header.ftl webapp/bluelight/style.css

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

svn commit: r754642 - in /ofbiz/trunk/themes/bluelight: includes/header.ftl webapp/bluelight/style.css

buscob
Author: buscob
Date: Sun Mar 15 09:36:11 2009
New Revision: 754642

URL: http://svn.apache.org/viewvc?rev=754642&view=rev
Log:
Improved bluelight theme.
- Less crowded header with more code reuse
- Added link to viewprofile on the username
- Better styling of disabled menu items


Modified:
    ofbiz/trunk/themes/bluelight/includes/header.ftl
    ofbiz/trunk/themes/bluelight/webapp/bluelight/style.css

Modified: ofbiz/trunk/themes/bluelight/includes/header.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/themes/bluelight/includes/header.ftl?rev=754642&r1=754641&r2=754642&view=diff
==============================================================================
--- ofbiz/trunk/themes/bluelight/includes/header.ftl (original)
+++ ofbiz/trunk/themes/bluelight/includes/header.ftl Sun Mar 15 09:36:11 2009
@@ -87,6 +87,19 @@
 <#else>
   <#assign logoLinkURL = "${layoutSettings.commonHeaderImageLinkUrl}">
 </#if>
+
+<#if person?has_content>
+  <#assign userName = person.firstName?if_exists + " " + person.middleName?if_exists + " " + person.lastName?if_exists>
+<#elseif partyGroup?has_content>
+  <#assign userName = partyGroup.groupName?if_exists>
+<#else>
+  <#assign userName = userLogin.userLoginId>
+</#if>
+
+<#if defaultOrganizationPartyGroupName?has_content>
+  <#assign orgName = " - " + defaultOrganizationPartyGroupName?if_exists>
+</#if>
+
 <body>
   <div class="page-container">
     <div class="hidden">
@@ -102,23 +115,6 @@
               <a href="<@ofbizUrl>${logoLinkURL}</@ofbizUrl>"><img src="<@ofbizContentUrl>${shortcutIcon}</@ofbizContentUrl>"/></a>
             </#if>
           </li>
-          <li>
-            <#if person?has_content>
-              ${uiLabelMap.CommonWelcome} ${person.firstName?if_exists} ${person.middleName?if_exists} ${person.lastName?if_exists} [${userLogin.userLoginId}]
-              <#if defaultOrganizationPartyId?exists>${uiLabelMap.CommonDefaultOrganizationPartyId} : ${defaultOrganizationPartyGroupName?if_exists} [${defaultOrganizationPartyId}]</#if>
-            <#elseif partyGroup?has_content>
-              ${uiLabelMap.CommonWelcome} ${partyGroup.groupName?if_exists} [${userLogin.userLoginId}]
-              <#if defaultOrganizationPartyId?exists>${uiLabelMap.CommonDefaultOrganizationPartyId} : ${defaultOrganizationPartyGroupName?if_exists} [${defaultOrganizationPartyId}]</#if>
-            <#else>
-              ${uiLabelMap.CommonWelcome}!
-            </#if>
-          </li>
-          <li class="control-area">
-            <p class="collapsed">
-              <a href="<@ofbizUrl>logout</@ofbizUrl>">${uiLabelMap.CommonLogout}</a>&nbsp;&nbsp;
-              <a href="setUserPreference?userPrefGroupTypeId=GLOBAL_PREFERENCES&amp;userPrefTypeId=COMPACT_HEADER&amp;userPrefValue=N">&nbsp;&nbsp;</a>
-            </p>
-          </li>
         <#else>
           <#if layoutSettings.headerImageUrl?exists>
             <#assign headerImageUrl = layoutSettings.headerImageUrl>
@@ -130,36 +126,28 @@
           <#if headerImageUrl?exists>
             <li class="logo-area"><a href="<@ofbizUrl>${logoLinkURL}</@ofbizUrl>"><img alt="${layoutSettings.companyName}" src="<@ofbizContentUrl>${headerImageUrl}</@ofbizContentUrl>"/></a></li>
           </#if>
-          <li class="control-area">
+        </#if>
+
+        <li class="control-area">
+          <ul id="preferences-menu">
+            <li class="user"><a href="/partymgr/control/viewprofile?partyId=${userLogin.partyId}">${userName}</a></li>
+            <li class="org">${orgName}</li>
+            <li class="first"><a href="<@ofbizUrl>LookupLocales</@ofbizUrl>">${uiLabelMap.CommonLanguageTitle} : ${locale.getDisplayName(locale)}</a></li>
             <#if userLogin?exists>
-              <p class="expanded">
-                <a href="<@ofbizUrl>logout</@ofbizUrl>">${uiLabelMap.CommonLogout}</a>&nbsp;&nbsp;
-                <a href="setUserPreference?userPrefGroupTypeId=GLOBAL_PREFERENCES&amp;userPrefTypeId=COMPACT_HEADER&amp;userPrefValue=Y">&nbsp;&nbsp;</a>
-              </p>
-            </#if>
-            <p>
-            <#if person?has_content>
-              ${uiLabelMap.CommonWelcome} ${person.firstName?if_exists} ${person.lastName?if_exists} [${userLogin.userLoginId}]
-              <#if defaultOrganizationPartyId?exists><p>${uiLabelMap.CommonDefaultOrganizationPartyId} : ${defaultOrganizationPartyGroupName?if_exists} [${defaultOrganizationPartyId}]</p></#if>
-            <#elseif partyGroup?has_content>
-              ${uiLabelMap.CommonWelcome} ${partyGroup.groupName?if_exists} [${userLogin.userLoginId}]
-              <#if defaultOrganizationPartyId?exists><p>${uiLabelMap.CommonDefaultOrganizationPartyId} : ${defaultOrganizationPartyGroupName?if_exists} [${defaultOrganizationPartyId}]</p></#if>
-            <#else>
-              ${uiLabelMap.CommonWelcome}!
+              <li><a href="<@ofbizUrl>LookupVisualThemes</@ofbizUrl>">${uiLabelMap.CommonVisualThemes}</a></li>
+              <li><a href="<@ofbizUrl>logout</@ofbizUrl>">${uiLabelMap.CommonLogout}</a></li>
             </#if>
-            </p>
-            <ul id="preferences-menu">
-<!--
-              <li class="first"><a href="<@ofbizUrl>Preferences</@ofbizUrl>">${uiLabelMap.CommonPreferences}</a></li>
--->
-              <li class="first"><a href="<@ofbizUrl>LookupLocales</@ofbizUrl>">${uiLabelMap.CommonLanguageTitle} : ${locale.getDisplayName(locale)}</a></li>
-              <#if userLogin?exists>
-                <li><a href="<@ofbizUrl>LookupVisualThemes</@ofbizUrl>">${uiLabelMap.CommonVisualThemes}</a></li>
+            <#include "component://common/webcommon/includes/helplink.ftl" />
+
+            <#if userLogin?exists>
+              <#if (userPreferences.COMPACT_HEADER)?default("N") == "Y">
+                <li class="collapsed"><a href="setUserPreference?userPrefGroupTypeId=GLOBAL_PREFERENCES&amp;userPrefTypeId=COMPACT_HEADER&amp;userPrefValue=N">&nbsp;&nbsp;</a></li>
+              <#else>
+                <li class="expanded"><a href="setUserPreference?userPrefGroupTypeId=GLOBAL_PREFERENCES&amp;userPrefTypeId=COMPACT_HEADER&amp;userPrefValue=Y">&nbsp;&nbsp;</a></li>
               </#if>
-              <#include "component://common/webcommon/includes/helplink.ftl" />
-            </ul>
-          </li>
-        </#if>
+            </#if>
+          </ul>
+        </li>
       </ul>
       <br class="clear" />
     </div>

Modified: ofbiz/trunk/themes/bluelight/webapp/bluelight/style.css
URL: http://svn.apache.org/viewvc/ofbiz/trunk/themes/bluelight/webapp/bluelight/style.css?rev=754642&r1=754641&r2=754642&view=diff
==============================================================================
--- ofbiz/trunk/themes/bluelight/webapp/bluelight/style.css (original)
+++ ofbiz/trunk/themes/bluelight/webapp/bluelight/style.css Sun Mar 15 09:36:11 2009
@@ -938,26 +938,12 @@
     /* placeholder */
 }
 
-#masthead ul .opposed,#masthead ul .control-area {
+#masthead ul .opposed,
+#masthead ul .control-area {
     float: right;
     text-align: right;
 }
 
-#masthead ul .control-area .expanded {
-    background: url(/images/collapse.gif) no-repeat right;
-    min-height: 10px;
-    min-width: 10px;
-    padding: 0 0.4em 0 0.4em;
-    margin: 0.5em;
-}
-
-#masthead ul .control-area .collapsed {
-    background: url(/images/expand.gif) no-repeat right;
-    min-height: 18px;
-    min-width: 10px;
-    padding: 0 0.4em 0 0.4em;
-}
-
 ul#preferences-menu {
     font-size: 1.1em;
     float: right;
@@ -966,11 +952,42 @@
 ul#preferences-menu li {
     border-left: solid 1px #BBBBBB;
     padding: 0 1em 0 1em;
-    margin-top: 0.5em;
 }
 
-ul#preferences-menu li.first {
-    border: none;
+ul#preferences-menu li.first,
+ul#preferences-menu li.user,
+ul#preferences-menu li.org {
+border: none;
+}
+
+ul#preferences-menu li.user,
+ul#preferences-menu li.org {
+padding: 0;
+color: #777777;
+}
+
+ul#preferences-menu li.user a,
+ul#preferences-menu li.org a {
+color: #777777;
+}
+
+ul#preferences-menu li.user a:hover {
+background-color: #777777;
+color: #FFFFFF;
+text-decoration: none;
+}
+
+ul#preferences-menu li.expanded,
+ul#preferences-menu li.collapsed {
+padding: 0 0 0 5px;
+}
+
+ul#preferences-menu li.expanded {
+background: url(/images/collapse.gif) no-repeat right;
+}
+
+ul#preferences-menu li.collapsed {
+background: url(/images/expand.gif) no-repeat right;
 }
 
 ul#preferences-menu li a {
@@ -993,7 +1010,8 @@
 /* ===== Footer Styles ===================== */
 /* ========================================= */
 #footer {
-    text-align: center;
+text-align: center;
+padding-bottom: 1em;
 }
 
 #footer p {
@@ -1043,7 +1061,8 @@
     font-size: 130%;
 }
 
-#main-navigation ul li h2,#app-navigation ul li h2 {
+#main-navigation ul li h2,
+#app-navigation ul li h2 {
     color: #FFFFFF;
     font-size: 1.2em;
     font-weight: bold;
@@ -1078,6 +1097,11 @@
 text-decoration:none;
 } /*Color subcells hovering mode*/
 
+#main-navigation ul li ul li a.disabled,
+#app-navigation ul li ul li a.disabled {
+color:#999999;
+} /*Color subcells disabled mode*/
+
 
 /* ================================================= */
 /* ===== Screenlet Title Bar/Navigation Styles ===== */
@@ -1241,8 +1265,7 @@
     /* ===== Button Bar Navigation Styles ===== */
     /* ======================================== */
 .button-bar {
-    margin-bottom: 1.0em;
-    width: 100%;
+margin: 0 1em 0 1em;
 }
 
 .button-bar ul {