view.xslt 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. Licensed Materials - Property of IBM
  4. IBM Cognos Products: cpscrn
  5. (C) Copyright IBM Corp. 2005, 2011
  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. <!-- $Header: //cpscrn/main/templates/cps4/portlets/utility/portlet-impl/html/view.xslt#1 $ -->
  13. <!-- $DateTime: 2008/10/22 11:12:04 $ -->
  14. <!-- $Change: 25109 $ -->
  15. <xsl:stylesheet version="1.0"
  16. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  17. xmlns:xts="http://developer.cognos.com/schemas/xts/"
  18. xmlns:ui="http://developer.cognos.com/schemas/cps/logic/ui/1/"
  19. xmlns:portlet="http://developer.cognos.com/schemas/cps/logic/portlet/1/"
  20. exclude-result-prefixes="xts ui portlet">
  21. <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no"/>
  22. <ui:property name="html-use-title" select="'html_use_title'"/>
  23. <ui:property name="html-url" select="'url'"/>
  24. <!-- create browser variable: $ui-browser -->
  25. <ui:browser/>
  26. <xsl:template match="/">
  27. <xsl:choose>
  28. <xsl:when test="$html-url != ''">
  29. <ui:property name="html-height" select="'html_height'"/>
  30. <xsl:if test="$ui-session-params[@name='url'] != ''">
  31. <a href="wsrp_rewrite?wsrp-urlType=blockingAction&amp;wsrp-interactionState=set:{$ui-state-params[@name = 'channel']}&amp;wsrp-windowState={$ui-window-state}&amp;wsrp-navigationalState=&amp;url=/wsrp_rewrite"><xts:string id="IDS_UTI_HTM_BACK_TO_DEFAULT"/></a>
  32. </xsl:if>
  33. <xsl:variable name="use-title" select="$html-use-title"/>
  34. <xsl:variable name="prefTitle">
  35. <xsl:choose>
  36. <xsl:when test="$html-use-title='true'">
  37. <xsl:variable name="titles" select="$ui-state-params[starts-with( @name, 'title_' ) and .!='']"/>
  38. <portlet:preferred-title-localized-value select="$titles"/>
  39. </xsl:when>
  40. <xsl:otherwise>
  41. <xsl:value-of select="$html-url"/>
  42. </xsl:otherwise>
  43. </xsl:choose>
  44. </xsl:variable>
  45. <iframe src="{$html-url}" width="100%" frameborder="0" id="wsrp_rewrite_iframe">
  46. <xsl:if test="$html-height!='' and $ui-window-state != 'wsrp:maximized'">
  47. <xsl:attribute name="height"><xsl:value-of select="$html-height"/></xsl:attribute>
  48. </xsl:if>
  49. <xsl:attribute name="title"><xsl:value-of select="$prefTitle"/></xsl:attribute>
  50. </iframe>
  51. <ui:maximize-scripts ui:objectId="wsrp_rewrite_iframe"/>
  52. </xsl:when>
  53. <xsl:otherwise>
  54. <table border="0" cellspacing="0" cellpadding="0" width="100%">
  55. <tr>
  56. <td class="portlet-font" align="center" valign="middle" height="100">
  57. <xsl:choose>
  58. <xsl:when test="$ui-state-params[@name = 'channel'] != ''"><xts:string id="IDS_UTI_HTM_READY_FOR_REQUESTS"/></xsl:when>
  59. <xsl:otherwise>
  60. <xsl:choose>
  61. <xsl:when test="$ui-mode = 'wsrp:preview'"><xts:string id="IDS_PRO_NOC_LABEL_NO_CONTENT"/></xsl:when>
  62. <xsl:otherwise><xts:string id="IDS_PRO_NOC_LABEL_CLICK_EDIT"/></xsl:otherwise>
  63. </xsl:choose>
  64. </xsl:otherwise>
  65. </xsl:choose>
  66. </td>
  67. </tr>
  68. </table>
  69. </xsl:otherwise>
  70. </xsl:choose>
  71. <ui:preview/>
  72. </xsl:template>
  73. </xsl:stylesheet>