svn commit: r1549981 - in /ofbiz/trunk/themes: bizznesstime/includes/appbar.ftl bizznesstime/includes/secondary-appbar.ftl bluelight/includes/appbarOpen.ftl droppingcrumbs/includes/appbarOpen.ftl tomahawk/includes/appbarOpen.ftl

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

svn commit: r1549981 - in /ofbiz/trunk/themes: bizznesstime/includes/appbar.ftl bizznesstime/includes/secondary-appbar.ftl bluelight/includes/appbarOpen.ftl droppingcrumbs/includes/appbarOpen.ftl tomahawk/includes/appbarOpen.ftl

jleroux@apache.org
Author: jleroux
Date: Tue Dec 10 21:52:57 2013
New Revision: 1549981

URL: http://svn.apache.org/r1549981
Log:
A, directly sent to me, Olivier Heintz's patch which completes the work done by Adrian at r1546891:
>>> Moved web access authorization code from the Flat Grey visual
>>> theme to LoginWorker.java. This change needs to be copied to
>>> other visual themes as well.

Modified:
    ofbiz/trunk/themes/bizznesstime/includes/appbar.ftl
    ofbiz/trunk/themes/bizznesstime/includes/secondary-appbar.ftl
    ofbiz/trunk/themes/bluelight/includes/appbarOpen.ftl
    ofbiz/trunk/themes/droppingcrumbs/includes/appbarOpen.ftl
    ofbiz/trunk/themes/tomahawk/includes/appbarOpen.ftl

Modified: ofbiz/trunk/themes/bizznesstime/includes/appbar.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/themes/bizznesstime/includes/appbar.ftl?rev=1549981&r1=1549980&r2=1549981&view=diff
==============================================================================
--- ofbiz/trunk/themes/bizznesstime/includes/appbar.ftl (original)
+++ ofbiz/trunk/themes/bizznesstime/includes/appbar.ftl Tue Dec 10 21:52:57 2013
@@ -20,7 +20,7 @@ under the License.
 <#if (externalLoginKey)?exists><#assign externalKeyParam = "?externalLoginKey=" + requestAttributes.externalLoginKey?if_exists></#if>
 <#assign ofbizServerName = application.getAttribute("_serverId")?default("default-server")>
 <#assign contextPath = request.getContextPath()>
-<#assign displayApps = Static["org.ofbiz.base.component.ComponentConfig"].getAppBarWebInfos(ofbizServerName, "main")>
+<#assign displayApps = Static["org.ofbiz.webapp.control.LoginWorker"].getAppBarWebInfos(security, userLogin, ofbizServerName, "main")>
 
 <#if userLogin?has_content>
         <div id="main-nav">
@@ -30,29 +30,19 @@ under the License.
                 <li><h4>${uiLabelMap.CommonPrimaryApps}</h4></li>
             <#list displayApps as display>
               <#assign thisApp = display.getContextRoot()>
-              <#assign permission = true>
               <#assign selected = false>
-              <#assign permissions = display.getBasePermission()>
-              <#list permissions as perm>
-                <#if perm != "NONE" && !security.hasEntityPermission(perm, "_VIEW", session)>
-                  <#-- User must have ALL permissions in the base-permission list -->
-                  <#assign permission = false>
-                </#if>
-              </#list>
-              <#if permission == true>
-                <#if thisApp == contextPath || contextPath + "/" == thisApp>
-                  <#assign selected = true>
-                </#if>
-                <#assign thisApp = StringUtil.wrapString(thisApp)>
-                <#assign thisURL = thisApp>
-                <#if thisApp != "/">
-                  <#assign thisURL = thisURL + "/control/main">
-                </#if>
-                  <#if layoutSettings.suppressTab?exists && display.name == layoutSettings.suppressTab>
-                    <!-- do not display this component-->
-                  <#else>
-                    <li><a href="${thisURL + externalKeyParam}" <#if uiLabelMap?exists> title="${uiLabelMap[display.description]}">${uiLabelMap[display.title]}<#else> title="${display.description}">${display.title}</#if></a></li>
-                  </#if>
+              <#if thisApp == contextPath || contextPath + "/" == thisApp>
+                <#assign selected = true>
+              </#if>
+              <#assign thisApp = StringUtil.wrapString(thisApp)>
+              <#assign thisURL = thisApp>
+              <#if thisApp != "/">
+                <#assign thisURL = thisURL + "/control/main">
+              </#if>
+              <#if layoutSettings.suppressTab?exists && display.name == layoutSettings.suppressTab>
+                <!-- do not display this component-->
+              <#else>
+                <li><a href="${thisURL + externalKeyParam}" <#if uiLabelMap?exists> title="${uiLabelMap[display.description]}">${uiLabelMap[display.title]}<#else> title="${display.description}">${display.title}</#if></a></li>
               </#if>
             </#list>
                 </ul>

