presentation.xsl 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. Licensed Materials - Property of IBM
  4. BI and PM: qs
  5. (C) Copyright IBM Corp. 2001, 2017
  6. US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  7. -->
  8. <!--
  9. Copyright (C) 2008 Cognos ULC, an IBM Company. All rights reserved.
  10. Cognos (R) is a trademark of Cognos ULC, (formerly Cognos Incorporated).
  11. -->
  12. <xsl:stylesheet version="1.0"
  13. xmlns:xts="http://developer.cognos.com/schemas/xts/"
  14. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  15. xmlns:out="dummy-uri"
  16. xmlns:qsp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/qs/presentation/"
  17. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  18. exclude-result-prefixes="xts xsl qsp">
  19. <xsl:output method="xml" encoding="UTF-8" indent="no"/>
  20. <xsl:namespace-alias stylesheet-prefix="out" result-prefix="xsl"/>
  21. <xsl:template match="qsp:h1">
  22. <link rel="STYLESHEET" type="text/css">
  23. <out:attribute name="href"><out:value-of select="$skin_root"/>/shared/banner.css</out:attribute>
  24. </link>
  25. <link rel="STYLESHEET" type="text/css">
  26. <out:attribute name="href"><out:value-of select="$webRoot"/>/qs/css/qs.css</out:attribute>
  27. </link>
  28. <div id="headerBack">
  29. <table cellspacing="0" cellpadding="0" class="mainHeader1" border="0">
  30. <tr>
  31. <td class="logoContainer"><div class="logo"></div></td>
  32. <td class="headerTitle" id="applicationCaption" style="white-space:nowrap;">
  33. <xsl:text/><xts:string id="QUERY_STUDIO_WINDOW_TITLE"/>&#160;<xsl:text/>
  34. </td>
  35. <td class="mainHeader1Middle">
  36. <table border="0" cellspacing="0" cellpadding="0">
  37. <tr>
  38. <out:if test=" $is-named = '1' ">
  39. <td nowrap="nowrap">
  40. <span class="userNameContainer" id="ibm-banner-welcome-qs">
  41. <out:value-of select="key('session-param', 'e_user')"/>
  42. </span>
  43. </td>
  44. </out:if>
  45. <out:if test="$is-secure = '1'">
  46. <td nowrap="nowrap">
  47. <div class="authOptionContainer" id="authOptionContainerDiv"/>
  48. </td>
  49. <td class="dividerContainer"><div class="bannerDivider"></div></td>
  50. </out:if>
  51. <td>
  52. <div id="topToolbarContainer" style="background: none;"/>
  53. </td>
  54. </tr>
  55. </table>
  56. </td>
  57. <td id="ibmLogo"></td>
  58. </tr>
  59. </table>
  60. <div class="headerBannerLip"></div>
  61. </div>
  62. <script type="text/javascript">
  63. <!-- init the available namespaces and the traversable (logged in) namespaces -->
  64. cfgSet("availableLogonNamespaces", 0);
  65. cfgSet("traversableLogonNamespaces", 0);
  66. <out:choose>
  67. <out:when test="key('user-param', 'activeLogonNamespaces') != ''">
  68. cfgSet("giAvailableLogonNamespaces", <out:value-of select="key('user-param', 'activeLogonNamespaces')"/>);
  69. </out:when>
  70. </out:choose>
  71. <out:choose>
  72. <out:when test="key('user-param', 'traversableLogonNamespaces') != ''">
  73. cfgSet("giTraversableLogonNamespaces", <out:value-of select="key('user-param', 'traversableLogonNamespaces')"/>);
  74. </out:when>
  75. </out:choose>
  76. var bIsAnonymous = false;
  77. <!-- need a drop down with logon as default and logon and logoff in the menu -->
  78. <out:choose>
  79. <!-- Test if we're anonymous -->
  80. <out:when test="key('session-param', 'show_logon') = 'true'">
  81. <out:choose>
  82. <out:when test="$is-named != '1'">
  83. <!-- We are anonymous -->
  84. cfgSet("gbIsAnonymous", true);
  85. var bIsAnonymous = true;
  86. </out:when>
  87. </out:choose>
  88. </out:when>
  89. </out:choose>
  90. var gTopToolbarLogon = initLogonMenu(cfgGet("giAvailableLogonNamespaces"),cfgGet("giTraversableLogonNamespaces"), bIsAnonymous);
  91. <!-- Header buttons -->
  92. var gTopToolbarStyle = new CUIStyle('bannerOptionsButtonNormal', 'bannerOptionsButtonOver', 'bannerOptionsButtonNormal', 'bannerOptionsButtonNormal', 'bannerOptionsButtonNormal');
  93. var gTopToolbarFlyoutMenu = new CUIStyle('bannerOptionsButtonNormal', 'bannerOptionsButtonOver', 'headerButtonDropDown', 'bannerOptionsButtonNormal','bannerOptionsButtonNormal', 'bannerOptionsButtonNormal');
  94. var gTopToolbar = new CBar('topToolbarContainer', gTopToolbarStyle, null, '', '', '', 'qs', 'tt');
  95. gTopToolbar.setMenuType(cHorizonalBar);
  96. <!-- Home and back buttons disabled in Titan release -->
  97. <!-- var topToolbarbutton = new CToolbarButton(gTopToolbar, 'bannerHome(cfgGet("gsCognosHome"));', '<out:value-of select="$skin_root"/>/shared/images/action_home.gif', '<xts:string id="IDS_PORTAL" encode="javascript"/>', gTopToolbarStyle, false, null, null, '<out:value-of select="$webRoot"/>');
  98. if (gsUiBackURL.length > 0)
  99. {
  100. topToolbarbutton = new CToolbarButton(gTopToolbar, 'closeLink();', '<out:value-of select="$skin_root"/>/shared/images/action_return.gif', '<xts:string id="EXIT" encode="javascript"/>', gTopToolbarStyle, false, null, null, '<out:value-of select="$webRoot"/>');
  101. }
  102. -->
  103. topToolbarbutton = new CToolbarButton(gTopToolbar, 'bannerHelp("help")', '<out:value-of select="$skin_root"/>/shared/images/action_help.gif', '<xts:string id="HELP" encode="javascript"/>', gTopToolbarStyle, false, null, null, '<out:value-of select="$webRoot"/>');
  104. var topMenuItem = new CMenuItem(gTopToolbar, '', '', '<out:value-of select="$skin_root"/>/shared/images/dropdown_arrow_banner.gif', gTopToolbarFlyoutMenu, '<out:value-of select="$webRoot"/>', '<out:value-of select="$skin_root"/>');
  105. topMenuItem.setToolTip('<xts:string id="HELP_OPTIONS" encode="javascript"/>');
  106. var topMenuIcon = topMenuItem.getIcon();
  107. topMenuIcon.setWidth(7);
  108. gTopToolbar.draw();
  109. var helpMenu = topMenuItem.createDropDownMenu(gMenuStyle, '<xts:string id="HELP" encode="javascript"/>');
  110. var helpMenuItem = new CMenuItem(helpMenu, '<xts:string id="HELP" encode="javascript"/>', 'bannerHelp("help")', '', gMenuItemStyle, '<out:value-of select="$webRoot"/>', '<out:value-of select="$skin_root"/>');
  111. helpMenuItem = new CMenuItem(helpMenu, '<xts:string id="COGNOS_ON_THE_WEB" encode="javascript"/>', 'bannerHelp("cogonweb")', '', gMenuItemStyle, '<out:value-of select="$webRoot"/>', '<out:value-of select="$skin_root"/>');
  112. helpMenu.add(gMenuSeperator);
  113. <!-- Welcome Page link disabled in Titan release -->
  114. <!-- helpMenuItem = new CMenuItem(helpMenu, '<xts:string id="GO_TO_THE_WELCOME_PAGE" encode="javascript"/>', 'bannerHelp("welcome")', '', gMenuItemStyle, '<out:value-of select="$webRoot"/>', '<out:value-of select="$skin_root"/>');
  115. helpMenu.add(gMenuSeperator); -->
  116. <out:variable name="appName">
  117. <xts:string id="QUERY_STUDIO_WINDOW_TITLE" encode="javascript"/>
  118. </out:variable>
  119. helpMenuItem = new CMenuItem(helpMenu, '<xts:string id="ABOUT_TITLE" encode="javascript"><xts:param name="appName"><out:value-of select="$appName"/></xts:param></xts:string>', 'bannerHelp("about")', '', gMenuItemStyle, '<out:value-of select="$webRoot"/>', '<out:value-of select="$skin_root"/>');
  120. </script>
  121. </xsl:template>
  122. <!-- the main engine -->
  123. <xsl:template match="*">
  124. <xsl:copy>
  125. <xsl:copy-of select="@*"/>
  126. <xsl:apply-templates/>
  127. </xsl:copy>
  128. </xsl:template>
  129. </xsl:stylesheet>