[OFBiz] SVN: r6720 - in trunk/applications/content: webapp/content/includes webapp/content/templates widget

jonesde@svn.ofbiz.org jonesde at svn.ofbiz.org
Sun Feb 12 03:27:34 CST 2006


Author: jonesde
Date: 2006-02-12 03:27:26 -0600 (Sun, 12 Feb 2006)
New Revision: 6720

Added:
   trunk/applications/content/webapp/content/includes/appheader.ftl
Removed:
   trunk/applications/content/webapp/content/includes/appbar.ftl
   trunk/applications/content/webapp/content/includes/countries.ftl
   trunk/applications/content/webapp/content/includes/footer.ftl
   trunk/applications/content/webapp/content/includes/header.ftl
   trunk/applications/content/webapp/content/includes/states.ftl
Modified:
   trunk/applications/content/webapp/content/templates/main.ftl
   trunk/applications/content/widget/CommonScreens.xml
   trunk/applications/content/widget/ContentMenus.xml
Log:
A number of cleanups to fix content manager menu links for screen widget based pages, and to show the apptitle, and made the jpublish pages a little closer to correctly sharing the common resource; this is one area where it would be really nice to move all jpublish pages to screen widget based

Deleted: trunk/applications/content/webapp/content/includes/appbar.ftl
===================================================================
--- trunk/applications/content/webapp/content/includes/appbar.ftl	2006-02-12 03:12:29 UTC (rev 6719)
+++ trunk/applications/content/webapp/content/includes/appbar.ftl	2006-02-12 09:27:26 UTC (rev 6720)
@@ -1,88 +0,0 @@
-<#--
- *  Copyright (c) 2003 The Open For Business Project - www.ofbiz.org
- *
- *  Permission is hereby granted, free of charge, to any person obtaining a
- *  copy of this software and associated documentation files (the "Software"),
- *  to deal in the Software without restriction, including without limitation
- *  the rights to use, copy, modify, merge, publish, distribute, sublicense,
- *  and/or sell copies of the Software, and to permit persons to whom the
- *  Software is furnished to do so, subject to the following conditions:
- *
- *  The above copyright notice and this permission notice shall be included
- *  in all copies or substantial portions of the Software.
- *
- *  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- *  OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- *  IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- *  CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT
- *  OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
- *  THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- *@author     Andy Zeneski (jaz at ofbiz.org)
- *@version    $Rev$
- *@since      3.0
--->
-
-<#assign security = requestAttributes.security>
-<#assign externalKeyParam = "?externalLoginKey=" + requestAttributes.externalLoginKey?if_exists>
-<#assign ofbizServerName = application.getAttribute("_serverId")?default("default-server")>
-<#assign contextPath = request.getContextPath()>
-<#assign displayApps = Static["org.ofbiz.base.component.ComponentConfig"].getAppBarWebInfos(ofbizServerName)>
-
-<#if requestAttributes.userLogin?has_content>
-
-<#assign unselectedClass = {"col" : "tabdownblock", "left" : "tabdownleft", "center" : "tabdowncenter", "right" : "tabdownright", "link" : "tablink"}>
-<#assign selectedClass = {"col" : "mainblock", "left" : "tabupleft", "center" : "tabupcenter", "right" : "tabupright", "link" : "tablinkselected"}>
-
-<table align="center" width="100%" border="0" cellspacing="0" cellpadding="0">
-  <tr bgcolor="#FFFFFF">
-    <td><div class="appbarleft"></div></td>
-    <td height="15" width="100%">
-	  <table width="100%" border="0" cellspacing="0" cellpadding="0">
-        <tr>
-          <#list displayApps as display>
-            <#assign thisApp = display.getContextRoot()>
-            <#assign permission = true>
-            <#assign permissions = display.getBasePermission()>
-            <#list permissions as perm>
-                <#if (perm != "NONE" && !security.hasEntityPermission(perm, "_VIEW", session))>
-                    <#assign permission = false>
-                </#if>
-            </#list>
-            <#if permission == true>
-              <#if thisApp == contextPath>
-                <#assign class = selectedClass>
-              <#else>
-                <#assign class = unselectedClass>
-              </#if>
-              <td height="15" class="${class.col}">
-                <table width="100%" border="0" cellspacing="0" cellpadding="0">
-                  <tr>
-                    <td class="${class.left}"><a href="${response.encodeURL(thisApp + "/control/main" + externalKeyParam)}" title="" class="${class.link}"><img src="<@ofbizContentUrl>/images/spacer.gif</@ofbizContentUrl>" alt="" width="10" height="15" border="0"></a></td>
-                    <td nowrap="nowrap" class="${class.center}"><a href="${response.encodeURL(thisApp + "/control/main" + externalKeyParam)}" title="" class="${class.link}">${display.title}</a></td>
-                    <td class="${class.right}"><a href="${response.encodeURL(thisApp + "/control/main" + externalKeyParam)}" title="" class="${class.link}"><img src="<@ofbizContentUrl>/images/spacer.gif</@ofbizContentUrl>" alt="" width="10" height="15" border="0"></a></td>
-                  </tr>
-                  <#if thisApp != contextPath>
-                    <tr><td colspan="3" class="blackarea"><img src="<@ofbizContentUrl>/images/spacer.gif</@ofbizContentUrl>" alt="" height="1"></td></tr>
-                    <tr><td colspan="3" class="whitearea"><img src="<@ofbizContentUrl>/images/spacer.gif</@ofbizContentUrl>" alt="" height="1"></td></tr>
-                  </#if>
-                </table>
-              </td>
-            </#if>
-          </#list>
-		  <td><div class="appbarright"></div></td>
-          <td width="100%" class="appbarresize">
-            <table width="100%" border="0" cellspacing="0" cellpadding="0">
-              <tr>
-                <td class="whitearea"><img src="<@ofbizContentUrl>/images/spacer.gif</@ofbizContentUrl>" alt="" height="1"></td>
-              </tr>
-            </table>
-          </td>
-        </tr>
-      </table>
-    </td>
-  </tr>
-</table>
-</#if>
-

