[pal-cvs 3387] [1121] added wcm layout decorator.

svnno****@sourc***** svnno****@sourc*****
2008年 9月 5日 (金) 10:59:38 JST


Revision: 1121
          http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=pal&view=rev&rev=1121
Author:   shinsuke
Date:     2008-09-05 10:59:38 +0900 (Fri, 05 Sep 2008)

Log Message:
-----------
added wcm layout decorator.

Added Paths:
-----------
    pal-portal/branches/pal-portal-1.x/portal/jetspeed-2/src/webapp/decorations/layout/wcm/
    pal-portal/branches/pal-portal-1.x/portal/jetspeed-2/src/webapp/decorations/layout/wcm/css/
    pal-portal/branches/pal-portal-1.x/portal/jetspeed-2/src/webapp/decorations/layout/wcm/css/styles.css
    pal-portal/branches/pal-portal-1.x/portal/jetspeed-2/src/webapp/decorations/layout/wcm/decorator-macros.vm
    pal-portal/branches/pal-portal-1.x/portal/jetspeed-2/src/webapp/decorations/layout/wcm/decorator.properties
    pal-portal/branches/pal-portal-1.x/portal/jetspeed-2/src/webapp/decorations/layout/wcm/footer.vm
    pal-portal/branches/pal-portal-1.x/portal/jetspeed-2/src/webapp/decorations/layout/wcm/header.vm


-------------- next part --------------
Added: pal-portal/branches/pal-portal-1.x/portal/jetspeed-2/src/webapp/decorations/layout/wcm/css/styles.css
===================================================================
--- pal-portal/branches/pal-portal-1.x/portal/jetspeed-2/src/webapp/decorations/layout/wcm/css/styles.css	                        (rev 0)
+++ pal-portal/branches/pal-portal-1.x/portal/jetspeed-2/src/webapp/decorations/layout/wcm/css/styles.css	2008-09-05 01:59:38 UTC (rev 1121)
@@ -0,0 +1,18 @@
+ @ import url("../../css/portal-standard.css");
+
+body {
+    font-family: Verdana, Helvetica, Arial, sans-serif;
+    voice-family: "\"}\"";
+    voice-family: inherit;
+    padding: 0;
+    background: #EFEFDE;
+    color: #000;
+}
+
+a:link, a:visited {
+    color: blue;
+}
+
+a:hover {
+    color: #f30 !important;
+}


Property changes on: pal-portal/branches/pal-portal-1.x/portal/jetspeed-2/src/webapp/decorations/layout/wcm/css/styles.css
___________________________________________________________________
Name: svn:eol-style
   + native

Added: pal-portal/branches/pal-portal-1.x/portal/jetspeed-2/src/webapp/decorations/layout/wcm/decorator-macros.vm
===================================================================
--- pal-portal/branches/pal-portal-1.x/portal/jetspeed-2/src/webapp/decorations/layout/wcm/decorator-macros.vm	                        (rev 0)
+++ pal-portal/branches/pal-portal-1.x/portal/jetspeed-2/src/webapp/decorations/layout/wcm/decorator-macros.vm	2008-09-05 01:59:38 UTC (rev 1121)
@@ -0,0 +1,117 @@
+#*
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+*#
+#* define navigation constants *#
+#macro (defineNavigationConstants)
+  #set($LEFT_TO_RIGHT = "LeftToRight")
+  #set($RIGHT_TO_LEFT = "RightToLeft")
+  #set($TOP_TO_BOTTOM = "TopToBottom")
+  #set($BOTTOM_TO_TOP = "BottomToTop")
+#end
+
+#* include potentially nested links navigation component *#
+#macro (includeNestedLinksWithIconNavigation $_nodeSet $_nodePrefix $_orientation)
+  <div>
+  #foreach($node in $_nodeSet.iterator()) 
+    #if($_orientation == $TOP_TO_BOTTOM)
+      #if($node.type == ".ds")
+        <div class="pagetitle" title="$node.getTitle($preferedLocale)">${node.getShortTitle($preferedLocale)}</div>
+      #else
+        <div>
+      #end
+    #end
+
+    #if($node.type == ".psml")
+      <a href="$jetspeed.getAbsoluteUrl($node.url)" class="LinkPage" title="$node.getTitle($preferedLocale)">$node.getShortTitle($preferedLocale)</a>    
+    #elseif($node.type == ".link")
+      <a href="$node.url" target="$node.target" class="Link" title="$node.getTitle($preferedLocale)">$node.getShortTitle($preferedLocale)</a>    
+    #elseif($node.type == "folder")
+      <a href="$jetspeed.getAbsoluteUrl($node.url)" class="LinkFolder" title="$node.getTitle($preferedLocale)">$node.getShortTitle($preferedLocale)</a>    
+    #elseif($node.type == ".ds")
+      #set($__nodePrefix = "${_nodePrefix}${node.url}")
+      #set($__nodeSet = $site.getDocumentSetNodes($__nodePrefix))
+      #includeNestedLinksWithIconNavigation($__nodeSet $__nodePrefix $_orientation)
+    #else
+      <a href="$node.url" title="$node.getTitle()">$node.getShortTitle()</a>    
+    #end
+
+    #if($_orientation == $TOP_TO_BOTTOM)
+      #if($node.type != ".ds")
+        </div>
+      #end
+    #end
+  #end
+  </div>
+#end
+#macro (includeLinksWithIconNavigation $_nodeSet $_orientation)
+  #includeNestedLinksWithIconNavigation($_nodeSet "" $_orientation)
+#end
+
+#* include folders navigation component *#
+#macro (includeFoldersNavigation $_nodeSet $_orientation)
+  <div class="FolderList">
+  #foreach($childFolder in $_nodeSet.iterator())
+    #if($_orientation == $LEFT_TO_RIGHT)
+      <span>
+    #elseif($_orientation == $TOP_TO_BOTTOM)
+      <div>
+    #end
+
+    <a href="$jetspeed.getAbsoluteUrl($childFolder.url)" class="FolderLink" title="$childFolder.getTitle($preferedLocale)">$childFolder.getShortTitle($preferedLocale)</a>        
+
+    #if($_orientation == $LEFT_TO_RIGHT)
+      </span>
+    #elseif($_orientation == $TOP_TO_BOTTOM)
+      </div>
+    #end
+  #end
+  </div>
+#end
+
+#* include tabs navigation component *#
+#macro (includeTabsNavigation $_nodeSet $_orientation)
+  <table border="0" cellpadding="0" cellspacing="0">
+    <tr>
+    #foreach($childPage in $_nodeSet.iterator())
+      #set($tabTitle = $childPage.getTitle($preferedLocale))
+      #set($tabName = $childPage.getShortTitle($preferedLocale))
+
+      #if($_orientation == $LEFT_TO_RIGHT)
+        #if($jetspeed.page.id == $childPage.id)
+          <td class="LTabLeft" nowrap="true">&nbsp;</td>
+          <td class="LTab" align="center" valign="middle" nowrap="true" title="$tabTitle">${tabName}</td>
+          <td class="LTabRight"  nowrap="true">&nbsp;</td>
+        #else
+          <td class="LTabLeftLow"  nowrap="true">&nbsp;</td>
+          <td class="LTabLow" align="center" valign="middle" nowrap="true" title="$tabTitle"><a href="$jetspeed.getAbsoluteUrl($childPage.url)">${tabName}</a></td>
+          <td class="LTabRightLow"  nowrap="true">&nbsp;</td>
+        #end
+      #end
+    #end
+    </tr>
+  </table>
+#end
+
+#macro (PageActionBar)
+ #set($_actions = $layoutDecoration.actions)
+  <div align="right">
+    #if($_actions.size() >0)
+    #foreach ($_action in $_actions)   
+     <a href="${_action.Action}" title="${_action.Name}" class="action pageAction" >${_action.Alt}</a>
+    #end   
+    #end
+  </div>
+#end

