portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wea...@apache.org
Subject svn commit: r354595 - in /portals/jetspeed-2/trunk/src/webapp/WEB-INF/templates/layout: html/columns/layout.vm html/maximized/layout.vm xhtml-basic/columns/layout.vm
Date Tue, 06 Dec 2005 22:43:39 GMT
Author: weaver
Date: Tue Dec  6 14:43:36 2005
New Revision: 354595

URL: http://svn.apache.org/viewcvs?rev=354595&view=rev
Log:
- Adding required macros
- Adjustments for new Decorator API.

Modified:
    portals/jetspeed-2/trunk/src/webapp/WEB-INF/templates/layout/html/columns/layout.vm
    portals/jetspeed-2/trunk/src/webapp/WEB-INF/templates/layout/html/maximized/layout.vm
    portals/jetspeed-2/trunk/src/webapp/WEB-INF/templates/layout/xhtml-basic/columns/layout.vm

Modified: portals/jetspeed-2/trunk/src/webapp/WEB-INF/templates/layout/html/columns/layout.vm
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/src/webapp/WEB-INF/templates/layout/html/columns/layout.vm?rev=354595&r1=354594&r2=354595&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/src/webapp/WEB-INF/templates/layout/html/columns/layout.vm (original)
+++ portals/jetspeed-2/trunk/src/webapp/WEB-INF/templates/layout/html/columns/layout.vm Tue
Dec  6 14:43:36 2005
@@ -65,7 +65,6 @@
 
  <div id="$renderResponse.namespace" class="portal-layout portal-layout-$layoutType">
 	#set ($sizeIndex = 0)
-    #set ($layoutImageBase = "${jetspeed.pageBasePath}/content/images")
 	#foreach($column in $columnLayout.columns)
 	  #set($columnWidth = "auto")
 	  
@@ -108,9 +107,8 @@
                #set($leftUrl = $renderResponse.createActionURL())    
                $!leftUrl.setParameter("move","3")
                $!leftUrl.setParameter("fragmentToMove","$f.id")
-			   $!leftUrl.setParameter("editingPage","$myPage.id")  
-               #set ($imgsrc="$layoutImageBase/movePortletLeft.gif")
-               <a href="$leftUrl" class="move-portlet-left"><img src="$jetspeed.getAbsoluteUrl($imgsrc)"
border="0" title="Move Portlet Left"/></a>
+			   $!leftUrl.setParameter("editingPage","$myPage.id")                
+               <a href="$leftUrl" class="move-portlet-left"><img src="#GetPageResource('images/movePortletLeft.gif')"
border="0" title="Move Portlet Left"/></a>
 			 #end
 			 
 			 ## Move portlet up	
@@ -119,16 +117,14 @@
                  $!upUrl.setParameter("move","1")
                  $!upUrl.setParameter("fragmentToMove","$f.id")
 				 $!upUrl.setParameter("editingPage","$myPage.id") 
-                 #set ($imgsrc="$layoutImageBase/movePortletUp.gif")
-                 <a href="$upUrl" class="move-portlet-up"><img src="$jetspeed.getAbsoluteUrl($imgsrc)"
border="0" title="Move Portlet Up"/></a>
+                 <a href="$upUrl" class="move-portlet-up"><img src="#GetPageResource('images/movePortletUp.gif')"
border="0" title="Move Portlet Up"/></a>
 			 #end
 			 
 			 ## Remove portlet from page
              #set($deleter = $renderResponse.createActionURL())    
              $deleter.setParameter("deleteId","$f.id")
              $deleter.setParameter("page","$myPage")                         
-             #set ($imgsrc="$layoutImageBase/close.gif")
-             <a href="$deleter" class="remove-portlet-from-apge"><img src="$jetspeed.getAbsoluteUrl($imgsrc)"
border="0" title="Remove Portlet"/></a>
+             <a href="$deleter" class="remove-portlet-from-apge"><img src="#GetPageResource('images/close.gif')"
border="0" title="Remove Portlet"/></a>
 			 
 			 ## Move portlet down
              #if($row < $lastRow)						
@@ -136,8 +132,7 @@
                $!downUrl.setParameter("move","2")
                $!downUrl.setParameter("fragmentToMove","$f.id")
 			   $!downUrl.setParameter("editingPage","$myPage.id") 
-               #set ($imgsrc="$layoutImageBase/movePortletDown.gif")
-               <a href="$downUrl" class="move-portlet-down"><img src="$jetspeed.getAbsoluteUrl($imgsrc)"
border="0" title="Move Portlet Down"/></a>
+               <a href="$downUrl" class="move-portlet-down"><img src="#GetPageResource('images/movePortletDown.gif')"
border="0" title="Move Portlet Down"/></a>
 			 #end
 			 
 			 ## Move portlet right
@@ -146,8 +141,7 @@
                $!rightUrl.setParameter("move","4")
                $!rightUrl.setParameter("fragmentToMove","$f.id")
 			   $!rightUrl.setParameter("editingPage","$myPage.id") 
