properties_metrics_export_titan.xts 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338
  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">
  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" >
  21. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  22. <xsl:template match="/">
  23. <xts:sequence>
  24. <xts:append>
  25. <tabs>
  26. <object class="metricsExportTask">
  27. <tab name="metrics_export" page="properties_metrics_export.xts"><xts:string id="IDS_PROP_TAB_METRICS_EXPORT"/></tab>
  28. </object>
  29. </tabs>
  30. </xts:append>
  31. </xts:sequence>
  32. </xsl:template>
  33. </xsl:stylesheet>
  34. </xts:block>
  35. <!--
  36. ===============================================================================================
  37. getContent - get our data from Content Manager
  38. ===============================================================================================
  39. -->
  40. <xts:block id="getContent" processor="XSLT" type="exec" dependency="formlogic_init">
  41. <xts:logicsheet path="logicsheets/presentation/dialog/templates.xsl"/>
  42. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  43. <xsl:stylesheet version="1.0"
  44. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  45. xmlns:dt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/templates/"
  46. xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/">
  47. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  48. <xsl:template match="/">
  49. <xts:sequence>
  50. <xts:append>
  51. <xts:transform src="transforms/CM/post-process.xslt" processor="XSLT">
  52. <send:request provider="cm">
  53. <xts:transform src="transforms/CM/pre-process.xslt" processor="XSLT">
  54. <cm:query xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
  55. <cm:search>
  56. <xsl:value-of select="/root/env/param[@name='m_obj']"/>
  57. </cm:search>
  58. <cm:properties>
  59. <cm:property name="defaultName"/>
  60. <cm:property name="owner"/>
  61. <cm:property name="permissions"/>
  62. <cm:property name="runAsOwner"/>
  63. <cm:property name="storeID"/>
  64. <cm:property name="metadataModelPackage"/>
  65. </cm:properties>
  66. <cm:options schemaInfo="true">
  67. <cm:refProps>
  68. <cm:refProp refPropName="owner">
  69. <cm:properties>
  70. <cm:property name="searchPath"/>
  71. <cm:property name="defaultName"/>
  72. <cm:property name="email"/>
  73. </cm:properties>
  74. </cm:refProp>
  75. </cm:refProps>
  76. </cm:options>
  77. </cm:query>
  78. </xts:transform>
  79. </send:request>
  80. </xts:transform>
  81. </xts:append>
  82. </xts:sequence>
  83. </xsl:template>
  84. </xsl:stylesheet>
  85. </xts:block>
  86. <!--
  87. ===============================================================================================
  88. Produce default options under /root/env, but only on first visit to the page
  89. ===============================================================================================
  90. -->
  91. <xts:block id="generateDefaultOptions" processor="XSLT" type="exec" dependency="getContent" condition=".[not(/root/env/param[@name = 'visited_metrics_import_property'])]" mandatory="false">
  92. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  93. xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
  94. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  95. <xsl:variable name="the-object" select="/root/cm:queryResponse/*[1]"/>
  96. <xsl:template match="/">
  97. <xts:sequence>
  98. <xts:append select="/root/env">
  99. <xsl:if test="$the-object/cm:runAsOwner!=''">
  100. <param name="m_re_runAsOwner">
  101. <xsl:value-of select="$the-object/cm:runAsOwner"/>
  102. </param>
  103. </xsl:if>
  104. </xts:append>
  105. </xts:sequence>
  106. </xsl:template>
  107. </xsl:stylesheet>
  108. </xts:block>
  109. <!--
  110. ===============================================================================================
  111. renderPage - render the page
  112. ===============================================================================================
  113. -->
  114. <xts:block id="renderPage" mode="output" processor="XSLT" type="exec" mimeType="text/html" dependency="generateDefaultOptions getTabs">
  115. <xts:logicsheet path="logicsheets/portal.xsl"/>
  116. <xts:logicsheet path="logicsheets/presentation/dialog/framework.xsl"/>
  117. <xts:logicsheet path="logicsheets/presentation/dialog/presentation.xsl"/>
  118. <xts:logicsheet path="logicsheets/presentation/layout.xsl"/>
  119. <xts:logicsheet path="logicsheets/presentation/controls/framework.xsl"/>
  120. <xts:logicsheet path="logicsheets/presentation/controls/presentation.xsl"/>
  121. <xts:logicsheet path="logicsheets/presentation/dialog/confirm.xslt"/>
  122. <xts:logicsheet path="logicsheets/formlogic.xslt"/>
  123. <xts:logicsheet path="logicsheets/validation.xslt"/> <xts:logicsheet path="logicsheets/presentation/touch_up.xslt"/>
  124. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  125. xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
  126. xmlns:dp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/presentation/"
  127. xmlns:df="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/framework/"
  128. xmlns:dc="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/confirm/1/"
  129. xmlns:lyt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/layout/"
  130. xmlns:cf="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/framework/"
  131. xmlns:cp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/presentation/"
  132. xmlns:utml="http://developer.cognos.com/schemas/xts/logicsheet/xslt/formlogic/"
  133. xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
  134. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt">
  135. <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no" omit-xml-declaration="yes"/>
  136. <!-- current file name -->
  137. <xsl:variable name="mname" select="'properties_metrics_export.xts'"/>
  138. <xsl:variable name="the-object" select="/root/cm:queryResponse/*[1]"/>
  139. <xsl:variable name="the-class" select="/root/cm:queryResponse/*[1]/cm:objectClass"/>
  140. <xsl:variable name="has_write_permission" select="contains(concat(' ', /root/cm:queryResponse/*[1]/cm:permissions, ' '), ' write ')"/>
  141. <xsl:variable name="has_policy_permission" select="contains(concat(' ', /root/cm:queryResponse/*[1]/cm:permissions, ' '), ' setPolicy ')"/>
  142. <xsl:variable name="showOKCancel" select="$has_write_permission or $has_policy_permission"/>
  143. <pf:variables/>
  144. <xsl:template match="/">
  145. <xsl:variable name="browserTitle"><xts:string id="IDS_PROPERTIES_TITLE"><xts:param name="objectName"><span lang="{$contentLocale}"><xsl:value-of select="key('env-param', 'm_name')"/></span></xts:param></xts:string></xsl:variable>
  146. <xsl:text disable-output-escaping='yes'>&lt;!DOCTYPE html></xsl:text><dp:page longTitle="$browserTitle">
  147. <dp:meta>
  148. <pf:meta/> <!-- Standard meta tags -->
  149. </dp:meta>
  150. <!-- get passed in parameters -->
  151. <dp:script>
  152. <pf:help context="HID_PROPERTIES"/> <!-- Help system -->
  153. <xsl:if test="$has_write_permission = true()">
  154. <dc:confirm-cancel/>
  155. </xsl:if>
  156. <script language="JavaScript">
  157. function goToWizard()
  158. {
  159. var form=document.pform;
  160. form.b_action.value='mms.run';
  161. form.pid.value='export_summary';
  162. form.exportid.value='<xsl:value-of select="$the-object/cm:storeID"/>';
  163. form.backID.value='<xsl:value-of select="/root/env/param[@name='m']"/>';
  164. form.submit();
  165. }
  166. </script>
  167. </dp:script>
  168. <utml:form name="pform" method="post" action="{$gateway}">
  169. <input type="hidden" name="ui.backURL" value="{/root/env/param[@name='backURL']}"/>
  170. <utml:read-only>
  171. <xsl:choose>
  172. <xsl:when test="$has_write_permission = true()">
  173. <xsl:text>false</xsl:text>
  174. </xsl:when>
  175. <xsl:otherwise>
  176. <xsl:text>true</xsl:text>
  177. </xsl:otherwise>
  178. </xsl:choose>
  179. </utml:read-only>
  180. <utml:input type="hidden" name="ps_nav_op" value="" utml:update="false"/>
  181. <utml:input type="hidden" name="pid" utml:update="false"/>
  182. <utml:input type="hidden" name="exportid" utml:update="false"/>
  183. <utml:input type="hidden" name="backID" utml:update="false"/>
  184. <utml:input type="hidden" name="ifrmcmd" value="save" utml:update="false"/>
  185. <utml:input type="hidden" value="true" name="m_validate" utml:update="false"/>
  186. <utml:input type="hidden" value="true" name="visited_metrics_export_property" utml:update="false"/>
  187. <utml:input type="hidden" name="m_p_metadataModelPackage" utml:update="false">
  188. <utml:value><xsl:value-of select="$the-object/cm:metadataModelPackage/*/*[local-name()='searchPath']"/></utml:value>
  189. </utml:input>
  190. <!-- dialog header -->
  191. <dp:header useBackURL="not($showOKCancel)">
  192. <!-- header titles-->
  193. <dp:title><xsl:copy-of select="$browserTitle"/></dp:title>
  194. </dp:header>
  195. <!-- property tabs -->
  196. <df:propertiesTabsTitanPagelet select="metrics_export">
  197. <df:hasSetPolicy><xsl:value-of select="$has_policy_permission"/></df:hasSetPolicy>
  198. </df:propertiesTabsTitanPagelet>
  199. <!-- description tabs -->
  200. <dp:description>
  201. <xts:string id="IDS_PROP_METRICS_EXPORT_INTRO"/>
  202. </dp:description>
  203. <lyt:layout style="2">
  204. <lyt:section>
  205. <table cellspacing="0" border="0" cellpadding="1">
  206. <tr>
  207. <td nowrap="nowrap" class="formLabel">
  208. <xts:string id="IDS_PROP_METRICS_EXPORT_OPTIONS"/>
  209. </td>
  210. </tr>
  211. </table>
  212. <table cellspacing="0" border="0" cellpadding="1">
  213. <tr>
  214. <td nowrap="nowrap" align="center">
  215. <img border="0" src="{concat($image_root, 'checkmark.gif')}"/>
  216. </td>
  217. <td nowrap="nowrap" class="formText">
  218. <xts:string id="IDS_PROP_METRICS_EXPORT"/>
  219. </td>
  220. </tr>
  221. </table>
  222. </lyt:section>
  223. <lyt:section>
  224. <dp:choice>
  225. <dp:section1>
  226. <img height="30" width="30">
  227. <xsl:attribute name="alt"><xts:string id="IDS_ICON_TIP"/></xsl:attribute>
  228. <xsl:attribute name="src"><xsl:value-of select="$skin_images"/>tip_template.gif</xsl:attribute>
  229. </img>
  230. </dp:section1>
  231. <dp:section2>
  232. <xsl:variable name="link">
  233. <a href="#" onclick="JavaScript:goToWizard()"><xsl:text><xts:string id="IDS_ACT_UPDATE_METRICS_EXPORT"/></xsl:text></a>
  234. </xsl:variable>
  235. <xts:string id="IDS_PROP_METRICS_EXPORT_UPDATE">
  236. <xts:param name="link"><xsl:copy-of select="$link"/></xts:param>
  237. </xts:string>
  238. </dp:section2>
  239. </dp:choice>
  240. </lyt:section>
  241. </lyt:layout>
  242. <lyt:layout style="1">
  243. <lyt:section>
  244. <!-- run as owner -->
  245. <dp:choice title="IDS_OTHERRUN_RUN_AS_OWNER">
  246. <dp:section1>
  247. <utml:input type="checkbox" name="m_re_runAsOwner" value="true" utml:track="true"/>
  248. </dp:section1>
  249. <dp:section2>
  250. <dp:text>
  251. <xsl:choose>
  252. <xsl:when test="(key('env-param', 'm_defaultName')) and not(key('env-param', 'm_defaultName') = '')">
  253. <xsl:value-of select="key('env-param', 'm_defaultName')"/>
  254. </xsl:when>
  255. <xsl:when test="$the-object/cm:owner/*/cm:defaultName">
  256. <xsl:value-of select="$the-object/cm:owner/*/cm:defaultName"/>
  257. </xsl:when>
  258. <xsl:when test="$the-object/cm:owner/*/cm:email">
  259. <xsl:value-of select="$the-object/cm:owner/*/cm:email"/>
  260. </xsl:when>
  261. <xsl:when test="$the-object/cm:owner/cm:nil">
  262. <xts:string id="IDS_PROP_UNKNOWN_OWNER"/>
  263. </xsl:when>
  264. <xsl:otherwise>
  265. <xts:string id="IDS_NONE"/>
  266. </xsl:otherwise>
  267. </xsl:choose>
  268. </dp:text>
  269. </dp:section2>
  270. </dp:choice>
  271. </lyt:section>
  272. </lyt:layout>
  273. <dp:footer>
  274. <xsl:choose>
  275. <xsl:when test="$showOKCancel">
  276. <df:button df:id="IDS_OK" utml:validate="true" df:style="submit" df:nav_op="stack-down"/>
  277. <xsl:choose>
  278. <xsl:when test="key('env-param', 'ps_nav_stack') and not(key('env-param', 'ps_nav_stack') = '') ">
  279. <df:button df:id="IDS_CANCEL" df:style="stack-down" onclick="{$dc-confirm-cancel}"/>
  280. </xsl:when>
  281. <xsl:otherwise>
  282. <df:button df:id="IDS_CANCEL" df:style="back-url" onclick="{$dc-confirm-cancel}"/>
  283. </xsl:otherwise>
  284. </xsl:choose>
  285. </xsl:when>
  286. <xsl:otherwise>
  287. <df:button df:id="IDS_CLOSE" df:style="back-url"/>
  288. </xsl:otherwise>
  289. </xsl:choose>
  290. </dp:footer>
  291. </utml:form>
  292. </dp:page>
  293. </xsl:template>
  294. </xsl:stylesheet>
  295. </xts:block>
  296. <!--
  297. ===============================================================================================
  298. debug - display debug information
  299. ===============================================================================================
  300. -->
  301. <xts:block id="debug" dependency="renderPage" condition=".[/root/session/param[@name='debug']='1']" type="exec" mode="output" processor="XSLT" mandatory="false" mimeType="text/html">
  302. <!-- get the debug logic sheet -->
  303. <xts:logicsheet path="logicsheets/debuglogic.xslt"/>
  304. <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">
  305. <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no" omit-xml-declaration="yes"/>
  306. <xsl:template match="/">
  307. <dbg:dumpxml select="/root"/>
  308. </xsl:template>
  309. </xsl:stylesheet>
  310. </xts:block>
  311. </xts:morphlet>