Modified: ofbiz/trunk/themes/bizznesstime/includes/secondary-appbar.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/themes/bizznesstime/includes/secondary-appbar.ftl?rev=1549981&r1=1549980&r2=1549981&view=diff
==============================================================================
--- ofbiz/trunk/themes/bizznesstime/includes/secondary-appbar.ftl (original)
+++ ofbiz/trunk/themes/bizznesstime/includes/secondary-appbar.ftl Tue Dec 10 21:52:57 2013
@@ -22,33 +22,23 @@ under the License.
 <#if (externalLoginKey)?exists><#assign externalKeyParam = "?externalLoginKey=" + requestAttributes.externalLoginKey?if_exists></#if>
 <#assign ofbizServerName = application.getAttribute("_serverId")?default("default-server")>
 <#assign contextPath = request.getContextPath()>
-<#assign displayApps = Static["org.ofbiz.base.component.ComponentConfig"].getAppBarWebInfos(ofbizServerName, "secondary")>
+<#assign displayApps = Static["org.ofbiz.webapp.control.LoginWorker"].getAppBarWebInfos(security, userLogin, ofbizServerName, "secondary")>
 
 <#if userLogin?has_content>
   <ul>
     <li><h4>${uiLabelMap.CommonSecondaryApps}</h4></li>
     <#list displayApps as display>
       <#assign thisApp = display.getContextRoot()>
-      <#assign permission = true>
       <#assign selected = false>
-      <#assign permissions = display.getBasePermission()>
-      <#list permissions as perm>
-        <#if perm != "NONE" && !security.hasEntityPermission(perm, "_VIEW", session)>
-          <#-- User must have ALL permissions in the base-permission list -->
-          <#assign permission = false>
-        </#if>
-      </#list>
-      <#if permission == true>
-        <#if thisApp == contextPath || contextPath + "/" == thisApp>
-          <#assign selected = true>
-        </#if>
-        <#assign thisApp = StringUtil.wrapString(thisApp)>
-        <#assign thisURL = thisApp>
-        <#if thisApp != "/">
-          <#assign thisURL = thisURL + "/control/main">
-        </#if>
-        <li><a<#if selected> class="current-section"</#if> href="${thisURL}${externalKeyParam}" <#if uiLabelMap?exists> title="${uiLabelMap[display.description]}">${uiLabelMap[display.title]}<#else> title="${display.description}"> ${display.title}</#if></a></li>
+      <#if thisApp == contextPath || contextPath + "/" == thisApp>
+        <#assign selected = true>
       </#if>
+      <#assign thisApp = StringUtil.wrapString(thisApp)>
+      <#assign thisURL = thisApp>
+      <#if thisApp != "/">
+        <#assign thisURL = thisURL + "/control/main">
+      </#if>
+      <li><a<#if selected> class="current-section"</#if> href="${thisURL}${externalKeyParam}" <#if uiLabelMap?exists> title="${uiLabelMap[display.description]}">${uiLabelMap[display.title]}<#else> title="${display.description}"> ${display.title}</#if></a></li>
     </#list>
   </ul>
 </#if>
\ No newline at end of file

Modified: ofbiz/trunk/themes/bluelight/includes/appbarOpen.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/themes/bluelight/includes/appbarOpen.ftl?rev=1549981&r1=1549980&r2=1549981&view=diff
==============================================================================
--- ofbiz/trunk/themes/bluelight/includes/appbarOpen.ftl (original)
+++ ofbiz/trunk/themes/bluelight/includes/appbarOpen.ftl Tue Dec 10 21:52:57 2013
@@ -20,8 +20,8 @@ under the License.
 <#if (externalLoginKey)?exists><#assign externalKeyParam = "?externalLoginKey=" + requestAttributes.externalLoginKey?if_exists></#if>
 <#assign ofbizServerName = application.getAttribute("_serverId")?default("default-server")>
 <#assign contextPath = request.getContextPath()>
