noPrompts.xslt 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. Licensed Materials - Property of IBM
  4. IBM Cognos Products: ps
  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. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  13. xmlns:xts="http://developer.cognos.com/schemas/xts/"
  14. xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
  15. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  16. xmlns:lyt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/layout/"
  17. xmlns:dp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/presentation/"
  18. xmlns:df="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/framework/"
  19. xmlns:prompt="http://developer.cognos.com/schemas/xts/portal/iPrompting/1/"
  20. xmlns:xos="http://developer.cognos.com/schemas/xts/output/"
  21. exclude-result-prefixes="xsl xts pf xtsext lyt dp df prompt xos">
  22. <!-- global application variables -->
  23. <pf:variables/>
  24. <xsl:output method="html" version="1.0" encoding="UTF-8" indent="yes"/>
  25. <xsl:variable name="mname" select="key('env-param', 'm')"/>
  26. <!-- Ouptut a response containing a simple message dialog stating that there are no prompts -->
  27. <xsl:template match="/root">
  28. <xsl:choose>
  29. <xsl:when test="/root/command/*/redirect != ''">
  30. <input type="hidden" name="ps_nav_op" value=""/>
  31. <!-- if we'ev visited the schedule dialog and we don't have a credential in CM, then create one -->
  32. <xsl:if test="not(key('env-param', 'm_sp_credential')) and key('env-param', 'visited_schedule_properties')">
  33. <input name="h_CAM_action" type="hidden" value="generateTC"/>
  34. </xsl:if>
  35. <script language="javascript">
  36. var frm = document.pform;
  37. frm.m.value = '<xsl:value-of select="xtsext:javascriptencode(string(/root/command/*/redirect))"/>';
  38. frm.method.value='';
  39. <!-- we never want to save the runOption prompt to true -->
  40. if (frm.m_ro_prompt)
  41. frm.m_ro_prompt.value = 'false';
  42. <xsl:choose>
  43. <!-- if we came from the job step run options page then do a stackdown -->
  44. <xsl:when test="key('env-param', 'step_options_visited')">
  45. frm.ps_nav_op.value = 'drop';
  46. </xsl:when>
  47. <xsl:otherwise>
  48. frm.ps_nav_op.value = 'submit';
  49. </xsl:otherwise>
  50. </xsl:choose>
  51. frm.submit();
  52. </script>
  53. </xsl:when>
  54. <xsl:otherwise>
  55. <!-- dialog header -->
  56. <dp:header help="false">
  57. <!-- header titles-->
  58. <dp:title>
  59. <xts:string id="IDS_PORTAL"/>
  60. </dp:title>
  61. <dp:close>
  62. <a href="#" onclick="document.formWarpRequest.method.value='';document.formWarpRequest.submit();">
  63. <dp:closeMarker/>
  64. </a>
  65. </dp:close>
  66. </dp:header>
  67. <lyt:layout style="1">
  68. <lyt:section>
  69. <dp:message>
  70. <dp:image>
  71. <img width="32" height="32" align="top" hspace="10">
  72. <xsl:attribute name="src">
  73. <xsl:value-of select="concat($webcontent, '/',$app,'/images/msg_information.gif')"/>
  74. </xsl:attribute>
  75. <xsl:attribute name="alt"><xts:string id="IDS_ICON_INFORMATION" encode="html"/></xsl:attribute>
  76. </img>
  77. </dp:image>
  78. <dp:messageText>
  79. <xts:string id="IDS_OTHERRUN_NO_PROMPTS_MESSAGE"/>
  80. <br/>
  81. </dp:messageText>
  82. </dp:message>
  83. </lyt:section>
  84. </lyt:layout>
  85. <!-- =================== F o o t e r ===================== -->
  86. <dp:footer>
  87. <df:button df:id="IDS_CLOSE" df:style="href" df:href="#" onClick="document.formWarpRequest.method.value='';document.formWarpRequest.submit();"/>
  88. </dp:footer>
  89. </xsl:otherwise>
  90. </xsl:choose>
  91. </xsl:template>
  92. </xsl:stylesheet>