123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- Licensed Materials - Property of IBM
- IBM Cognos Products: ps
- (C) Copyright IBM Corp. 2005, 2012
- US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
- -->
- <!--
- Copyright (C) 2008 Cognos ULC, an IBM Company. All rights reserved.
- Cognos (R) is a trademark of Cognos ULC, (formerly Cognos Incorporated).
- -->
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- xmlns:xts="http://developer.cognos.com/schemas/xts/"
- xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
- exclude-result-prefixes="xts xtsext xts pf xsl">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <pf:variables/>
- <xsl:variable name="dashboardFavorites" select="/root/favoritesFolder/*[local-name()='queryResponse']//*[local-name()='dashboard']"/>
- <xsl:variable name="iconName" select="/root/system/param[@name='ui_objects']/object[@class='dashboard']/@icon"/>
- <xsl:variable name="hasDashboards" select="count($dashboardFavorites)>0"/>
- <xsl:variable name="canUseAdvancedFeatures" select="/root/session/param[@name='capabilities']/*[local-name()='canUseAdvancedDashboardFeatures']"/>
- <xsl:variable name="isChromeless" select="string(/root/generalConfigSettings/configuration/property[@name='portal.launchBusinessInsightChromeless']) = 'true'"/>
- <xsl:variable name="errURL" select="/root/system/param[@name='COGNOSHome']"/>
- <xsl:template match="/root">
- <favorites>
- <dashboard>
- <script>
- function launchICDFavorite(id) {
- var winProp = "menubar=no,toolbar=no,status=no,location=no,resizable=yes,scrollbars=yes";
- var uierrURL = "<xsl:value-of select="$errURL"/>";
- if(id != '')
- {
- <xsl:choose>
- <xsl:when test="$isChromeless">cognosLaunchInWindow('_blank', winProp, 'ui.gateway', g_PS_gateway, 'ui.tool', 'DashboardConsole', 'ui.action', 'edit', 'ui.id', id);</xsl:when>
- <xsl:otherwise>
- directLaunch('ui.gateway', sGateway, 'ui.tool', 'DashboardConsole', 'ui.action', 'edit', 'ui.id', id, 'ui.errURL', uierrURL);
- </xsl:otherwise>
- </xsl:choose>
- }
- else
- {
- <xsl:choose>
- <xsl:when test="$isChromeless">cognosLaunchInWindow('_blank', winProp, 'ui.gateway', sGateway, 'ui.tool', 'DashboardConsole', 'ui.action', 'new');</xsl:when>
- <xsl:otherwise>
- directLaunch('ui.gateway', sGateway, 'ui.tool', 'DashboardConsole', 'ui.action', 'new','ui.errURL', uierrURL);
- </xsl:otherwise>
- </xsl:choose>
- }
- }
- </script>
- <title>
- <xsl:choose>
- <xsl:when test="$hasDashboards">
- <xsl:choose>
- <xsl:when test="$canUseAdvancedFeatures"><xts:string id="IDS_WELCOME_DASHBOARD_DESC"/></xsl:when>
- <xsl:otherwise><xts:string id="IDS_WELCOME_DASHBOARD_VIEW_FAV_DESC"/></xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:otherwise>
- <xsl:choose>
- <xsl:when test="$canUseAdvancedFeatures"><xts:string id="IDS_WELCOME_DASHBOARD_NEW_DESC"/></xsl:when>
- <xsl:otherwise><xts:string id="IDS_WELCOME_IBM_COGNOS_DASHBOARD_VIEW_NOFAV_DESC"/></xsl:otherwise>
- </xsl:choose>
- </xsl:otherwise>
- </xsl:choose>
- </title>
- <action>javascript:launchICDFavorite('')</action>
- <xsl:if test="$hasDashboards">
- <flyout>
- <caption><xts:string id="IDS_WELCOME_FAVORITES"/></caption>
- <entries>
- <xsl:apply-templates select="$dashboardFavorites" mode="dashboard"/>
- <xsl:if test="$canUseAdvancedFeatures">
- <item createWksp="true">
- <image><xsl:value-of select="$image_root"/>action_new_<xsl:value-of select="$iconName"/>.gif</image>
- <altText><xts:string id="IDS_WELCOME_DASHBOARD_NEW_DESC"/></altText>
- <name><xts:string id="IDS_WELCOME_CREATE_NEW_DASHBOARD"/></name>
- <action>javascript:launchICDFavorite('')</action>
- </item>
- </xsl:if>
- </entries>
- </flyout>
- </xsl:if>
- </dashboard>
- </favorites>
- </xsl:template>
- <xsl:template match="*[local-name()='dashboard']" mode="dashboard">
- <item>
- <image><xsl:value-of select="$image_root"/>icon_<xsl:value-of select="$iconName"/>.gif</image>
- <altText><xts:string id="IDS_ACT_OPEN_DASHBOARD_ALT"><xts:param name="name"><xsl:value-of select="./*[local-name()='defaultName']"/></xts:param></xts:string></altText>
- <ariaText><xts:string id="IDS_ACT_OPEN_DASHBOARD_ARA"><xts:param name="name"><xsl:value-of select="./*[local-name()='defaultName']"/></xts:param></xts:string></ariaText>
- <name><xsl:value-of select="./*[local-name()='defaultName']"/></name>
- <action>javascript:launchICDFavorite('<xsl:value-of select="./*[local-name()='storeID']"/>')</action>
- </item>
- </xsl:template>
- <xsl:template match="*"/>
- </xsl:stylesheet>
|