portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tay...@apache.org
Subject cvs commit: jakarta-jetspeed-2/portal/src/webapp/WEB-INF/decorations/layout/html/ja/tigris decorator-top.vm
Date Thu, 02 Dec 2004 05:18:09 GMT
taylor      2004/12/01 21:18:09

  Modified:    portal/src/webapp/WEB-INF/decorations/layout/html/jetspeed
                        decorator-top.vm decorator.properties
               portal/src/webapp/WEB-INF web.xml jetspeed_macros.vm
               portal/src/webapp/WEB-INF/decorations/layout/html/tigris
                        decorator-top.vm decorator.properties
               portal/src/webapp/WEB-INF/decorations/layout/html/ja/tigris
                        decorator-top.vm
  Added:       portal/src/webapp/WEB-INF/decorations/layout/html/jetspeed
                        decorator-macros.vm
               portal/src/webapp/WEB-INF/decorations/layout/html/tigris
                        decorator-macros.vm
  Removed:     portal/src/webapp/WEB-INF/templates/navigation/html/folders
                        LeftToRight.vm navigation.properties TopToBottom.vm
               portal/src/webapp/WEB-INF/templates/navigation/html/tabs
                        LeftToRight.vm navigation.properties
               portal/src/webapp/WEB-INF/templates/navigation/html/linksWithIcon1
                        TopToBottom.vm LeftToRight.vm navigation.properties
  Log:
  Supports individual VelocityEngine instances for decorators to allow local macro definitions.
  Caching of VelocityEngine is controlled via web.xml init parameters for JetspeedVelocityViewServlet.
  See decorator.properties and decorator-macros.vm files in tigris and jetspeed layout decorators