-<#assign displayApps = Static["org.ofbiz.base.component.ComponentConfig"].getAppBarWebInfos(ofbizServerName, "main")>
-<#assign displaySecondaryApps = Static["org.ofbiz.base.component.ComponentConfig"].getAppBarWebInfos(ofbizServerName, "secondary")>
+<#assign displayApps = Static["org.ofbiz.webapp.control.LoginWorker"].getAppBarWebInfos(security, userLogin, ofbizServerName, "main")>
+<#assign displaySecondaryApps = Static["org.ofbiz.webapp.control.LoginWorker"].getAppBarWebInfos(security, userLogin, ofbizServerName, "secondary")>
 
 <#assign appModelMenu = Static["org.ofbiz.widget.menu.MenuFactory"].getMenuFromLocation(applicationMenuLocation,applicationMenuName,delegator,dispatcher)>
 <#if appModelMenu.getModelMenuItemByName(headerItem)?exists>
@@ -41,29 +41,19 @@ under the License.
             <#-- Primary Applications -->
             <#list displayApps as display>
               <#assign thisApp = display.getContextRoot()>
-              <#assign permission = true>
               <#assign selected = false>
-              <#assign permissions = display.getBasePermission()>
-              <#list permissions as perm>
-                <#if (perm != "NONE" && !security.hasEntityPermission(perm, "_VIEW", session))>
-                  <#-- User must have ALL permissions in the base-permission list -->
-                  <#assign permission = false>
-                </#if>
-              </#list>
-              <#if permission == true>
-                <#if thisApp == contextPath || contextPath + "/" == thisApp>
-                  <#assign selected = true>
-                </#if>
-                <#assign thisApp = StringUtil.wrapString(thisApp)>
-                <#assign thisURL = thisApp>
-                <#if thisApp != "/">
-                  <#assign thisURL = thisURL + "/control/main">
-                </#if>
-                <#if layoutSettings.suppressTab?exists && display.name == layoutSettings.suppressTab>
-                  <!-- do not display this component-->
-                <#else>
-                    <li <#if selected>class="selected"</#if>><a href="${thisURL + externalKeyParam}" <#if uiLabelMap?exists> title="${uiLabelMap[display.description]}">${uiLabelMap[display.title]}<#else> title="${display.description}">${display.title}</#if></a></li>
-                </#if>
+              <#if thisApp == contextPath || contextPath + "/" == thisApp>
+                <#assign selected = true>
+              </#if>
+              <#assign thisApp = StringUtil.wrapString(thisApp)>
+              <#assign thisURL = thisApp>
+              <#if thisApp != "/">
+                <#assign thisURL = thisURL + "/control/main">
+              </#if>
+              <#if layoutSettings.suppressTab?exists && display.name == layoutSettings.suppressTab>
+                <!-- do not display this component-->
+              <#else>
+                  <li <#if selected>class="selected"</#if>><a href="${thisURL + externalKeyParam}" <#if uiLabelMap?exists> title="${uiLabelMap[display.description]}">${uiLabelMap[display.title]}<#else> title="${display.description}">${display.title}</#if></a></li>
               </#if>
             </#list>
            </ul></li>
@@ -71,29 +61,19 @@ under the License.
             <#-- Secondary Applications -->
             <#list displaySecondaryApps as display>
               <#assign thisApp = display.getContextRoot()>
-              <#assign permission = true>
               <#assign selected = false>
-              <#assign permissions = display.getBasePermission()>
-              <#list permissions as perm>
-                <#if (perm != "NONE" && !security.hasEntityPermission(perm, "_VIEW", session))>
-                  <#-- User must have ALL permissions in the base-permission list -->
-                  <#assign permission = false>
-                </#if>
-              </#list>
-              <#if permission == true>
-                <#if thisApp == contextPath || contextPath + "/" == thisApp>
-                  <#assign selected = true>
-                </#if>
-                <#assign thisApp = StringUtil.wrapString(thisApp)>
-                <#assign thisURL = thisApp>
-                <#if thisApp != "/">
-                  <#assign thisURL = thisURL + "/control/main">
-                </#if>
-                <#if layoutSettings.suppressTab?exists && display.name == layoutSettings.suppressTab>
-                  <!-- do not display this component-->
-                <#else>
-                  <li <#if selected>class="selected"</#if>><a href="${thisURL + externalKeyParam}" <#if uiLabelMap?exists> title="${uiLabelMap[display.description]}">${uiLabelMap[display.title]}<#else> title="${display.description}">${display.title}</#if></a></li>
-                </#if>
+              <#if thisApp == contextPath || contextPath + "/" == thisApp>
+                <#assign selected = true>
+              </#if>
+              <#assign thisApp = StringUtil.wrapString(thisApp)>
+              <#assign thisURL = thisApp>
+              <#if thisApp != "/">
+                <#assign thisURL = thisURL + "/control/main">
+              </#if>
+              <#if layoutSettings.suppressTab?exists && display.name == layoutSettings.suppressTab>
+                <!-- do not display this component-->
+              <#else>
+                <li <#if selected>class="selected"</#if>><a href="${thisURL + externalKeyParam}" <#if uiLabelMap?exists> title="${uiLabelMap[display.description]}">${uiLabelMap[display.title]}<#else> title="${display.description}">${display.title}</#if></a></li>
               </#if>
             </#list>
             </ul>

