David,

Oops... attached CVS diff -u patch files... should have done that the first time!

Randy Watler

Attached are patches to the jetspeed layout decorator to enable tab navigation for pages, (folder navigation remains as links). This is based off of a recent CVS HEAD that includes Scott's navigation work. I tried to follow the usage of CSS styles established with the portlet decorators. Let me know how it looks!

Steps to patch:

1. move /portal/src/webapp/WEB-INF/decorations/portlet/html/jetspeed/images/tab*.gif to /portal/src/webapp/WEB-INF/decorations/layout/html/jetspeed/images.
2. apply decorator-top.vm.patch to /portal/src/webapp/WEB-INF/decorations/layout/html/jetspeed/decorator-top.vm


3. apply styles.css.patch to /portal/src/webapp/WEB-INF/decorations/layout/html/jetspeed/css/styles.css




Index: decorator-top.vm
===================================================================
RCS file: 
/home/cvspublic/jakarta-jetspeed-2/portal/src/webapp/WEB-INF/decorations/layout/html/jetspeed/decorator-top.vm,v
retrieving revision 1.10
diff -u -r1.10 decorator-top.vm
--- decorator-top.vm    24 Aug 2004 21:33:25 -0000      1.10
+++ decorator-top.vm    1 Sep 2004 23:58:51 -0000
@@ -34,9 +34,11 @@
 </ol>
 *#
 
+#set($myF = $jetspeed.currentFragment)
 
 <!--  BEGIN: layout/html/jetspeed/decorator.vm -->
 
+<div id="layout-${myF.id}" class="layout-Jetspeed" >
 <p>
 <img src="content/images/jetspeed-logo.gif" alt="Jetspeed 2 Logo" border="0">
 </p>
@@ -55,12 +57,34 @@
        #foreach($childFolder in $folder.folders.iterator())
          <a 
href="${appRoot}/portal${childFolder.name}">$childFolder.metaData.getTitle($preferedLocal)</a>
 &nbsp;              
        #end
-       
+
+    #* 
        #foreach($childPage in $folder.pages.iterator())                
                <a 
href="${appRoot}/portal${childPage.id}">$childPage.getTitle($preferedLocal)</a> &nbsp;
        #end
+    *#
+    <p>
+        <table border="0" cellpadding="0" cellspacing="0" width="100%">
+            <tr>
+                #foreach($childPage in $folder.pages.iterator())
+                #set($tabName = $childPage.getTitle($preferedLocal))
+                #if($jetspeed.page == $childPage)
+                <td class="LTabLeft" style="font-size:1pt;" nowrap="true">&nbsp;</td>
+                <td class="LTab" align="center" valign="middle" 
nowrap="true">${tabName}</td>
+                <td class="LTabRight" style="font-size:1pt;" nowrap="true">&nbsp;</td>
+                #else
+                <td class="LTabLeftLow" style="font-size:1pt;" 
nowrap="true">&nbsp;</td>
+                <td class="LTabLow" align="center" valign="middle" nowrap="true"><a 
href="${appRoot}/portal${childPage.id}">${tabName}</a></td>
+                <td class="LTabRightLow" style="font-size:1pt;" 
nowrap="true">&nbsp;</td>
+                #end
+                #end
+            </tr>
+        </table>
+    </p>
        
 </p>
+</div>
+
 ## $jetspeed.include($jetspeed.currentFragment)
 
 <!--  END: layout/html/jetspeed/decorator.vm -->
Index: styles.css
===================================================================
RCS file: 
/home/cvspublic/jakarta-jetspeed-2/portal/src/webapp/WEB-INF/decorations/layout/html/jetspeed/css/styles.css,v
retrieving revision 1.9
diff -u -r1.9 styles.css
--- styles.css  20 Jul 2004 21:36:31 -0000      1.9
+++ styles.css  1 Sep 2004 23:59:16 -0000
@@ -18,3 +18,49 @@
 BODY.layout-Jetspeed  {
 
 }
+
+.layout-Jetspeed .LTabLeftLow
+{
+       /**
+       Needs to specify the width of image used
+       otherwise it won't show !
+       **/
+       width:10px;
+    
+       /** Always use relative path ! **/
+       background:url(content/jetspeed/images/tableft_low.gif);
+}
+
+.layout-Jetspeed .LTabLow
+{
+       /**
+       Specify the height of the image used
+       else it will use the text height        
+       **/
+       height:25px;    
+       background:url(content/jetspeed/images/tabmiddle_low.gif);
+}
+ 
+.layout-Jetspeed .LTabRightLow
+{
+       width:10px;
+       background:url(content/jetspeed/images/tabright_low.gif);
+}
+
+.layout-Jetspeed .LTabLeft
+{
+       width:10px;
+       background:url(content/jetspeed/images/tableft.gif);
+}
+
+.layout-Jetspeed .LTab
+{
+       height:25px;    
+       background:url(content/jetspeed/images/tabmiddle.gif);
+}
+ 
+.layout-Jetspeed .LTabRight
+{
+       width:10px;
+       background:url(content/jetspeed/images/tabright.gif);
+}

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to