for use of this facility.
  
  Submitted by:	Randy Watler
  Reviewed by:	David Sean Taylor
  CVS: ----------------------------------------------------------------------
  CVS: PR:
  CVS:   If this change addresses a PR in the problem report tracking
  CVS:   database, then enter the PR number(s) here.
  CVS: Obtained from:
  CVS:   If this change has been taken from another system, such as NCSA,
  CVS:   then name the system in this line, otherwise delete it.
  CVS: Submitted by:
  CVS:   If this code has been contributed to Apache by someone else; i.e.,
  CVS:   they sent us a patch or a new module, then include their name/email
  CVS:   address here. If this is your work then delete this line.
  CVS: Reviewed by:
  CVS:   If we are doing pre-commit code reviews and someone else has
  CVS:   reviewed your changes, include their name(s) here.
  CVS:   If you have not had it reviewed then delete this line.
  
  Revision  Changes    Path
  1.23      +4 -6      jakarta-jetspeed-2/portal/src/webapp/WEB-INF/decorations/layout/html/jetspeed/decorator-top.vm
  
  Index: decorator-top.vm
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/portal/src/webapp/WEB-INF/decorations/layout/html/jetspeed/decorator-top.vm,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- decorator-top.vm	26 Nov 2004 18:51:41 -0000	1.22
  +++ decorator-top.vm	2 Dec 2004 05:18:09 -0000	1.23
  @@ -14,8 +14,6 @@
   limitations under the License.
   *#
   
  -#* Add all template constants to the current context *#
  -#defineConstants()
   #* Add the current layouts configuration values to the context *#
   #defineLayoutObjects()
   
  @@ -49,10 +47,10 @@
   	 </p>
   	#end
   	
  -  #includeNavigation("folders" $profiledPageContext.siblingFolders $LEFT_TO_RIGHT)
  +  #includeFoldersNavigation($profiledPageContext.siblingFolders)
   </p>
     <p>
  -  #includeNavigation("tabs" $profiledPageContext.siblingPages $LEFT_TO_RIGHT)
  +  #includeTabsNavigation($profiledPageContext.siblingPages)
     </p>
   </p>
   	
  @@ -64,7 +62,7 @@
       <tr>
         <td nowrap>  
           <br>Additional Links:
  -        #includeNavigation("linksWithIcon1" $profiledPageContext.rootLinks $TOP_TO_BOTTOM)
  +        #includeLinksWithIconNavigation($profiledPageContext.rootLinks)
         </td>
       </tr>
       #end
  @@ -74,7 +72,7 @@
         <tr>
           <td nowrap>    
             <br><span title="$docSet.getTitle($preferedLocale)">${docSet.getShortTitle($preferedLocale)}</span>:
  -          #includeDocumentSetNavigation("linksWithIcon1" $docSet $docSetNodes $TOP_TO_BOTTOM)
  +          #includeNestedLinksWithIconNavigation($docSetNodes $docSet.url)
           </td>
         </tr>
       #end
  
  
  
  1.2       +2 -1      jakarta-jetspeed-2/portal/src/webapp/WEB-INF/decorations/layout/html/jetspeed/decorator.properties
  
  Index: decorator.properties
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/portal/src/webapp/WEB-INF/decorations/layout/html/jetspeed/decorator.properties,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- decorator.properties	20 Sep 2004 19:26:01 -0000	1.1
  +++ decorator.properties	2 Dec 2004 05:18:09 -0000	1.2
  @@ -15,5 +15,6 @@
   id=jetspeed
   template.type=velocity
   template.extension=.vm
  +template.macros=-macros
   decorates=layout
  -base.css.class=layout-Jetspeed
  \ No newline at end of file
  +base.css.class=layout-Jetspeed
  
  
  
  1.1                  jakarta-jetspeed-2/portal/src/webapp/WEB-INF/decorations/layout/html/jetspeed/decorator-macros.vm
  
  Index: decorator-macros.vm
  ===================================================================
  #* include potentially nested links navigation component *#
  #macro (includeNestedLinksWithIconNavigation $_nodeSet $_nodePrefix)
    <div>
    #foreach($node in $_nodeSet.iterator()) 
      #if($node.type == ".psml")
        <div><a href="$jetspeed.getAbsoluteUrl($node.url)" class="LinkPage" title="$node.getTitle($preferedLocale)">$node.getShortTitle($preferedLocale)</a></div>
      #elseif($node.type == ".link")
        <div><a href="$node.url" target="$node.target" class="Link" title="$node.getTitle($preferedLocale)">$node.getShortTitle($preferedLocale)</a></div>
      #elseif($node.type == "folder")
        <div><a href="$jetspeed.getAbsoluteUrl($node.url)" class="LinkFolder" title="$node.getTitle($preferedLocale)">$node.getShortTitle($preferedLocale)</a></div>
      #elseif($node.type == ".ds")
        <div class="pagetitle" title="$node.getTitle($preferedLocale)">${node.getShortTitle($preferedLocale)}</div>
        #set($__nodePrefix = "${_nodePrefix}${node.url}")
        #set($__nodeSet = $profiledPageContext.getDocumentSetNodes($__nodePrefix))
        #includeNestedLinksWithIconNavigation($__nodeSet $__nodePrefix)
      #else
        <div><a href="$node.url" title="$node.getTitle()">$node.getShortTitle()</a></div>
      #end
    #end
    </div>
  #end
  #macro (includeLinksWithIconNavigation $_nodeSet)
    #includeNestedLinksWithIconNavigation($_nodeSet "")
  #end
  
  #* include folders navigation component *#
  #macro (includeFoldersNavigation $_nodeSet)
    <div class="FolderList">
    #foreach($childFolder in $_nodeSet.iterator())
      <span><a href="$jetspeed.getAbsoluteUrl($childFolder.url)" class="FolderLink"
title="$childFolder.getTitle($preferedLocale)">$childFolder.getShortTitle($preferedLocale)</a></span>
	
    #end
    </div>
  #end
  
  #* include tabs navigation component *#
  #macro (includeTabsNavigation $_nodeSet)
    <table border="0" cellpadding="0" cellspacing="0">
      <tr>
        #foreach($childPage in $_nodeSet.iterator())
          #set($tabTitle = $childPage.getTitle($preferedLocale))
          #set($tabName = $childPage.getShortTitle($preferedLocale))
          #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
      </tr>
    </table>
  #end
  
  
  
  1.20      +8 -0      jakarta-jetspeed-2/portal/src/webapp/WEB-INF/web.xml
  
  Index: web.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/portal/src/webapp/WEB-INF/web.xml,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- web.xml	27 Oct 2004 05:13:00 -0000	1.19
  +++ web.xml	2 Dec 2004 05:18:09 -0000	1.20
  @@ -128,6 +128,14 @@
   			<param-name>org.apache.velocity.properties</param-name>
   			<param-value>/WEB-INF/velocity.properties</param-value>
   		</init-param>
  +		<init-param>
  +			<param-name>org.apache.jetspeed.cache.size</param-name>
  +			<param-value>50</param-value>
  +		</init-param>
  +		<init-param>
  +			<param-name>org.apache.jetspeed.cache.validation.interval</param-name>
  +			<param-value>10000</param-value>
  +		</init-param>
   		<load-on-startup>10</load-on-startup>
   	</servlet>
   
  
  
  
  1.6       +1 -31     jakarta-jetspeed-2/portal/src/webapp/WEB-INF/jetspeed_macros.vm
  
  Index: jetspeed_macros.vm
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/portal/src/webapp/WEB-INF/jetspeed_macros.vm,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- jetspeed_macros.vm	26 Nov 2004 18:51:41 -0000	1.5
  +++ jetspeed_macros.vm	2 Dec 2004 05:18:09 -0000	1.6
  @@ -1,11 +1,3 @@
  -#macro (defineConstants)
  -  #* Constants for layout orientation *#	
  -  #set($LEFT_TO_RIGHT = "LeftToRight")
  -  #set($RIGHT_TO_LEFT = "RightToLeft")
  -  #set($TOP_TO_BOTTOM = "TopToBottom")
  -  #set($BOTTOM_TO_TOP = "BottomToTop")
  -#end
  -
   #macro (defineLayoutObjects)
     #set($_layoutDecorator = $myPage.getDefaultDecorator("layout"))
     #set($_layoutDecoratorConfig = $jetspeed.getTypeConfiguration("layout", "${_layoutDecorator}",
