properties_powerplay_8_run_options.xts 45 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968
  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, 2014
  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. <xts:morphlet xmlns:xts="http://developer.cognos.com/schemas/xts/" messageBase="messages/portal.xml, messages/portalRL.xml" includeConfig="true">
  13. <!--
  14. ===============================================================================================
  15. formlogic_init - standard form logic initialization
  16. ===============================================================================================
  17. -->
  18. <xts:block id="formlogic_init" type="exec" mode="interpret" processor="XSLT" path="/logicsheets/formlogic_init.xslt" nodelist="env,credential,system,http"/>
  19. <!-- Load object-specific property tabs map ============================================================== -->
  20. <xts:block id="getTabs1" type="exec" mode="interpret" processor="XML" path="/portal/uiobjects_tabs.xml" condition=".[not(/root/env/param[@name='setPrompts']='true')]" mandatory="false"/>
  21. <!-- Load object-specific property tabs map ============================================================== -->
  22. <xts:block id="getTabs" type="exec" mode="interpret" processor="XML" condition=".[/root/env/param[@name='setPrompts']='true']" mandatory="false">
  23. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  24. <xsl:template match="/">
  25. <xts:sequence>
  26. <xts:append>
  27. <tabs>
  28. <object class="powerPlay8Report">
  29. <tab name="run_options" page="properties_powerplay_8_run_options.xts"><xts:string id="IDS_PROP_TAB_POWERPLAY8_REPORT"/></tab>
  30. </object>
  31. </tabs>
  32. </xts:append>
  33. </xts:sequence>
  34. </xsl:template>
  35. </xsl:stylesheet>
  36. </xts:block>
  37. <!--
  38. ===============================================================================================
  39. restore_state - have been called from powerPlayService so we have to restore the state and extract the new prompt parameters
  40. ===============================================================================================
  41. -->
  42. <xts:block id="restore_state" processor="XSLT" dependency="formlogic_init" type="exec" condition=".[ /root/env/param[@name='opaque'] or /root/env/param[@name='ccstate']]" mandatory="false">
  43. <xts:logicsheet path="logicsheets/portal.xsl"/>
  44. <xsl:stylesheet version="1.0"
  45. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  46. xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
  47. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  48. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  49. xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
  50. exclude-result-prefixes="xsl pf xtsext xsi SOAP-ENC">
  51. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  52. <xsl:variable name="passport" select="/root/credential/param[@name='CAM']/*[local-name() ='CAM']/*[local-name() = 'CAMPassport']/*[local-name() = 'id']"/>
  53. <xsl:key name="env-param" match="/root/env/param" use="@name"/>
  54. <xsl:template match="/">
  55. <xts:sequence>
  56. <!-- get the parameters returned from powerPlayService and append to root -->
  57. <xsl:if test="key('env-param','m_parameter')!=''">
  58. <xts:append select="/root">
  59. <parameters>
  60. <xts:transform src="transforms/portal/parameters/post-WARP-process.xslt" processor="XSLT">
  61. <xts:transform name="XMLDecode">
  62. <xsl:value-of select="string(key('env-param','m_parameter'))"/>
  63. </xts:transform>
  64. </xts:transform>
  65. </parameters>
  66. <view>properties</view>
  67. </xts:append>
  68. </xsl:if>
  69. <!-- save the value of this environment variable while we restore the <env> node -->
  70. <xsl:variable name="saved_parameters" select="key('env-param','m_parameter')"/>
  71. <!-- restore the saved state -->
  72. <xts:replace select="/root/env">
  73. <env>
  74. <xts:transform name="XMLDecode">
  75. <xsl:choose>
  76. <!-- ccstate is returned from powerPlay when the user presses Cancel so unpack the state that is returned from ccstate -->
  77. <xsl:when test="/root/env/param[@name='ccstate']">
  78. <xsl:value-of select="xtsext:web64decode(string(xtsext:cafaction('sign_unwrap', string( key('env-param','ccstate')))), true())"/>
  79. </xsl:when>
  80. <!-- opaque is returned from powerPlay when the user presses OK. -->
  81. <xsl:otherwise>
  82. <xsl:value-of select="xtsext:web64decode(string(xtsext:cafaction('sign_unwrap', string( key('env-param','opaque')))), true())"/>
  83. </xsl:otherwise>
  84. </xsl:choose>
  85. </xts:transform>
  86. </env>
  87. </xts:replace>
  88. <!-- restore the environment variable that was saved prior to restoring the <env> node -->
  89. <xts:delete select="/root/env/param[@name='m_parameter']"/>
  90. <xts:append select="/root/env">
  91. <param name="m_parameter">
  92. <xsl:value-of select="$saved_parameters"/>
  93. </param>
  94. </xts:append>
  95. <!-- clear some environment parameters from the restored state -->
  96. <xts:delete select="/root/env/param[@name='controller_state']"/>
  97. <xts:delete select="/root/env/param[@name='parameterDescription']"/> <!-- force generation of new parameter description -->
  98. <xts:delete select="/root/env/param[@name='cleared_prompts']"/>
  99. </xts:sequence>
  100. </xsl:template>
  101. </xsl:stylesheet>
  102. </xts:block>
  103. <!--
  104. ===============================================================================================
  105. save_state - saves the current state to be passed to the powerPlayService
  106. ===============================================================================================
  107. -->
  108. <xts:block id="save_state" processor="XSLT" dependency="restore_state" type="exec" condition=".[starts-with(/root/env/param[@name='controller_state'],'prompt')]" mandatory="false">
  109. <xts:logicsheet path="logicsheets/portal.xsl"/>
  110. <xsl:stylesheet version="1.0"
  111. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  112. xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
  113. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt">
  114. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  115. <xsl:variable name="passport" select="/root/credential/param[@name='CAM']/*[local-name() ='CAM']/*[local-name() = 'CAMPassport']/*[local-name() = 'id']"/>
  116. <xsl:key name="env-param" match="/root/env/param" use="@name"/>
  117. <xsl:template match="/">
  118. <xts:sequence>
  119. <!-- remove any existing saved state-->
  120. <xts:delete select="/root/env/param[@name='savedEnv']"/>
  121. <!-- encode the current state and append to the environment in savedEnv -->
  122. <xts:append select="/root/env">
  123. <xsl:variable name="markup">
  124. <xsl:call-template name="serialize-xml">
  125. <xsl:with-param name="node-set" select="/root/env/param[@name != 'savedEnv']"/>
  126. </xsl:call-template>
  127. </xsl:variable>
  128. <param name="savedEnv">
  129. <xsl:value-of select="xtsext:cafaction( concat('sign_wrap_setpassportid_', $passport), xtsext:web64encode(string($markup), true()))"/>
  130. </param>
  131. </xts:append>
  132. <!-- web64encode the parameters retrieved from getContent block. This only occurs the first time Edit or Set are pressed-->
  133. <xsl:if test="not(/root/env/param[@name='m_rp_parameters']) or /root/env/param[@name='m_rp_parameters']=''">
  134. <xsl:variable name="markup">
  135. <xsl:call-template name="serialize-xml">
  136. <xsl:with-param name="node-set" select="/root/*[local-name()='parameters']"/>
  137. </xsl:call-template>
  138. </xsl:variable>
  139. <xsl:if test="$markup!=''">
  140. <xts:delete select="/root/env/param[@name='m_rp_parameters']"/>
  141. <xts:append select="/root/env">
  142. <param name="m_rp_parameters">
  143. <xsl:value-of select="xtsext:web64encode(string($markup),true())"/>
  144. </param>
  145. </xts:append>
  146. </xsl:if>
  147. </xsl:if>
  148. </xts:sequence>
  149. </xsl:template>
  150. <pf:serialize-xml/>
  151. </xsl:stylesheet>
  152. </xts:block>
  153. <!--
  154. ===============================================================================================
  155. callPowerPlayService - Calls the powerPlayService to deal with prompts by creating a blank redirect page and submitting
  156. ===============================================================================================
  157. -->
  158. <xts:block id="callPowerPlayService" dependency="save_state" mode="output" processor="XSLT" type="exec" condition=".[starts-with(/root/env/param[@name='controller_state'],'prompt')]" mimeType="text/html" mandatory="false">
  159. <!-- portal specific information -->
  160. <xts:logicsheet path="logicsheets/portal.xsl"/>
  161. <xsl:stylesheet version="1.0"
  162. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  163. xmlns:xts="http://developer.cognos.com/schemas/xts/"
  164. xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
  165. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  166. exclude-result-prefixes="xsl xts pf xtsext">
  167. <pf:variables/>
  168. <xsl:key name="env-param" match="/root/env/param" use="@name"/>
  169. <xsl:template match="/">
  170. <!-- call powerPlayServce via POST to get the prompt information -->
  171. <html>
  172. <body>
  173. <form name="pform" method="post" action="{$gateway}">
  174. <input type="hidden" name="ui.backURL" value="{$gateway}?b_action=xts.run&amp;m={$app}/properties_powerplay_8_run_options.xts&amp;ccstate={/root/env/param[@name='savedEnv']}"/>
  175. <input type="hidden" name="PP_BACK" value="{$gateway}?b_action=xts.run&amp;m={$app}/properties_powerplay_8_run_options.xts&amp;ccstate={/root/env/param[@name='savedEnv']}"/>
  176. <input type="hidden" name="b_action" value="powerPlayService"/>
  177. <input type="hidden" name="ui.action" value="setPowerPlay8Prompt"/>
  178. <input type="hidden" name="m" value="{$app}/properties_powerplay_8_run_options.xts"/>
  179. <input type="hidden" name="crnobj" value="{key('env-param','m_obj')}"/>
  180. <input type="hidden" name="ui.crnfrm" value="PDF"/>
  181. <input type="hidden" name="opaque" value="{key('env-param','savedEnv')}"/>
  182. <input type="hidden" name="store_ID" value="{key('env-param','m_storeID')}"/>
  183. <!-- add the existing parameters if the edit (and not the set) link was pressed -->
  184. <xsl:if test="key('env-param','controller_state')='prompt_edit' and key('env-param','m_rp_parameters')!=''">
  185. <input type="hidden" name="m_parameter" value="{key('env-param','m_parameter')}"/>
  186. </xsl:if>
  187. </form>
  188. <!-- submit form -->
  189. <script type="text/javascript">
  190. document.pform.submit();
  191. </script>
  192. </body>
  193. </html>
  194. </xsl:template>
  195. </xsl:stylesheet>
  196. </xts:block>
  197. <!--
  198. ===============================================================================================
  199. getObjects - get object class names
  200. ===============================================================================================
  201. -->
  202. <xts:block id="classNames" type="exec" mode="input" processor="XML" condition=".[ not(/root/env/param[@name='controller_state'])]" mandatory="false" path="/portal/uiExtensions.xml">
  203. <xts:logicsheet path="/logicsheets/uiobjects/uiobjects_names.xslt"/>
  204. </xts:block>
  205. <!--
  206. ===============================================================================================
  207. getContent - get our data from Content Manager
  208. ===============================================================================================
  209. -->
  210. <xts:block id="getContent" processor="XSLT" type="exec" condition=".[ not(/root/env/param[@name='controller_state']) or /root/env/param[@name='controller_state']='' ]" mandatory="false" dependency="formlogic_init restore_state">
  211. <xts:logicsheet path="logicsheets/presentation/dialog/templates.xsl"/>
  212. <xts:logicsheet path="logicsheets/cm-logic.xsl"/>
  213. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  214. <xts:logicsheet path="logicsheets/portal.xsl"/>
  215. <xsl:stylesheet version="1.0"
  216. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  217. xmlns:cml="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/cml/1/"
  218. xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
  219. xmlns:dt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/templates/"
  220. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  221. xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/" exclude-result-prefixes="xsl cml dt xtsext pf send">
  222. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  223. <xsl:variable name="passport" select="/root/credential/param[@name='CAM']/*[local-name() ='CAM']/*[local-name() = 'CAMPassport']/*[local-name() = 'id']"/>
  224. <xsl:key name="env-param" match="/root/env/param" use="@name"/>
  225. <xsl:template match="/">
  226. <xts:sequence>
  227. <!-- web64encode the contents of m_parameter returned from powerPlay and save as environment variable m_rp_parameters which
  228. is where various morphlets such as save.xts, and view_prompts.xts expect to find them -->
  229. <xsl:variable name="markup">
  230. <xsl:call-template name="serialize-xml">
  231. <xsl:with-param name="node-set" select="/root/*[local-name()='parameters']"/>
  232. </xsl:call-template>
  233. </xsl:variable>
  234. <xsl:if test="$markup!=''">
  235. <xts:delete select="/root/env/param[@name='m_rp_parameters']"/>
  236. <xts:append select="/root/env">
  237. <param name="m_rp_parameters">
  238. <xsl:value-of select="xtsext:web64encode(string($markup),true())"/>
  239. </param>
  240. </xts:append>
  241. </xsl:if>
  242. <xts:append>
  243. <xts:transform src="transforms/CM/post-process.xslt" processor="XSLT">
  244. <send:request provider="cm">
  245. <xts:transform src="transforms/CM/pre-process.xslt" processor="XSLT">
  246. <cm:query xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
  247. <cm:search>
  248. <xsl:value-of select="/root/env/param[@name='m_obj']"/>
  249. </cm:search>
  250. <cm:properties>
  251. <cm:property name="defaultName"/>
  252. <cm:property name="storeID"/>
  253. <cm:property name="permissions"/>
  254. <cm:property name="options"/>
  255. <cm:property name="parameters"/>
  256. <cm:property name="defaultPortalAction"/>
  257. </cm:properties>
  258. <cm:options schemaInfo="false" maxObjects="1"/>
  259. </cm:query>
  260. </xts:transform>
  261. </send:request>
  262. </xts:transform>
  263. <view>properties</view>
  264. </xts:append>
  265. <xsl:if test="not(/root/parameters)">
  266. <dt:splitParameters queryNode="/root/*[local-name()='queryResponse']"/>
  267. </xsl:if>
  268. </xts:sequence>
  269. </xsl:template>
  270. <pf:serialize-xml/>
  271. </xsl:stylesheet>
  272. </xts:block>
  273. <!--
  274. ===============================================================================================
  275. generateParameterDescription
  276. ===============================================================================================
  277. -->
  278. <xts:block id="generateParameterDescription"
  279. nodelist="env,credentialParameters,parameters,dataSources"
  280. path="/portal/iPrompting/logicsheets/gen-prompt-description.xslt"
  281. processor="XSLT"
  282. type="exec"
  283. dependency="getContent"
  284. condition=".[/root/view='properties' and not(/root/env/param[@name='parameterDescription'] and /root/env/param[@name='controller_state']) or /root/env/param[@name='m_rp_parameters']!='']"
  285. mandatory="false">
  286. <xts:logicsheet path="logicsheets/presentation/dialog/templates.xsl"/>
  287. </xts:block>
  288. <!--
  289. ===============================================================================================
  290. Produce default runOption under /root/env
  291. ===============================================================================================
  292. -->
  293. <xts:block id="generateDefaultRunOptions"
  294. processor="XSLT" type="exec"
  295. dependency="getContent formlogic_init"
  296. condition=".[not(/root/env/param[@name = 'visited_run_options_property']) and (not(/root/env/param[@name='controller_state']) or /root/env/param[@name='controller_state']='' )]"
  297. mandatory="false">
  298. <xts:logicsheet path="logicsheets/cm-logic.xsl"/>
  299. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  300. <xts:logicsheet path="logicsheets/presentation/dialog/templates.xsl"/>
  301. <xsl:stylesheet version="1.0"
  302. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  303. xmlns:cml="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/cml/1/"
  304. xmlns:dt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/templates/"
  305. xmlns:xts="http://developer.cognos.com/schemas/xts/"
  306. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  307. xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/" exclude-result-prefixes="cml dt xts xtsext cm">
  308. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  309. <xsl:template match="/">
  310. <xts:sequence>
  311. <xts:append select="/root/env">
  312. <xts:transform src="transforms/portal/options/generateParams.xslt" processor="XSLT">
  313. <xts:param name="messageBase">/messages/portal.xml</xts:param>
  314. <root>
  315. <xts:transform src="transforms/portal/options/mergeReportOptions.xslt" processor="XSLT">
  316. <root>
  317. <xts:queryNode select="/root/*[local-name()='queryResponse']/*"/>
  318. </root>
  319. </xts:transform>
  320. <deliverySection>false</deliverySection>
  321. <defaultOptions>true</defaultOptions>
  322. <preferences>
  323. <xsl:copy-of select="/root/header/*[local-name() = 'biBusHeader']/*[local-name() = 'userPreferenceVars']/*"/>
  324. </preferences>
  325. <system>
  326. <param name="reportFormats">
  327. <xsl:copy-of select="/root/system/param[@name='reportFormats']/*"/>
  328. </param>
  329. </system>
  330. <basicOptions>true</basicOptions>
  331. </root>
  332. </xts:transform>
  333. </xts:append>
  334. </xts:sequence>
  335. </xsl:template>
  336. </xsl:stylesheet>
  337. </xts:block>
  338. <xts:block id="renderPage2" mode="output" processor="XSLT" type="exec" mimeType="text/html" condition=".[ ((not(/root/env/param[@name='controller_state']) or /root/env/param[@name='controller_state']='') and (/root/env/param[@name='setPrompts']='true')) ]" mandatory="false" dependency="generateDefaultRunOptions getTabs classNames">
  339. <xts:logicsheet path="logicsheets/portal.xsl"/>
  340. <xts:logicsheet path="logicsheets/presentation/dialog/ui-templates.xsl"/>
  341. <xts:logicsheet path="logicsheets/presentation/dialog/framework.xsl"/>
  342. <xts:logicsheet path="logicsheets/presentation/layout.xsl"/>
  343. <xts:logicsheet path="logicsheets/presentation/dialog/presentation.xsl"/>
  344. <xts:logicsheet path="logicsheets/presentation/controls/framework.xsl"/>
  345. <xts:logicsheet path="logicsheets/presentation/controls/presentation.xsl"/>
  346. <xts:logicsheet path="logicsheets/presentation/dialog/confirm.xslt"/>
  347. <xts:logicsheet path="logicsheets/formlogic.xslt"/>
  348. <xts:logicsheet path="logicsheets/validation.xslt"/> <xts:logicsheet path="logicsheets/presentation/touch_up.xslt"/>
  349. <xsl:stylesheet version="1.0"
  350. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  351. xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
  352. xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
  353. xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/"
  354. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  355. xmlns:xts="http://developer.cognos.com/schemas/xts/"
  356. xmlns:lyt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/layout/"
  357. xmlns:dp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/presentation/"
  358. xmlns:df="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/framework/"
  359. xmlns:ut="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/ui-templates/"
  360. xmlns:dc="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/confirm/1/"
  361. xmlns:cf="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/framework/"
  362. xmlns:cp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/presentation/"
  363. xmlns:utml="http://developer.cognos.com/schemas/xts/logicsheet/xslt/formlogic/"
  364. xmlns:thm="http://developer.cognos.com/schemas/xts/logicsheets/xslt/theme/"
  365. exclude-result-prefixes="xsl cf cp df dp dc lyt cm thm utml xtsext ut">
  366. <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no" omit-xml-declaration="yes"/>
  367. <!-- current file name -->
  368. <xsl:variable name="mname" select="'properties_powerplay_8_run_options.xts'"/>
  369. <xsl:variable name="the-object" select="/root/cm:queryResponse/*"/>
  370. <xsl:variable name="has_write_permission" select="contains(concat(' ', /root/cm:queryResponse/*[position()=1]/cm:permissions, ' '), ' write ')"/>
  371. <xsl:variable name="has_execute_permission" select="contains(concat(' ', /root/cm:queryResponse/*[position()=1]/cm:permissions, ' '), ' execute ')"/>
  372. <xsl:variable name="has_policy_permission" select="contains(concat(' ', /root/cm:queryResponse/*[position()=1]//cm:permissions, ' '), ' setPolicy ')"/>
  373. <xsl:variable name="showOKCancel" select="$has_write_permission or $has_policy_permission"/>
  374. <xsl:variable name="pp_option" select="/root/*[local-name()='queryResponse']/*[contains(local-name(),'powerPlay8Report')]/*[local-name()='options']"/>
  375. <xsl:variable name="reportOptionsExists">
  376. <xsl:choose>
  377. <xsl:when test="string(key('env-param','override_default_reportOptions')) = 'true'">true</xsl:when>
  378. <xsl:when test="key('env-param','changed_override_default_reportOptions')">false</xsl:when>
  379. <xsl:when test="string(/root/cm:queryResponse/*/cm:executionLocale) != '' or string(/root/cm:queryResponse/*/cm:executionFormat) != ''">true</xsl:when>
  380. <xsl:otherwise>false</xsl:otherwise>
  381. </xsl:choose>
  382. </xsl:variable>
  383. <pf:variables/>
  384. <!-- start the output -->
  385. <xsl:template match="/root">
  386. <xsl:variable name="browserTitle">
  387. <xts:string id="IDS_PROPERTIES_TITLE">
  388. <xts:param name="objectName">
  389. <span lang="{$contentLocale}"><xsl:value-of select="xtsext:enforceBTD(key('env-param', 'm_name'), $baseTextDirection, $productLocale, boolean($isBidiEnabled='true'))"/></span>
  390. </xts:param>
  391. </xts:string>
  392. </xsl:variable>
  393. <xsl:text disable-output-escaping='yes'>&lt;!DOCTYPE html></xsl:text><dp:page longTitle="$browserTitle">
  394. <dp:meta>
  395. <pf:meta/> <!-- Standard meta tags -->
  396. </dp:meta>
  397. <!-- get passed in parameters -->
  398. <dp:script>
  399. <pf:help context="HID_PP_RUN_OPTIONS"/> <!-- Help system -->
  400. <xsl:if test="$has_write_permission = true()">
  401. <script language="javascript">
  402. function init()
  403. {
  404. var frm = document.pform;
  405. frm.m.value = 'portal/properties_powerplay_8_run_options.xts';
  406. frm.method.value="";
  407. }
  408. </script>
  409. <dc:confirm-cancel/>
  410. </xsl:if>
  411. <script language="javascript">
  412. function togglePageState( item )
  413. {
  414. <!-- Change state based on the checkbox selected or dynamic sections expanded -->
  415. var val = getSessionValue(item);
  416. if (val != '0') {
  417. setStateValue(item,'0');
  418. }
  419. else
  420. {
  421. setStateValue(item,'1');
  422. }
  423. }
  424. </script>
  425. </dp:script>
  426. <utml:form name="pform" method="post" action="{$gateway}">
  427. <utml:input type="hidden" name="controller_state" value="" utml:update="false"/>
  428. <utml:input type="hidden" name="m_storeID">
  429. <xsl:attribute name="value">
  430. <xsl:value-of select="/root/cm:queryResponse/*[position()=1]/cm:storeID"/>
  431. </xsl:attribute>
  432. </utml:input>
  433. <utml:read-only>
  434. <xsl:choose>
  435. <xsl:when test="$has_write_permission = true()">
  436. <xsl:text>false</xsl:text>
  437. </xsl:when>
  438. <xsl:otherwise>
  439. <xsl:text>true</xsl:text>
  440. </xsl:otherwise>
  441. </xsl:choose>
  442. </utml:read-only>
  443. <!--
  444. add a hidden input for the 'ps_nav_op', doing this will define the default behavior when submitting
  445. this form, we don't want the operation set when tabing, so set it to empty here. ideally this would
  446. be done by the tabbing itself, but since it's done in the theme stuff (and can't use utml) we'll just do
  447. it here.
  448. -->
  449. <utml:input type="hidden" name="ps_nav_op" value="" utml:update="false"/>
  450. <!--
  451. this defines the form command operation to be performed when all the collected properties are submitted.
  452. -->
  453. <utml:input type="hidden" name="ifrmcmd" value="save" utml:update="false"/>
  454. <!-- dialog header -->
  455. <dp:header useBackURL="not($showOKCancel)">
  456. <!-- header titles-->
  457. <dp:title><xsl:copy-of select="$browserTitle"/></dp:title>
  458. </dp:header>
  459. <!-- property tabs -->
  460. <xsl:choose>
  461. <xsl:when test="/root/env/param[@name='setPrompts']='true'">
  462. <df:propertiesTabsTitan select="run_options">
  463. <df:hasSetPolicy><xsl:value-of select="$has_policy_permission"/></df:hasSetPolicy>
  464. </df:propertiesTabsTitan>
  465. </xsl:when>
  466. <xsl:otherwise>
  467. <df:propertiesTabs select="run_options">
  468. <df:hasSetPolicy><xsl:value-of select="$has_policy_permission"/></df:hasSetPolicy>
  469. </df:propertiesTabs>
  470. </xsl:otherwise>
  471. </xsl:choose>
  472. <!-- get the format saved in CM. -->
  473. <xsl:variable name="savedOutputFormat">
  474. <xsl:value-of select="$pp_option/*/*[name='outputFormat']/value"/>
  475. </xsl:variable>
  476. <!-- used by ut:propDefaultActionSection template -->
  477. <xsl:variable name="defaultAction">
  478. <xsl:choose>
  479. <xsl:when test="key('env-param', 'm_p_defaultPortalAction') and key('env-param', 'm_p_defaultPortalAction') != ''">
  480. <xsl:value-of select="key('env-param', 'm_p_defaultPortalAction')"/>
  481. </xsl:when>
  482. <xsl:when test="/root/cm:queryResponse/*[position()=1]/cm:defaultPortalAction != ''">
  483. <xsl:value-of select="/root/cm:queryResponse/*[position()=1]/cm:defaultPortalAction"/>
  484. </xsl:when>
  485. <xsl:otherwise>
  486. <xsl:value-of select="'viewOutput'"/>
  487. </xsl:otherwise>
  488. </xsl:choose>
  489. </xsl:variable>
  490. <!-- used by ut:propDefaultActionSection template -->
  491. <xsl:variable name="studioName">
  492. <xts:string id="IDS_TOOLS_REPORT"/>
  493. </xsl:variable>
  494. <lyt:layout style="1">
  495. <!-- PowerPlay Studio options-->
  496. <lyt:section>
  497. <!-- prompt -->
  498. <ut:prompt prefix="m_p" showCheckbox="false"/>
  499. </lyt:section>
  500. </lyt:layout>
  501. <xsl:if test="$has_write_permission or $has_policy_permission">
  502. <script language="javascript">
  503. <!-- The following script is executed on page load or when the page is refreshed to render the correct view of the dynamic region -->
  504. <!-- The states that can be set are:
  505. 0 - The Report options - override the default values checkbox is not checked.
  506. 1 - The Report options - override the default values checkbox has been checked from being unchecked.
  507. 3 - The Report options - override the default values checkbox is checked based on queried information.
  508. -->
  509. var hro = getSessionValue('hasRO');
  510. <!-- This portion of the script is executed on refresh -->
  511. if ( hro != null &amp;&amp; hro != "" )
  512. {
  513. if ( hro == '0' )
  514. {
  515. if (document.pform['override_default_reportOptions']) {
  516. document.pform['override_default_reportOptions'].checked = false;
  517. }
  518. hideDynamicDiv('overrideOptionsDiv');
  519. showDynamicDiv('defaultOptions');
  520. }
  521. else
  522. {
  523. if (document.pform['override_default_reportOptions']) {
  524. document.pform['override_default_reportOptions'].checked = "checked";
  525. }
  526. showDynamicDiv('overrideOptionsDiv');
  527. hideDynamicDiv('defaultOptions');
  528. }
  529. }
  530. else
  531. {
  532. <!-- This portion of the script is executed on page load -->
  533. <xsl:choose>
  534. <xsl:when test="$reportOptionsExists = 'true'">
  535. if (document.pform['override_default_reportOptions']) {
  536. document.pform['override_default_reportOptions'].checked = "checked";
  537. }
  538. setStateValue('hasRO','3');
  539. showDynamicDiv('overrideOptionsDiv');
  540. hideDynamicDiv('defaultOptions');
  541. </xsl:when>
  542. <xsl:otherwise>
  543. if (document.pform['override_default_reportOptions']) {
  544. document.pform['override_default_reportOptions'].checked = false;
  545. }
  546. setStateValue('hasRO','0');
  547. hideDynamicDiv('overrideOptionsDiv');
  548. showDynamicDiv('defaultOptions');
  549. </xsl:otherwise>
  550. </xsl:choose>
  551. }
  552. </script>
  553. </xsl:if>
  554. <dp:footer>
  555. <xsl:choose>
  556. <xsl:when test="$showOKCancel">
  557. <df:button df:id="IDS_OK" utml:validate="true" df:style="submit" df:nav_op="stack-down"/>
  558. <xsl:choose>
  559. <xsl:when test="key('env-param', 'ps_nav_stack') and not(key('env-param', 'ps_nav_stack') = '') ">
  560. <df:button df:id="IDS_CANCEL" df:style="stack-down" onclick="{$dc-confirm-cancel}"/>
  561. </xsl:when>
  562. <xsl:otherwise>
  563. <df:button df:id="IDS_CANCEL" df:style="back-url" onclick="{$dc-confirm-cancel}"/>
  564. </xsl:otherwise>
  565. </xsl:choose>
  566. </xsl:when>
  567. <xsl:otherwise>
  568. <df:button df:id="IDS_CLOSE" df:style="back-url"/>
  569. </xsl:otherwise>
  570. </xsl:choose>
  571. </dp:footer>
  572. </utml:form>
  573. </dp:page>
  574. </xsl:template>
  575. <ut:promptTemplate_pp8Titan propertyDialog="true" showCheckbox="false" noParamTest="and not(/root/cm:queryResponse/*/cm:parameters/*)" mname="portal/properties_powerplay_8_run_options.xts"/>
  576. </xsl:stylesheet>
  577. </xts:block>
  578. <!--
  579. ===============================================================================================
  580. renderPage - render the page
  581. ===============================================================================================
  582. -->
  583. <xts:block id="renderPage" mode="output" processor="XSLT" type="exec" mimeType="text/html" condition=".[ ((not(/root/env/param[@name='controller_state']) or /root/env/param[@name='controller_state']='') and (not(/root/env/param[@name='setPrompts']='true'))) ]" mandatory="false" dependency="generateDefaultRunOptions getTabs classNames">
  584. <xts:logicsheet path="logicsheets/portal.xsl"/>
  585. <xts:logicsheet path="logicsheets/presentation/dialog/ui-templates.xsl"/>
  586. <xts:logicsheet path="logicsheets/presentation/dialog/framework.xsl"/>
  587. <xts:logicsheet path="logicsheets/presentation/layout.xsl"/>
  588. <xts:logicsheet path="logicsheets/presentation/dialog/presentation.xsl"/>
  589. <xts:logicsheet path="logicsheets/presentation/controls/framework.xsl"/>
  590. <xts:logicsheet path="logicsheets/presentation/controls/presentation.xsl"/>
  591. <xts:logicsheet path="logicsheets/presentation/dialog/confirm.xslt"/>
  592. <xts:logicsheet path="logicsheets/formlogic.xslt"/>
  593. <xts:logicsheet path="logicsheets/validation.xslt"/> <xts:logicsheet path="logicsheets/presentation/touch_up.xslt"/>
  594. <xsl:stylesheet version="1.0"
  595. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  596. xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
  597. xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
  598. xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/"
  599. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  600. xmlns:xts="http://developer.cognos.com/schemas/xts/"
  601. xmlns:lyt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/layout/"
  602. xmlns:dp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/presentation/"
  603. xmlns:df="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/framework/"
  604. xmlns:ut="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/ui-templates/"
  605. xmlns:dc="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/confirm/1/"
  606. xmlns:cf="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/framework/"
  607. xmlns:cp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/presentation/"
  608. xmlns:utml="http://developer.cognos.com/schemas/xts/logicsheet/xslt/formlogic/"
  609. xmlns:thm="http://developer.cognos.com/schemas/xts/logicsheets/xslt/theme/"
  610. exclude-result-prefixes="xsl cf cp df dp dc lyt cm thm utml xtsext ut">
  611. <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no" omit-xml-declaration="yes"/>
  612. <!-- current file name -->
  613. <xsl:variable name="mname" select="'properties_powerplay_8_run_options.xts'"/>
  614. <xsl:variable name="the-object" select="/root/cm:queryResponse/*"/>
  615. <xsl:variable name="has_write_permission" select="contains(concat(' ', /root/cm:queryResponse/*[position()=1]/cm:permissions, ' '), ' write ')"/>
  616. <xsl:variable name="has_execute_permission" select="contains(concat(' ', /root/cm:queryResponse/*[position()=1]/cm:permissions, ' '), ' execute ')"/>
  617. <xsl:variable name="has_policy_permission" select="contains(concat(' ', /root/cm:queryResponse/*[position()=1]//cm:permissions, ' '), ' setPolicy ')"/>
  618. <xsl:variable name="showOKCancel" select="$has_write_permission or $has_policy_permission"/>
  619. <xsl:variable name="pp_option" select="/root/*[local-name()='queryResponse']/*[contains(local-name(),'powerPlay8Report')]/*[local-name()='options']"/>
  620. <xsl:variable name="reportOptionsExists">
  621. <xsl:choose>
  622. <xsl:when test="string(key('env-param','override_default_reportOptions')) = 'true'">true</xsl:when>
  623. <xsl:when test="key('env-param','changed_override_default_reportOptions')">false</xsl:when>
  624. <xsl:when test="string(/root/cm:queryResponse/*/cm:executionLocale) != '' or string(/root/cm:queryResponse/*/cm:executionFormat) != ''">true</xsl:when>
  625. <xsl:otherwise>false</xsl:otherwise>
  626. </xsl:choose>
  627. </xsl:variable>
  628. <pf:variables/>
  629. <!-- start the output -->
  630. <xsl:template match="/root">
  631. <xsl:variable name="browserTitle">
  632. <xts:string id="IDS_PROPERTIES_TITLE">
  633. <xts:param name="objectName">
  634. <span lang="{$contentLocale}"><xsl:value-of select="xtsext:enforceBTD(key('env-param', 'm_name'), $baseTextDirection, $productLocale, boolean($isBidiEnabled='true'))"/></span>
  635. </xts:param>
  636. </xts:string>
  637. </xsl:variable>
  638. <xsl:text disable-output-escaping='yes'>&lt;!DOCTYPE html></xsl:text><dp:page longTitle="$browserTitle">
  639. <dp:meta>
  640. <pf:meta/> <!-- Standard meta tags -->
  641. </dp:meta>
  642. <!-- get passed in parameters -->
  643. <dp:script>
  644. <pf:help context="HID_PP_RUN_OPTIONS"/> <!-- Help system -->
  645. <xsl:if test="$has_write_permission = true()">
  646. <script language="javascript">
  647. function init()
  648. {
  649. var frm = document.pform;
  650. frm.m.value = 'portal/properties_powerplay_8_run_options.xts';
  651. frm.method.value="";
  652. }
  653. </script>
  654. <dc:confirm-cancel/>
  655. </xsl:if>
  656. <script language="javascript">
  657. function togglePageState( item )
  658. {
  659. <!-- Change state based on the checkbox selected or dynamic sections expanded -->
  660. var val = getSessionValue(item);
  661. if (val != '0') {
  662. setStateValue(item,'0');
  663. }
  664. else
  665. {
  666. setStateValue(item,'1');
  667. }
  668. }
  669. </script>
  670. </dp:script>
  671. <utml:form name="pform" method="post" action="{$gateway}">
  672. <utml:input type="hidden" name="controller_state" value="" utml:update="false"/>
  673. <utml:input type="hidden" name="m_storeID">
  674. <xsl:attribute name="value">
  675. <xsl:value-of select="/root/cm:queryResponse/*[position()=1]/cm:storeID"/>
  676. </xsl:attribute>
  677. </utml:input>
  678. <utml:read-only>
  679. <xsl:choose>
  680. <xsl:when test="$has_write_permission = true()">
  681. <xsl:text>false</xsl:text>
  682. </xsl:when>
  683. <xsl:otherwise>
  684. <xsl:text>true</xsl:text>
  685. </xsl:otherwise>
  686. </xsl:choose>
  687. </utml:read-only>
  688. <!--
  689. add a hidden input for the 'ps_nav_op', doing this will define the default behavior when submitting
  690. this form, we don't want the operation set when tabing, so set it to empty here. ideally this would
  691. be done by the tabbing itself, but since it's done in the theme stuff (and can't use utml) we'll just do
  692. it here.
  693. -->
  694. <utml:input type="hidden" name="ps_nav_op" value="" utml:update="false"/>
  695. <!--
  696. this defines the form command operation to be performed when all the collected properties are submitted.
  697. -->
  698. <utml:input type="hidden" name="ifrmcmd" value="save" utml:update="false"/>
  699. <!-- dialog header -->
  700. <dp:header useBackURL="not($showOKCancel)">
  701. <!-- header titles-->
  702. <dp:title><xsl:copy-of select="$browserTitle"/></dp:title>
  703. </dp:header>
  704. <!-- property tabs -->
  705. <df:propertiesTabs select="run_options">
  706. <df:hasSetPolicy><xsl:value-of select="$has_policy_permission"/></df:hasSetPolicy>
  707. </df:propertiesTabs>
  708. <!-- description tabs -->
  709. <dp:description>
  710. <xts:string id="IDS_PROP_RUN_INTRO"/>
  711. </dp:description>
  712. <!-- get the format saved in CM. -->
  713. <xsl:variable name="savedOutputFormat">
  714. <xsl:value-of select="$pp_option/*/*[name='outputFormat']/value"/>
  715. </xsl:variable>
  716. <!-- used by ut:propDefaultActionSection template -->
  717. <xsl:variable name="defaultAction">
  718. <xsl:choose>
  719. <xsl:when test="key('env-param', 'm_p_defaultPortalAction') and key('env-param', 'm_p_defaultPortalAction') != ''">
  720. <xsl:value-of select="key('env-param', 'm_p_defaultPortalAction')"/>
  721. </xsl:when>
  722. <xsl:when test="/root/cm:queryResponse/*[position()=1]/cm:defaultPortalAction != ''">
  723. <xsl:value-of select="/root/cm:queryResponse/*[position()=1]/cm:defaultPortalAction"/>
  724. </xsl:when>
  725. <xsl:otherwise>
  726. <xsl:value-of select="'viewOutput'"/>
  727. </xsl:otherwise>
  728. </xsl:choose>
  729. </xsl:variable>
  730. <!-- used by ut:propDefaultActionSection template -->
  731. <xsl:variable name="studioName">
  732. <xts:string id="IDS_TOOLS_REPORT"/>
  733. </xsl:variable>
  734. <lyt:layout style="1">
  735. <!-- default action section -->
  736. <lyt:section>
  737. <ut:propDefaultActionSection/>
  738. <!-- report options -->
  739. <dp:choice title="IDS_PROP_RUN_REPORT_OPTIONS" width="100%">
  740. <dp:section1>
  741. <utml:input type="checkbox" name="override_default_reportOptions" value="true" utml:track="true" onclick="toggledynamicDiv('overrideOptionsDiv');toggledynamicDiv('defaultOptions');togglePageState('hasRO');" id="ctrl_override_default_reportOptions" >
  742. </utml:input>
  743. </dp:section1>
  744. <dp:section2 for="ctrl_override_default_reportOptions">
  745. <xts:string id="IDS_STEP_RUN_OVERRIDE_DEFAULT_REPORT_OPTIONS"/>
  746. </dp:section2>
  747. <dp:section3 width="100%">
  748. <ut:defaultReportOptionsDiv deliverySection="false" objectClassXPath="$the-object/cm:objectClass"/>
  749. <!-- override options -->
  750. <cf:dynamicDiv name="overrideOptionsDiv" visible="true">
  751. <dp:box valign="top" width="100%">
  752. <dp:boxSection width="100%">
  753. <!-- format section -->
  754. <ut:formatSelectList/>
  755. <!-- language section -->
  756. <ut:localeSelectList/>
  757. </dp:boxSection>
  758. </dp:box>
  759. </cf:dynamicDiv>
  760. </dp:section3>
  761. </dp:choice>
  762. </lyt:section>
  763. <!-- deprecated property that needs to be set to blank-->
  764. <xsl:if test="$savedOutputFormat != ''">
  765. <utml:input name="m_pp8ro_outputFormat" utml:track="true" value=""/>
  766. </xsl:if>
  767. <!-- PowerPlay Studio options-->
  768. <lyt:section>
  769. <xsl:if test="key('env-param','m_class') = 'powerPlay8Report'">
  770. <xsl:variable name="design_checked">
  771. <xsl:choose>
  772. <xsl:when test="key('env-param', 'm_pp8ro_data') = 'previewWithNoData'">true</xsl:when>
  773. <xsl:when test="$pp_option/*/*[name='data']/value = 'previewWithNoData' and not(key('env-param','changed_m_pp8ro_data'))">true</xsl:when>
  774. <xsl:otherwise>false</xsl:otherwise>
  775. </xsl:choose>
  776. </xsl:variable>
  777. <dp:choice title="IDS_PROP_RUN_POWERPLAY_STUDIO_OPTION">
  778. <dp:section1>
  779. <utml:input type="checkbox" name="m_pp8ro_data" value="previewWithNoData" utml:track="true" utml:default-condition="$design_checked='true'" id="ctrl_m_pp8ro_data">
  780. </utml:input>
  781. </dp:section1>
  782. <dp:section2 for="ctrl_m_pp8ro_data">
  783. <xts:string id="IDS_PROP_RUN_OPEN_DESIGN"/>
  784. </dp:section2>
  785. </dp:choice>
  786. </xsl:if>
  787. <!-- prompt -->
  788. <ut:prompt prefix="m_p" showCheckbox="false"/>
  789. </lyt:section>
  790. </lyt:layout>
  791. <xsl:if test="$has_write_permission or $has_policy_permission">
  792. <script language="javascript">
  793. <!-- The following script is executed on page load or when the page is refreshed to render the correct view of the dynamic region -->
  794. <!-- The states that can be set are:
  795. 0 - The Report options - override the default values checkbox is not checked.
  796. 1 - The Report options - override the default values checkbox has been checked from being unchecked.
  797. 3 - The Report options - override the default values checkbox is checked based on queried information.
  798. -->
  799. var hro = getSessionValue('hasRO');
  800. <!-- This portion of the script is executed on refresh -->
  801. if ( hro != null &amp;&amp; hro != "" )
  802. {
  803. if ( hro == '0' )
  804. {
  805. if (document.pform['override_default_reportOptions']) {
  806. document.pform['override_default_reportOptions'].checked = false;
  807. }
  808. hideDynamicDiv('overrideOptionsDiv');
  809. showDynamicDiv('defaultOptions');
  810. }
  811. else
  812. {
  813. if (document.pform['override_default_reportOptions']) {
  814. document.pform['override_default_reportOptions'].checked = "checked";
  815. }
  816. showDynamicDiv('overrideOptionsDiv');
  817. hideDynamicDiv('defaultOptions');
  818. }
  819. }
  820. else
  821. {
  822. <!-- This portion of the script is executed on page load -->
  823. <xsl:choose>
  824. <xsl:when test="$reportOptionsExists = 'true'">
  825. if (document.pform['override_default_reportOptions']) {
  826. document.pform['override_default_reportOptions'].checked = "checked";
  827. }
  828. setStateValue('hasRO','3');
  829. showDynamicDiv('overrideOptionsDiv');
  830. hideDynamicDiv('defaultOptions');
  831. </xsl:when>
  832. <xsl:otherwise>
  833. if (document.pform['override_default_reportOptions']) {
  834. document.pform['override_default_reportOptions'].checked = false;
  835. }
  836. setStateValue('hasRO','0');
  837. hideDynamicDiv('overrideOptionsDiv');
  838. showDynamicDiv('defaultOptions');
  839. </xsl:otherwise>
  840. </xsl:choose>
  841. }
  842. </script>
  843. </xsl:if>
  844. <dp:footer>
  845. <xsl:choose>
  846. <xsl:when test="$showOKCancel">
  847. <df:button df:id="IDS_OK" utml:validate="true" df:style="submit" df:nav_op="stack-down"/>
  848. <xsl:choose>
  849. <xsl:when test="key('env-param', 'ps_nav_stack') and not(key('env-param', 'ps_nav_stack') = '') ">
  850. <df:button df:id="IDS_CANCEL" df:style="stack-down" onclick="{$dc-confirm-cancel}"/>
  851. </xsl:when>
  852. <xsl:otherwise>
  853. <df:button df:id="IDS_CANCEL" df:style="back-url" onclick="{$dc-confirm-cancel}"/>
  854. </xsl:otherwise>
  855. </xsl:choose>
  856. </xsl:when>
  857. <xsl:otherwise>
  858. <df:button df:id="IDS_CLOSE" df:style="back-url"/>
  859. </xsl:otherwise>
  860. </xsl:choose>
  861. </dp:footer>
  862. </utml:form>
  863. </dp:page>
  864. </xsl:template>
  865. <ut:promptTemplate propertyDialog="true" showCheckbox="false" noParamTest="and not(/root/cm:queryResponse/*/cm:parameters/*)" mname="portal/properties_powerplay_8_run_options.xts"/>
  866. </xsl:stylesheet>
  867. </xts:block>
  868. <!--
  869. ===============================================================================================
  870. debug - display debug information
  871. ===============================================================================================
  872. -->
  873. <xts:block id="debug" dependency="renderPage" condition=".[/root/session/param[@name='debug']='1']" type="exec" mode="output" processor="XSLT" mandatory="false" mimeType="text/html">
  874. <!-- get the debug logic sheet -->
  875. <xts:logicsheet path="logicsheets/debuglogic.xslt"/>
  876. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:dbg="http://developer.cognos.com/schemas/xts/logicsheets/xslt/debug/" exclude-result-prefixes="dbg">
  877. <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no" omit-xml-declaration="yes"/>
  878. <xsl:template match="/">
  879. <dbg:dumpxml select="/root"/>
  880. </xsl:template>
  881. </xsl:stylesheet>
  882. </xts:block>
  883. </xts:morphlet>