properties_packageconfiguration.xts 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303
  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, 2013
  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/" xmlns:cml="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/cml/1/" xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/" messageBase="messages/portal.xml, messages/portalRL.xml">
  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="getTabs" type="exec" mode="interpret" processor="XML" dependency="formlogic_init" path="/portal/uiobjects_tabs.xml"/>
  21. <!--
  22. ===============================================================================================
  23. Query for the default destination container
  24. ===============================================================================================
  25. -->
  26. <xts:block id="getContent" processor="XSLT" type="exec" dependency="formlogic_init">
  27. <xts:logicsheet path="logicsheets/portal.xsl"/>
  28. <xts:logicsheet path="logicsheets/cm-logic.xsl"/>
  29. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  30. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
  31. xmlns:cml="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/cml/1/"
  32. xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/"
  33. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt">
  34. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  35. <xsl:key name="env-param" match="/root/env/param" use="@name"/>
  36. <xsl:template match="/">
  37. <xts:sequence>
  38. <xts:append>
  39. <xts:transform src="transforms/CM/post-process.xslt" processor="XSLT">
  40. <send:request provider="cm">
  41. <xts:transform src="transforms/CM/pre-process.xslt" processor="XSLT">
  42. <cm:query xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
  43. <cm:search>
  44. <xsl:value-of select="key('env-param','m_obj')"/>
  45. </cm:search>
  46. <cm:properties>
  47. <cm:property name="defaultName"/>
  48. <cm:property name="searchPath"/>
  49. <cm:property name="ancestors"/>
  50. <cm:property name="permissions"/>
  51. <cm:property name="memberDisplayCountDefault"/>
  52. <cm:property name="memberDisplayCountLimit"/>
  53. </cm:properties>
  54. <cm:options schemaInfo="true">
  55. <cm:refProps>
  56. <cm:refProp refPropName="defaultAnalysis">
  57. <cm:properties>
  58. <cm:property name="searchPath"/>
  59. <cm:property name="defaultName"/>
  60. <cm:property name="ancestors"/>
  61. <cm:property name="permissions"/>
  62. <cm:property name="storeID"/>
  63. </cm:properties>
  64. </cm:refProp>
  65. </cm:refProps>
  66. </cm:options>
  67. </cm:query>
  68. </xts:transform>
  69. </send:request>
  70. </xts:transform>
  71. </xts:append>
  72. <xsl:if test="string(key('env-param','so.searchPath'))!=''">
  73. <xts:append>
  74. <selectedAnalysis>
  75. <xts:transform src="transforms/CM/post-process.xslt" processor="XSLT">
  76. <send:request provider="cm">
  77. <xts:transform src="transforms/CM/pre-process.xslt" processor="XSLT">
  78. <cm:query>
  79. <cm:search><xsl:value-of select="key('env-param','so.searchPath')"/></cm:search>
  80. <cm:properties>
  81. <cm:property name="defaultName"/>
  82. <cm:property name="searchPath"/>
  83. <cm:property name="ancestors"/>
  84. </cm:properties>
  85. </cm:query>
  86. </xts:transform>
  87. </send:request>
  88. </xts:transform>
  89. </selectedAnalysis>
  90. </xts:append>
  91. </xsl:if>
  92. </xts:sequence>
  93. </xsl:template>
  94. </xsl:stylesheet>
  95. </xts:block>
  96. <xts:block id="buildPkgCfgSettings" type="exec" mode="interpret" processor="XSLT" dependency="formlogic_init getContent" path="/portal/packageConfiguration/settings.xml"/>
  97. <!--
  98. ===============================================================================================
  99. renderPage - render the page
  100. ===============================================================================================
  101. -->
  102. <xts:block id="render_page" mode="output" processor="XSLT" type="exec" mimeType="text/html" dependency="formlogic_init getTabs getContent buildPkgCfgSettings">
  103. <!-- get the presentation theme -->
  104. <xts:logicsheet path="logicsheets/portal.xsl"/>
  105. <xts:logicsheet path="portal/packageConfiguration/packageConfiguration.xslt"/>
  106. <xts:logicsheet path="logicsheets/presentation/dialog/framework.xsl"/>
  107. <xts:logicsheet path="logicsheets/presentation/layout.xsl"/>
  108. <xts:logicsheet path="logicsheets/presentation/dialog/presentation.xsl"/>
  109. <xts:logicsheet path="logicsheets/presentation/controls/framework.xsl"/>
  110. <xts:logicsheet path="logicsheets/presentation/controls/presentation.xsl"/>
  111. <!-- apply the form logic -->
  112. <xts:logicsheet path="logicsheets/formlogic.xslt"/>
  113. <xts:logicsheet path="logicsheets/validation.xslt"/>
  114. <xts:logicsheet path="logicsheets/presentation/touch_up.xslt"/>
  115. <xsl:stylesheet version="1.0"
  116. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  117. xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
  118. xmlns:lyt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/layout/"
  119. xmlns:dp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/presentation/"
  120. xmlns:df="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/framework/"
  121. xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
  122. xmlns:utml="http://developer.cognos.com/schemas/xts/logicsheet/xslt/formlogic/"
  123. xmlns:cf="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/framework/"
  124. xmlns:cp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/presentation/"
  125. xmlns:pkgcfg="http://developer.cognos.com/schemas/xts/pkgcfg"
  126. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  127. exclude-result-prefixes="xsl cm pf df dp lyt utml cf cp pkgcfg xtsext">
  128. <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no" omit-xml-declaration="yes"/>
  129. <!-- current file name -->
  130. <xsl:variable name="mname" select="'properties_packageconfiguration.xts'"/>
  131. <!-- add any theme variables -->
  132. <pf:variables/>
  133. <!-- start the output -->
  134. <xsl:template match="/root">
  135. <xsl:variable name="the-object" select="/root/cm:queryResponse/*"/>
  136. <xsl:variable name="has_policy_permission" select="contains(string(/root/cm:queryResponse/*/cm:permissions), 'setPolicy')"/>
  137. <xsl:variable name="theObjectName">
  138. <xsl:value-of select="$the-object/*[local-name()='defaultName']"/>
  139. </xsl:variable>
  140. <xsl:variable name="browserTitle"><xts:string id="IDS_PROPERTIES_TITLE"><xts:param name="objectName"><span lang="{$contentLocale}"><xsl:value-of select="$theObjectName"/></span></xts:param></xts:string></xsl:variable>
  141. <xsl:text disable-output-escaping='yes'>&lt;!DOCTYPE html></xsl:text><dp:page longTitle="$browserTitle">
  142. <dp:meta>
  143. <!-- Standard meta tags -->
  144. <pf:meta/>
  145. </dp:meta>
  146. <dp:script>
  147. <pf:help context="HID_PACKAGE_CONFIG"/>
  148. <xsl:if test="(not(key('env-param','ps_nav_stack')) or key('env-param','ps_nav_stack') = '')">
  149. <script language="javascript">
  150. <!-- cwb - Cancel When Back - there are no stack pages. -->
  151. function cwb()
  152. {
  153. location.href = "<xsl:value-of select="xtsext:javascriptencode(string(/root/env/param[@name='backURL']))"/>";
  154. }
  155. </script>
  156. </xsl:if>
  157. <script language="javascript">
  158. <pkgcfg:scripts/>
  159. function validate()
  160. {
  161. document.pform.ifrmcmd.value = "save";
  162. return validatePkgCfg();
  163. }
  164. function removeAnalysis()
  165. {
  166. storeSettings();
  167. document.pform.m_ppc_defaultAnalysis.value="";
  168. document.pform.remove_m_ppc_defaultAnalysis.value="true";
  169. document.pform.m.value = '<xsl:value-of select="concat($app,'/',$mname)"/>';
  170. document.pform.m_return.value = "portal/properties_packageconfiguration.xts";
  171. document.pform.submit();
  172. }
  173. </script>
  174. <script language="javascript" src="{$webcontent}/{$app}/js/utilities.js"/>
  175. <script language="javascript" src="{$webcontent}/{$app}/js/list.js"></script>
  176. </dp:script>
  177. <utml:form name="pform" method="post" action="{$gateway}">
  178. <utml:exclusion-list><xsl:value-of select="' memberDisplayCountDefault memberDisplayCountLimit'"/></utml:exclusion-list>
  179. <utml:input type="hidden" name="ifrmcmd" value="" utml:update="false"/>
  180. <utml:input type="hidden" name="so.defaultObject" utml:update="false">
  181. <xsl:attribute name="value">
  182. <xsl:choose>
  183. <xsl:when test="key('env-param','so.searchPath')"><xsl:value-of select="key('env-param','so.searchPath')"/></xsl:when>
  184. <xsl:when test="/root/cm:queryResponse/cm:packageConfiguration/cm:defaultAnalysis/*/cm:searchPath">
  185. <xsl:value-of select="/root/cm:queryResponse/cm:packageConfiguration/cm:defaultAnalysis/*/cm:searchPath"/>
  186. </xsl:when>
  187. <xsl:otherwise><xsl:value-of select="key('env-param','m_obj')"/></xsl:otherwise>
  188. </xsl:choose>
  189. </xsl:attribute>
  190. </utml:input>
  191. <utml:input type="hidden" name="so.select" value="analysis" utml:update="false"/>
  192. <utml:input type="hidden" name="so.return.m" utml:update="false">
  193. <xsl:attribute name="value"><xsl:value-of select="concat($app,'/',$mname)"/></xsl:attribute>
  194. </utml:input>
  195. <utml:input type="hidden" name="m_ppc_defaultAnalysis">
  196. <xsl:choose>
  197. <xsl:when test="key('env-param','remove_m_ppc_defaultAnalysis') and key('env-param','remove_m_ppc_defaultAnalysis')='true'">
  198. <xsl:attribute name="value"></xsl:attribute>
  199. </xsl:when>
  200. <xsl:when test="key('env-param','so.searchPath')">
  201. <xsl:attribute name="value"><xsl:value-of select="key('env-param','so.searchPath')"/></xsl:attribute>
  202. </xsl:when>
  203. <xsl:when test="/root/cm:queryResponse/cm:packageConfiguration/cm:defaultAnalysis/*/cm:searchPath">
  204. <xsl:attribute name="value"><xsl:value-of select="/root/cm:queryResponse/cm:packageConfiguration/cm:defaultAnalysis/*/cm:searchPath"/></xsl:attribute>
  205. </xsl:when>
  206. </xsl:choose>
  207. </utml:input>
  208. <utml:input type="hidden" name="remove_m_ppc_defaultAnalysis" utml:update="false">
  209. <xsl:attribute name="value">
  210. <xsl:choose>
  211. <xsl:when test="key('env-param','remove_m_ppc_defaultAnalysis')"><xsl:value-of select="key('env-param','remove_m_ppc_defaultAnalysis')"/></xsl:when>
  212. <xsl:otherwise>false</xsl:otherwise>
  213. </xsl:choose>
  214. </xsl:attribute>
  215. </utml:input>
  216. <utml:input type="hidden" name="m_return" utml:update="false">
  217. <utml:value>
  218. <xsl:if test="key('env-param', 'm_return')">
  219. <xsl:value-of select="key('env-param', 'm_return')"/>
  220. </xsl:if>
  221. </utml:value>
  222. </utml:input>
  223. <!-- ================================================================ -->
  224. <!-- H E A D E R -->
  225. <!-- ================================================================ -->
  226. <dp:header>
  227. <dp:title>
  228. <xsl:copy-of select="$browserTitle"/>
  229. </dp:title>
  230. </dp:header>
  231. <!-- property tabs -->
  232. <df:propertiesTabs select="settings">
  233. <df:hasSetPolicy><xsl:value-of select="$has_policy_permission"/></df:hasSetPolicy>
  234. </df:propertiesTabs>
  235. <dp:description>
  236. <xts:string id="IDS_PACKAGECONFIGURATION_INTRO"/>
  237. </dp:description>
  238. <!-- ================================================================ -->
  239. <!-- B O D Y -->
  240. <!-- ================================================================ -->
  241. <lyt:layout style="1">
  242. <lyt:section>
  243. <pkgcfg:defaultAnalysis/>
  244. </lyt:section>
  245. </lyt:layout>
  246. <lyt:layout style="1">
  247. <lyt:section>
  248. </lyt:section>
  249. </lyt:layout>
  250. <lyt:layout style="1">
  251. <lyt:section>
  252. <pkgcfg:settingsList/>
  253. <pkgcfg:settingsInput/>
  254. </lyt:section>
  255. </lyt:layout>
  256. <!-- ================================================================ -->
  257. <!-- F O O T E R -->
  258. <!-- ================================================================ -->
  259. <dp:footer>
  260. <df:button df:id="IDS_OK" utml:validate="true" df:style="submit" df:nav_op="stack-down"/>
  261. <xsl:choose>
  262. <xsl:when test="key('env-param','ps_nav_stack') and not(key('env-param','ps_nav_stack') = '') ">
  263. <!-- The following is needed to get around some issues with formlogic_lite (needs more investigation) -->
  264. <df:button df:id="IDS_CANCEL" df:style="stack-down"/>
  265. </xsl:when>
  266. <xsl:otherwise>
  267. <!-- The following is needed to get around some issues with formlogic_lite (needs more investigation) -->
  268. <df:button df:id="IDS_CANCEL" df:href="javascript:cwb()" df:style="href"/>
  269. </xsl:otherwise>
  270. </xsl:choose>
  271. </dp:footer>
  272. </utml:form>
  273. </dp:page>
  274. </xsl:template>
  275. </xsl:stylesheet>
  276. </xts:block>
  277. <!--
  278. ===============================================================================================
  279. debug - display debug information
  280. ===============================================================================================
  281. -->
  282. <xts:block id="debug" dependency="render_page" condition=".[/root/session/param[@name='debug']='1']" type="exec" mode="output" processor="XSLT" mandatory="false" mimeType="text/html">
  283. <!-- get the debug logic sheet -->
  284. <xts:logicsheet path="logicsheets/debuglogic.xslt"/>
  285. <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">
  286. <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no" omit-xml-declaration="yes"/>
  287. <xsl:template match="/">
  288. <dbg:dumpxml select="/root"/>
  289. </xsl:template>
  290. </xsl:stylesheet>
  291. </xts:block>
  292. </xts:morphlet>