portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rwat...@apache.org
Subject svn commit: r209562 - in /portals/jetspeed-2/branches/MENUS_BRANCH: components/portal-site/src/java/org/apache/jetspeed/portalsite/impl/ components/portal-site/src/java/org/apache/jetspeed/portalsite/view/ components/portal-site/src/test/org/apache/jet...
Date Thu, 07 Jul 2005 02:30:34 GMT
Author: rwatler
Date: Wed Jul  6 19:30:32 2005
New Revision: 209562

URL: http://svn.apache.org/viewcvs?rev=209562&view=rev
Log:
- port tigris decorators to menu support
- cleanup portal test PSML document set remains
- fix suppression of hidden folders, pages, and links
- fix multiple profile locators support


Modified:
    portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/portalsite/impl/MenuImpl.java
    portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/portalsite/impl/PortalSiteSessionContextImpl.java
    portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/portalsite/view/SiteView.java
    portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/test/org/apache/jetspeed/portalsite/TestPortalSite.java
    portals/jetspeed-2/branches/MENUS_BRANCH/design-docs/src/portal-site/portal-site-component.sxw
    portals/jetspeed-2/branches/MENUS_BRANCH/portal/src/webapp/WEB-INF/decorations/layout/html/tigris/decorator-macros.vm
    portals/jetspeed-2/branches/MENUS_BRANCH/portal/src/webapp/WEB-INF/decorations/layout/html/tigris/decorator-top.vm
    portals/jetspeed-2/branches/MENUS_BRANCH/portal/src/webapp/WEB-INF/pages/Administrative/folder.metadata
    portals/jetspeed-2/branches/MENUS_BRANCH/portal/src/webapp/WEB-INF/pages/_role/user/top-links/folder.metadata
    portals/jetspeed-2/branches/MENUS_BRANCH/portal/src/webapp/WEB-INF/pages/_user/user/folder.metadata
    portals/jetspeed-2/branches/MENUS_BRANCH/portal/src/webapp/WEB-INF/pages/folder.metadata