Modified: ofbiz/trunk/themes/droppingcrumbs/includes/appbarOpen.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/themes/droppingcrumbs/includes/appbarOpen.ftl?rev=1549981&r1=1549980&r2=1549981&view=diff
==============================================================================
--- ofbiz/trunk/themes/droppingcrumbs/includes/appbarOpen.ftl (original)
+++ ofbiz/trunk/themes/droppingcrumbs/includes/appbarOpen.ftl Tue Dec 10 21:52:57 2013
@@ -21,8 +21,8 @@ under the License.
 <#if (externalLoginKey)?exists><#assign externalKeyParam = "?externalLoginKey=" + requestAttributes.externalLoginKey?if_exists></#if>
 <#assign ofbizServerName = application.getAttribute("_serverId")?default("default-server")>
 <#assign contextPath = request.getContextPath()>
-<#assign displayApps = Static["org.ofbiz.base.component.ComponentConfig"].getAppBarWebInfos(ofbizServerName, "main")>
-<#assign displaySecondaryApps = Static["org.ofbiz.base.component.ComponentConfig"].getAppBarWebInfos(ofbizServerName, "secondary")>
+<#assign displayApps = Static["org.ofbiz.webapp.control.LoginWorker"].getAppBarWebInfos(security, userLogin, ofbizServerName, "main")>
+<#assign displaySecondaryApps = Static["org.ofbiz.webapp.control.LoginWorker"].getAppBarWebInfos(security, userLogin, ofbizServerName, "secondary")>
 
 <#assign appModelMenu = Static["org.ofbiz.widget.menu.MenuFactory"].getMenuFromLocation(applicationMenuLocation,applicationMenuName,delegator,dispatcher)>
 <#if appModelMenu.getModelMenuItemByName(headerItem)?exists>
@@ -41,29 +41,19 @@ under the License.
             <#-- Primary Applications -->
             <#list displayApps as display>
               <#assign thisApp = display.getContextRoot()>
-              <#assign permission = true>
               <#assign selected = false>
-              <#assign permissions = display.getBasePermission()>
-              <#list permissions as perm>
-                <#if (perm != "NONE" && !security.hasEntityPermission(perm, "_VIEW", session))>
-                  <#-- User must have ALL permissions in the base-permission list -->
-                  <#assign permission = false>
-                </#if>
-              </#list>
-              <#if permission == true>
-                <#if thisApp == contextPath || contextPath + "/" == thisApp>
-                  <#assign selected = true>
-                </#if>
-                <#assign thisApp = StringUtil.wrapString(thisApp)>
-                <#assign thisURL = thisApp>
-                <#if thisApp != "/">
-                  <#assign thisURL = thisURL + "/control/main">
-                </#if>
-                <#if layoutSettings.suppressTab?exists && display.name == layoutSettings.suppressTab>
-                  <!-- do not display this component-->
-                <#else>
-                    <li <#if selected>class="selected"</#if>><a href="${thisURL + externalKeyParam}" <#if uiLabelMap?exists> title="${uiLabelMap[display.description]}">${uiLabelMap[display.title]}<#else> title="${display.description}">${display.title}</#if></a></li>
-                </#if>
+              <#if thisApp == contextPath || contextPath + "/" == thisApp>
+                <#assign selected = true>
+              </#if>
+              <#assign thisApp = StringUtil.wrapString(thisApp)>
+              <#assign thisURL = thisApp>
+              <#if thisApp != "/">
+                <#assign thisURL = thisURL + "/control/main">
+              </#if>
+              <#if layoutSettings.suppressTab?exists && display.name == layoutSettings.suppressTab>
+                <!-- do not display this component-->
+              <#else>
+                  <li <#if selected>class="selected"</#if>><a href="${thisURL + externalKeyParam}" <#if uiLabelMap?exists> title="${uiLabelMap[display.description]}">${uiLabelMap[display.title]}<#else> title="${display.description}">${display.title}</#if></a></li>
               </#if>
             </#list>
            </ul></li>
