renderSummaryPage.xslt 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436
  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. 2012, 2014
  6. US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  7. -->
  8. <xsl:stylesheet version="1.0"
  9. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  10. xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
  11. xmlns:lyt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/layout/"
  12. xmlns:dp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/presentation/"
  13. xmlns:df="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/framework/"
  14. xmlns:cf="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/framework/"
  15. xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
  16. xmlns:cp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/presentation/"
  17. xmlns:mf="http://developer.cognos.com/schemas/xts/logicsheets/presentation/main/mf"
  18. xmlns:utml="http://developer.cognos.com/schemas/xts/logicsheet/xslt/formlogic/"
  19. xmlns:xts="http://developer.cognos.com/schemas/xts/"
  20. xmlns:dpl="http://developer.cognos.com/schemas/xts/logicsheets/deployment/"
  21. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  22. exclude-result-prefixes="xsl cm cf cp df dp lyt utml xts xtsext dpl mf pf">
  23. <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no" omit-xml-declaration="yes"/>
  24. <!-- current file name -->
  25. <xsl:variable name="mname" select="'new_deployment2.xts'"/>
  26. <!-- add any theme variables -->
  27. <pf:variables/>
  28. <pf:gen-icon/>
  29. <pf:serialize-xml/>
  30. <!-- deployment variables -->
  31. <dpl:variables/>
  32. <!-- dpl:packagesToInclude template needs this variable. -->
  33. <xsl:variable name="numberOfPackages">
  34. <xsl:value-of select="count(/root/deploymentOptions/cm:deploymentOption[@name='package']/*[local-name() = 'packageDeploymentInfo'])"/>
  35. </xsl:variable>
  36. <mf:variables/>
  37. <!-- start the output -->
  38. <xsl:template match="/root">
  39. <xsl:variable name="browserTitle">
  40. <xts:string id="IDS_DEPLOYMENT_SUMMARY_TITLE">
  41. <xts:param name="wizardName">
  42. <xsl:value-of select="$wizard-title"/>
  43. </xts:param>
  44. </xts:string>
  45. </xsl:variable>
  46. <xsl:text disable-output-escaping='yes'>&lt;!DOCTYPE html></xsl:text><dp:page longTitle="$browserTitle">
  47. <dp:meta>
  48. <pf:meta/>
  49. <!-- Standard meta tags -->
  50. </dp:meta>
  51. <dp:script>
  52. <pf:help context="HID_DPLOY"/>
  53. <!-- Help system -->
  54. <script language="javascript" src="{$webcontent}/{$app}/js/list.js"></script>
  55. <script language="JavaScript"/>
  56. </dp:script>
  57. <script language="javascript" src="{$webRoot}/dojo16/dojo/dojo.js"/>
  58. <script language="javascript" src="{$webcontent}/{$app}/js/deployment.js"/>
  59. <utml:form name="pform" method="post" action="{$gateway}">
  60. <utml:read-only>true</utml:read-only>
  61. <!-- Set input for submitting -->
  62. <utml:input type="hidden" name="ifrmcmd" utml:update="false">
  63. <xsl:attribute name="value">
  64. <xsl:choose>
  65. <xsl:when test="key('env-param','m_obj') != '' ">save</xsl:when>
  66. <xsl:otherwise>create</xsl:otherwise>
  67. </xsl:choose>
  68. </xsl:attribute>
  69. </utml:input>
  70. <xsl:variable name="m" select="concat($app, '/new_deployment2.xts')"/>
  71. <utml:input type="hidden" name="errURL" utml:update="false"><utml:value/></utml:input>
  72. <utml:input type="hidden" name="m_return" utml:update="false"/>
  73. <utml:input type="hidden" name="m_firstrun" utml:update="false">
  74. <utml:value>
  75. <xsl:choose>
  76. <xsl:when test="key('env-param','m_firstrun')">
  77. <xsl:value-of select="key('env-param','m_firstrun')"/>
  78. </xsl:when>
  79. <xsl:otherwise>
  80. <xsl:value-of select="'true'"/>
  81. </xsl:otherwise>
  82. </xsl:choose>
  83. </utml:value>
  84. </utml:input>
  85. <!-- dialog header -->
  86. <xsl:call-template name="summary-header">
  87. <xsl:with-param name="form-read-only" select="$form-read-only"/>
  88. <xsl:with-param name="utml-form-name" select="$utml-form-name"/>
  89. </xsl:call-template>
  90. <!-- name and description -->
  91. <lyt:layout style="2" title="IDS_DEPLOYMENT_SUMMARY_DEPLOYMENT_SPECIFICATION" border="yes">
  92. <lyt:section>
  93. <dp:list>
  94. <dp:section>
  95. <dp:label>
  96. <xts:string id="IDS_NEW_NAME"/>
  97. </dp:label>
  98. </dp:section>
  99. <dp:section>
  100. <dp:text>
  101. <xsl:value-of select="/root/env/param[@name='m_p_defaultName']"/>
  102. </dp:text>
  103. </dp:section>
  104. </dp:list>
  105. </lyt:section>
  106. <lyt:section>
  107. <dp:textarea wrap="yes">
  108. <dp:section1>
  109. <xts:string id="IDS_NEW_DESCRIPTION"/>
  110. </dp:section1>
  111. <dp:section2>
  112. <utml:textarea rows="4" cols="30" class="pTextarea" readOnly="true" utml:track="false">
  113. <utml:value>
  114. <xsl:value-of select="key('env-param','m_p_defaultDescription')"/>
  115. </utml:value>
  116. </utml:textarea>
  117. </dp:section2>
  118. </dp:textarea>
  119. </lyt:section>
  120. </lyt:layout>
  121. <!-- deployment file and encryption -->
  122. <xsl:call-template name="archive-options">
  123. <xsl:with-param name="form-read-only" select="$form-read-only"/>
  124. <xsl:with-param name="utml-form-name" select="$utml-form-name"/>
  125. </xsl:call-template>
  126. <xsl:call-template name="summary-options">
  127. <xsl:with-param name="form-read-only" select="$form-read-only"/>
  128. <xsl:with-param name="utml-form-name" select="$utml-form-name"/>
  129. </xsl:call-template>
  130. <dp:footer div="div">
  131. <xsl:choose>
  132. <xsl:when test="key('env-param', 'ps_nav_stack') and not(key('env-param', 'ps_nav_stack') = '') ">
  133. <df:button df:id="IDS_CANCEL" df:style="stack-down"/>
  134. </xsl:when>
  135. <xsl:otherwise>
  136. <df:button df:id="IDS_CANCEL" df:style="back-url"/>
  137. </xsl:otherwise>
  138. </xsl:choose>
  139. <xsl:variable name="back-page">
  140. <xsl:choose>
  141. <xsl:when test="$deployment-method='import' and /root/cm:deploymentOptionsUI/cm:deploymentOption[@name='entireContentStoreSelect']='true'">
  142. <!-- Is method page skipped? -->
  143. <xsl:choose>
  144. <xsl:when test="/root/cm:deploymentOptionsUI/cm:deploymentOption[@name='personalDataSelect' and @enabled='false']">
  145. <xsl:value-of select="'select-archive'"/>
  146. </xsl:when>
  147. <xsl:otherwise>
  148. <xsl:value-of select="'method'"/>
  149. </xsl:otherwise>
  150. </xsl:choose>
  151. </xsl:when>
  152. <xsl:when test="$deployment-method='import' and /root/cm:deploymentOptionsUI/cm:deploymentOption[@name='entireContentStoreSelect']='false'">
  153. <xsl:value-of select="'ownership'"/>
  154. </xsl:when>
  155. <!-- otherwise Export, go to select archive -->
  156. <xsl:otherwise>
  157. <xsl:value-of select="'select-archive'"/>
  158. </xsl:otherwise>
  159. </xsl:choose>
  160. </xsl:variable>
  161. <xsl:variable name="back-target">
  162. <xsl:choose>
  163. <xsl:when test="$deployment-method='import' and $back-page='select-archive'">
  164. <xsl:value-of select="concat($app, '/new_general.xts')"/>
  165. </xsl:when>
  166. <xsl:otherwise>
  167. <xsl:value-of select="concat($app, '/new_deployment2.xts')"/>
  168. </xsl:otherwise>
  169. </xsl:choose>
  170. </xsl:variable>
  171. <df:button df:id="IDS_BACK" df:style="maintain" utml:validate="false" onClick="javascript:document.pform.m_deploymentWizardPage.value='{$back-page}';document.pform.m_firstrun.value='false'">
  172. <df:target>
  173. <xsl:value-of select="$back-target"/>
  174. </df:target>
  175. </df:button>
  176. <script language="JavaScript">
  177. function validate()
  178. {
  179. <xsl:if test="/root/cm:deploymentOptionsUI/cm:deploymentOption[@name='entireContentStoreSelect']='false' and /root/cm:deploymentOptionsUI/cm:deploymentOption[@name='namespaceSelect']='false' and /root/cm:deploymentOptionsUI/cm:deploymentOption[@name='dataSourceSelect']='false' and /root/cm:deploymentOptionsUI/cm:deploymentOption[@name='recipientsSelect']='false' and not(/root/cm:deploymentOptionsUI/cm:deploymentOption[@name='package']/*[cm:inPackagesToInclude = 'true'])">
  180. <xsl:variable name="NoContentWarningString">
  181. <xsl:choose>
  182. <xsl:when test="$deployment-method='import' ">
  183. <xsl:text/><xts:string id="IDS_DEPLOYMENT_SUMMARY_EMPTY_CONTENT_WARNING_IMPORT" encode="javascript"/><xsl:text/>
  184. </xsl:when>
  185. <xsl:otherwise>
  186. <xsl:text/><xts:string id="IDS_DEPLOYMENT_SUMMARY_EMPTY_CONTENT_WARNING_EXPORT" encode="javascript"/><xsl:text/>
  187. </xsl:otherwise>
  188. </xsl:choose>
  189. </xsl:variable>
  190. if (!confirm("<xsl:value-of select="$NoContentWarningString"/>"))
  191. {
  192. return false;
  193. }
  194. </xsl:if>
  195. <!-- check that the target location exists and warn user if required -->
  196. <xsl:if test="$deployment-method='import' ">
  197. <xsl:variable name="MissingTargetWarningString">
  198. <xsl:text/><xts:string id="IDS_DEPLOYMENT_SUMMARY_MISSING_TARGET_WARNING_IMPORT" encode="javascript"/><xsl:text/>
  199. </xsl:variable>
  200. var deployment = new ps.deployment();
  201. if (deployment.targetLocationWarningExists()) {
  202. if (!confirm("<xsl:value-of select="$MissingTargetWarningString"/>"))
  203. {
  204. return false;
  205. }
  206. }
  207. </xsl:if>
  208. return true;
  209. }
  210. </script>
  211. <df:button df:id="IDS_NEXT" df:style="maintain" utml:validate="true">
  212. <df:target><xsl:value-of select="concat($app, '/new_select_action.xts')"/></df:target>
  213. </df:button>
  214. <df:button df:id="IDS_FINISH"/>
  215. </dp:footer>
  216. <utml:input type="hidden" name="m_packagesOp" utml:update="false"/>
  217. </utml:form>
  218. </dp:page>
  219. </xsl:template>
  220. <xsl:template name="summary-header">
  221. <xsl:param name="form-read-only"/>
  222. <xsl:param name="utml-form-name"/>
  223. <xsl:copy>
  224. <dp:header div="div">
  225. <dpl:title dpl:id="IDS_DEPLOYMENT_SUMMARY_TITLE"/>
  226. <!-- description tabs -->
  227. <dp:description>
  228. <dpl:description dpl:import-id="IDS_DEPLOYMENT_SUMMARY_INTRO_IMPORT_1" dpl:export-id="IDS_DEPLOYMENT_SUMMARY_INTRO_EXPORT_1"/>
  229. </dp:description>
  230. </dp:header>
  231. <img height="8" width="1" border="0"><xsl:attribute name="src"><xsl:value-of select="$webcontent"/>/images/space.gif</xsl:attribute></img>
  232. <dp:description>
  233. <dpl:description dpl:import-id="IDS_DEPLOYMENT_SUMMARY_INTRO_IMPORT_2" dpl:export-id="IDS_DEPLOYMENT_SUMMARY_INTRO_EXPORT_2"/>
  234. </dp:description>
  235. <xsl:variable name="label_saveonly">
  236. <xsl:text/><xts:string id="IDS_DEPLOYMENT_SUMMARY_SAVE_FINISH"/><xsl:text/>
  237. </xsl:variable>
  238. <img height="8" width="1" border="0"><xsl:attribute name="src"><xsl:value-of select="$webcontent"/>/images/space.gif</xsl:attribute></img>
  239. <dp:description>
  240. <xts:string id="IDS_DEPLOYMENT_SUMMARY_INTRO_3"/>
  241. </dp:description>
  242. </xsl:copy>
  243. </xsl:template>
  244. <xsl:template name="archive-options">
  245. <xsl:param name="form-read-only"/>
  246. <xsl:param name="utml-form-name"/>
  247. <xsl:copy>
  248. <lyt:layout style="2" title="IDS_DEPLOYMENT_SUMMARY_DEPLOYMENT_FILE" border="yes">
  249. <lyt:section>
  250. <dp:list>
  251. <dp:section>
  252. <dp:label>
  253. <xts:string id="IDS_DEPLOYMENT_SUMMARY_DEPLOYMENT_FILE_NAME"/>
  254. </dp:label>
  255. </dp:section>
  256. <dp:section>
  257. <dp:text>
  258. <xsl:value-of select="/root/env/param[@name='m_archive']"/>
  259. </dp:text>
  260. </dp:section>
  261. </dp:list>
  262. </lyt:section>
  263. <lyt:section>
  264. <xsl:if test="$deployment-method='export'">
  265. <dp:list>
  266. <dp:section>
  267. <dp:label>
  268. <xts:string id="IDS_DEPLOYMENT_ENCRYPTION"/>
  269. </dp:label>
  270. </dp:section>
  271. <dp:section>
  272. <dp:text>
  273. <xsl:choose>
  274. <xsl:when test="key('env-param','m_archiveEncryptPword') != ''">
  275. <xts:string id="IDS_DEPLOYMENT_SUMMARY_ENCRYPTION_ENCRYPT"/>
  276. </xsl:when>
  277. <xsl:otherwise>
  278. <xts:string id="IDS_DEPLOYMENT_SUMMARY_ENCRYPTION_DO_NOT_ENCRYPT"/>
  279. </xsl:otherwise>
  280. </xsl:choose>
  281. </dp:text>
  282. </dp:section>
  283. </dp:list>
  284. </xsl:if>
  285. </lyt:section>
  286. </lyt:layout>
  287. </xsl:copy>
  288. </xsl:template>
  289. <xsl:template name="summary-options">
  290. <xsl:param name="form-read-only"/>
  291. <xsl:param name="utml-form-name"/>
  292. <xsl:copy>
  293. <xsl:choose>
  294. <xsl:when test="/root/cm:deploymentOptionsUI/cm:deploymentOption[@name='entireContentStoreSelect']='true' and count(/root/cm:deploymentOptionsUI/cm:deploymentOption[@name='tenants']/*)>0">
  295. <xsl:call-template name="tenantsOptionsSummary">
  296. <xsl:with-param name="form-read-only" select="$form-read-only"/>
  297. <xsl:with-param name="utml-form-name" select="$utml-form-name"/>
  298. </xsl:call-template>
  299. </xsl:when>
  300. <xsl:when test="/root/cm:deploymentOptionsUI/cm:deploymentOption[@name='entireContentStoreSelect']='true'">
  301. <xsl:call-template name="entireContentStoreOptionsSummary">
  302. <xsl:with-param name="form-read-only" select="$form-read-only"/>
  303. <xsl:with-param name="utml-form-name" select="$utml-form-name"/>
  304. </xsl:call-template>
  305. </xsl:when>
  306. <xsl:otherwise>
  307. <xsl:call-template name="packagesSummary">
  308. <xsl:with-param name="form-read-only" select="$form-read-only"/>
  309. <xsl:with-param name="utml-form-name" select="$utml-form-name"/>
  310. </xsl:call-template>
  311. <xsl:call-template name="packagesOptionsSummary">
  312. <xsl:with-param name="form-read-only" select="$form-read-only"/>
  313. <xsl:with-param name="utml-form-name" select="$utml-form-name"/>
  314. </xsl:call-template>
  315. <xsl:call-template name="directoryContentOptionsSummary">
  316. <xsl:with-param name="form-read-only" select="$form-read-only"/>
  317. <xsl:with-param name="utml-form-name" select="$utml-form-name"/>
  318. </xsl:call-template>
  319. <xsl:call-template name="generalOptionsSummary">
  320. <xsl:with-param name="form-read-only" select="$form-read-only"/>
  321. <xsl:with-param name="utml-form-name" select="$utml-form-name"/>
  322. </xsl:call-template>
  323. </xsl:otherwise>
  324. </xsl:choose>
  325. </xsl:copy>
  326. </xsl:template>
  327. <xsl:template name="tenantsOptionsSummary">
  328. <xsl:param name="form-read-only"/>
  329. <xsl:param name="utml-form-name"/>
  330. <xsl:copy>
  331. <dpl:tenantsOptionsSummary>
  332. <dpl:param name="tenant-path">/root/cm:deploymentOptionsUI/cm:deploymentOption[@name='tenants']/*</dpl:param>
  333. </dpl:tenantsOptionsSummary>
  334. </xsl:copy>
  335. </xsl:template>
  336. <xsl:template name="entireContentStoreOptionsSummary">
  337. <xsl:param name="form-read-only"/>
  338. <xsl:param name="utml-form-name"/>
  339. <xsl:copy>
  340. <dpl:entireContentStoreOptionsSummary/>
  341. </xsl:copy>
  342. </xsl:template>
  343. <xsl:template name="packagesSummary">
  344. <xsl:param name="form-read-only"/>
  345. <xsl:param name="utml-form-name"/>
  346. <lyt:layout style="1" title="IDS_DEPLOYMENT_SUMMARY_PACKAGE_CONTENT" border="yes">
  347. <lyt:section>
  348. <xsl:choose>
  349. <xsl:when test="$deployment-method='import' and $do-new='true' ">
  350. <xsl:call-template name="newImportPackagesSummary">
  351. <xsl:with-param name="form-read-only" select="$form-read-only"/>
  352. <xsl:with-param name="utml-form-name" select="$utml-form-name"/>
  353. </xsl:call-template>
  354. </xsl:when>
  355. <xsl:when test="$deployment-method='import' and $do-new='false' ">
  356. <xsl:call-template name="updateImportPackagesSummary">
  357. <xsl:with-param name="form-read-only" select="$form-read-only"/>
  358. <xsl:with-param name="utml-form-name" select="$utml-form-name"/>
  359. </xsl:call-template>
  360. </xsl:when>
  361. <xsl:otherwise>
  362. <xsl:call-template name="exportPackagesSummary">
  363. <xsl:with-param name="form-read-only" select="$form-read-only"/>
  364. <xsl:with-param name="utml-form-name" select="$utml-form-name"/>
  365. </xsl:call-template>
  366. </xsl:otherwise>
  367. </xsl:choose>
  368. </lyt:section>
  369. </lyt:layout>
  370. </xsl:template>
  371. <xsl:template name="newImportPackagesSummary">
  372. <xsl:param name="form-read-only"/>
  373. <xsl:param name="utml-form-name"/>
  374. <xsl:copy>
  375. <dpl:packagesToInclude>
  376. <dpl:param name="item-path">/root/cm:deploymentOptionsUI/cm:deploymentOption[@name='package']/*[cm:inPackagesToInclude='true']</dpl:param>
  377. <dpl:param name="targetLocations-path">/root/targetLocationProperties</dpl:param>
  378. <dpl:param name="type">importDeployment</dpl:param>
  379. <dpl:param name="new">true</dpl:param>
  380. <dpl:param name="summaryId">IDS_DEPLOYMENT_SUMMARY_IMPORT_PACKAGES_SUMMARY</dpl:param>
  381. </dpl:packagesToInclude>
  382. </xsl:copy>
  383. </xsl:template>
  384. <xsl:template name="updateImportPackagesSummary">
  385. <xsl:param name="form-read-only"/>
  386. <xsl:param name="utml-form-name"/>
  387. <xsl:copy>
  388. <dpl:packagesToInclude>
  389. <dpl:param name="item-path">/root/cm:deploymentOptionsUI/cm:deploymentOption[@name='package']/*[cm:inPackagesToInclude='true']</dpl:param>
  390. <dpl:param name="type">importDeployment</dpl:param>
  391. <dpl:param name="new">false</dpl:param>
  392. <dpl:param name="summaryId">IDS_DEPLOYMENT_SUMMARY_IMPORT_PACKAGES_SUMMARY</dpl:param>
  393. </dpl:packagesToInclude>
  394. </xsl:copy>
  395. </xsl:template>
  396. <xsl:template name="exportPackagesSummary">
  397. <xsl:param name="form-read-only"/>
  398. <xsl:param name="utml-form-name"/>
  399. <xsl:copy>
  400. <dpl:packagesToInclude>
  401. <dpl:param name="item-path">/root/cm:deploymentOptionsUI/cm:deploymentOption[@name='package']/*[cm:inPackagesToInclude='true']</dpl:param>
  402. <dpl:param name="type">exportDeployment</dpl:param>
  403. <dpl:param name="summaryId">IDS_DEPLOYMENT_SUMMARY_EXPORT_PACKAGES_SUMMARY</dpl:param>
  404. </dpl:packagesToInclude>
  405. </xsl:copy>
  406. </xsl:template>
  407. <xsl:template name="packagesOptionsSummary">
  408. <xsl:param name="form-read-only"/>
  409. <xsl:param name="utml-form-name"/>
  410. <xsl:copy>
  411. <dpl:packagesOptionsSummary/>
  412. </xsl:copy>
  413. </xsl:template>
  414. <xsl:template name="directoryContentOptionsSummary">
  415. <xsl:param name="form-read-only"/>
  416. <xsl:param name="utml-form-name"/>
  417. <xsl:copy>
  418. <dpl:directoryContentOptionsSummary/>
  419. </xsl:copy>
  420. </xsl:template>
  421. <xsl:param name="form-read-only"/>
  422. <xsl:param name="utml-form-name"/>
  423. <xsl:template name="generalOptionsSummary">
  424. <xsl:param name="form-read-only"/>
  425. <xsl:param name="utml-form-name"/>
  426. <xsl:copy>
  427. <dpl:generalOptionsSummary/>
  428. </xsl:copy>
  429. </xsl:template>
  430. </xsl:stylesheet>