properties_preferences.xts 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221
  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/" messageBase="messages/portal.xml, messages/portalRL.xml" includeConfig="true">
  13. <!-- Navigation control -->
  14. <xts:block id="formlogic_init" type="exec" mode="interpret" processor="XSLT" path="/logicsheets/formlogic_init.xslt" nodelist="env,credential,system,http"/>
  15. <!-- Load object-specific property tabs map ============================================================== -->
  16. <xts:block id="getTabs" type="exec" mode="interpret" processor="XML" path="/portal/uiobjects_tabs.xml"/>
  17. <!--
  18. ================================================================================
  19. Content request to get basic preferences
  20. ================================================================================
  21. -->
  22. <xts:block id="getContent" processor="XSLT" type="exec" dependency="formlogic_init" condition=".[not(/root/env/param[@name='controller_state']) or /root/env/param[@name='controller_state']='']" mandatory="false">
  23. <xts:logicsheet path="portal/preferences/common/request/request.xslt"/>
  24. <xts:logicsheet path="logicsheets/cm-logic.xsl"/>
  25. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  26. <xsl:stylesheet version="1.0"
  27. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  28. xmlns:cml="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/cml/1/"
  29. xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/"
  30. xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
  31. xmlns:rdr="http://developer.cognos.com/schemas/xts/rdr/"
  32. xmlns:xts="http://developer.cognos.com/schemas/xts/">
  33. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  34. <xsl:template match="/root">
  35. <rdr:Requests>
  36. <rdr:Request type="preferences" mode="properties">
  37. <rdr:searchPath>
  38. <xsl:value-of select="/root/env/param[@name='m_obj']"/>
  39. </rdr:searchPath>
  40. </rdr:Request>
  41. <rdr:Request type="self" mode="properties"/>
  42. <rdr:Request type="skins" mode="preferences">
  43. <rdr:searchPath>/portal/*[@objectClass='portalSkinFolder']/*[@objectClass='portalSkin']</rdr:searchPath>
  44. </rdr:Request>
  45. <rdr:Request type="installedServices" mode="properties">
  46. <rdr:searchPath>/configuration/dispatcher/installedComponent</rdr:searchPath>
  47. </rdr:Request>
  48. </rdr:Requests>
  49. </xsl:template>
  50. </xsl:stylesheet>
  51. </xts:block>
  52. <xts:block id="resolveSkinPath" processor="XSLT" type="exec" dependency="getContent">
  53. <xts:logicsheet path="portal/preferences/common/request/request.xslt"/>
  54. <xts:logicsheet path="logicsheets/cm-logic.xsl"/>
  55. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  56. <xsl:stylesheet version="1.0"
  57. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  58. xmlns:cml="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/cml/1/"
  59. xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/"
  60. xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
  61. xmlns:rdr="http://developer.cognos.com/schemas/xts/rdr/"
  62. xmlns:xts="http://developer.cognos.com/schemas/xts/">
  63. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  64. <xsl:template match="/root">
  65. <xsl:variable name="the-object" select="/root/cm:queryResponse/cm:queryReply[1]/*"/>
  66. <xsl:if test="string($the-object/options/value/item[name = 'skin']/value) != ''">
  67. <rdr:resolveSkinPath>
  68. <rdr:searchPath><xsl:value-of select="$the-object/options/value/item[name = 'skin']/value"/></rdr:searchPath>
  69. </rdr:resolveSkinPath>
  70. </xsl:if>
  71. </xsl:template>
  72. </xsl:stylesheet>
  73. </xts:block>
  74. <!-- Response -->
  75. <xts:block id="format" mode="output" processor="XSLT" type="exec" mimeType="text/html" dependency="formlogic_init getTabs getContent resolveSkinPath" condition=".[not(/root/env/param[@name='controller_state']) or /root/env/param[@name='controller_state']='']" mandatory="false">
  76. <xts:logicsheet path="portal/preferences/common/response/preferences.xslt"/>
  77. <xts:logicsheet path="logicsheets/portal.xsl"/>
  78. <xts:logicsheet path="logicsheets/presentation/dialog/templates.xsl"/>
  79. <xts:logicsheet path="logicsheets/presentation/layout.xsl"/>
  80. <xts:logicsheet path="logicsheets/presentation/dialog/framework.xsl"/>
  81. <xts:logicsheet path="logicsheets/presentation/dialog/presentation.xsl"/>
  82. <xts:logicsheet path="logicsheets/presentation/dialog/confirm.xslt"/>
  83. <xts:logicsheet path="logicsheets/presentation/controls/framework.xsl"/>
  84. <xts:logicsheet path="logicsheets/presentation/controls/presentation.xsl"/>
  85. <xts:logicsheet path="logicsheets/formlogic.xslt"/>
  86. <xts:logicsheet path="logicsheets/validation.xslt"/> <xts:logicsheet path="logicsheets/presentation/touch_up.xslt"/>
  87. <xsl:stylesheet version="1.0"
  88. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  89. xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
  90. xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
  91. xmlns:lyt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/layout/"
  92. xmlns:dt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/templates/"
  93. xmlns:dp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/presentation/"
  94. xmlns:df="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/framework/"
  95. xmlns:dc="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/confirm/1/"
  96. xmlns:cp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/presentation/"
  97. xmlns:cf="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/framework/"
  98. xmlns:utml="http://developer.cognos.com/schemas/xts/logicsheet/xslt/formlogic/"
  99. xmlns:out="http://www.w3.org/1999/XSL/Transform"
  100. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  101. xmlns:xts="http://developer.cognos.com/schemas/xts/"
  102. xmlns:x="x"
  103. xmlns:rdb="http://developer.cognos.com/schemas/xts/rdb"
  104. exclude-result-prefixes="rdb xsl out cm lyt pf df dp dt cp dc cf utml x xts xtsext">
  105. <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no" omit-xml-declaration="yes"/>
  106. <!-- morphlet -->
  107. <xsl:variable name="mname" select="'properties_preferences.xts'"/>
  108. <!-- Global vars -->
  109. <xsl:variable name="the-object" select="/root/cm:queryResponse/cm:queryReply[1]/*"/>
  110. <xsl:variable name="self" select="/root/cm:queryResponse/cm:queryReply[2]/*"/>
  111. <xsl:variable name="skin-objects" select="/root/cm:queryResponse/cm:queryReply[3]"/>
  112. <xsl:variable name="resolved-skin-object" select="/root/resolvedSkinPath/cm:queryResponse[1]"/>
  113. <xsl:variable name="XLSenabled" select="xtsext:cafaction('get_configsignedreporturls','')!='true'"/>
  114. <xsl:variable name="theObjectName">
  115. <xsl:choose>
  116. <xsl:when test="key('env-param','m_name')!=''"><xsl:value-of select="key('env-param','m_name')"/></xsl:when>
  117. <xsl:otherwise><xsl:value-of select="$the-object/*[local-name()='defaultName']"/></xsl:otherwise>
  118. </xsl:choose>
  119. </xsl:variable>
  120. <xsl:variable name="isNamedAccountReadOnly" select="(not(contains($the-object/cm:permissions,'write')) and ($is-named='1'))"/>
  121. <pf:modalVariables/>
  122. <!-- start the output -->
  123. <xsl:template match="/root">
  124. <xsl:variable name="has_write_permission" select="contains(concat(' ', $the-object/cm:permissions, ' '), ' write ')"/>
  125. <xsl:variable name="has_policy_permission" select="contains(concat(' ', $the-object/cm:permissions, ' '), ' setPolicy ')"/>
  126. <xsl:variable name="showOKCancel" select="$has_write_permission or $has_policy_permission"/>
  127. <xsl:variable name="browserTitle">
  128. <xts:string id="IDS_PROPERTIES_TITLE">
  129. <xts:param name="objectName">
  130. <span lang="{$contentLocale}"><xsl:value-of select="$theObjectName"/></span>
  131. </xts:param>
  132. </xts:string>
  133. </xsl:variable>
  134. <xsl:text disable-output-escaping='yes'>&lt;!DOCTYPE html></xsl:text><dp:page longTitle="$browserTitle">
  135. <dp:meta>
  136. <pf:meta/>
  137. </dp:meta>
  138. <dp:script>
  139. <pf:help context="HID_PERSONALIZE"/>
  140. </dp:script>
  141. <utml:form name="pform" method="post" action="{$gateway}">
  142. <utml:read-only><xsl:value-of select="$isNamedAccountReadOnly"/></utml:read-only>
  143. <dp:header useBackURL="not($showOKCancel)">
  144. <dp:title><xsl:copy-of select="$browserTitle"/></dp:title>
  145. </dp:header>
  146. <!-- Tab control -->
  147. <df:propertiesTabs select="preferences">
  148. <df:hasSetPolicy>
  149. <xsl:value-of select="$has_policy_permission"/>
  150. </df:hasSetPolicy>
  151. </df:propertiesTabs>
  152. <utml:input type="hidden" name="ifrmcmd" value="save" utml:update="false"/>
  153. <utml:input type="hidden" name="m_return" value="" utml:update="false"/>
  154. <!-- Render the body of this tab -->
  155. <rdb:preferences mode="properties"/>
  156. <!-- Footer -->
  157. <dp:footer>
  158. <xsl:choose>
  159. <xsl:when test="$showOKCancel">
  160. <df:button df:id="IDS_OK" utml:validate="true" df:style="submit"/>
  161. <xsl:choose>
  162. <xsl:when test="key('env-param', 'ps_nav_stack') and not(key('env-param', 'ps_nav_stack') = '') ">
  163. <df:button df:id="IDS_CANCEL" df:style="stack-down" onclick="{$dc-confirm-cancel}"/>
  164. </xsl:when>
  165. <xsl:otherwise>
  166. <df:button df:id="IDS_CANCEL" df:style="back-url" onclick="{$dc-confirm-cancel}"/>
  167. </xsl:otherwise>
  168. </xsl:choose>
  169. </xsl:when>
  170. <xsl:otherwise>
  171. <df:button df:id="IDS_CLOSE" df:style="back-url"/>
  172. </xsl:otherwise>
  173. </xsl:choose>
  174. </dp:footer>
  175. </utml:form>
  176. </dp:page>
  177. </xsl:template>
  178. <!-- Generic templates -->
  179. <pf:variables/>
  180. <pf:gen-icon/>
  181. </xsl:stylesheet>
  182. </xts:block>
  183. <!-- debug -->
  184. <xts:block id="debug" dependency="format" condition=".[/root/session/param[@name='debug']='1']" type="exec" mode="output" processor="XSLT" mandatory="false" mimeType="text/html">
  185. <xts:logicsheet path="logicsheets/debuglogic.xslt"/>
  186. <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">
  187. <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no" omit-xml-declaration="yes"/>
  188. <xsl:template match="/">
  189. <dbg:dumpxml select="/root"/>
  190. </xsl:template>
  191. </xsl:stylesheet>
  192. </xts:block>
  193. </xts:morphlet>