properties_userInterfaceProfile.xts 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254
  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. 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/" 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" requiredCapability="canUseAdministrationPortal">
  13. <!--
  14. ===============================================================================================
  15. formlogic_init
  16. Standard form logic initialization
  17. ===============================================================================================
  18. -->
  19. <xts:block id="formlogic_init" type="exec" mode="interpret" processor="XSLT" path="/logicsheets/formlogic_init.xslt" nodelist="env,credential,system,http"/>
  20. <!--
  21. ===============================================================================================
  22. get_advanced_settings - get advanced settings
  23. ===============================================================================================
  24. -->
  25. <xts:block id="get_advanced_settings" type="exec" processor="XSLT" mandatory="false" condition=".[/root/env/param[@name='m_class']='userInterfaceProfile']" mode="interpret">
  26. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  27. <xsl:template match="/">
  28. <xts:sequence>
  29. <xts:append>
  30. <advancedSettings>
  31. <xts:function name="getConfiguration">
  32. <xts:param name="COGADMIN.UIPROFILES.DEVELOPER_MODE"/>
  33. </xts:function>
  34. </advancedSettings>
  35. </xts:append>
  36. </xts:sequence>
  37. </xsl:template>
  38. </xsl:stylesheet>
  39. </xts:block>
  40. <!-- Load object-specific property tabs map ============================================================== -->
  41. <xts:block id="getTabs" dependency="get_advanced_settings" type="exec" mode="interpret" processor="XML" path="/portal/uiobjects_tabs.xml"/>
  42. <!--
  43. ================================================================================
  44. get_content
  45. Retrieve the data details from Content Manager.
  46. ================================================================================
  47. -->
  48. <xts:block id="get_content" processor="XSLT" type="exec" mode="interpret">
  49. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  50. <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt">
  51. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  52. <xsl:key name="env-param" match="/root/env/param" use="@name"/>
  53. <xsl:template match="/">
  54. <xts:sequence>
  55. <xts:append>
  56. <xts:transform src="transforms/CM/post-process.xslt" processor="XSLT">
  57. <send:request provider="cm">
  58. <xts:transform src="transforms/CM/pre-process.xslt" processor="XSLT">
  59. <query xmlns="http://developer.cognos.com/schemas/xts-cm/1/">
  60. <search>
  61. <xsl:value-of select="key('env-param','m_obj')"/>
  62. <xsl:text>[permission('read')]</xsl:text>
  63. </search>
  64. <properties>
  65. <cm:property name="data"/>
  66. <cm:property name="permissions"/>
  67. </properties>
  68. </query>
  69. </xts:transform>
  70. </send:request>
  71. </xts:transform>
  72. </xts:append>
  73. </xts:sequence>
  74. </xsl:template>
  75. </xsl:stylesheet>
  76. </xts:block>
  77. <!--
  78. ================================================================================
  79. render_page
  80. Render the HTML page.
  81. ================================================================================
  82. -->
  83. <xts:block id="render_page" mode="output" processor="XSLT" type="exec" mimeType="text/html" dependency="get_content formlogic_init getTabs">
  84. <!-- portal specific information -->
  85. <xts:logicsheet path="logicsheets/portal.xsl"/>
  86. <!-- get the presentation theme -->
  87. <xts:logicsheet path="logicsheets/presentation/dialog/framework.xsl"/>
  88. <xts:logicsheet path="logicsheets/presentation/layout.xsl"/>
  89. <xts:logicsheet path="logicsheets/presentation/dialog/presentation.xsl"/>
  90. <xts:logicsheet path="logicsheets/presentation/dialog/confirm.xslt"/>
  91. <xts:logicsheet path="logicsheets/presentation/controls/framework.xsl"/>
  92. <xts:logicsheet path="logicsheets/presentation/controls/presentation.xsl"/>
  93. <!-- apply the form logic -->
  94. <xts:logicsheet path="logicsheets/formlogic.xslt"/>
  95. <xts:logicsheet path="logicsheets/validation.xslt"/>
  96. <xts:logicsheet path="logicsheets/presentation/touch_up.xslt"/>
  97. <xsl:stylesheet version="1.0"
  98. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  99. xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
  100. xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
  101. xmlns:lyt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/layout/"
  102. xmlns:dp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/presentation/"
  103. xmlns:df="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/framework/"
  104. xmlns:dc="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/confirm/1/"
  105. xmlns:utml="http://developer.cognos.com/schemas/xts/logicsheet/xslt/formlogic/"
  106. xmlns:cf="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/framework/"
  107. xmlns:cp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/presentation/"
  108. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" exclude-result-prefixes="xsl cm pf df dp dc lyt utml cp cf xtsext">
  109. <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no" omit-xml-declaration="yes"/>
  110. <!-- current file name -->
  111. <xsl:variable name="mname" select="'properties_userInterfaceProfile.xts'"/>
  112. <!-- add any theme variables -->
  113. <pf:variables/>
  114. <xsl:variable name="object" select="/root/cm:queryResponse/*"/>
  115. <!-- start the output -->
  116. <xsl:template match="/root">
  117. <!-- get passed in parameters -->
  118. <xsl:variable name="canWrite" select="contains(concat(' ',$object/cm:permissions,' '),' write ')"/>
  119. <xsl:variable name="canSetPolicy" select="contains(concat(' ', $object/cm:permissions, ' '), ' setPolicy ')"/>
  120. <xsl:variable name="showOKCancel" select="$canWrite or $canSetPolicy"/>
  121. <xsl:variable name="browserTitle">
  122. <xts:string id="IDS_PROPERTIES_TITLE">
  123. <xts:param name="objectName">
  124. <span lang="{$contentLocale}"><xsl:value-of select="/root/env/param[@name='m_name']"/></span>
  125. </xts:param>
  126. </xts:string>
  127. </xsl:variable>
  128. <xsl:text disable-output-escaping='yes'>&lt;!DOCTYPE html></xsl:text><dp:page longTitle="$browserTitle">
  129. <dp:meta>
  130. <!-- Standard meta tags -->
  131. <pf:meta/>
  132. </dp:meta>
  133. <dp:script>
  134. <!-- Help system -->
  135. <pf:help context="HID_DISTRIB_UIPROFILE"/>
  136. <xsl:if test="$canWrite">
  137. <script language="javascript">
  138. function chgUIProfileData(val)
  139. {
  140. document.pform['m_t_data'].value = val;
  141. setPropertiesChanged();
  142. }
  143. </script>
  144. <dc:confirm-cancel/>
  145. <script language="javascript" src="{$webcontent}/{$app}/js/utilities.js"/>
  146. </xsl:if>
  147. </dp:script>
  148. <utml:form name="pform" method="post" action="{$gateway}">
  149. <utml:read-only>
  150. <xsl:choose>
  151. <xsl:when test="$canWrite">false</xsl:when>
  152. <xsl:otherwise>true</xsl:otherwise>
  153. </xsl:choose>
  154. </utml:read-only>
  155. <!--
  156. this defines the form command operation to be performed when all the collected properties are submitted.
  157. -->
  158. <utml:input type="hidden" name="ifrmcmd" value="save" utml:update="false"/>
  159. <!-- dialog header -->
  160. <dp:header useBackURL="not($showOKCancel)">
  161. <!-- header titles-->
  162. <dp:title>
  163. <xsl:copy-of select="$browserTitle"/>
  164. </dp:title>
  165. </dp:header>
  166. <!-- property tabs -->
  167. <df:propertiesTabs select="userInterfaceProfile">
  168. <df:hasSetPolicy>
  169. <xsl:value-of select="$canSetPolicy"/>
  170. </df:hasSetPolicy>
  171. </df:propertiesTabs>
  172. <!-- description tabs -->
  173. <dp:description>
  174. <xts:string id="IDS_PROP_UIP_INTRO"/>
  175. </dp:description>
  176. <lyt:layout style="1">
  177. <lyt:section>
  178. <dp:input>
  179. <dp:section1>
  180. <label for="ptyUserInterfaceProfileData"><xts:string id="IDS_PROP_UIP_DATA"/></label>
  181. </dp:section1>
  182. <dp:section2>
  183. <utml:textarea class="pTextarea" rows="4" cols="30" style="width: 700px; height: 400px;" name="m_t_data" onchange="chgUIProfileData(this.value)" id="ptyUserInterfaceProfileData" role="textbox" aria-multiline="true">
  184. <utml:read-only>
  185. <xsl:choose>
  186. <xsl:when test="/root/cm:queryResponse/child::node()/cm:data[@modifiable = 'false']">true</xsl:when>
  187. <xsl:otherwise>false</xsl:otherwise>
  188. </xsl:choose>
  189. false
  190. </utml:read-only>
  191. <utml:value>
  192. <xsl:choose>
  193. <xsl:when test="not(/root/env/param[@name='m_t_data'])">
  194. <xsl:value-of select="xtsext:base64decode(string(/root/cm:queryResponse/child::node()/cm:data),false)"/>
  195. </xsl:when>
  196. <xsl:otherwise>
  197. <xsl:value-of select="/root/env/param[@name='m_t_data']"/>
  198. </xsl:otherwise>
  199. </xsl:choose>
  200. </utml:value>
  201. </utml:textarea>
  202. </dp:section2>
  203. </dp:input>
  204. </lyt:section>
  205. </lyt:layout>
  206. <dp:footer>
  207. <xsl:choose>
  208. <xsl:when test="$showOKCancel">
  209. <df:button df:id="IDS_OK" utml:validate="false" df:style="submit"/>
  210. <xsl:choose>
  211. <xsl:when test="key('env-param', 'ps_nav_stack') and not(key('env-param', 'ps_nav_stack') = '') ">
  212. <df:button df:id="IDS_CANCEL" df:style="stack-down" onclick="{$dc-confirm-cancel}"/>
  213. </xsl:when>
  214. <xsl:otherwise>
  215. <df:button df:id="IDS_CANCEL" df:style="back-url" onclick="{$dc-confirm-cancel}"/>
  216. </xsl:otherwise>
  217. </xsl:choose>
  218. </xsl:when>
  219. <xsl:otherwise>
  220. <df:button df:id="IDS_CLOSE" df:style="back-url"/>
  221. </xsl:otherwise>
  222. </xsl:choose>
  223. </dp:footer>
  224. </utml:form>
  225. </dp:page>
  226. </xsl:template>
  227. </xsl:stylesheet>
  228. </xts:block>
  229. <!--
  230. ===============================================================================================
  231. debug - display debug information
  232. ===============================================================================================
  233. -->
  234. <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">
  235. <!-- get the debug logic sheet -->
  236. <xts:logicsheet path="logicsheets/debuglogic.xslt"/>
  237. <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">
  238. <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no" omit-xml-declaration="yes"/>
  239. <xsl:template match="/">
  240. <dbg:dumpxml select="/root"/>
  241. </xsl:template>
  242. </xsl:stylesheet>
  243. </xts:block>
  244. </xts:morphlet>