@@ -71,29 +61,19 @@ under the License.
             <#-- Secondary Applications -->
             <#list displaySecondaryApps as display>
               <#assign thisApp = display.getContextRoot()>
-              <#assign permission = true>
               <#assign selected = false>
-              <#assign permissions = display.getBasePermission()>
-              <#list permissions as perm>
-                <#if (perm != "NONE" && !security.hasEntityPermission(perm, "_VIEW", session))>
-                  <#-- User must have ALL permissions in the base-permission list -->
-                  <#assign permission = false>
-                </#if>
-              </#list>
-              <#if permission == true>
-                <#if thisApp == contextPath || contextPath + "/" == thisApp>
-                  <#assign selected = true>
-                </#if>
-                <#assign thisApp = StringUtil.wrapString(thisApp)>
-                <#assign thisURL = thisApp>
-                <#if thisApp != "/">
-                  <#assign thisURL = thisURL + "/control/main">
-                </#if>
-                <#if layoutSettings.suppressTab?exists && display.name == layoutSettings.suppressTab>
-                  <!-- do not display this component-->
-                <#else>
-                  <li <#if selected>class="selected"</#if>><a href="${thisURL + externalKeyParam}" <#if uiLabelMap?exists> title="${uiLabelMap[display.description]}">${uiLabelMap[display.title]}<#else> title="${display.description}">${display.title}</#if></a></li>
-                </#if>
+              <#if thisApp == contextPath || contextPath + "/" == thisApp>
+                <#assign selected = true>
+              </#if>
+              <#assign thisApp = StringUtil.wrapString(thisApp)>
+              <#assign thisURL = thisApp>
+              <#if thisApp != "/">
+                <#assign thisURL = thisURL + "/control/main">
+              </#if>
+              <#if layoutSettings.suppressTab?exists && display.name == layoutSettings.suppressTab>
+                <!-- do not display this component-->
+              <#else>
+                <li <#if selected>class="selected"</#if>><a href="${thisURL + externalKeyParam}" <#if uiLabelMap?exists> title="${uiLabelMap[display.description]}">${uiLabelMap[display.title]}<#else> title="${display.description}">${display.title}</#if></a></li>
               </#if>
             </#list>
             </ul>

Modified: ofbiz/trunk/themes/tomahawk/includes/appbarOpen.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/themes/tomahawk/includes/appbarOpen.ftl?rev=1549981&r1=1549980&r2=1549981&view=diff
==============================================================================
--- ofbiz/trunk/themes/tomahawk/includes/appbarOpen.ftl (original)
+++ ofbiz/trunk/themes/tomahawk/includes/appbarOpen.ftl Tue Dec 10 21:52:57 2013
@@ -21,8 +21,8 @@ under the License.
 <#if (externalLoginKey)?exists><#assign externalKeyParam = "?externalLoginKey=" + requestAttributes.externalLoginKey?if_exists></#if>
 <#assign ofbizServerName = application.getAttribute("_serverId")?default("default-server")>
 <#assign contextPath = request.getContextPath()>
-<#assign displayApps = Static["org.ofbiz.base.component.ComponentConfig"].getAppBarWebInfos(ofbizServerName, "main")>
-<#assign displaySecondaryApps = Static["org.ofbiz.base.component.ComponentConfig"].getAppBarWebInfos(ofbizServerName, "secondary")>
+<#assign displayApps = Static["org.ofbiz.webapp.control.LoginWorker"].getAppBarWebInfos(security, userLogin, ofbizServerName, "main")>
+<#assign displaySecondaryApps = Static["org.ofbiz.webapp.control.LoginWorker"].getAppBarWebInfos(security, userLogin, ofbizServerName, "secondary")>
 
 <#assign appModelMenu = Static["org.ofbiz.widget.menu.MenuFactory"].getMenuFromLocation(applicationMenuLocation,applicationMenuName,delegator,dispatcher)>
 <#if appModelMenu.getModelMenuItemByName(headerItem)?exists>