Copied: trunk/applications/content/webapp/content/includes/appheader.ftl (from rev 6719, trunk/applications/content/webapp/content/includes/header.ftl)

Deleted: trunk/applications/content/webapp/content/includes/countries.ftl
===================================================================
--- trunk/applications/content/webapp/content/includes/countries.ftl	2006-02-12 03:12:29 UTC (rev 6719)
+++ trunk/applications/content/webapp/content/includes/countries.ftl	2006-02-12 09:27:26 UTC (rev 6720)
@@ -1,6 +0,0 @@
-
-<#assign countries = Static["org.ofbiz.common.CommonWorkers"].getCountryList(delegator)>
-<#list countries as country>
-    <option value='${country.geoId}'>${country.geoName?default(country.geoId)}</option>
-</#list>
-

Deleted: trunk/applications/content/webapp/content/includes/footer.ftl
===================================================================
--- trunk/applications/content/webapp/content/includes/footer.ftl	2006-02-12 03:12:29 UTC (rev 6719)
+++ trunk/applications/content/webapp/content/includes/footer.ftl	2006-02-12 09:27:26 UTC (rev 6720)
@@ -1,37 +0,0 @@
-<#--
- *  Copyright (c) 2001-2005 The Open For Business Project - www.ofbiz.org
- *
- *  Permission is hereby granted, free of charge, to any person obtaining a 
- *  copy of this software and associated documentation files (the "Software"), 
- *  to deal in the Software without restriction, including without limitation 
- *  the rights to use, copy, modify, merge, publish, distribute, sublicense, 
- *  and/or sell copies of the Software, and to permit persons to whom the 
- *  Software is furnished to do so, subject to the following conditions:
- *
- *  The above copyright notice and this permission notice shall be included 
- *  in all copies or substantial portions of the Software.
- *
- *  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 
- *  OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 
- *  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 
- *  IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 
- *  CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT 
- *  OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR 
- *  THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- *@author     David E. Jones (jonesde at ofbiz.org)
- *@author     Andy Zeneski (jaz at ofbiz.org)
- *@version    $Rev$
- *@since      2.1
--->
-
-<#assign nowTimestamp = Static["org.ofbiz.base.util.UtilDateTime"].nowTimestamp()>
-
-<br/>
-<div class="tabletext" align="center">
-    <div class="tabletext">Copyright (c) 2001-${nowTimestamp?string("yyyy")} The Open For Business Project - <a href="http://www.ofbiz.org" class="tabletext" target="_blank">www.ofbiz.org</a></div>
-    <div class="tabletext">Powered By <a href="http://www.ofbiz.org" class="tabletext" target="_blank">OFBiz</a></div>
-</div>
-<br/>
-</body>
-</html>