Modified: portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/portalsite/impl/MenuImpl.java
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/portalsite/impl/MenuImpl.java?rev=209562&r1=209561&r2=209562&view=diff
==============================================================================
--- portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/portalsite/impl/MenuImpl.java
(original)
+++ portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/portalsite/impl/MenuImpl.java
Wed Jul  6 19:30:32 2005
@@ -96,7 +96,7 @@
             {
                 try
                 {
-                    optionProxy = view.getNodeProxy(options, context.getPage(), true);
+                    optionProxy = view.getNodeProxy(options, context.getPage(), true, true);
                 }
                 catch (NodeNotFoundException nnfe)
                 {
@@ -125,7 +125,7 @@
                     if ((optionProxy instanceof Folder) && !definition.isPaths()
&& (definition.getDepth() != 0))
                     {
                         // override menu options with visible folder contents i
-                        List folderChildren = view.getNodeProxies("*", optionProxy, true);
+                        List folderChildren = view.getNodeProxies("*", optionProxy, true,
true);
                         if ((folderChildren != null) && !folderChildren.isEmpty())
                         {
                             overrideOptionProxies = folderChildren;
@@ -230,7 +230,7 @@
                         }
 
                         // construct new separator and reset separator
-                        // option/menu elements list
+                        // and separator option/menu elements list
                         MenuSeparatorDefinition separatorDefinition = (MenuSeparatorDefinition)menuElement;
                         separator = new MenuSeparatorImpl(this, separatorDefinition);
                         if (separatedElements != null)
@@ -314,12 +314,45 @@
                                                 includeElement = (MenuElementImpl)includeElement.clone();
                                                 includeElement.setParentMenu(this);
                                                 
-                                                // append menu element to current separated
elements list
-                                                if (separatedElements == null)
+                                                // insert separators or options and menus
+                                                if (includeElement instanceof MenuSeparatorImpl)
                                                 {
-                                                    separatedElements = new ArrayList(includeMenu.getElements().size());
+                                                    // append current separator and separated
option/menu elements
+                                                    if ((separatedElements != null) &&
!separatedElements.isEmpty())
+                                                    {
+                                                        if (this.elements == null)
+                                                        {
+                                                            int initialSize = separatedElements.size();
+                                                            if (separator != null)
+                                                            {
+                                                                initialSize++;
+                                                            }
+                                                            this.elements = new ArrayList(initialSize);
+                                                        }
+                                                        if (separator != null)
+                                                        {
+                                                            this.elements.add(separator);
+                                                        }
+                                                        this.elements.addAll(separatedElements);
+                                                    }
+
+                                                    // reset separator and separator option/menu
elements list
+                                                    // using separator menu element
+                                                    separator = (MenuSeparatorImpl)includeElement;
+                                                    if (separatedElements != null)
+                                                    {
+                                                        separatedElements.clear();
+                                                    }
+                                                }
+                                                else
+                                                {
+                                                    // append menu element to current separated
elements list
+                                                    if (separatedElements == null)
+                                                    {
+                                                        separatedElements = new ArrayList(includeMenu.getElements().size());
+                                                    }
+                                                    appendMenuElement(includeElement, separatedElements);
                                                 }
-                                                appendMenuElement(includeElement, separatedElements);
                                             }
                                             catch (CloneNotSupportedException cnse)
                                             {
@@ -521,7 +554,7 @@
                             List pathProxies = null;
                             try
                             {
-                                pathProxies = view.getNodeProxies(optionPath, context.getPage(),
true);
+                                pathProxies = view.getNodeProxies(optionPath, context.getPage(),
true, true);
                             }
                             catch (NodeNotFoundException nnfe)
                             {
@@ -554,7 +587,7 @@
                             Node pathProxy = null;
                             try
                             {
-                                pathProxy = view.getNodeProxy(optionPath, context.getPage(),
true);
+                                pathProxy = view.getNodeProxy(optionPath, context.getPage(),
true, true);
                             }
                             catch (NodeNotFoundException nnfe)
                             {

Modified: portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/portalsite/impl/PortalSiteSessionContextImpl.java
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/portalsite/impl/PortalSiteSessionContextImpl.java?rev=209562&r1=209561&r2=209562&view=diff
==============================================================================
--- portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/portalsite/impl/PortalSiteSessionContextImpl.java
(original)
+++ portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/portalsite/impl/PortalSiteSessionContextImpl.java
Wed Jul  6 19:30:32 2005
@@ -197,12 +197,13 @@
                 log.debug("Request page: request path=" + requestPath);
             }
 
-            // lookup request path in view for visible page or folder nodes
+            // lookup request path in view for viewable page or folder
+            // nodes; note: directly requested pages/folders may be hidden
             Node requestNode = null;
             try
             {
                 // try page or folder request url
-                requestNode = view.getNodeProxy(requestPath, null, true);
+                requestNode = view.getNodeProxy(requestPath, null, true, false);
             }
             catch (NodeNotFoundException nnfe)
             {
@@ -212,7 +213,7 @@
                 {
                     // retry folder request url
                     requestPath = requestPath.substring(0, requestPath.length() - Folder.FALLBACK_DEFAULT_PAGE.length());
-                    requestNode = view.getNodeProxy(requestPath, null, true);
+                    requestNode = view.getNodeProxy(requestPath, null, true, false);
                 }
                 else
                 {
@@ -430,7 +431,7 @@
                     {
                         boolean firstEntry = true;
                         Iterator entriesIter = profileLocators.entrySet().iterator();
-                        if (entriesIter.hasNext())
+                        while (entriesIter.hasNext())
                         {
                             Map.Entry entry = (Map.Entry)entriesIter.next();
                             String locatorName = (String)entry.getKey();

Modified: portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/portalsite/view/SiteView.java
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/portalsite/view/SiteView.java?rev=209562&r1=209561&r2=209562&view=diff
==============================================================================
--- portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/portalsite/view/SiteView.java
(original)
+++ portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/portalsite/view/SiteView.java
Wed Jul  6 19:30:32 2005
@@ -317,7 +317,7 @@
             if ((pageLocator == null) || (locators.size() > 1))
             {
                 Iterator locatorNameIter = locators.keySet().iterator();
-                if (locatorNameIter.hasNext())
+                while (locatorNameIter.hasNext())
                 {
                     String locatorName = (String)locatorNameIter.next();
                     if (!locatorName.equals(ProfileLocator.PAGE_LOCATOR))
@@ -656,12 +656,13 @@
      *
      * @param path single node path
      * @param currentNode current folder or page for relative paths or null
-     * @param onlyVisible node required to be visible flag
+     * @param onlyViewable node required to be viewable
+     * @param onlyVisible node required to be visible, (or current)
      * @return folder, page, or link node proxy
      * @throws NodeNotFoundException if not found
      * @throws SecurityException if view access not granted
      */
-    public Node getNodeProxy(String path, Node currentNode, boolean onlyVisible) throws NodeNotFoundException
+    public Node getNodeProxy(String path, Node currentNode, boolean onlyViewable, boolean
onlyVisible) throws NodeNotFoundException
     {
         // determine current folder and page
         String currentPath = path;
@@ -680,7 +681,7 @@
         // match current page path
         if (currentPath.equals(CURRENT_PAGE_PATH) || currentPath.equals(ALT_CURRENT_PAGE_PATH))
         {
-            // return current page if specified, (assume visible)
+            // return current page if specified, (assume viewable)
             return currentPage;
         }
 
@@ -738,15 +739,16 @@
             else
             {
                 // access remaining path as page, folder, or link node
-                // proxy; return null if not found or not visible and
-                // visiblity is required
+                // proxy; return null if not found or not viewable/visible
+                // and visibility is required
                 try
                 {
                     NodeSet children = currentFolder.getAll();
                     if (children != null)
                     {
                         Node node = children.get(currentPath);
-                        if ((node != null) && (!onlyVisible || isProxyVisible(node)))
+                        if ((node != null) && (!onlyViewable || isProxyViewable(node))
&&
+                            (!onlyVisible || !node.isHidden() || (node == currentPage)))
                         {
                             return node;
                         }
@@ -758,17 +760,17 @@
                     nnfe.initCause(ne);
                     throw nnfe;
                 }
-                throw new NodeNotFoundException("Specified path " + path + " not found or
visible.");
+                throw new NodeNotFoundException("Specified path " + path + " not found or
viewable/visible.");
             }
         }
 
-        // path maps to current folder; return if visible
+        // path maps to current folder; return if viewable/visible
         // or visibility not required
-        if (!onlyVisible || isProxyVisible(currentFolder))
+        if ((!onlyViewable || isProxyViewable(currentFolder)) && (!onlyVisible ||
!currentFolder.isHidden()))
         {
             return currentFolder;
         }
-        throw new NodeNotFoundException("Specified path " + path + " not found or visible.");
+        throw new NodeNotFoundException("Specified path " + path + " not found or viewable/visible.");
     }
 
     /**
@@ -778,10 +780,11 @@
      *
      * @param regexpPath regular expression node path
      * @param currentNode current folder or page for relative paths or null
-     * @param onlyVisible nodes required to be visible flag
+     * @param onlyViewable nodes required to be viewable flag
+     * @param onlyVisible node required to be visible, (or current)
      * @return list of folder, page, or link node proxies
      */
-    public List getNodeProxies(String regexpPath, Node currentNode, boolean onlyVisible)
+    public List getNodeProxies(String regexpPath, Node currentNode, boolean onlyViewable,
boolean onlyVisible)
     {
         // determine current folder and page
         String currentRegexpPath = regexpPath;
@@ -802,7 +805,7 @@
         {
             if (currentPage != null)
             {
-                // return current page, (assume visible)
+                // return current page, (assume viewable)
                 List proxies = new ArrayList(1);
                 proxies.add(currentPage);
                 return proxies;
@@ -885,7 +888,7 @@
                                         while (subfoldersIter.hasNext())
                                         {
                                             currentFolder = (Folder)subfoldersIter.next();
-                                            List subfolderProxies = getNodeProxies(currentRegexpPath,
currentFolder, onlyVisible);
+                                            List subfolderProxies = getNodeProxies(currentRegexpPath,
currentFolder, onlyViewable, onlyVisible);
                                             if ((subfolderProxies != null) && !subfolderProxies.isEmpty())
                                             {
                                                 if (proxies == null)
@@ -939,7 +942,7 @@
                         if (pathPattern != null)
                         {
                             // copy children matching remaining path pattern as
-                            // page, folder, or link proxies if visible or
+                            // page, folder, or link proxies if viewable/visible or
                             // visibilty not required
                             children = children.inclusiveSubset(pathPattern);
                             if ((children != null) && !children.isEmpty())
@@ -949,7 +952,8 @@
                                 while (childrenIter.hasNext())
                                 {
                                     Node child = (Node)childrenIter.next(); 
-                                    if (!onlyVisible || isProxyVisible(child))
+                                    if ((!onlyViewable || isProxyViewable(child)) &&
+                                        (!onlyVisible || !child.isHidden() || (child == currentPage)))
                                     {
                                         if (proxies == null)
                                         {
@@ -965,9 +969,10 @@
                         {
                             // access remaining path as page, folder, or link
                             // node proxy; return null if not found or not
-                            // visible and visiblity is required
+                            // viewable and visiblity is required
                             Node child = children.get(currentRegexpPath);
-                            if ((child != null) && (!onlyVisible || isProxyVisible(child)))
+                            if ((child != null) && (!onlyViewable || isProxyViewable(child))
&&
+                                (!onlyVisible || !child.isHidden() || (child == currentPage)))
                             {
                                 List proxies = new ArrayList(1);
                                 proxies.add(currentFolder);
@@ -989,9 +994,9 @@
             }
         }
 
-        // path maps to current folder; return if visible
+        // path maps to current folder; return if viewable/visible
         // or visibility not required
-        if (!onlyVisible || isProxyVisible(currentFolder))
+        if ((!onlyViewable || isProxyViewable(currentFolder)) && (!onlyVisible ||
!currentFolder.isHidden()))
         {
             List proxies = new ArrayList(1);
             proxies.add(currentFolder);
@@ -1058,15 +1063,15 @@
     }
 
     /**
-     * isProxyVisible - tests for node proxy visibilty in view
+     * isProxyViewable - tests for node proxy visibilty in view
      *
      * @param nodeProxy test node proxy
-     * @return - visible flag
+     * @return - viewable flag
      */
-    private static boolean isProxyVisible(Node nodeProxy)
+    private static boolean isProxyViewable(Node nodeProxy)
     {
-        // pages and links are always considered visible;
-        // folders must be tested for visible child nodes
+        // pages and links are always considered viewable;
+        // folders must be tested for viewable child nodes
         if (nodeProxy instanceof Folder)
         {
             try
@@ -1077,7 +1082,7 @@
                     Iterator childrenIter = children.iterator();
                     while (childrenIter.hasNext())
                     {
-                        if (isProxyVisible((Node)childrenIter.next()))
+                        if (isProxyViewable((Node)childrenIter.next()))
                         {
                             return true;
                         }

Modified: portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/test/org/apache/jetspeed/portalsite/TestPortalSite.java
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/test/org/apache/jetspeed/portalsite/TestPortalSite.java?rev=209562&r1=209561&r2=209562&view=diff
==============================================================================
--- portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/test/org/apache/jetspeed/portalsite/TestPortalSite.java
(original)
+++ portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/test/org/apache/jetspeed/portalsite/TestPortalSite.java
Wed Jul  6 19:30:32 2005
@@ -177,27 +177,27 @@
         assertEquals("/folder0/page0.psml", extractFileSystemPathFromId(folder0Page0Proxy.getId()));
 
         // test SiteView access by path
-        Folder rootFolderProxyByPath = (Folder)baseView.getNodeProxy("/", null, false);
+        Folder rootFolderProxyByPath = (Folder)baseView.getNodeProxy("/", null, false, false);
         assertNotNull(rootFolderProxyByPath);
         assertEquals(rootFolderProxy, rootFolderProxyByPath);
-        Folder rootFolder0ProxyByPath = (Folder)baseView.getNodeProxy("/folder0/", null,
false);
+        Folder rootFolder0ProxyByPath = (Folder)baseView.getNodeProxy("/folder0/", null,
false, false);
         assertNotNull(rootFolder0ProxyByPath);
         assertEquals(rootFolder0Proxy, rootFolder0ProxyByPath);
-        Page folder0Page0ProxyByPath = (Page)baseView.getNodeProxy("/folder0/page0.psml",
null, false);
+        Page folder0Page0ProxyByPath = (Page)baseView.getNodeProxy("/folder0/page0.psml",
null, false, false);
         assertNotNull(folder0Page0ProxyByPath);
         assertEquals(folder0Page0Proxy, folder0Page0ProxyByPath);
-        folder0Page0ProxyByPath = (Page)baseView.getNodeProxy("page0.psml", rootFolder0Proxy,
false);
+        folder0Page0ProxyByPath = (Page)baseView.getNodeProxy("page0.psml", rootFolder0Proxy,
false, false);
         assertNotNull(folder0Page0ProxyByPath);
         assertEquals(folder0Page0Proxy, folder0Page0ProxyByPath);
-        List rootPageProxiesByPath = baseView.getNodeProxies("/page?.psml", null, false);
+        List rootPageProxiesByPath = baseView.getNodeProxies("/page?.psml", null, false,
false);
         assertNotNull(rootPageProxiesByPath);
         assertEquals(3,rootPageProxiesByPath.size());
         assertTrue(rootPageProxiesByPath.contains(rootPage0Proxy));
-        List rootFolderProxiesByPath = baseView.getNodeProxies("/*/", null, false);
+        List rootFolderProxiesByPath = baseView.getNodeProxies("/*/", null, false, false);
         assertNotNull(rootFolderProxiesByPath);
         assertEquals(3,rootFolderProxiesByPath.size());
         assertTrue(rootFolderProxiesByPath.contains(rootFolder0Proxy));
-        List folderPageProxiesByPath = baseView.getNodeProxies("*/p*[0-9].psml", rootFolderProxy,
false);
+        List folderPageProxiesByPath = baseView.getNodeProxies("*/p*[0-9].psml", rootFolderProxy,
false, false);
         assertNotNull(folderPageProxiesByPath);
         assertEquals(2,folderPageProxiesByPath.size());
         assertTrue(folderPageProxiesByPath.contains(folder0Page0Proxy));

Modified: portals/jetspeed-2/branches/MENUS_BRANCH/design-docs/src/portal-site/portal-site-component.sxw
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/branches/MENUS_BRANCH/design-docs/src/portal-site/portal-site-component.sxw?rev=209562&r1=209561&r2=209562&view=diff
==============================================================================
Binary files - no diff available.

Modified: portals/jetspeed-2/branches/MENUS_BRANCH/portal/src/webapp/WEB-INF/decorations/layout/html/tigris/decorator-macros.vm
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/branches/MENUS_BRANCH/portal/src/webapp/WEB-INF/decorations/layout/html/tigris/decorator-macros.vm?rev=209562&r1=209561&r2=209562&view=diff
==============================================================================
--- portals/jetspeed-2/branches/MENUS_BRANCH/portal/src/webapp/WEB-INF/decorations/layout/html/tigris/decorator-macros.vm
(original)
+++ portals/jetspeed-2/branches/MENUS_BRANCH/portal/src/webapp/WEB-INF/decorations/layout/html/tigris/decorator-macros.vm
Wed Jul  6 19:30:32 2005
@@ -7,130 +7,164 @@
   #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>
+#* include tabs navigation component *#
+#macro (includeTabsNavigation $_menu $_orientation)
+        <table border="0" cellpadding="0" cellspacing="0">
+          <tr>
+    #foreach($element in $_menu.elements.iterator())
+      #if($element.elementType == "option")
+        #set($tabTitle = $element.getTitle($preferedLocale))
+        #set($tabName = $element.getShortTitle($preferedLocale))
+        #if($_orientation == $LEFT_TO_RIGHT)
+          #if($element.isSelected($site))
+            <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
+            #set($tabUrl = $jetspeed.getAbsoluteUrl($element.url))
+            <td class="LTabLeftLow"  nowrap="true">&nbsp;</td>
+            <td class="LTabLow" align="center" valign="middle" nowrap="true" title="$!tabTitle"><a
href="$tabUrl">${tabName}</a></td>
+            <td class="LTabRightLow"  nowrap="true">&nbsp;</td>
+          #end
+        #end
       #end
     #end
+          </tr>
+        </table>
+#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="$jetspeed.getAbsoluteUrl($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="$jetspeed.getAbsoluteUrl($node.url)" title="$node.getTitle()">$node.getShortTitle()</a>

-    #end
-
-    #if($_orientation == $TOP_TO_BOTTOM)
-      #if($node.type != ".ds")
+#* include links navigation component *#
+#macro (includeLinksNavigation $_menu $_orientation)
+      <div class="FolderList">
+  #foreach($element in $_menu.elements.iterator())
+    #if($element.elementType == "option")
+      #if($_orientation == $LEFT_TO_RIGHT)
+        <span>
+      #elseif($_orientation == $TOP_TO_BOTTOM)
+        <div>
+      #end
+      #set($linkTitle = $element.getTitle($preferedLocale))
+      #set($linkName = $element.getShortTitle($preferedLocale))
+      #set($linkUrl = $jetspeed.getAbsoluteUrl($element.url))
+      #if($element.type == "page")
+          <a href="$linkUrl" class="LinkPage" title="$!linkTitle">${linkName}</a>
	
+      #elseif($element.type == "link")
+          <a href="$linkUrl" class="Link" title="$!linkTitle">${linkName}</a>
	
+      #elseif($element.type == "folder")
+          <a href="$linkUrl" class="LinkFolder" title="$!linkTitle">${linkName}</a>
	
+      #else
+          <a href="$linkUrl" title="$!linkTitle">${linkName}</a>		
+      #end
+      #if($_orientation == $LEFT_TO_RIGHT)
+        &nbsp;</span>
+      #elseif($_orientation == $TOP_TO_BOTTOM)
         </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
+#* include nested menu links navigation component *#
+#macro (includeNestedLinksWithIconNavigation $_menu $_orientation)
+  #set($menuTitle = $_menu.getTitle($preferedLocale))
+  #set($menuName = $_menu.getShortTitle($preferedLocale))
+  #if($menuName)
+              <div class="pagetitle" title="$!menuTitle">${menuName}</div>
+  #end
+              <div>
+  #foreach($element in $_menu.elements.iterator())
+    #if($element.elementType == "option")
+      #set($linkTitle = $element.getTitle($preferedLocale))
+      #set($linkName = $element.getShortTitle($preferedLocale))
+      #set($linkUrl = $jetspeed.getAbsoluteUrl($element.url))
+      #if($element.type == "page")
+                <div><a href="$linkUrl" class="LinkPage" title="$!linkTitle">${linkName}</a></div>
+      #elseif($element.type == "link")
+        #set($linkTarget = $element.target)
+                <div><a href="$linkUrl" target="$linkTarget" class="Link" title="$!linkTitle">${linkName}</a></div>

+      #elseif($element.type == "folder")
+                <div><a href="$linkUrl" class="LinkFolder" title="$!linkTitle">$linkName</a></div>
       #end
+    #elseif($element.elementType == "menu")
+      #includeNestedLinksWithIconNavigation($element $_orientation)
+    #elseif($element.elementType == "separator")
+      #set($separatorTitle = $element.getTitle($preferedLocale))
+      #set($separatorText = $element.getText($preferedLocale))
+                  <div class="pagetitle" title="$!separatorTitle">${separatorText}</div>
             
     #end
-    </tr>
-  </table>
+  #end
+              </div>
 #end
 
-#* include tabs navigation component *#
-#macro (includeFolderTabsNavigation $_nodeSet $_orientation)
-  <table border="0" cellpadding="0" cellspacing="0">
-    <tr>
-    #foreach($childFolder in $_nodeSet.iterator())
-      #set($tabTitle = $childFolder.getTitle($preferedLocale))
-      #set($tabName = $childFolder.getShortTitle($preferedLocale))
-
-      #if($_orientation == $LEFT_TO_RIGHT)
-        #if($site.folder.id == $childFolder.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($childFolder.url)">${tabName}</a></td>
-          <td class="LTabRightLow"  nowrap="true">&nbsp;</td>
-        #end
+#* include top level menu links navigation component *#
+#macro (includeLinksWithIconNavigation $_menu $_orientation)
+  #set($rowStarted = false)
+  #set($elementsStarted = false)
+  #foreach($element in $_menu.elements.iterator())
+    #if($element.elementType == "option")
+      #if(!$rowStarted)
+        <tr>
+          <td>
+            <div class="toolgroup">
+              <div class="body">
+                <div class="FolderList">
+      #elseif(!$elementsStarted)
+              <div class="body">
+                <div class="FolderList">
       #end
-    #end           
-            
-    </tr>
-  </table>
-#end
-
-#macro (includePagesNavigation $_nodeSet $_orientation)
-  <div class="FolderList">
-  #foreach($childPage in $_nodeSet.iterator())
-    #if($_orientation == $LEFT_TO_RIGHT)
-      <span>
-    #elseif($_orientation == $TOP_TO_BOTTOM)
-      <div>
-    #end
-
-    <a href="$jetspeed.getAbsoluteUrl($childPage.url)" class="FolderLink" title="$childPage.getTitle($preferedLocale)">$childPage.getShortTitle($preferedLocale)</a>
	
-
-    #if($_orientation == $LEFT_TO_RIGHT)
-      </span>
-    #elseif($_orientation == $TOP_TO_BOTTOM)
-      </div>
+      #set($linkTitle = $element.getTitle($preferedLocale))
+      #set($linkName = $element.getShortTitle($preferedLocale))
+      #set($linkUrl = $jetspeed.getAbsoluteUrl($element.url))
+      #if($element.type == "page")
+                  <div><a href="$linkUrl" class="LinkPage" title="$!linkTitle">${linkName}</a></div>
+      #elseif($element.type == "link")
+        #set($linkTarget = $element.target)
+                  <div><a href="$linkUrl" target="$!linkTarget" class="Link" title="$!linkTitle">${linkName}</a></div>

+      #elseif($element.type == "folder")
+                  <div><a href="$linkUrl" class="LinkFolder" title="$!linkTitle">$linkName</a></div>
+      #end
+      #set($rowStarted = true)
+      #set($elementsStarted = true)
+    #elseif($element.elementType == "menu")
+      #if(!$rowStarted)
+        <tr>
+          <td>
+            <div class="toolgroup">
+              <div class="body">
+                <div class="FolderList">
+      #elseif(!$elementsStarted)
+              <div class="body">
+                <div class="FolderList">
+      #end
+      #includeNestedLinksWithIconNavigation($element $_orientation)
+      #set($rowStarted = true)
+      #set($elementsStarted = true)
+    #elseif($element.elementType == "separator")
+      #if(!$rowStarted)
+        <tr>
+          <td>
+            <div class="toolgroup">
+      #elseif($elementsStarted)
+                </div>
+              </div>
+      #end
+      #set($separatorTitle = $element.getTitle($preferedLocale))
+      #set($separatorText = $element.getText($preferedLocale))
+              <div class="label">
+                ${separatorText}
+              </div>
+      #set($rowStarted = true)
+      #set($elementsStarted = false)
     #end
   #end
-  </div>
+  #if($elementsStarted)
+                </div>
+              </div>
+  #end
+  #if($rowStarted)
+            </div>
+          <td>
+        <tr>
+  #end
 #end

Modified: portals/jetspeed-2/branches/MENUS_BRANCH/portal/src/webapp/WEB-INF/decorations/layout/html/tigris/decorator-top.vm
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/branches/MENUS_BRANCH/portal/src/webapp/WEB-INF/decorations/layout/html/tigris/decorator-top.vm?rev=209562&r1=209561&r2=209562&view=diff
==============================================================================
--- portals/jetspeed-2/branches/MENUS_BRANCH/portal/src/webapp/WEB-INF/decorations/layout/html/tigris/decorator-top.vm
(original)
+++ portals/jetspeed-2/branches/MENUS_BRANCH/portal/src/webapp/WEB-INF/decorations/layout/html/tigris/decorator-top.vm
Wed Jul  6 19:30:32 2005
@@ -38,7 +38,6 @@
 
 #set($myF = $jetspeed.currentFragment)
 #set($site = $request.getAttribute("org.apache.jetspeed.profiledPageContext"))
-#set($parentFolder = $site.parentFolder)
 
 <!--  BEGIN: layout/html/tigris/decorator.vm -->
 
@@ -60,68 +59,35 @@
       </div>
 <!-- Top Tabs -->
       <div class="tabs">
-#includeTabsNavigation($site.siblingPages $LEFT_TO_RIGHT)
+#set($pagesStandardMenu = $site.getMenu("pages"))
+#if($pagesStandardMenu.elements)
+#includeTabsNavigation($pagesStandardMenu $LEFT_TO_RIGHT)
+#end
       </div>
       <div id="breadcrumbs">
-#if($parentFolder)
-		<a href="$jetspeed.getAbsoluteUrl($parentFolder.url)" title="$parentFolder.getTitle($preferedLocale)">Back
to $parentFolder.getShortTitle($preferedLocale)</a>
-#end
+#set($backStandardMenu = $site.getMenu("back"))
+#if($backStandardMenu.elements)
+#includeLinksNavigation($backStandardMenu $LEFT_TO_RIGHT)
+#else
         &nbsp;
+#end
       </div>
       <table cellpadding="0" cellspacing="0" border="0" width="100%" id="main">
         <tr>
-#set($hasFoldersAndPages = ($site.siblingFolders && !$site.siblingFolders.isEmpty())
|| ($site.documentSetNames && !$site.documentSetNames.isEmpty()))
-#set($hasAdditionaLinks = $site.rootLinks && !$site.rootLinks.isEmpty())
-#if($hasFoldersAndPages || $hasAdditionaLinks)
+#set($navigationsStandardMenu = $site.getMenu("navigations"))
+#if($navigationsStandardMenu.elements)
           <td valign="top" id="leftcol" width="20%">
             <div id="navcolumn">
 
 <!-- Navigation Column -->
-<table cellpadding="0" cellspacing="4" border="0" width="100%">
-#if($hasFoldersAndPages)
-  <tr>
-    <td>
-      <div class="toolgroup">    
-        <div class="label">
-          Folders and Pages
-        </div>
-        <div class="body">
-#includeFoldersNavigation($site.siblingFolders $TOP_TO_BOTTOM)
-
-#foreach($docSetName in $site.documentSetNames)
-  #set($docSet = $site.getDocumentSet($docSetName))
-  #set($docSetNodes = $site.getDocumentSetNodes($docSetName))
-          <div>
-            <div class="pagetitle" title="$docSet.getTitle($preferedLocale)">
-            ${docSet.getShortTitle($preferedLocale)}
-            </div>
-          </div>
-#includeNestedLinksWithIconNavigation($docSetNodes $docSet.url $TOP_TO_BOTTOM)
-#end
-        </div>
-      </div>
-    </td>
-  </tr>
-#end
-#if($hasAdditionaLinks)
-  <tr>
-    <td>  
-      <div class="toolgroup">
-        <div class="label">
-          Additional Links
-        </div>
-        <div class="body">
-#includeLinksWithIconNavigation($site.rootLinks $TOP_TO_BOTTOM)
-        </div>
-      </div>
-    </td>
-  </tr>
-#end
-</table>
+              <table cellpadding="0" cellspacing="4" border="0" width="100%">
+#includeLinksWithIconNavigation($navigationsStandardMenu $TOP_TO_BOTTOM)
+              </table>
 
             </div>
           </td>
 #end
+
           <td nowrap valign="top">
   
 ## $jetspeed.include($jetspeed.currentFragment)

Modified: portals/jetspeed-2/branches/MENUS_BRANCH/portal/src/webapp/WEB-INF/pages/Administrative/folder.metadata
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/branches/MENUS_BRANCH/portal/src/webapp/WEB-INF/pages/Administrative/folder.metadata?rev=209562&r1=209561&r2=209562&view=diff
==============================================================================
--- portals/jetspeed-2/branches/MENUS_BRANCH/portal/src/webapp/WEB-INF/pages/Administrative/folder.metadata
(original)
+++ portals/jetspeed-2/branches/MENUS_BRANCH/portal/src/webapp/WEB-INF/pages/Administrative/folder.metadata
Wed Jul  6 19:30:32 2005
@@ -13,13 +13,17 @@
   <document-order>palm.psml</document-order>
   <document-order>profiler.psml</document-order>
 
-  <security-constraints>
-    <security-constraints-ref>manager</security-constraints-ref>
-  </security-constraints>
-
   <menu name="page-navigations">
     <separator>Users Admin Pages</separator>
     <options>/Administrative/user-mgt.psml</options>
     <options>/Administrative/users-jsf.psml</options>
+    <separator>Profiled Pages</separator>
+    <options regexp="true">/p[0-9][0-9][0-9].psml</options>
+    <separator>Non Java Pages</separator>
+    <options>/non-java</options>
   </menu>
+
+  <security-constraints>
+    <security-constraints-ref>manager</security-constraints-ref>
+  </security-constraints>
 </folder>

Modified: portals/jetspeed-2/branches/MENUS_BRANCH/portal/src/webapp/WEB-INF/pages/_role/user/top-links/folder.metadata
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/branches/MENUS_BRANCH/portal/src/webapp/WEB-INF/pages/_role/user/top-links/folder.metadata?rev=209562&r1=209561&r2=209562&view=diff
==============================================================================
--- portals/jetspeed-2/branches/MENUS_BRANCH/portal/src/webapp/WEB-INF/pages/_role/user/top-links/folder.metadata
(original)
+++ portals/jetspeed-2/branches/MENUS_BRANCH/portal/src/webapp/WEB-INF/pages/_role/user/top-links/folder.metadata
Wed Jul  6 19:30:32 2005
@@ -4,6 +4,5 @@
   <document-order>apache_portals.link</document-order>
   <document-order>apache_tomcat.link</document-order>
   <document-order>apache_velocity.link</document-order>
-  <document-order>more-pages.ds</document-order>
   <document-order>apache_commons.link</document-order>
 </folder>

Modified: portals/jetspeed-2/branches/MENUS_BRANCH/portal/src/webapp/WEB-INF/pages/_user/user/folder.metadata
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/branches/MENUS_BRANCH/portal/src/webapp/WEB-INF/pages/_user/user/folder.metadata?rev=209562&r1=209561&r2=209562&view=diff
==============================================================================
--- portals/jetspeed-2/branches/MENUS_BRANCH/portal/src/webapp/WEB-INF/pages/_user/user/folder.metadata
(original)
+++ portals/jetspeed-2/branches/MENUS_BRANCH/portal/src/webapp/WEB-INF/pages/_user/user/folder.metadata
Wed Jul  6 19:30:32 2005
@@ -21,10 +21,6 @@
   <document-order>non-java</document-order>
   <document-order>Administrative</document-order>
 
-  <document-order>top-pages.ds</document-order>
-  <document-order>pages.ds</document-order>
-  <document-order>non-java.ds</document-order>
-
   <menu name="page-navigations">
     <separator>
       <text>[USER] Top Pages</text>
@@ -34,6 +30,10 @@
     <menu regexp="true" profile="menu" options="/top-links/more/*.*">
       <title>[USER] More Pages</title>
     </menu>
+    <separator>Profiled Pages</separator>
+    <options regexp="true">/p[0-9][0-9][0-9].psml</options>
+    <separator>Non Java Pages</separator>
+    <options>/non-java</options>
   </menu>
 
   <security-constraints>

Modified: portals/jetspeed-2/branches/MENUS_BRANCH/portal/src/webapp/WEB-INF/pages/folder.metadata
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/branches/MENUS_BRANCH/portal/src/webapp/WEB-INF/pages/folder.metadata?rev=209562&r1=209561&r2=209562&view=diff
==============================================================================
--- portals/jetspeed-2/branches/MENUS_BRANCH/portal/src/webapp/WEB-INF/pages/folder.metadata
(original)
+++ portals/jetspeed-2/branches/MENUS_BRANCH/portal/src/webapp/WEB-INF/pages/folder.metadata
Wed Jul  6 19:30:32 2005
@@ -14,7 +14,7 @@
       <text>Top Pages</text>
       <metadata name="text" xml:lang="fr">Page haut</metadata>
     </separator>
-    <options profile="menu">/Administrative</options>
+    <options>/Administrative</options>
     <separator>Profiled Pages</separator>
     <options regexp="true">/p[0-9][0-9][0-9].psml</options>
     <separator>Non Java Pages</separator>



---------------------------------------------------------------------
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