@@ -45,29 +45,19 @@ under the License.
             <#-- Primary Applications -->
             <#list displayApps as display>
               <#assign thisApp = display.getContextRoot()>
-              <#assign permission = true>
               <#assign selected = false>
-              <#assign permissions = display.getBasePermission()>
-              <#list permissions as perm>
-                <#if (perm != "NONE" && !security.hasEntityPermission(perm, "_VIEW", session))>
-                  <#-- User must have ALL permissions in the base-permission list -->
-                  <#assign permission = false>
-                </#if>
-              </#list>
-              <#if permission == true>
-                <#if thisApp == contextPath || contextPath + "/" == thisApp>
-                  <#assign selected = true>
-                </#if>
-                <#assign thisApp = StringUtil.wrapString(thisApp)>
-                <#assign thisURL = thisApp>
-                <#if thisApp != "/">
-                  <#assign thisURL = thisURL + "/control/main">
-                </#if>
-                <#if layoutSettings.suppressTab?exists && display.name == layoutSettings.suppressTab>
-                  <!-- do not display this component-->
-                <#else>
-                  <li<#if selected> class="selected"</#if>><a href="${thisURL + externalKeyParam}"<#if uiLabelMap?exists> title="${uiLabelMap[display.description]}">${uiLabelMap[display.title]}<#else> title="${display.description}">${display.title}</#if></a></li>
-                </#if>
+              <#if thisApp == contextPath || contextPath + "/" == thisApp>
+                <#assign selected = true>
+              </#if>
+              <#assign thisApp = StringUtil.wrapString(thisApp)>
+              <#assign thisURL = thisApp>
+              <#if thisApp != "/">
+                <#assign thisURL = thisURL + "/control/main">
+              </#if>
+              <#if layoutSettings.suppressTab?exists && display.name == layoutSettings.suppressTab>
+                <!-- do not display this component-->
+              <#else>
+                <li<#if selected> class="selected"</#if>><a href="${thisURL + externalKeyParam}"<#if uiLabelMap?exists> title="${uiLabelMap[display.description]}">${uiLabelMap[display.title]}<#else> title="${display.description}">${display.title}</#if></a></li>
               </#if>
             </#list>
            </ul></li>
@@ -75,29 +65,19 @@ under the License.
             <#-- Secondary Applications -->
             <#list displaySecondaryApps as display>
               <#assign thisApp = display.getContextRoot()>
-              <#assign permission = true>
               <#assign selected = false>
-              <#assign permissions = display.getBasePermission()>
-              <#list permissions as perm>
-                <#if (perm != "NONE" && !security.hasEntityPermission(perm, "_VIEW", session))>
-                  <#-- User must have ALL permissions in the base-permission list -->
-                  <#assign permission = false>
-                </#if>
-              </#list>
-              <#if permission == true>
-                <#if thisApp == contextPath || contextPath + "/" == thisApp>
-                  <#assign selected = true>
-                </#if>
-                <#assign thisApp = StringUtil.wrapString(thisApp)>
-                <#assign thisURL = thisApp>
-                <#if thisApp != "/">
-                  <#assign thisURL = thisURL + "/control/main">
-                </#if>
-                <#if layoutSettings.suppressTab?exists && display.name == layoutSettings.suppressTab>
-                  <!-- do not display this component-->
-                <#else>
-                    <li<#if selected> class="selected"</#if>><a href="${thisURL + externalKeyParam}"<#if uiLabelMap?exists> title="${uiLabelMap[display.description]}">${uiLabelMap[display.title]}<#else> title="${display.description}">${display.title}</#if></a></li>
-                </#if>
+              <#if thisApp == contextPath || contextPath + "/" == thisApp>
+                <#assign selected = true>
+              </#if>
+              <#assign thisApp = StringUtil.wrapString(thisApp)>
+              <#assign thisURL = thisApp>
+              <#if thisApp != "/">
+                <#assign thisURL = thisURL + "/control/main">
+              </#if>
+              <#if layoutSettings.suppressTab?exists && display.name == layoutSettings.suppressTab>
+                <!-- do not display this component-->
+              <#else>
+                  <li<#if selected> class="selected"</#if>><a href="${thisURL + externalKeyParam}"<#if uiLabelMap?exists> title="${uiLabelMap[display.description]}">${uiLabelMap[display.title]}<#else> title="${display.description}">${display.title}</#if></a></li>
               </#if>
             </#list>
             </ul>