Deleted: trunk/applications/content/webapp/content/includes/header.ftl
===================================================================
--- trunk/applications/content/webapp/content/includes/header.ftl	2006-02-12 03:12:29 UTC (rev 6719)
+++ trunk/applications/content/webapp/content/includes/header.ftl	2006-02-12 09:27:26 UTC (rev 6720)
@@ -1,57 +0,0 @@
-<#--
- *  Copyright (c) 2003 The Open For Business Project - www.ofbiz.org
- *
- *  Permission is hereby granted, free of charge, to any person obtaining a 
- *  copy of this software and associated documentation files (the "Software"), 
- *  to deal in the Software without restriction, including without limitation 
- *  the rights to use, copy, modify, merge, publish, distribute, sublicense, 
- *  and/or sell copies of the Software, and to permit persons to whom the 
- *  Software is furnished to do so, subject to the following conditions:
- *
- *  The above copyright notice and this permission notice shall be included 
- *  in all copies or substantial portions of the Software.
- *
- *  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 
- *  OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 
- *  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 
- *  IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 
- *  CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT 
- *  OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR 
- *  THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- *@author     Andy Zeneski (jaz at ofbiz.org)
- *@version    $Rev$
- *@since      2.1
--->
-
-<#assign unselectedLeftClassName = "headerButtonLeft">
-<#assign unselectedRightClassName = "headerButtonRight">
-<#assign selectedLeftClassMap = {page.headerItem?default("void") : "headerButtonLeftSelected"}>
-<#assign selectedRightClassMap = {page.headerItem?default("void") : "headerButtonRightSelected"}>
-
-<div class="apptitle">&nbsp;Content Manager Application&nbsp;</div>
-<div class="row">
-  <div class="col"><a href="<@ofbizUrl>main</@ofbizUrl>" class="${selectedLeftClassMap.main?default(unselectedLeftClassName)}">Main</a></div>
-  <div class="col"><a href="<@ofbizUrl>FindWebSite</@ofbizUrl>" class="${selectedLeftClassMap.WebSite?default(unselectedLeftClassName)}">WebSites</a></div>
-  <div class="col"><a href="<@ofbizUrl>FindSurvey</@ofbizUrl>" class="${selectedLeftClassMap.Survey?default(unselectedLeftClassName)}">Surveys</a></div>
-  <div class="col"><a href="<@ofbizUrl>ContentMenu</@ofbizUrl>" class="${selectedLeftClassMap.Content?default(unselectedLeftClassName)}">Content</a></div>
-  <div class="col"><a href="<@ofbizUrl>DataMenu</@ofbizUrl>" class="${selectedLeftClassMap.DataResource?default(unselectedLeftClassName)}">DataResource</a></div>
-
-  <div class="col"><a href="<@ofbizUrl>ContentSetupMenu</@ofbizUrl>" class="${selectedLeftClassMap.ContentSetupMenu?default(unselectedLeftClassName)}">Content Setup</a></div>
-  <div class="col"><a href="<@ofbizUrl>DataSetupMenu</@ofbizUrl>" class="${selectedLeftClassMap.DataResourceSetupMenu?default(unselectedLeftClassName)}">DataResource Setup</a></div>
-
-  <div class="col"><a href="<@ofbizUrl>LayoutMenu</@ofbizUrl>" class="${selectedLeftClassMap.Layout?default(unselectedLeftClassName)}">Template</a></div>
-  <#assign cmsTarget="CMSContentFind"/>
-  <#if menuContext?has_content && menuContext.cmsRequestName?has_content>
-     <#assign cmsTarget=menuContext.cms.cmsRequestName/>
-  </#if>
-  <div class="col"><a href="<@ofbizUrl>${cmsTarget}</@ofbizUrl>" class="${selectedLeftClassMap.CMS?default(unselectedLeftClassName)}">CMS</a></div>
-  <div class="col"><a href="<@ofbizUrl>FindCompDoc</@ofbizUrl>" class="${selectedLeftClassMap.CompDoc?default(unselectedLeftClassName)}">CompDoc</a></div>
-
-  <#if requestAttributes.userLogin?has_content>
-    <div class="col-right"><a href="<@ofbizUrl>logout</@ofbizUrl>" class="${selectedRightClassMap.login?default(unselectedRightClassName)}">Logout</a></div>
-  <#else>
-    <div class="col-right"><a href='<@ofbizUrl>${checkLoginUrl?if_exists}</@ofbizUrl>' class='${selectedRightClassMap.login?default(unselectedRightClassName)}'>Login</a></div>
-  </#if>
-  <div class="col-fill">&nbsp;</div>
-</div>