"decorations"))
  @@ -16,29 +8,7 @@
   #* Adds link for all style sheets required by the layout and portlet decorations *#
   #macro (includeStyleSheets)
    #set($cssUrls = $renderRequest.getAttribute("cssUrls"))
  - #foreach($cssUrl in $cssUrls)
  -    
  + #foreach($cssUrl in $cssUrls)    
   	<link rel="stylesheet" type="text/css" media="all" href="$cssUrl" />
    #end
  -#end
  -
  -#* Includes a nested navigation component *#
  -#macro (includeNestedNavigation $_name $_nodeSet $_orientation $_nodePrefix)
  -  #parse($jetspeed.getTemplate("${_name}/${_orientation}${_ext}", "navigation").appRelativePath)
  -#end
  -
  -#* Includes a navigation component *#
  -#macro (defineConfig $name $type)
  -  #set($_navConfig =$jetspeed.getTypeConfiguration("navigation", $name, "templates"))
  -#end
  -#macro (includeNavigation $_name $_nodeSet $_orientation)
  -  #defineConfig($_name "navigation")
  -  #set($_ext = $_navConfig.getString("template.extension"))
  -  #includeNestedNavigation($_name $_nodeSet $_orientation "")
  -#end
  -#macro (includeDocumentSetNavigation $_name $_node $_nodeSet $_orientation)
  -  #defineConfig($_name "navigation")
  -  #set($_ext = $_navConfig.getString("template.extension"))
  -  #set($_nodePrefix = $_node.url)
  -  #includeNestedNavigation($_name $_nodeSet $_orientation $_nodePrefix)
   #end
  
  
  
  1.4       +6 -6      jakarta-jetspeed-2/portal/src/webapp/WEB-INF/decorations/layout/html/tigris/decorator-top.vm
  
  Index: decorator-top.vm
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/portal/src/webapp/WEB-INF/decorations/layout/html/tigris/decorator-top.vm,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- decorator-top.vm	26 Nov 2004 18:51:41 -0000	1.3
  +++ decorator-top.vm	2 Dec 2004 05:18:09 -0000	1.4
  @@ -15,7 +15,7 @@
   *#
   
   #* Add all template constants to the current context *#
  -#defineConstants()
  +#defineNavigationConstants()
   #* Add the current layouts configuration values to the context *#
   #defineLayoutObjects()
   
  @@ -59,7 +59,7 @@
         </div>
   <!-- Top Tabs -->
         <div class="tabs">
  -#includeNavigation("tabs" $profiledPageContext.siblingPages $LEFT_TO_RIGHT)
  +#includeTabsNavigation($profiledPageContext.siblingPages $LEFT_TO_RIGHT)
         </div>
         <div id="breadcrumbs">
   #if($parentFolder)
  @@ -81,7 +81,7 @@
             Folders and Pages
           </div>
           <div class="body">
  -#includeNavigation("folders" $profiledPageContext.siblingFolders $TOP_TO_BOTTOM)
  +#includeFoldersNavigation($profiledPageContext.siblingFolders $TOP_TO_BOTTOM)
   
   #foreach($docSetName in $profiledPageContext.documentSetNames)
     #set($docSet = $profiledPageContext.getDocumentSet($docSetName))
  @@ -91,7 +91,7 @@
               ${docSet.getShortTitle($preferedLocale)}
               </div>
             </div>
  -#includeDocumentSetNavigation("linksWithIcon1" $docSet $docSetNodes $TOP_TO_BOTTOM)
  +#includeNestedLinksWithIconNavigation($docSetNodes $docSet.url $TOP_TO_BOTTOM)
   #end
           </div>
         </div>
  @@ -105,7 +105,7 @@
             Additional Links
           </div>
           <div class="body">
  -#includeNavigation("linksWithIcon1" $profiledPageContext.rootLinks $TOP_TO_BOTTOM)
  +#includeLinksWithIconNavigation($profiledPageContext.rootLinks $TOP_TO_BOTTOM)
           </div>
         </div>
       </td>
  
  
  
  1.2       +1 -0      jakarta-jetspeed-2/portal/src/webapp/WEB-INF/decorations/layout/html/tigris/decorator.properties
  
  Index: decorator.properties
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/portal/src/webapp/WEB-INF/decorations/layout/html/tigris/decorator.properties,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- decorator.properties	31 Oct 2004 22:06:10 -0000	1.1
  +++ decorator.properties	2 Dec 2004 05:18:09 -0000	1.2
  @@ -15,5 +15,6 @@
   id=tigris
   template.type=velocity
   template.extension=.vm
  +template.macros=-macros
   decorates=layout
   base.css.class=layout-tigris
  
  
  
  1.1                  jakarta-jetspeed-2/portal/src/webapp/WEB-INF/decorations/layout/html/tigris/decorator-macros.vm
  
  Index: decorator-macros.vm
  ===================================================================
  #* define navigation constants *#
  #macro (defineNavigationConstants)
    #* Constants for layout orientation *#	
    #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 = $profiledPageContext.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
  
  
  
  1.5       +7 -7      jakarta-jetspeed-2/portal/src/webapp/WEB-INF/decorations/layout/html/ja/tigris/decorator-top.vm
  
  Index: decorator-top.vm
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/portal/src/webapp/WEB-INF/decorations/layout/html/ja/tigris/decorator-top.vm,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- decorator-top.vm	26 Nov 2004 21:25:16 -0000	1.4
  +++ decorator-top.vm	2 Dec 2004 05:18:09 -0000	1.5
  @@ -15,7 +15,7 @@
   *#
   
   #* Add all template constants to the current context *#
  -#defineConstants()
  +#defineNavigationConstants()
   #* Add the current layouts configuration values to the context *#
   #defineLayoutObjects()
   
  @@ -59,11 +59,11 @@
         </div>
   <!-- Top Tabs -->
         <div class="tabs">
  -#includeNavigation("tabs" $profiledPageContext.siblingPages $LEFT_TO_RIGHT)
  +#includeTabsNavigation($profiledPageContext.siblingPages $LEFT_TO_RIGHT)
         </div>
         <div id="breadcrumbs">
   #if($parentFolder)
  -		<a href="$jetspeed.getAbsoluteUrl($parentFolder.url)" title="$parentFolder.getTitle($preferedLocale)">$parentFolder.getShortTitle($preferedLocale)へ戻る</a>
  +		<a href="$jetspeed.getAbsoluteUrl($parentFolder.url)" title="$parentFolder.getTitle($preferedLocale)">$parentFolder.getShortTitle($preferedLocale)?戻る</a>
   #end
           &nbsp;
         </div>
  @@ -81,7 +81,7 @@
             フォルダ&ページ
           </div>
           <div class="body">
  -#includeNavigation("folders" $profiledPageContext.siblingFolders $TOP_TO_BOTTOM)
  +#includeFoldersNavigation($profiledPageContext.siblingFolders $TOP_TO_BOTTOM)
   
   #foreach($docSetName in $profiledPageContext.documentSetNames)
     #set($docSet = $profiledPageContext.getDocumentSet($docSetName))
  @@ -91,7 +91,7 @@
               ${docSet.getShortTitle($preferedLocale)}
               </div>
             </div>
  -#includeDocumentSetNavigation("linksWithIcon1" $docSet $docSetNodes $TOP_TO_BOTTOM)
  +#includeNestedLinksWithIconNavigation($docSetNodes $docSet.url $TOP_TO_BOTTOM)
   #end
           </div>
         </div>
  @@ -105,7 +105,7 @@
             追加リンク
           </div>
           <div class="body">
  -#includeNavigation("linksWithIcon1" $profiledPageContext.rootLinks $TOP_TO_BOTTOM)
  +#includeLinksWithIconNavigation($profiledPageContext.rootLinks $TOP_TO_BOTTOM)
           </div>
         </div>
       </td>
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org


Mime
View raw message