properties_dataset.xts 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241
  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, 2015
  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="canUseMyDataSets canUseMyDataSetsAdministration or">
  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. <!-- Load object-specific property tabs map ============================================================== -->
  21. <xts:block id="getTabs" type="exec" mode="interpret" processor="XML" path="/portal/uiobjects_tabs.xml"/>
  22. <!--
  23. ================================================================================
  24. get_content
  25. Retrieve the data set details from Content Manager.
  26. ================================================================================
  27. -->
  28. <xts:block id="get_content" processor="XSLT" type="exec" mode="interpret">
  29. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  30. <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">
  31. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  32. <xsl:key name="env-param" match="/root/env/param" use="@name"/>
  33. <xsl:template match="/">
  34. <xts:sequence>
  35. <xts:append>
  36. <xts:transform src="transforms/CM/post-process.xslt" processor="XSLT">
  37. <send:request provider="cm">
  38. <xts:transform src="transforms/CM/pre-process.xslt" processor="XSLT">
  39. <query xmlns="http://developer.cognos.com/schemas/xts-cm/1/">
  40. <search>
  41. <xsl:value-of select="key('env-param','m_obj')"/>
  42. <xsl:text>[permission('read')]</xsl:text>
  43. </search>
  44. <properties>
  45. <cm:property name="specification"/>
  46. <cm:property name="permissions"/>
  47. </properties>
  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. render_page
  60. Render the HTML page.
  61. ================================================================================
  62. -->
  63. <xts:block id="render_page" mode="output" processor="XSLT" type="exec" mimeType="text/html" dependency="get_content formlogic_init getTabs">
  64. <!-- portal specific information -->
  65. <xts:logicsheet path="logicsheets/portal.xsl"/>
  66. <!-- get the presentation theme -->
  67. <xts:logicsheet path="logicsheets/presentation/dialog/framework.xsl"/>
  68. <xts:logicsheet path="logicsheets/presentation/layout.xsl"/>
  69. <xts:logicsheet path="logicsheets/presentation/dialog/presentation.xsl"/>
  70. <xts:logicsheet path="logicsheets/presentation/dialog/confirm.xslt"/>
  71. <xts:logicsheet path="logicsheets/presentation/controls/framework.xsl"/>
  72. <xts:logicsheet path="logicsheets/presentation/controls/presentation.xsl"/>
  73. <!-- apply the form logic -->
  74. <xts:logicsheet path="logicsheets/formlogic.xslt"/>
  75. <xts:logicsheet path="logicsheets/validation.xslt"/> <xts:logicsheet path="logicsheets/presentation/touch_up.xslt"/>
  76. <xsl:stylesheet version="1.0"
  77. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  78. xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
  79. xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
  80. xmlns:lyt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/layout/"
  81. xmlns:dp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/presentation/"
  82. xmlns:df="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/framework/"
  83. xmlns:dc="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/confirm/1/"
  84. xmlns:utml="http://developer.cognos.com/schemas/xts/logicsheet/xslt/formlogic/"
  85. xmlns:cf="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/framework/"
  86. xmlns:cp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/presentation/"
  87. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" exclude-result-prefixes="xsl cm pf df dp dc lyt utml cp cf xtsext">
  88. <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no"/>
  89. <!-- current file name -->
  90. <xsl:variable name="mname" select="'properties_dataset.xts'"/>
  91. <!-- add any theme variables -->
  92. <pf:variables/>
  93. <xsl:variable name="object" select="/root/cm:queryResponse/*"/>
  94. <!-- start the output -->
  95. <xsl:template match="/root">
  96. <!-- get passed in parameters -->
  97. <xsl:variable name="canWrite" select="contains(concat(' ',$object/cm:permissions,' '),' write ')"/>
  98. <xsl:variable name="canSetPolicy" select="false()"/>
  99. <xsl:variable name="showOKCancel" select="$canWrite or $canSetPolicy"/>
  100. <xsl:variable name="browserTitle">
  101. <xts:string id="IDS_PROPERTIES_TITLE">
  102. <xts:param name="objectName">
  103. <span lang="{$contentLocale}"><xsl:value-of select="/root/env/param[@name='m_name']"/></span>
  104. </xts:param>
  105. </xts:string>
  106. </xsl:variable>
  107. <dp:page longTitle="$browserTitle">
  108. <dp:meta>
  109. <!-- Standard meta tags -->
  110. <pf:meta/>
  111. </dp:meta>
  112. <dp:script>
  113. <!-- Help system -->
  114. <pf:help context="HID_DISTRIB_DATASET"/>
  115. <xsl:if test="$canWrite">
  116. <script language="javascript">
  117. function validate()
  118. {
  119. return true;
  120. }
  121. </script>
  122. <dc:confirm-cancel/>
  123. <script language="javascript" src="{$webcontent}/{$app}/js/utilities.js"/>
  124. </xsl:if>
  125. </dp:script>
  126. <utml:form name="pform" method="post" action="{$gateway}">
  127. <utml:read-only>
  128. <xsl:choose>
  129. <xsl:when test="$canWrite">false</xsl:when>
  130. <xsl:otherwise>true</xsl:otherwise>
  131. </xsl:choose>
  132. </utml:read-only>
  133. <!--
  134. this defines the form command operation to be performed when all the collected properties are submitted.
  135. -->
  136. <utml:input type="hidden" name="ifrmcmd" value="save" utml:update="false"/>
  137. <!-- dialog header -->
  138. <dp:header useBackURL="not($showOKCancel)">
  139. <!-- header titles-->
  140. <dp:title>
  141. <xsl:copy-of select="$browserTitle"/>
  142. </dp:title>
  143. </dp:header>
  144. <!-- property tabs -->
  145. <df:propertiesTabs select="dataSet">
  146. <df:hasSetPolicy>
  147. <xsl:value-of select="$canSetPolicy"/>
  148. </df:hasSetPolicy>
  149. </df:propertiesTabs>
  150. <!-- description tabs -->
  151. <dp:description>
  152. <xts:string id="IDS_MYDS_TAB_INTRO"/>
  153. </dp:description>
  154. <table border="0" cellspacing="0" cellpadding="0" width="100%" summary="" role="presentation">
  155. <tr>
  156. <td width="50%" valign="top">
  157. <lyt:layout style="1" width="50%" lyt:kbA11y="true">
  158. <!-- Class -->
  159. <lyt:section dp:kbA11y="true">
  160. <dp:list width="100%">
  161. <dp:section>
  162. <dp:label width="15%"><xts:string id="IDS_MYDS_TAB_DB_TABLE_NAME"/></dp:label>
  163. <dp:text>
  164. <xsl:value-of select="/root/cm:queryResponse/child::node()/cm:specification//*[local-name()='neoTableName']"/>
  165. </dp:text>
  166. </dp:section>
  167. <dp:section>
  168. <dp:label width="15%"><xts:string id="IDS_MYDS_TAB_DB_DATASOURCE"/></dp:label>
  169. <dp:text>
  170. <xsl:value-of select="/root/cm:queryResponse/child::node()/cm:specification//*[local-name()='dataSource']/*[local-name()='name']"/>
  171. </dp:text>
  172. </dp:section>
  173. <dp:section>
  174. <dp:label width="15%"><xts:string id="IDS_PROP_ADVANCED_REPOSITORY_RULES_CONNECT_LABEL"/></dp:label>
  175. <dp:text>
  176. <xsl:value-of select="/root/cm:queryResponse/child::node()/cm:specification//*[local-name()='dataSource']/*[local-name()='connection']"/>
  177. </dp:text>
  178. </dp:section>
  179. <dp:section>
  180. <dp:label width="15%"><xts:string id="IDS_PROP_SIGNON_CREDENTIALS"/></dp:label>
  181. <dp:text>
  182. <xsl:value-of select="/root/cm:queryResponse/child::node()/cm:specification//*[local-name()='dataSource']/*[local-name()='signon']"/>
  183. </dp:text>
  184. </dp:section>
  185. </dp:list>
  186. </lyt:section>
  187. </lyt:layout>
  188. </td>
  189. </tr>
  190. </table>
  191. <dp:footer>
  192. <xsl:choose>
  193. <xsl:when test="$showOKCancel">
  194. <df:button df:id="IDS_OK" utml:validate="true" df:style="submit"/>
  195. <xsl:choose>
  196. <xsl:when test="key('env-param', 'ps_nav_stack') and not(key('env-param', 'ps_nav_stack') = '') ">
  197. <df:button df:id="IDS_CANCEL" df:style="stack-down" onclick="{$dc-confirm-cancel}"/>
  198. </xsl:when>
  199. <xsl:otherwise>
  200. <df:button df:id="IDS_CANCEL" df:style="back-url" onclick="{$dc-confirm-cancel}"/>
  201. </xsl:otherwise>
  202. </xsl:choose>
  203. </xsl:when>
  204. <xsl:otherwise>
  205. <df:button df:id="IDS_CLOSE" df:style="back-url"/>
  206. </xsl:otherwise>
  207. </xsl:choose>
  208. </dp:footer>
  209. </utml:form>
  210. </dp:page>
  211. </xsl:template>
  212. </xsl:stylesheet>
  213. </xts:block>
  214. <!--
  215. ===============================================================================================
  216. debug - display debug information
  217. ===============================================================================================
  218. -->
  219. <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">
  220. <!-- get the debug logic sheet -->
  221. <xts:logicsheet path="logicsheets/debuglogic.xslt"/>
  222. <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">
  223. <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no"/>
  224. <xsl:template match="/">
  225. <dbg:dumpxml select="/root"/>
  226. </xsl:template>
  227. </xsl:stylesheet>
  228. </xts:block>
  229. </xts:morphlet>