tools_cs_administration.xts 41 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796
  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, 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/" messageBase="messages/portal.xml, messages/portalRL.xml" requiredCapability="canUseContentStoreTool">
  13. <!--
  14. ===============================================================================================
  15. formlogic_init
  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. <!--
  20. ===============================================================================================
  21. If external backURLs are not allowed then verify the backURL is in the crn domain and replace it if it isn't
  22. ===============================================================================================
  23. -->
  24. <xts:block id="secureBackURL" path="portal/secureBackURL.xml" processor="XSLT" type="exec" condition=".[/root/system/param[@name = 'allowExternalURLs'] = 'false']" mandatory="false"/>
  25. <!--
  26. ===============================================================================================
  27. Saves cut/copied entries in a user session - Only executes after a cut or a copy operation.
  28. ===============================================================================================
  29. -->
  30. <xts:block id="groupEdit" path="portal/set_clipboard.xml" processor="XSLT" type="exec" mandatory="false" condition=".[/root/env/param[@name='editentries']]">
  31. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  32. <xts:logicsheet path="logicsheets/portal.xsl"/>
  33. </xts:block>
  34. <!-- ======================================================== -->
  35. <!-- Session Management -->
  36. <!-- ======================================================== -->
  37. <!-- Reads session-sensitive info from CM -->
  38. <xts:block processor="XSLT" type="exec" mandatory="false"
  39. id="refreshSession"
  40. path="portal/cc/read_session.xml"
  41. condition=".[
  42. string(/root/cookies/cookie[@name = 'cc_session']) = ''
  43. or /root/env/param[@name='m_reload']
  44. or /root/env/param[@name='m_root'] ]">
  45. <xts:logicsheet path="logicsheets/cm-logic.xsl"/>
  46. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  47. </xts:block>
  48. <!-- Update the <session> element for this request. -->
  49. <xts:block id="buildSession" path="portal/session.xml" dependency="refreshSession secureBackURL" processor="XSLT" type="exec"
  50. condition=".[
  51. /root/newSession
  52. or /root/env/param[@name='ui']
  53. or /root/env/param[@name='d']
  54. or /root/env/param[starts-with(@name,'m_s_')]
  55. or /root/env/param[@name = 'resetSort'] ]"
  56. mandatory="false"/>
  57. <!-- Save changes to the state info in a cookie -->
  58. <xts:block mode="interpret" processor="XSLT" type="exec"
  59. id="setSession"
  60. path="portal/set_session.xml"
  61. dependency="buildSession getContent"
  62. condition=".[/root/updateSession]"
  63. mandatory="false"/>
  64. <!--
  65. ======================================
  66. Generat the search expression
  67. ======================================
  68. -->
  69. <xts:block id="generateSearchExp" processor="XSLT" type="exec" dependency="buildSession" condition=".[/root/env/param[@name='search']]" mandatory="false">
  70. <xts:logicsheet path="logicsheets/searchlogic.xslt"/>
  71. <xts:logicsheet path="logicsheets/cm-logic.xsl"/>
  72. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  73. xmlns:search="http://developer.cognos.com/schemas/xts/logicsheets/xslt/searchlogic/"
  74. xmlns:cml="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/cml/1/"
  75. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  76. exclude-result-prefixes="search cml xtsext">
  77. <xsl:output method="xml" version="1.0" encoding="UTF-8" omit-xml-declaration="yes" indent="no"/>
  78. <cml:object-predicates/>
  79. <xsl:template match="root">
  80. <xsl:variable name="path">
  81. <xsl:choose>
  82. <xsl:when test=" /root/env/param[@name='m_path'] != '' ">
  83. <xsl:value-of select="/root/env/param[@name='m_path']"/>
  84. </xsl:when>
  85. <xsl:otherwise>
  86. <xsl:value-of select="'/adminFolder'"/>
  87. </xsl:otherwise>
  88. </xsl:choose>
  89. </xsl:variable>
  90. <xts:sequence>
  91. <search:gen-search-exp defaultRoot="adminFolder">
  92. <search:defaultTypes>
  93. <search:defaultType>adminFolder</search:defaultType>
  94. <search:defaultType>contentTask</search:defaultType>
  95. <search:defaultType>indexUpdateTask</search:defaultType>
  96. <search:defaultType>importDeployment</search:defaultType>
  97. <search:defaultType>exportDeployment</search:defaultType>
  98. <search:defaultType>jobDefinition</search:defaultType>
  99. <search:defaultType>planningMacroTask</search:defaultType>
  100. <search:defaultType>queryServiceTask</search:defaultType>
  101. </search:defaultTypes>
  102. </search:gen-search-exp>
  103. </xts:sequence>
  104. </xsl:template>
  105. </xsl:stylesheet>
  106. </xts:block>
  107. <!--
  108. =============================================
  109. Query Content Manager. Get the contents.
  110. =============================================
  111. -->
  112. <xts:block id="getContent" processor="XSLT" type="exec" dependency="formlogic_init buildSession generateSearchExp">
  113. <xts:logicsheet path="logicsheets/tenantlogic.xsl"/>
  114. <xts:logicsheet path="logicsheets/cm-logic.xsl"/>
  115. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  116. <xts:logicsheet path="logicsheets/portal.xsl"/>
  117. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  118. xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
  119. xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
  120. xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/"
  121. xmlns:cml="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/cml/1/"
  122. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  123. exclude-result-prefixes="xsl cm pf send cml xtsext">
  124. <xsl:output method="xml" version="1.0" encoding="UTF-8" omit-xml-declaration="yes" indent="no"/>
  125. <pf:variables/>
  126. <cml:object-predicates/>
  127. <xsl:template match="root">
  128. <xsl:variable name="userPrefs" select="/root/session/param"/>
  129. <xsl:variable name="userPrefsDefault" select="/root/system/param[@name='defaultPortalPreferences']"/>
  130. <!-- How many objects to retrieve from CM in a single query-->
  131. <xsl:variable name="maxObjects">
  132. <xsl:choose>
  133. <xsl:when test="string(/root/env/param[@name = 'm_pagertocsadmin']) !='' and string(/root/env/param[@name = 'm_pagerfromcsadmin']) !=''">
  134. <xsl:value-of select="(/root/env/param[@name = 'm_pagertocsadmin'] - /root/env/param[@name = 'm_pagerfromcsadmin']) + 1"/>
  135. </xsl:when>
  136. <xsl:when test="$userPrefs[@name='linesPerPage']!=''">
  137. <xsl:value-of select="$userPrefs[@name='linesPerPage']"/>
  138. </xsl:when>
  139. <xsl:otherwise>
  140. <xsl:value-of select="$userPrefsDefault/pref[@name='lines']"/>
  141. </xsl:otherwise>
  142. </xsl:choose>
  143. </xsl:variable>
  144. <xsl:variable name="skipObjects">
  145. <xsl:choose>
  146. <xsl:when test="/root/env/param[@name = 'm_pagerfromcsadmin'] and /root/env/param[@name = 'm_pagerfromcsadmin']!=''">
  147. <xsl:value-of select="(/root/env/param[@name = 'm_pagerfromcsadmin'])-1"/>
  148. </xsl:when>
  149. <xsl:when test="/root/env/param[@name='m_csadminsection']!=''">
  150. <xsl:choose>
  151. <xsl:when test="/root/env/param[@name='m_csadminsection']!='-1'">
  152. <xsl:value-of select="((/root/env/param[@name='m_csadminsection']) -1)"/>
  153. </xsl:when>
  154. <xsl:otherwise>
  155. <xsl:value-of select="($maxObjects) * -1"/>
  156. </xsl:otherwise>
  157. </xsl:choose>
  158. </xsl:when>
  159. <xsl:otherwise>0</xsl:otherwise>
  160. </xsl:choose>
  161. </xsl:variable>
  162. <!-- Get the current adminFolder path from m_path env parameter. If m_path does not exist or is blank then set the path to the root adminFolder. -->
  163. <xsl:variable name="path">
  164. <xsl:choose>
  165. <xsl:when test="/root/env/param[@name='m_path']!=''">
  166. <xsl:value-of select="/root/env/param[@name='m_path']"/>
  167. </xsl:when>
  168. <xsl:otherwise>
  169. <xsl:text>/adminFolder</xsl:text>
  170. </xsl:otherwise>
  171. </xsl:choose>
  172. </xsl:variable>
  173. <xsl:variable name="m_sort" select="/root/session/param[@name='s_cs']"/>
  174. <!-- Query the CM and append the response to the /root/content -->
  175. <xts:sequence>
  176. <xts:append>
  177. <content>
  178. <xts:transform src="transforms/CM/post-process.xslt" processor="XSLT">
  179. <send:request provider="cm">
  180. <xts:transform src="transforms/CM/pre-process.xslt" processor="XSLT">
  181. <cm:query>
  182. <cm:requests>
  183. <!-- Get the current adminFolder properties -->
  184. <cm:query>
  185. <cm:search>
  186. <xsl:value-of select="$path"/>
  187. </cm:search>
  188. <cm:properties>
  189. <cm:property name="defaultName"/>
  190. <cm:property name="ancestors"/>
  191. <cm:property name="searchPath"/>
  192. <cm:property name="storeID"/>
  193. <cm:property name="objectClass"/>
  194. <cm:property name="disabled"/>
  195. <cm:property name="permissions"/>
  196. <cm:property name="tenantID"/>
  197. </cm:properties>
  198. </cm:query>
  199. <!-- Get the properties of ALL of the objects under the current adminFolder regardless of object type. -->
  200. <xsl:if test="/root/search/expression or not(/root/search)">
  201. <cm:query>
  202. <cm:search>
  203. <xsl:choose>
  204. <xsl:when test="/root/search/expression">
  205. <xsl:value-of select="concat(/root/search/expression, $visibility-predicate)"/>
  206. </xsl:when>
  207. <xsl:otherwise>
  208. <xsl:value-of select="concat(string($path), '/*', $visibility-predicate)"/>
  209. </xsl:otherwise>
  210. </xsl:choose>
  211. </cm:search>
  212. <cm:properties>
  213. <cml:prop-base/>
  214. <cm:property name="hasChildren"/>
  215. <cm:property name="ancestors"/>
  216. <cm:property name="displaySequence"/>
  217. <cm:property name="position"/>
  218. </cm:properties>
  219. <cm:options maxObjects="{($maxObjects+1)}" skipObjects="{$skipObjects}"/>
  220. <cm:sortBy>
  221. <cm:sort name="usage" order="ascending"/>
  222. <xsl:choose>
  223. <xsl:when test="$m_sort = 'da'">
  224. <cm:sort name="modificationTime" order="ascending"/>
  225. </xsl:when>
  226. <xsl:when test="$m_sort = 'dd'">
  227. <cm:sort name="modificationTime" order="descending"/>
  228. </xsl:when>
  229. <xsl:when test="$m_sort = 'na'">
  230. <cm:sort name="defaultName" order="ascending"/>
  231. </xsl:when>
  232. <xsl:when test="$m_sort = 'nd'">
  233. <cm:sort name="defaultName" order="descending"/>
  234. </xsl:when>
  235. <xsl:otherwise>
  236. <cm:sort name="displaySequence" order="ascending"/>
  237. </xsl:otherwise>
  238. </xsl:choose>
  239. </cm:sortBy>
  240. </cm:query>
  241. </xsl:if>
  242. </cm:requests>
  243. </cm:query>
  244. </xts:transform>
  245. </send:request>
  246. </xts:transform>
  247. </content>
  248. </xts:append>
  249. </xts:sequence>
  250. <!-- Every time the page is reloaded, delete the following pager parameters from the /root/env. This is required for the pager to work properly. -->
  251. <xts:sequence>
  252. <xts:delete select="/root/env/param[@name='pagerfromcsadmin']"/>
  253. <xts:delete select="/root/env/param[@name='pagertocsadmin']"/>
  254. <xts:delete select="/root/env/param[@name='pagerfrom_dcsadmin']"/>
  255. <xts:delete select="/root/env/param[@name='pagerto_dcsadmin']"/>
  256. </xts:sequence>
  257. <!-- if there is no m_path parameter under /root/env then append it to /root/env and set its value to the administrattion root folder /adminFolder -->
  258. <xts:sequence>
  259. <xsl:if test="not(/root/env/param[@name = 'm_path']) or /root/env/param[@name = 'm_path'] = '' ">
  260. <xts:append select="/root/env">
  261. <param name="m_path">/adminFolder</param>
  262. </xts:append>
  263. </xsl:if>
  264. </xts:sequence>
  265. <xts:sequence>
  266. <xts:append>
  267. <installedComponents>
  268. <xts:function name="getConfiguration">
  269. <xts:param name="installedComponents"/>
  270. </xts:function>
  271. </installedComponents>
  272. </xts:append>
  273. </xts:sequence>
  274. </xsl:template>
  275. </xsl:stylesheet>
  276. </xts:block>
  277. <!-- Merge the tenantNames into the response -->
  278. <xts:block processor="XSLT" type="exec" mandatory="false"
  279. path="/portal/tenancy/mergeTenantNames.xslt"
  280. id="mergeTenantNames"
  281. dependency="getContent"
  282. condition=".[/root/session/param[@name='e_showTenantInfo']='true']">
  283. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  284. </xts:block>
  285. <!--
  286. ===============================================================================================
  287. Load class names map
  288. ===============================================================================================
  289. -->
  290. <xts:block id="getClassNames" type="exec" mode="input" processor="XML" path="/portal/uiExtensions.xml">
  291. <xts:logicsheet path="/logicsheets/uiobjects/uiobjects_names.xslt"/>
  292. </xts:block>
  293. <!--
  294. ===============================================================================================
  295. head - This block generates the HTML <head> tag.
  296. ===============================================================================================
  297. -->
  298. <xts:block id="head" type="exec" mode="output" processor="XSLT" dependency="getContent" mimeType="text/html" contentId="head" partId="1" xmlns:tool="http://developer.cognos.com/schemas/xts/logicsheets/xslt/toollogic/" xmlns:pf="http://developer.cognos.com/schemas/xts/pf" xmlns:mt="http://developer.cognos.com/schemas/xts/logicsheets/presentation/main/mt" xmlns:mf="http://developer.cognos.com/schemas/xts/logicsheets/presentation/main/mf" xmlns:cf="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/framework/" xmlns:cp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/presentation/">
  299. <xts:logicsheet path="logicsheets/toollogic2.xslt"/>
  300. <xts:logicsheet path="logicsheets/portal.xsl"/>
  301. <xts:logicsheet path="logicsheets/presentation/main/framework.xsl"/>
  302. <xts:logicsheet path="logicsheets/presentation/main/presentation.xsl"/>
  303. <xts:logicsheet path="logicsheets/validation.xslt"/> <xts:logicsheet path="logicsheets/presentation/touch_up.xslt"/>
  304. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" exclude-result-prefixes="cm tool pf mt mf cf cp xsl xts xtsext">
  305. <xsl:output method="html" encoding="utf-8" indent="no"/>
  306. <!-- current file name -->
  307. <xsl:variable name="mname" select="'legacy_tools/tools_cs_administration.xts'"/>
  308. <tool:variables formName="frmEntryAdmin" stateParams="m_path m_csadminsection m_pagerfromcsadmin m_pagertocsadmin"/>
  309. <xsl:template match="/">
  310. <tool:head title="IDS_TOOLS_CSADMIN" helpid="HID_MAINT_CONTENTSTORE"/>
  311. </xsl:template>
  312. </xsl:stylesheet>
  313. </xts:block>
  314. <!--
  315. ===============================================================================================
  316. banner - This block generates the portal banner at the top of the tool.
  317. ===============================================================================================
  318. -->
  319. <xts:block id="banner" type="exec" mode="output" processor="XSLT" dependency="getContent" mimeType="text/html" contentId="banner" partId="1">
  320. <xts:logicsheet path="logicsheets/toollogic2.xslt"/>
  321. <!-- Cognos Central main behaviour logic -->
  322. <xts:logicsheet path="logicsheets/portal.xsl"/>
  323. <xts:logicsheet path="logicsheets/presentation/main/framework.xsl"/>
  324. <xts:logicsheet path="logicsheets/presentation/main/presentation.xsl"/>
  325. <!-- Cognos Central controls logic -->
  326. <xts:logicsheet path="logicsheets/presentation/controls/framework.xsl"/>
  327. <xts:logicsheet path="logicsheets/presentation/controls/presentation.xsl"/>
  328. <xts:logicsheet path="logicsheets/validation.xslt"/>
  329. <xts:logicsheet path="logicsheets/presentation/touch_up.xslt"/>
  330. <xsl:stylesheet version="1.0"
  331. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  332. xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
  333. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  334. xmlns:tool="http://developer.cognos.com/schemas/xts/logicsheets/xslt/toollogic/"
  335. xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
  336. xmlns:mf="http://developer.cognos.com/schemas/xts/logicsheets/presentation/main/mf"
  337. xmlns:mt="http://developer.cognos.com/schemas/xts/logicsheets/presentation/main/mt"
  338. xmlns:cf="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/framework/"
  339. xmlns:cp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/presentation/"
  340. xmlns:xts="http://developer.cognos.com/schemas/xts/"
  341. exclude-result-prefixes="tool pf mf mt cf cp cm xtsext xts">
  342. <xsl:output method="html" encoding="utf-8" indent="no"/>
  343. <!-- current file name -->
  344. <xsl:variable name="mname" select="'legacy_tools/tools_cs_administration.xts'"/>
  345. <xsl:variable name="the-object" select="/root/content/cm:queryResponse/cm:queryReply[1]/*"/>
  346. <xsl:variable name="userCanNotTraverse" select="not(contains(/root/content/cm:queryResponse/cm:queryReply[1]/*/cm:permissions, 'traverse'))"/>
  347. <xsl:variable name="userCanNotWrite" select="not(contains(/root/content/cm:queryResponse/cm:queryReply[1]/*/cm:permissions, 'write'))"/>
  348. <xsl:variable name="disableToolIcons">
  349. <xsl:choose>
  350. <xsl:when test="/root/env/param[@name='search'] and (/root/search/emptySearchExpression or not(/root/content/cm:queryResponse/cm:queryReply[2]/*) or not(string(/root/search)))">true</xsl:when>
  351. <xsl:otherwise>false</xsl:otherwise>
  352. </xsl:choose>
  353. </xsl:variable>
  354. <tool:variables formName="frmEntryAdmin" stateParams="m_path m_csadminsection m_pagerfromcsadmin m_pagertocsadmin"/>
  355. <xsl:variable name="showMigration" select="count(/root/installedComponents/configuration/property/component[string(.)='migrationService']) > 0 and count(/root/installedComponents/configuration/property/component[string(.)='powerPlayService']) > 0 and $userCanUseUGRT and $userCanUseDST"/>
  356. <cp:flyoutControl/>
  357. <xsl:variable name="searchIsEnabled">
  358. <xsl:choose>
  359. <xsl:when test="key('env-param', 'search')">true</xsl:when>
  360. <xsl:otherwise>false</xsl:otherwise>
  361. </xsl:choose>
  362. </xsl:variable>
  363. <xsl:template match="/">
  364. <tool:banner title="IDS_TOOLS_CSADMIN" hideHeaders="true" id="lbl_csAdmin_region">
  365. <tool:path>
  366. <cf:do-the-path-link>
  367. <cf:param name="familytree">$the-object/cm:ancestors</cf:param>
  368. <cf:param name="familymember">$the-object/cm:defaultName</cf:param>
  369. <cf:param name="lastIsLink"><xsl:value-of select="$searchIsEnabled"/></cf:param>
  370. <cf:param name="anchorpath">
  371. <xsl:choose>
  372. <xsl:when test="cm:title">
  373. <a>
  374. <xsl:attribute name="href"><xsl:value-of select="concat($gateway, '?b_action=xts.run')"/><xsl:value-of select="concat('&amp;m=', key('env-param', 'm'))"/><xsl:value-of select="concat('&amp;m_path=', xtsext:protect(xtsext:urlencode(string(cm:searchPath)),'url','searchPath','getdata'))"/><xsl:if test="key('env-param', 'backURL')"><xsl:value-of select="concat('&amp;backURL=', xtsext:protect(xtsext:urlencode(string(key('env-param', 'backURL'))),'url','url','getdata'))"/></xsl:if></xsl:attribute>
  375. <xsl:value-of select="cm:title"/>
  376. </a>
  377. </xsl:when>
  378. <xsl:otherwise>
  379. <a>
  380. <xsl:attribute name="href"><xsl:value-of select="concat($gateway, '?b_action=xts.run')"/><xsl:value-of select="concat('&amp;m=', key('env-param', 'm'))"/><xsl:value-of select="concat('&amp;m_path=', xtsext:protect(xtsext:urlencode(string($the-object/cm:searchPath)),'url','searchPath','getdata'))"/><xsl:if test="key('env-param', 'backURL')"><xsl:value-of select="concat('&amp;backURL=', xtsext:protect(xtsext:urlencode(string(key('env-param', 'backURL'))),'url','url','getdata'))"/></xsl:if></xsl:attribute>
  381. <xsl:value-of select="$the-object/cm:defaultName"/>
  382. </a>
  383. </xsl:otherwise>
  384. </xsl:choose>
  385. </cf:param>
  386. </cf:do-the-path-link>
  387. <xsl:if test="/root/env/param[@name='search']">
  388. <xsl:text/>&#160;&#160;-&#160;&#160;<span class="bold"><xts:string id="IDS_SEARCH"/></span><xsl:text/>
  389. </xsl:if>
  390. </tool:path>
  391. <tool:actions>
  392. <mt:toolbar cogadmin="true">
  393. <xsl:if test="not(/root/env/param[@name='search'])">
  394. <mt:tool-group cogadmin="true">
  395. <xsl:choose>
  396. <xsl:when test="$userCanNotWrite or $userCanNotTraverse">
  397. <mt:tool cogadmin="true" name="new" disable="true" new-class="adminFolder"/>
  398. <mt:tool cogadmin="true" name="new" disable="true" new-class="jobDefinition"/>
  399. <mt:tool cogadmin="true" name="export" disable="true"/>
  400. <mt:tool cogadmin="true" name="import" disable="true"/>
  401. <xsl:if test="$showMigration">
  402. <mt:tool cogadmin="true" name="new_migration" disable="true"/>
  403. </xsl:if>
  404. <mt:tool cogadmin="true" name="new" disable="true" new-class="contentTask"/>
  405. <xsl:if test="$userCanUseQST">
  406. <mt:tool cogadmin="true" name="new" disable="true" new-class="queryServiceTask"/>
  407. </xsl:if>
  408. </xsl:when>
  409. <xsl:otherwise>
  410. <mt:tool cogadmin="true" name="new" new-class="adminFolder"/>
  411. <mt:tool cogadmin="true" name="new" new-class="jobDefinition"/>
  412. <mt:tool cogadmin="true" name="export"/>
  413. <mt:tool cogadmin="true" name="import"/>
  414. <xsl:if test="$showMigration">
  415. <mt:tool cogadmin="true" name="new_migration"/>
  416. </xsl:if>
  417. <mt:tool cogadmin="true" name="new" new-class="contentTask"/>
  418. <xsl:if test="$userCanUseQST">
  419. <mt:tool cogadmin="true" name="new" new-class="queryServiceTask"/>
  420. </xsl:if>
  421. </xsl:otherwise>
  422. </xsl:choose>
  423. </mt:tool-group>
  424. </xsl:if>
  425. <mt:tool-group cogadmin="true" lastgroup="true">
  426. <xsl:if test="not(/root/env/param[@name='search'])">
  427. <mt:tool cogadmin="true" name="cut"/>
  428. </xsl:if>
  429. <xsl:choose>
  430. <xsl:when test="$disableToolIcons='true'">
  431. <mt:tool cogadmin="true" name="copy" disable="true"/>
  432. </xsl:when>
  433. <xsl:otherwise>
  434. <mt:tool cogadmin="true" name="copy"/>
  435. </xsl:otherwise>
  436. </xsl:choose>
  437. <xsl:if test="not(/root/env/param[@name='search'])">
  438. <mt:tool cogadmin="true" name="paste" mode="tools"/>
  439. </xsl:if>
  440. <xsl:choose>
  441. <xsl:when test="$disableToolIcons='true'">
  442. <mt:tool cogadmin="true" name="delete" mode="tools" disable="true"/>
  443. </xsl:when>
  444. <xsl:otherwise>
  445. <mt:tool cogadmin="true" name="delete" mode="tools"/>
  446. </xsl:otherwise>
  447. </xsl:choose>
  448. </mt:tool-group>
  449. <xsl:if test="not(/root/env/param[@name='search'])">
  450. <mt:tool-group cogadmin="true" lastgroup="true">
  451. <mt:tool cogadmin="true" name="parent_properties">
  452. <tool-name>adminfolder_properties</tool-name>
  453. <request-path>/root/content/cm:queryResponse/cm:queryReply[1]/*</request-path>
  454. </mt:tool>
  455. <xsl:choose>
  456. <xsl:when test="$userCanNotTraverse">
  457. <mt:tool cogadmin="true" name="search" disable="true"/>
  458. </xsl:when>
  459. <xsl:otherwise>
  460. <mt:tool cogadmin="true" name="search"/>
  461. </xsl:otherwise>
  462. </xsl:choose>
  463. </mt:tool-group>
  464. </xsl:if>
  465. </mt:toolbar>
  466. </tool:actions>
  467. </tool:banner>
  468. </xsl:template>
  469. </xsl:stylesheet>
  470. </xts:block>
  471. <!--
  472. ===============================================================================================
  473. body - This block generates the tool contents.
  474. ===============================================================================================
  475. -->
  476. <xts:block id="body" type="exec" mode="output" processor="XSLT" dependency="mergeTenantNames getClassNames" mimeType="text/html" contentId="body" partId="1" xmlns:tool="http://developer.cognos.com/schemas/xts/logicsheets/xslt/toollogic/" xmlns:pf="http://developer.cognos.com/schemas/xts/pf" xmlns:pm="http://developer.cognos.com/schemas/xts/pm" xmlns:mf="http://developer.cognos.com/schemas/xts/logicsheets/presentation/main/mf" xmlns:mt="http://developer.cognos.com/schemas/xts/logicsheets/presentation/main/mt" xmlns:cf="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/framework/" xmlns:cp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/presentation/" xmlns:lyt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/layout/" xmlns:utml="http://developer.cognos.com/schemas/xts/logicsheet/xslt/formlogic/" xmlns:dp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/presentation/">
  477. <xts:logicsheet path="logicsheets/toollogic2.xslt"/>
  478. <xts:logicsheet path="logicsheets/formlogic.xslt"/>
  479. <!-- Cognos Central main behaviour logic -->
  480. <xts:logicsheet path="logicsheets/portal.xsl"/>
  481. <xts:logicsheet path="logicsheets/permissions.xsl"/>
  482. <xts:logicsheet path="logicsheets/presentation/main/framework.xsl"/>
  483. <xts:logicsheet path="logicsheets/presentation/main/presentation.xsl"/>
  484. <xts:logicsheet path="logicsheets/presentation/main/search.xsl"/>
  485. <xts:logicsheet path="logicsheets/presentation/layout.xsl"/>
  486. <!-- Cognos Central controls logic -->
  487. <xts:logicsheet path="logicsheets/presentation/controls/framework.xsl"/>
  488. <xts:logicsheet path="logicsheets/presentation/controls/presentation.xsl"/>
  489. <xts:logicsheet path="logicsheets/presentation/dialog/presentation.xsl"/>
  490. <xts:logicsheet path="logicsheets/validation.xslt"/>
  491. <xts:logicsheet path="logicsheets/presentation/touch_up.xslt"/>
  492. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" exclude-result-prefixes="tool pf pm mf mt cf cp dp cm xtsext xts">
  493. <xsl:output method="html" encoding="utf-8" indent="no"/>
  494. <!-- current file name -->
  495. <xsl:variable name="mname" select="'legacy_tools/tools_cs_administration.xts'"/>
  496. <xsl:variable name="userCanNotTraverse" select="not(contains(/root/content/cm:queryResponse/cm:queryReply[1]/*/cm:permissions, 'traverse'))"/>
  497. <xsl:variable name="showMigration" select="count(/root/installedComponents/configuration/property/component[string(.)='migrationService']) > 0 and count(/root/installedComponents/configuration/property/component[string(.)='powerPlayService']) > 0"/>
  498. <tool:variables formName="frmEntryAdmin" stateParams="m_path m_csadminsection m_pagerfromcsadmin m_pagertocsadmin m_pg_ecsadmin"/>
  499. <cp:flyoutControl/>
  500. <xsl:template match="/">
  501. <xsl:if test="$tool-search='true'">
  502. <xsl:call-template name="search-panel"/>
  503. </xsl:if>
  504. <tool:content formName="frmEntryAdmin" tool="contentadmin">
  505. <lyt:layout style="1" joinSection="yes">
  506. <lyt:section width="100%">
  507. <xsl:choose>
  508. <xsl:when test="$userCanNotTraverse">
  509. <mt:objectNoneFound id="IDS_NO_TRAVERSE_CONTAINER"/>
  510. </xsl:when>
  511. <!-- when we get an empty response for the ancestor then the user used a bookmark and he no longer has access or the directory was deleted -->
  512. <xsl:when test="not(/root/content/cm:queryResponse/cm:queryReply[1]/*)">
  513. <mt:containerNoAccess/>
  514. </xsl:when>
  515. <xsl:when test="/root/search/emptySearchExpression">
  516. <mt:objectNoneFound id="IDS_EMPTY_QUERY"/>
  517. </xsl:when>
  518. <xsl:when test="/root/search/expression or not(/root/search)">
  519. <cf:main-pager-section virtualPage="true" width="100%" name="csadmin">
  520. <cf:param name="target">concat(concat($app,'/'),$mname)</cf:param>
  521. <cf:param name="item-path">root/content/cm:queryResponse/cm:queryReply[2]/*</cf:param>
  522. <cf:param name="lines-per-page">
  523. <xsl:value-of select="key('session-param', 'linesPerPage')"/>
  524. </cf:param>
  525. <cf:param name="rows">
  526. <cp:tableHeader session-name="s_cs">
  527. <cp:columnHeader width="16" toggleName="checkbox_" noLabel="true" form="pfrmEntryAdmin"/>
  528. <cp:columnHeader width="20"/>
  529. <cp:columnHeader width="100%" sort="n" id="columnHeader_name">
  530. <cp:sortHref>
  531. <xsl:value-of select="$back-url"/>&amp;m_s_cs=<xsl:choose>
  532. <xsl:when test="key('session-param', 's_cs') = 'na' ">nd</xsl:when>
  533. <xsl:when test="key('session-param', 's_cs') = 'nd' ">sa</xsl:when>
  534. <xsl:otherwise>na</xsl:otherwise>
  535. </xsl:choose>
  536. </cp:sortHref>
  537. <xsl:if test="/root/search">
  538. <img height="5" width="1" border="0"><xsl:attribute name="src"><xsl:value-of select="$webcontent"/>/images/space.gif</xsl:attribute></img>
  539. <xsl:text/><xts:string id="IDS_PATH_INDICATOR"/><xsl:text>&#160;</xsl:text>
  540. <img height="5" width="1" border="0"><xsl:attribute name="src"><xsl:value-of select="$webcontent"/>/images/space.gif</xsl:attribute></img>
  541. </xsl:if>
  542. <xts:string id="IDS_NAME"/>
  543. </cp:columnHeader>
  544. <cp:columnHeader sort="d" id="columnHeader_modified">
  545. <cp:sortHref>
  546. <xsl:value-of select="$back-url"/>&amp;m_s_cs=<xsl:choose>
  547. <xsl:when test="key('session-param', 's_cs') = 'da' ">dd</xsl:when>
  548. <xsl:when test="key('session-param', 's_cs') = 'dd' ">sa</xsl:when>
  549. <xsl:otherwise>da</xsl:otherwise>
  550. </xsl:choose>
  551. </cp:sortHref>
  552. <xts:string id="IDS_MODIFIED"/>
  553. </cp:columnHeader>
  554. <cp:columnHeader>
  555. <cp:columnCondition><xsl:value-of select="/root/session/param[@name='e_showTenantInfo']='true'"/></cp:columnCondition>
  556. <xts:string id="IDS_OBJ_TENANT"/>
  557. </cp:columnHeader>
  558. <cp:columnHeader>
  559. <xts:string id="IDS_HEADING_ACTIONS"/>
  560. </cp:columnHeader>
  561. </cp:tableHeader>
  562. <cp:tableContent>
  563. <cp:common-render-variables>
  564. <!-- Common variables used in rendering icons, actions .. etc. -->
  565. <pm:permissions/>
  566. <mf:common-entry-varaibles/>
  567. </cp:common-render-variables>
  568. <cp:columnContent>
  569. <input type="checkbox" value="{xtsext:urlencode(string(cm:searchPath))}" name="checkbox_{position()}">
  570. <xsl:attribute name="aria-label"><xts:string id="IDS_SELECTION_FOR_PAGER_ITEM" encode="html"><xts:param name="pagerItemName"><xsl:value-of select="xtsext:htmlencode(cm:defaultName)"/></xts:param></xts:string></xsl:attribute>
  571. <xsl:if test="key('env-param',concat('checkbox_' , position()))">
  572. <xsl:attribute name="checked">checked</xsl:attribute>
  573. </xsl:if>
  574. </input>
  575. </cp:columnContent>
  576. <cp:columnContent>
  577. <xsl:call-template name="gen-icon">
  578. <xsl:with-param name="class" select="$class"/>
  579. <xsl:with-param name="hiddenObject" select="$hiddenObject"/>
  580. </xsl:call-template>
  581. </cp:columnContent>
  582. <cp:columnContent scope="row">
  583. <!-- Logic to figure out if an entry is to be hyperlinked and if it is what the URL should be -->
  584. <xsl:if test="/root/search">
  585. <img width="20" height="16" align="absmiddle" src="{$skin_images}path.gif">
  586. <xsl:attribute name="alt">
  587. <xsl:variable name="object-start-at-path">
  588. <xsl:value-of select="'/adminFolder'"/>
  589. </xsl:variable>
  590. <cf:do-the-path-link>
  591. <cf:param name="familytree">cm:ancestors</cf:param>
  592. <cf:param name="familymember">cm:defaultName</cf:param>
  593. <cf:param name="home"><xsl:value-of select="$object-start-at-path"/></cf:param>
  594. </cf:do-the-path-link>
  595. </xsl:attribute>
  596. </img><xsl:text>&#160;</xsl:text>
  597. </xsl:if>
  598. <xsl:choose>
  599. <xsl:when test="(cm:objectClass = 'adminFolder')">
  600. <a>
  601. <xsl:attribute name="href"><xsl:call-template name="gen-url"/></xsl:attribute>
  602. <xsl:value-of select="cm:defaultName"/>
  603. </a>
  604. </xsl:when>
  605. <xsl:otherwise>
  606. <xsl:value-of select="cm:defaultName"/>
  607. </xsl:otherwise>
  608. </xsl:choose>
  609. <xsl:if test="cm:disabled = 'true'">
  610. <img height="16" width="16" hspace="4" align="absmiddle" src="{$image_root}state_disabled.gif">
  611. <xsl:attribute name="alt"><xts:string id="IDS_DISABLED"/></xsl:attribute>
  612. </img>
  613. </xsl:if>
  614. <xsl:text>&#160;&#160;</xsl:text>
  615. </cp:columnContent>
  616. <cp:columnContent>
  617. <!-- this will give us the time formatted with the java long(2) date and medium(3) time using the locale date and time patterns provided by java -->
  618. <nobr>
  619. <xsl:value-of select="xtsext:formatDateFromUTC( string( cm:modificationTime ), number( '2' ), number( '3' ), string( $timeZone ), string( $contentLocale ) )"/>
  620. </nobr>
  621. <xsl:text>&#160;&#160;</xsl:text>
  622. </cp:columnContent>
  623. <cp:columnContent>
  624. <cp:columnCondition><xsl:value-of select="/root/session/param[@name='e_showTenantInfo']='true'"/></cp:columnCondition>
  625. <xsl:value-of select="cm:tenantName"/>
  626. <xsl:text>&#160;&#160;</xsl:text>
  627. </cp:columnContent>
  628. <cp:columnContent>
  629. <nobr>
  630. <xsl:call-template name="action-properties">
  631. <xsl:with-param name="class" select="$class"/>
  632. <xsl:with-param name="supportPropertiesAction" select="true()"/>
  633. <xsl:with-param name="supportRunOptionsAction" select="true()"/>
  634. <xsl:with-param name="supportViewRunHistory" select="false()"/>
  635. <xsl:with-param name="supportScheduleAction" select="true()"/>
  636. <xsl:with-param name="supportAllActionsAction" select="true()"/>
  637. <xsl:with-param name="canExecute" select="contains(cm:permissions, 'execute')"/>
  638. </xsl:call-template>
  639. </nobr>
  640. </cp:columnContent>
  641. </cp:tableContent>
  642. <cp:tableFooter>
  643. <cp:columnFooter width="100%" colspan="11" timezone="string(/root/user/param[@name='timeZoneID'])">
  644. <!-- display the current timestamp -->
  645. <xsl:variable name="time_now" select="xtsext:getCurrentDateTime(string(/root/user/param[@name='timeZoneID']))"/>
  646. <xts:string id="IDS_LAST_UPDATED">
  647. <xts:param name="time">
  648. <xsl:value-of select="xtsext:formatDateFromUTC(string($time_now), number('2'), number('3'), '', string($contentLocale))"/>
  649. </xts:param>
  650. </xts:string>
  651. </cp:columnFooter>
  652. </cp:tableFooter>
  653. </cf:param>
  654. </cf:main-pager-section>
  655. </xsl:when>
  656. </xsl:choose>
  657. </lyt:section>
  658. </lyt:layout>
  659. </tool:content>
  660. </xsl:template>
  661. <xsl:template name="search-panel">
  662. <mt:search type="tools">
  663. <mt:scopes>
  664. <mt:scope>fb</mt:scope>
  665. <mt:scope>fo</mt:scope>
  666. <mt:scope>any</mt:scope>
  667. </mt:scopes>
  668. <mt:stypes>
  669. <mt:stype name="contentTask">
  670. <xts:string id="IDS_OBJ_CONTENTMAINTENANCE"/>
  671. </mt:stype>
  672. <mt:stype name="exportDeployment">
  673. <xts:string id="IDS_OBJ_EXPORTDEPLOYMENT"/>
  674. </mt:stype>
  675. <mt:stype name="adminFolder">
  676. <xts:string id="IDS_OBJ_CONTENT"/>
  677. </mt:stype>
  678. <mt:stype name="importDeployment">
  679. <xts:string id="IDS_OBJ_IMPORTDEPLOYMENT"/>
  680. </mt:stype>
  681. <xsl:if test="$userCanUseIndexSearch">
  682. <mt:stype name="indexUpdateTask">
  683. <xts:string id="IDS_OBJ_INDEXUPDATETASK"/>
  684. </mt:stype>
  685. </xsl:if>
  686. <xsl:if test="$showMigration">
  687. <mt:stype name="migrationTask">
  688. <xts:string id="IDS_OBJ_MIGRATIONTASK"/>
  689. </mt:stype>
  690. </xsl:if>
  691. <mt:stype name="jobDefinition">
  692. <xts:string id="IDS_OBJ_JOBDEFINITION"/>
  693. </mt:stype>
  694. <mt:stype name="queryServiceTask">
  695. <xts:string id="IDS_OBJ_QUERYSERVICETASK"/>
  696. </mt:stype>
  697. </mt:stypes>
  698. <mt:close-params>
  699. <param>backURL</param>
  700. <param>m_path</param>
  701. <param>m_section</param>
  702. </mt:close-params>
  703. </mt:search>
  704. </xsl:template>
  705. <!-- Insert common templates -->
  706. <mt:actions mode="tools"/>
  707. <pf:gen-action/>
  708. <pf:gen-icon/>
  709. <pf:gen-url/>
  710. </xsl:stylesheet>
  711. </xts:block>
  712. <!--
  713. ===============================================================================================
  714. render-page - Main page rendering block.
  715. ===============================================================================================
  716. -->
  717. <xts:block id="render-page" type="exec" mode="interpret" processor="XSLT" dependency="head banner body" mimeType="text/html" xmlns:mt="http://developer.cognos.com/schemas/xts/logicsheets/presentation/main/mt">
  718. <xts:logicsheet path="logicsheets/portal.xsl"/>
  719. <!-- Cognos Central main behaviour logic -->
  720. <xts:logicsheet path="logicsheets/presentation/main/presentation.xsl"/>
  721. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xos="http://developer.cognos.com/schemas/xts/output/" xmlns:bus="http://developer.cognos.com/schemas/bibus/3/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:pf="http://developer.cognos.com/schemas/xts/pf" xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/" xmlns:mt="http://developer.cognos.com/schemas/xts/logicsheets/presentation/main/mt" xmlns:mf="http://developer.cognos.com/schemas/xts/logicsheets/theme/main/mf" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" xmlns:xts="http://developer.cognos.com/schemas/xts/" exclude-result-prefixes="xsl cm pf mt mf bus xts xos SOAP-ENV">
  722. <xsl:output method="xml" version="1.0" encoding="utf-8" indent="no"/>
  723. <pf:variables/>
  724. <xsl:template match="/root">
  725. <xts:sequence>
  726. <xts:replace select="/root/output/*[local-name() = 'part']">
  727. <xos:part>
  728. <xos:entityHeader>
  729. <xos:param name="Content-Type">text/html; charset=utf-8</xos:param>
  730. </xos:entityHeader>
  731. <xos:entityBody>
  732. <html lang="{$productLocale}">
  733. <!-- copy in the head content -->
  734. <xsl:copy-of select="output/xos:part/xos:entityBody/xos:content[@id = 'head']"/>
  735. <mt:page region="IDS_TOOLS_CSADMIN">
  736. <!-- copy in the banner -->
  737. <xsl:copy-of select="output/xos:part/xos:entityBody/xos:content[@id = 'banner']"/>
  738. <!-- copy in the body -->
  739. <xsl:copy-of select="output/xos:part/xos:entityBody/xos:content[@id = 'body']"/>
  740. </mt:page>
  741. </html>
  742. </xos:entityBody>
  743. </xos:part>
  744. </xts:replace>
  745. </xts:sequence>
  746. </xsl:template>
  747. </xsl:stylesheet>
  748. </xts:block>
  749. <!--
  750. =============================================
  751. Output debug dump
  752. =============================================
  753. -->
  754. <xts:block id="debug" type="exec" mode="output" processor="XSLT" condition=".[/root/env/param[@name='d'] = '1' or /root/session/param[@name='debug'] = '1']" mandatory="false" mimeType="text/html" dependency="render-page">
  755. <!-- get the debug logic sheet -->
  756. <xts:logicsheet path="logicsheets/debuglogic.xslt"/>
  757. <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">
  758. <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no" omit-xml-declaration="yes"/>
  759. <xsl:template match="/">
  760. <dbg:dumpxml select="/root"/>
  761. </xsl:template>
  762. </xsl:stylesheet>
  763. </xts:block>
  764. </xts:morphlet>