specify_archive_options.xts 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261
  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. <xts:block id="formlogic_init" type="exec" mode="interpret" processor="XSLT" path="/logicsheets/formlogic_init.xslt" nodelist="env,credential,system,http"/>
  14. <!--
  15. ===============================================================================================
  16. getContent - get our data from Content Manager
  17. ===============================================================================================
  18. -->
  19. <xts:block id="getContent" nodelist="" processor="XSLT" type="exec" mandatory="false">
  20. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  21. <xts:logicsheet path="logicsheets/cm-logic.xsl"/>
  22. <xsl:stylesheet version="1.0"
  23. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  24. xmlns:cml="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/cml/1/"
  25. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  26. xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/"
  27. exclude-result-prefixes="xsl cml xtsext send">
  28. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  29. <cml:object-predicates/>
  30. <xsl:template match="/">
  31. <!-- get all the archives from CM -->
  32. <xts:sequence>
  33. <xts:append>
  34. <xts:transform src="transforms/CM/post-process.xslt" processor="XSLT">
  35. <send:request provider="cm">
  36. <xts:transform src="transforms/CM/pre-process.xslt" processor="XSLT">
  37. <query xmlns="http://developer.cognos.com/schemas/xts-cm/1/">
  38. <search>
  39. <xsl:text>/configuration/archiveLocation[permission(&quot;execute&quot;)]</xsl:text>
  40. </search>
  41. <properties>
  42. <property name="defaultName"/>
  43. <property name="searchPath"/>
  44. </properties>
  45. <sortBy>
  46. <sort name="defaultName" order="ascending"/>
  47. </sortBy>
  48. </query>
  49. </xts:transform>
  50. </send:request>
  51. </xts:transform>
  52. </xts:append>
  53. </xts:sequence>
  54. </xsl:template>
  55. </xsl:stylesheet>
  56. </xts:block>
  57. <!--
  58. ===============================================================================================
  59. format - render the page
  60. ===============================================================================================
  61. -->
  62. <xts:block id="format" mode="output" processor="XSLT" type="exec" dependency="getContent" mimeType="text/html">
  63. <!-- portal specific information -->
  64. <xts:logicsheet path="logicsheets/portal.xsl"/>
  65. <!-- get the new theme stuff -->
  66. <xts:logicsheet path="logicsheets/presentation/dialog/ui-templates.xsl"/>
  67. <xts:logicsheet path="logicsheets/presentation/layout.xsl"/>
  68. <xts:logicsheet path="logicsheets/presentation/dialog/framework.xsl"/>
  69. <xts:logicsheet path="logicsheets/presentation/dialog/presentation.xsl"/>
  70. <xts:logicsheet path="logicsheets/presentation/controls/framework.xsl"/>
  71. <xts:logicsheet path="logicsheets/presentation/controls/presentation.xsl"/>
  72. <xts:logicsheet path="logicsheets/formlogic.xslt"/>
  73. <xts:logicsheet path="logicsheets/validation.xslt"/>
  74. <xts:logicsheet path="logicsheets/presentation/touch_up.xslt"/>
  75. <xsl:stylesheet version="1.0"
  76. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  77. xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
  78. xmlns:lyt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/layout/"
  79. xmlns:dp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/presentation/"
  80. xmlns:cf="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/framework/"
  81. xmlns:cp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/presentation/"
  82. xmlns:ut="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/ui-templates/"
  83. xmlns:df="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/framework/"
  84. xmlns:utml="http://developer.cognos.com/schemas/xts/logicsheet/xslt/formlogic/"
  85. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  86. xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
  87. exclude-result-prefixes="pf lyt dp cf cp df utml xtsext cm ut">
  88. <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no" omit-xml-declaration="yes"/>
  89. <!-- Global template variables -->
  90. <pf:variables/>
  91. <xsl:variable name="mname" select="'specify_archive_options.xts'"/>
  92. <!-- start the output -->
  93. <xsl:template match="/root">
  94. <xsl:variable name="objName">
  95. <xsl:choose>
  96. <xsl:when test="key('env-param','step_default_name')"><xsl:value-of select="key('env-param','step_default_name')"/></xsl:when>
  97. <xsl:otherwise><xsl:value-of select="key('env-param', 'm_name')"/></xsl:otherwise>
  98. </xsl:choose>
  99. </xsl:variable>
  100. <xsl:variable name="browserTitle"><xts:string id="IDS_ARC_TITLE"><xts:param name="objName"><span lang="{$contentLocale}"><xsl:value-of select="$objName"/></span></xts:param></xts:string></xsl:variable>
  101. <xsl:text disable-output-escaping='yes'>&lt;!DOCTYPE html></xsl:text><dp:page longTitle="$browserTitle">
  102. <dp:script>
  103. <script language="javascript">
  104. function validate() {
  105. var frm = document.pform;
  106. <!-- user selected to specify a name, but no name has been specified -->
  107. if (frm.archiveNameGroup[1].checked &amp;&amp; frm.m_arc_filenameStub.value == '') {
  108. window.alert('<xts:string id="IDS_ARC_ERR_NO_FILE_NAME" encode="javascript"/>');
  109. frm.m_arc_filenameStub.focus();
  110. return false;
  111. }
  112. return true;
  113. }
  114. </script>
  115. </dp:script>
  116. <dp:meta>
  117. <pf:meta/>
  118. <!-- Standard meta tags -->
  119. </dp:meta>
  120. <pf:help/>
  121. <utml:form name="pform" method="post" action="{$gateway}">
  122. <!-- header -->
  123. <dp:header>
  124. <dp:title>
  125. <xsl:copy-of select="$browserTitle"/>
  126. </dp:title>
  127. <dp:description>
  128. <xts:string id="IDS_ARC_INTRO"/>
  129. </dp:description>
  130. </dp:header>
  131. <!-- body -->
  132. <lyt:layout style="1">
  133. <lyt:section>
  134. <utml:radio-group name="archiveNameGroup">
  135. <utml:default-value>
  136. <xsl:choose>
  137. <xsl:when test="key('env-param','m_arc_filenameStub')!=''">specify_name</xsl:when>
  138. <xsl:otherwise>report_name</xsl:otherwise>
  139. </xsl:choose>
  140. </utml:default-value>
  141. <dp:choice title="IDS_ARC_NAME">
  142. <dp:section1>
  143. <utml:input type="radio" name="archiveNameGroup" value="report_name" onclick="document.pform.m_arc_filenameStub.value = '';"/>
  144. </dp:section1>
  145. <dp:section2><xts:string id="IDS_ARC_NAME_USE_REPORT_NAME"/></dp:section2>
  146. <dp:section1>
  147. <utml:input type="radio" name="archiveNameGroup" value="specify_name"/>
  148. </dp:section1>
  149. <dp:section2><xts:string id="IDS_ARC_NAME_SPECIFY"/></dp:section2>
  150. <dp:section3>
  151. <utml:input type="text" name="m_arc_filenameStub" size="35" maxlength="256" onchange="document.pform.archiveNameGroup[1].checked = true;"/>
  152. </dp:section3>
  153. </dp:choice>
  154. </utml:radio-group>
  155. </lyt:section>
  156. <!-- location -->
  157. <lyt:section>
  158. <dp:choice title="IDS_ARC_LOCATION">
  159. <dp:section1>
  160. <utml:select name="m_arc_archiveLocation">
  161. <xsl:for-each select="/root/cm:queryResponse/cm:archiveLocation">
  162. <utml:option>
  163. <xsl:if test="key('env-param','m_arc_archiveLocation') = cm:searchPath">
  164. <xsl:attribute name="selected">true</xsl:attribute>
  165. </xsl:if>
  166. <xsl:attribute name="value"><xsl:value-of select="cm:searchPath"/></xsl:attribute>
  167. <xsl:value-of select="cm:defaultName"/>
  168. </utml:option>
  169. </xsl:for-each>
  170. </utml:select>
  171. </dp:section1>
  172. </dp:choice>
  173. </lyt:section>
  174. <!-- conflict resolution -->
  175. <lyt:section>
  176. <utml:radio-group name="m_arc_conflictResolution">
  177. <utml:default-value>
  178. <xsl:choose>
  179. <xsl:when test="key('env-param','m_arc_conflictResolution')!=''"><xsl:value-of select="m_arc_conflictResolution"/></xsl:when>
  180. <xsl:otherwise>replace</xsl:otherwise>
  181. </xsl:choose>
  182. </utml:default-value>
  183. <dp:choice title="IDS_ARC_CONFLICT">
  184. <dp:section1>
  185. <utml:input type="radio" name="m_arc_conflictResolution" value="fail"/>
  186. </dp:section1>
  187. <dp:section2><xts:string id="IDS_ARC_KEEP_EXISTING_FILES"/></dp:section2>
  188. <dp:section1>
  189. <utml:input type="radio" name="m_arc_conflictResolution" value="replace"/>
  190. </dp:section1>
  191. <dp:section2><xts:string id="IDS_ARC_REPLACE_EXISTING_FILES"/></dp:section2>
  192. <dp:section1>
  193. <utml:input type="radio" name="m_arc_conflictResolution" value="appendDateTime"/>
  194. </dp:section1>
  195. <dp:section2><xts:string id="IDS_ARC_APPEND_TIMESTAMP"/></dp:section2>
  196. <dp:section1>
  197. <utml:input type="radio" name="m_arc_conflictResolution" value="appendSequenceNumber"/>
  198. </dp:section1>
  199. <dp:section2><xts:string id="IDS_ARC_APPEND_SEQUENCE_NUMBER"/></dp:section2>
  200. </dp:choice>
  201. </utml:radio-group>
  202. </lyt:section>
  203. </lyt:layout>
  204. <!-- footer -->
  205. <dp:footer>
  206. <df:button df:id="IDS_OK" utml:validate="true" df:style="stack-down-save"/>
  207. <xsl:choose>
  208. <xsl:when test="key('env-param', 'ps_nav_stack') and not(key('env-param', 'ps_nav_stack') = '') ">
  209. <df:button df:id="IDS_CANCEL" df:style="stack-down"/>
  210. </xsl:when>
  211. <xsl:otherwise>
  212. <df:button df:id="IDS_CANCEL" df:style="back-url"/>
  213. </xsl:otherwise>
  214. </xsl:choose>
  215. </dp:footer>
  216. </utml:form>
  217. </dp:page>
  218. </xsl:template>
  219. </xsl:stylesheet>
  220. </xts:block>
  221. <!--
  222. ===============================================================================================
  223. debug - display debug information
  224. ===============================================================================================
  225. -->
  226. <xts:block id="debug" dependency="format" condition=".[/root/session/param[@name='debug']='1']" type="exec" mode="output" processor="XSLT" mandatory="false" mimeType="text/html">
  227. <!-- get the debug logic sheet -->
  228. <xts:logicsheet path="logicsheets/debuglogic.xslt"/>
  229. <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">
  230. <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no" omit-xml-declaration="yes"/>
  231. <xsl:template match="/">
  232. <dbg:dumpxml select="/root"/>
  233. </xsl:template>
  234. </xsl:stylesheet>
  235. </xts:block>
  236. </xts:morphlet>