-               #set ($imgsrc="$layoutImageBase/movePortletRight.gif")
-               <a href="$rightUrl" class="move-portlet-right"><img src="$jetspeed.getAbsoluteUrl($imgsrc)"
border="0" title="Move Portlet Right"/></a>
+               <a href="$rightUrl" class="move-portlet-right"><img src="#GetPageResource('images/movePortletRight.gif')"
border="0" title="Move Portlet Right"/></a>
 			 #end
 </form>			 
 		   </div>

Modified: portals/jetspeed-2/trunk/src/webapp/WEB-INF/templates/layout/html/maximized/layout.vm
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/src/webapp/WEB-INF/templates/layout/html/maximized/layout.vm?rev=354595&r1=354594&r2=354595&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/src/webapp/WEB-INF/templates/layout/html/maximized/layout.vm
(original)
+++ portals/jetspeed-2/trunk/src/webapp/WEB-INF/templates/layout/html/maximized/layout.vm
Tue Dec  6 14:43:36 2005
@@ -14,43 +14,19 @@
 See the License for the specific language governing permissions and
 limitations under the License.
 *#
-
-#set($table = $jetspeed.columns)
-
 #set($myPage = $jetspeed.page)
+#set($f = $request.getAttribute("org.apache.jetspeed.maximized.Fragment"))
+#set($rootFragment = $myPage.rootFragment)
 
-#set($myFragment = $request.getAttribute("org.apache.jetspeed.maximized.Fragment"))
-
-#set($myLayout = $jetspeed.currentLayout)
-
-#set($decorator = $myPage.getDefaultDecorator($myFragment.getType()))
-#set($ldecorator = $myPage.getDefaultDecorator("layout"))  
-
-#if($myFragment.getDecorator())
-    #set($decorator = $myFragment.getDecorator())
-#end
-
-#if($myLayout.getDecorator())
-        #set($ldecorator = $myLayout.getDecorator())
+#if ($rootFragment.decoration.header)
+   #parse($rootFragment.decoration.header)
 #end
 
-#if ($ldecorator)
-   #set($decoTop = "${ldecorator}/decorator-top.vm")
-   #set($decoBottom = "${ldecorator}/decorator-bottom.vm")
-#end
-
-<!-- Decorator  $decorator  ${decoTop} - ${decoBottom}-->
-
-  #if ($decoTop)
-      #parse($jetspeed.getDecoration($decoTop, "layout").appRelativePath)
-  #end
-
   ## get the decorated Portlet content
   <div id="portal-layout-$htmlUtil.getSafeElementId($myPage.id)" class="portal-layout-maxed">
-    #parse($jetspeed.decorateAndInclude($myFragment))
+    #parse($f.decoration.template)
   </div>
-
-
-#if ($decoBottom)
-   #parse($jetspeed.getDecoration($decoBottom, "layout").appRelativePath)
+  
+#if ($rootFragment.decoration.footer)
+  #parse($rootFragment.decoration.footer)
 #end

Modified: portals/jetspeed-2/trunk/src/webapp/WEB-INF/templates/layout/xhtml-basic/columns/layout.vm
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/src/webapp/WEB-INF/templates/layout/xhtml-basic/columns/layout.vm?rev=354595&r1=354594&r2=354595&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/src/webapp/WEB-INF/templates/layout/xhtml-basic/columns/layout.vm
(original)
+++ portals/jetspeed-2/trunk/src/webapp/WEB-INF/templates/layout/xhtml-basic/columns/layout.vm
Tue Dec  6 14:43:36 2005
@@ -21,16 +21,7 @@
 #set($editing = true)
 #set($lastColumn = $renderRequest.getAttribute("numberOfColumns") - 1)
 #end
-#if($myFragment.getDecorator())
-#set($decorator = $myFragment.getDecorator())
-#end
-#if($decorator)
-#set($decoTop = "${decorator}/decorator-top.vm")
-#set($decoBottom = "${decorator}/decorator-bottom.vm")
-#end
-#if(($decoTop) && ($myFragment == $myPage.getRootFragment()))
-#parse($jetspeed.getDecoration($decoTop, "layout").appRelativePath)
-#end
+#parse($myFragment.decoration.header)
 #set($layoutType =$portletConfig.getInitParameter("layoutType"))
 #set($columnLayout = $renderRequest.getAttribute("columnLayout"))
 #if($actions.size()>0)
@@ -55,14 +46,13 @@
 ##
 <div id="portal-layout-$htmlUtil.getSafeElementId($myPage.id)" class="portal-layout">
 #set ($sizeIndex = 0)
-#set ($layoutImageBase = "${jetspeed.pageBasePath}/content/images")
 #foreach($column in $columnLayout.columns)
 #set ($sizeIndex = $sizeIndex + 1)     
 #foreach($f in $column)       
 ## TODO: Edit layout
 ## get the decorated Portlet content
 #if($f.type == "portlet")
-#parse($jetspeed.decorateAndInclude($f))
+#parse($f.decoration.template)
 #else		
 $jetspeed.setCurrentFragment($f)
 $f.renderedContent			
@@ -72,5 +62,5 @@
 </div>
 ##
 #if(($decoBottom ) && ($myFragment == $myPage.getRootFragment()))
-#parse($jetspeed.getDecoration($decoBottom, "layout").appRelativePath)
+#parse($myFragment.decoration.footer)
 #end



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


Mime
View raw message