Deleted: trunk/applications/content/webapp/content/includes/states.ftl
===================================================================
--- trunk/applications/content/webapp/content/includes/states.ftl	2006-02-12 03:12:29 UTC (rev 6719)
+++ trunk/applications/content/webapp/content/includes/states.ftl	2006-02-12 09:27:26 UTC (rev 6720)
@@ -1,6 +0,0 @@
-
-<#assign states = Static["org.ofbiz.common.CommonWorkers"].getStateList(delegator)>
-<#list states as state>
-    <option value='${state.geoId}'>${state.geoName?default(state.geoId)}</option>
-</#list>
-

Modified: trunk/applications/content/webapp/content/templates/main.ftl
===================================================================
--- trunk/applications/content/webapp/content/templates/main.ftl	2006-02-12 03:12:29 UTC (rev 6719)
+++ trunk/applications/content/webapp/content/templates/main.ftl	2006-02-12 09:27:26 UTC (rev 6720)
@@ -150,34 +150,12 @@
 </head>
 
 <body <#if primaryHTMLField?exists && (primaryHTMLField?length >0)>onLoad="initEditor()"</#if> >
-<table border="0" width='100%' cellspacing='0' cellpadding='0' class='headerboxoutside'>
-  <tr>
-    <td width='100%'>
-      <table width='100%' border='0' cellspacing='0' cellpadding='0' class='headerboxtop'>
-        <tr>
-          <#if layoutSettings.headerImageUrl?exists>
-          <td align="left" width='1%'><img alt="${layoutSettings.companyName}" src='<@ofbizContentUrl>${layoutSettings.headerImageUrl}</@ofbizContentUrl>'></td>
-          </#if>       
-          <td align='right' width='1%' nowrap <#if layoutSettings.headerRightBackgroundUrl?has_content>background='${layoutSettings.headerRightBackgroundUrl}'</#if>>
-            <#if requestAttributes.person?has_content>
-              <div class="insideHeaderText">Welcome&nbsp;${requestAttributes.person.firstName?if_exists}&nbsp;${requestAttributes.person.lastName?if_exists}!</div>
-            <#elseif requestAttributes.partyGroup?has_content>
-              <div class="insideHeaderText">Welcome&nbsp;${requestAttributes.partyGroup.groupName?if_exists}!</div>
-            <#else>
-              <div class="insideHeaderText">Welcome!</div>
-            </#if>
-            <div class="insideHeaderText">&nbsp;${Static["org.ofbiz.base.util.UtilDateTime"].nowTimestamp().toString()}</div>
-          </td>
-        </tr>
-      </table>
-    </td>
-  </tr>
-</table>
 
-${pages.get("/includes/appbar.ftl")}
+${common.get("/includes/header.ftl")}
+${common.get("/includes/appbar.ftl")}
 
 <div class="centerarea">