Added: pal-portal/branches/pal-portal-1.x/portal/jetspeed-2/src/webapp/decorations/layout/wcm/decorator.properties
===================================================================
--- pal-portal/branches/pal-portal-1.x/portal/jetspeed-2/src/webapp/decorations/layout/wcm/decorator.properties	                        (rev 0)
+++ pal-portal/branches/pal-portal-1.x/portal/jetspeed-2/src/webapp/decorations/layout/wcm/decorator.properties	2008-09-05 01:59:38 UTC (rev 1121)
@@ -0,0 +1,6 @@
+id=wcm
+template.type=velocity
+template.extension=.vm
+template.macros=-macros
+decorates=layout
+base.css.class=layout-wcm


Property changes on: pal-portal/branches/pal-portal-1.x/portal/jetspeed-2/src/webapp/decorations/layout/wcm/decorator.properties
___________________________________________________________________
Name: svn:eol-style
   + native

Added: pal-portal/branches/pal-portal-1.x/portal/jetspeed-2/src/webapp/decorations/layout/wcm/footer.vm
===================================================================
--- pal-portal/branches/pal-portal-1.x/portal/jetspeed-2/src/webapp/decorations/layout/wcm/footer.vm	                        (rev 0)
+++ pal-portal/branches/pal-portal-1.x/portal/jetspeed-2/src/webapp/decorations/layout/wcm/footer.vm	2008-09-05 01:59:38 UTC (rev 1121)
@@ -0,0 +1,2 @@
+</body>
+</html>

Added: pal-portal/branches/pal-portal-1.x/portal/jetspeed-2/src/webapp/decorations/layout/wcm/header.vm
===================================================================
--- pal-portal/branches/pal-portal-1.x/portal/jetspeed-2/src/webapp/decorations/layout/wcm/header.vm	                        (rev 0)
+++ pal-portal/branches/pal-portal-1.x/portal/jetspeed-2/src/webapp/decorations/layout/wcm/header.vm	2008-09-05 01:59:38 UTC (rev 1121)
@@ -0,0 +1,18 @@
+## Add the current layouts configuration values to the context
+#defineLayoutObjects()##
+## Loads our custom macros
+#parse($layoutDecoration.getResource("decorator-macros.vm"))##
+## Add all template constants to the current context
+#defineNavigationConstants()##
+<html>
+  <head>
+#includeHeaderResource()
+    <meta http-equiv="Content-type" content="#ContentType()" />
+    <meta http-equiv="Content-style-type" content="text/css" />
+#includeJavaScriptForHead()
+#IncludeStylesheets()
+    <title>#PageTitle()</title>
+    <meta name="keywords" content="#PageKeywords()" />
+    <meta name="description" content="#PageDescription()" />
+  </head>
+  <body marginwidth="0" marginheight="0" class="#PageBaseCSSClass()">


pal-cvs メーリングリストの案内