<%-- Licensed Materials - Property of IBM, 5724-E76, (C) Copyright IBM Corp. 2001, 2004, 2006 - All Rights reserved. NOTE: See notes in Default.jsp for information regarding editing theme JSP fragments. --%> <%@page import="com.ibm.wps.services.config.Config" %> <%-- theme extensions meta items --%> <portal-theme-ext:themeExtension id="com.ibm.portal.theme.plugin.MetaTagDataItems" > <portal-theme-ext:themeExtensionLoop> <portal-theme-ext:themeExtensionItemText /> </portal-theme-ext:themeExtensionLoop> </portal-theme-ext:themeExtension> <link href='<portal-logic:urlFindInTheme file="images/Portal.ico"/>' rel="shortcut icon" /> <%-- Compute color palette. Search order for color palette: 1. page meta data attribute 2. colorPalette theme policy attribute. 3. "default" --%> <portal-logic:pageMetaData varname="pageMetaData"> <c:set var="colorPalette" scope="request"><c:out value="${pageMetaData.colorPalette}" default="${portalThemePolicyMap.colorPalette}"/></c:set> <c:if test="${empty colorPalette}"> <c:set var="colorPalette" scope="request" value="default"/> </c:if> </portal-logic:pageMetaData> <% // Compute the object id for the theme on this page com.ibm.portal.admin.Theme theme = getCurrentTheme(request,response); String themeOidStr = ""; if (theme != null) { themeOidStr = identification.serialize( theme.getObjectID() ); } %> <%-- Compute the theme context info string. This string is appended to POC URIs like "themeGraphic:policy:filePath:logo.gif" or "themeGraphic:theme:filePath:images/NavigationClose.gif" or "themeGraphic:themeColorPalette:buttonBackground.gif" and then passed to the <portal-resolver:url .../> tag to get graphics. It is also used to pass the appropriate information to the CSS jsp (as that JSP needs these exact parameters in this exact format as well.) The format of this string is key:value:key:value... where the following keys are required (order is not important): policyPath The path of the current theme policy (such as theme/SingleTopNav) policyVersion The value of the styleVersion attribute of the policy. Used for cache partitioning to force loading updates through the cache. colorPalette The color palette to use on the page (such as default) browserVendor The vendor of the browser (such as Mozilla+Foundation) browserName The name of the browser (such as Firefox) browserVersion The version of the browser (such as 2.0) locale The current locale (such as en) themeOid The object id of this theme Remember to encode any values that would make the URI invalid. (such as a space or NLS characters, etc.) --%> <% String isProtectedUrl = Boolean.FALSE.toString(); if (null != request.getRemoteUser()) { isProtectedUrl = Boolean.TRUE.toString(); } String themeContextInfo = "policyPath:" + java.net.URLEncoder.encode(portalThemePolicyPath, "UTF-8") + ":policyVersion:" + themePolicy.getValueAsInt("styleVersion",1) + ":colorPalette:" + java.net.URLEncoder.encode((String)pageContext.getRequest().getAttribute( "colorPalette" ), "UTF-8") + ":browserVendor:" + java.net.URLEncoder.encode(browserVendor, "UTF-8") + ":browserName:" + java.net.URLEncoder.encode(browserName, "UTF-8") + ":browserVersion:" + java.net.URLEncoder.encode(browserVersion, "UTF-8") + ":locale:" + request.getLocale().getLanguage() + ":themeOid:" + themeOidStr + ":protectedUrl:" + isProtectedUrl; // place it in the page context for use in JSTL pageContext.setAttribute("themeContextInfo", themeContextInfo); // place user locale in page context for use in JSTL so fallback is applied to styles pageContext.setAttribute("userLocale", userLocale); %> <%-- OneUI styles --%> <link rel="styleSheet" href='<portal-logic:urlFindInTheme file="css/core${bidiSuffix}.css" />' type="text/css" /> <link rel="styleSheet" href='<portal-logic:urlFindInTheme file="css/defaultTheme${bidiSuffix}.css" />' type="text/css" /> <link rel="styleSheet" href='<portal-logic:urlFindInTheme file="css/dojo${bidiSuffix}.css" />' type="text/css" /> <link rel="styleSheet" href='<portal-logic:urlFindInTheme file="css/dojoTheme${bidiSuffix}.css" />' type="text/css" /> <%-- Link the CSS --%> <link id="portalStyles" href='<portal-logic:urlFindInTheme file="./styles.jsp" />?themeContextInfo=${themeContextInfo}&userLocale=${userLocale}' rel="styleSheet" type="text/css" /> <%-- Link dojo theme stylesheet --%> <link rel="stylesheet" type="text/css" href="/portal_dojo/dijit/themes/tundra/tundra.css" /> <portal-fmt:bidi dir="rtl"> <link rel="stylesheet" type="text/css" href="/portal_dojo/dijit/themes/tundra/tundra_rtl.css" /> </portal-fmt:bidi> <%-- Link the search widget CSS --%> <c-rt:if test = "${themePolicy.renderSearch}"> <link rel="stylesheet" type="text/css" href="<%= Config.URI_CONTEXT_PATH %>/search/css/searchWidgets.css" /> </c-rt:if>