-  ${pages.get("/includes/header.ftl")}
+  ${pages.get("/includes/appheader.ftl")}
   <div class="contentarea">
     <div style='border: 0; margin: 0; padding: 0; width: 100%;'>
       <table style='border: 0; margin: 0; padding: 0; width: 100%;' cellpadding='0' cellspacing='0'>
@@ -208,7 +186,7 @@
   </div>
 </div>
 
-${pages.get("/includes/footer.ftl")}
+${common.get("/includes/footer.ftl")}
 
 </body>
 </html>

Modified: trunk/applications/content/widget/CommonScreens.xml
===================================================================
--- trunk/applications/content/widget/CommonScreens.xml	2006-02-12 03:12:29 UTC (rev 6719)
+++ trunk/applications/content/widget/CommonScreens.xml	2006-02-12 09:27:26 UTC (rev 6720)
@@ -43,13 +43,11 @@
                 <!-- render header -->
                 <platform-specific><html><html-template location="component://common/webcommon/includes/header.ftl"/></html></platform-specific>
                 <!-- render appbar -->
-                <platform-specific><html><html-template location="component://content/webapp/content/includes/appbar.ftl"/></html></platform-specific>
+                <platform-specific><html><html-template location="component://common/webcommon/includes/appbar.ftl"/></html></platform-specific>
                 
                 <container style="centerarea">
                     <!-- render appheader -->
-                    <!-- 
-                    <platform-specific><html><html-template location="component://content/webapp/content/includes/header.ftl"/></html></platform-specific>
-                    -->
+                    <container style="apptitle"><label text="Content Manager Application"/></container>
                     <include-menu name="ContentAppBar" location="component://content/widget/ContentMenus.xml"/>
                     
                     <container style="contentarea">

Modified: trunk/applications/content/widget/ContentMenus.xml
===================================================================
--- trunk/applications/content/widget/ContentMenus.xml	2006-02-12 03:12:29 UTC (rev 6719)
+++ trunk/applications/content/widget/ContentMenus.xml	2006-02-12 09:27:26 UTC (rev 6720)
@@ -32,12 +32,12 @@
         <menu-item name="websites" title="${uiLabelMap.ContentWebSites}"><link target="FindWebSite"/></menu-item>
         <menu-item name="survey" title="${uiLabelMap.ContentSurvey}"><link target="FindSurvey"/></menu-item>
         <menu-item name="Content" title="${uiLabelMap.ContentContent}"><link target="ContentMenu"/></menu-item>
-        <menu-item name="DataResource" title="${uiLabelMap.ContentDataResource}"><link target="DataResource"/></menu-item>
+        <menu-item name="DataResource" title="${uiLabelMap.ContentDataResource}"><link target="DataMenu"/></menu-item>
         <menu-item name="ContentSetupMenu" title="${uiLabelMap.ContentContentSetup}"><link target="ContentSetupMenu"/></menu-item>
-        <menu-item name="DataResourceSetupMenu" title="${uiLabelMap.ContentDataSetup}"><link target="DataResourceSetupMenu"/></menu-item>
+        <menu-item name="DataResourceSetupMenu" title="${uiLabelMap.ContentDataSetup}"><link target="DataSetupMenu"/></menu-item>
         <menu-item name="Layout" title="${uiLabelMap.ContentTemplate}"><link target="LayoutMenu"/></menu-item>
         <menu-item name="CMS" title="${uiLabelMap.ContentCMS}"><link target="CMSContentFind"/></menu-item>
-        <menu-item name="CompDoc" title="${uiLabelMap.ContentCompDoc}"><link target="FindCompDocRoot"/></menu-item>
+        <menu-item name="CompDoc" title="${uiLabelMap.ContentCompDoc}"><link target="FindCompDoc"/></menu-item>
         
         <menu-item name="Logout" title="Logout" align-style="col-right" widget-style="headerButtonRight" selected-style="headerButtonRightSelected">
             <condition><not><if-empty field-name="userLogin"/></not></condition>



More information about the Svn mailing list