<%-- Licensed Materials - Property of IBM 5724S31 © Copyright IBM Corp. 2007 All Rights Reserved. US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp. NOTE: See notes in Default.jsp for information regarding editing theme JSP fragments. --%> <c:if test = "${portalThemePolicyMap.renderQuickLinksShelf}"> <% String quickLinksShelfExpandedUniqueNameRoot = "ibm.portal.ThemeLinks.ExpandedQuickLinksShelfLinks"; // The <portal-navigation:navigation> tag throws exceptions that get logged if it cannot find the unique name. // So, for backward compatibility, we need to see if quickLinksShelfExpandedUniqueNameRoot exists before using the tag. com.ibm.portal.ObjectID quickLinksShelfExpandedUniqueNameRootOID = null; try { quickLinksShelfExpandedUniqueNameRootOID = identification.deserialize(quickLinksShelfExpandedUniqueNameRoot); } catch (com.ibm.portal.serialize.SerializationException se ) { // Intentionally do nothing if this exception is thrown. // It means that the themeLinksUniqueNameRoot does not exist, and that is OK... // We are checking to see if it exists. } if (null != quickLinksShelfExpandedUniqueNameRootOID) { %> <portal-logic:if navigationAvailable="yes" screen="Home" loggedIn="yes"> <% String usernameID = request.getRemoteUser(); int qlsStyle = themePolicy.getValueAsInt("quickLinksShelfStyle", 1); // qlsStyle bit 1 turned on means to show the quick links shelf expanded boolean collapsed = ( (1 & qlsStyle) == 1) ? false : true; // qlsStyle bit 2 turned on means to hide the expand/collapse link boolean showExpandCollapse = ( (2 & qlsStyle) == 2) ? false : true; %> <div id="wptheme-quickLinksShelf" class="wptheme-quickLinksShelf"> <div id="wptheme-collapsedQuickLinksShelf" style="clear:both;<% if (!collapsed) {%>display:none;<% } %>"> <ul class="wptheme-themeLinks"> <% String themeLinksUniqueNameRoot = "ibm.portal.ThemeLinks.CollapsedQuickLinksShelfLinks"; %> <%@ include file="./themeLinks.jspf" %> </ul> <% if (showExpandCollapse) {%> <a href="javascript:void();" class="wptheme-quickLinksShelfAction" onclick="javascript:return wptheme_QuickLinksShelf.expand();"><portal-fmt:text key="link.expand" bundle="nls.engine"/>&nbsp;<img src="<portal-logic:urlFindInTheme file='./colors/default/ExpandButton.gif'/>" border="0" alt=""></a> <% } %> </div> <div id="wptheme-expandedQuickLinksShelf" style="clear:both;<% if (collapsed) {%>display:none;<% } %>"> <portal-navigation:navigation scopeUniqueName="<%= quickLinksShelfExpandedUniqueNameRoot %>" startLevel="1" stopLevel="1"> <% boolean first=true; %> <table cellspacing="0"> <tr> <portal-navigation:navigationLoop> <% if (first) { first = false; %> <th class="wptheme-quickLinksShelf-first"> <% } else { %> <th> <% } %> <% // Labels come back with link URLs so you have to check this way to avoid generating an unnecessary link. boolean isLabel = com.ibm.portal.content.ContentNodeType.LABEL.equals(wpsNavNode.getContentNode().getContentNodeType()); if (!isLabel) { %> <a href='<portal-navigation:navigationUrl type="link" varname="<%=wpsNavNode%>"/>'><portal-fmt:title varname="<%=wpsNavNode%>"/></a> <% } else { %> <portal-fmt:title varname="<%=wpsNavNode%>"/> <% } %> </th> </portal-navigation:navigationLoop> </tr> </portal-navigation:navigation> <portal-navigation:navigation scopeUniqueName="<%= quickLinksShelfExpandedUniqueNameRoot %>" startLevel="1" stopLevel="1"> <% boolean first=true; %> <tr> <portal-navigation:navigationLoop> <% if (first) { first = false; %> <td class="wptheme-quickLinksShelf-first"> <% } else { %> <td> <% } %> <ul class="wptheme-themeLinksCategorized"> <% // We need to iterate over multiple levels of navigation nodes here. // However, the <portal-navigation:navigationLoop> tag will only iterate // over child navigation nodes that are EXPANDED. The default is collapsed. // So we use the JSP tag to iterate over the direct children of the page // unique name of interest... then to get 2nd-level children, we have to // manually iterate over them using the Model SPI. java.util.Iterator childNodeIterator = wpsNavModel.getChildren(wpsNavNode); while (null != childNodeIterator && childNodeIterator.hasNext()) { com.ibm.portal.navigation.NavigationNode themeLinkNode = (com.ibm.portal.navigation.NavigationNode)childNodeIterator.next(); // Labels come back with link URLs so you have to check this way to avoid generating an unnecessary link. boolean isLabel = com.ibm.portal.content.ContentNodeType.LABEL.equals(themeLinkNode.getContentNode().getContentNodeType()); if (!isLabel) { %><li><a href='<portal-navigation:navigationUrl type="link" varname="<%=themeLinkNode%>"/>'><portal-fmt:title varname="<%=themeLinkNode%>"/></a></li><% } else { %><li><portal-fmt:title varname="<%=themeLinkNode%>"/></li><% } } %> </ul> </td> </portal-navigation:navigationLoop> </tr> </table> </portal-navigation:navigation> <% if (showExpandCollapse) {%> <a href="javascript:void();" class="wptheme-quickLinksShelfAction" onclick="javascript:return wptheme_QuickLinksShelf.collapse();"><portal-fmt:text key="link.collapse" bundle="nls.engine"/>&nbsp;<img src="<portal-logic:urlFindInTheme file='./colors/default/CollapseButton.gif'/>" border="0" alt=""></a> <% } %> </div> <div style="clear:both;"><!-- iefix --></div> </div> <% if (!collapsed && showExpandCollapse) {%> <script type="text/javascript"> { var collapsed = wptheme_CookieUtils.getCookie("<%=quickLinksShelfCookie%>"); if (collapsed) { wptheme_QuickLinksShelf.collapse(); } } </script> <% } %> </portal-logic:if> <% } %> </c:if>