cc_drillthrough.xts 57 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122
  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">
  13. <!--
  14. ===============================================================================================
  15. If external backURLs are not allowed then verify the backURL is in the crn domain and replace it if it isn't
  16. ===============================================================================================
  17. -->
  18. <xts:block id="secureBackURL" path="portal/secureBackURL.xml" processor="XSLT" type="exec" condition=".[/root/system/param[@name = 'allowExternalURLs'] = 'false']" mandatory="false"/>
  19. <!--
  20. ===============================================================================================
  21. Saves cut/copied entries in a user session - Only executes after a cut or a copy operation.
  22. ===============================================================================================
  23. -->
  24. <xts:block id="groupEdit" path="portal/set_clipboard.xml" processor="XSLT" type="exec" mandatory="false" condition=".[/root/env/param[@name='editentries']]">
  25. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  26. <xts:logicsheet path="logicsheets/portal.xsl"/>
  27. </xts:block>
  28. <!-- ======================================================== -->
  29. <!-- Session Management -->
  30. <!-- ======================================================== -->
  31. <!-- Reads session-sensitive info from CM -->
  32. <xts:block processor="XSLT" type="exec" mandatory="false"
  33. id="refreshSession"
  34. path="portal/cc/read_session.xml"
  35. condition=".[
  36. string(/root/cookies/cookie[@name = 'cc_session']) = ''
  37. or /root/env/param[@name='m_reload']
  38. or /root/env/param[@name='m_root'] ]">
  39. <xts:logicsheet path="logicsheets/cm-logic.xsl"/>
  40. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  41. </xts:block>
  42. <!-- Update the <session> element for this request. -->
  43. <xts:block id="buildSession" path="portal/session.xml" dependency="refreshSession impersonateTenant secureBackURL" processor="XSLT" type="exec"
  44. condition=".[
  45. /root/newSession
  46. or /root/env/param[@name='ui']
  47. or /root/env/param[@name='d']
  48. or /root/env/param[starts-with(@name,'m_s_')]
  49. or /root/env/param[@name = 'resetSort'] ]"
  50. mandatory="false"/>
  51. <xts:block id="impersonateTenant" path="/portal/tenants/impersonateTenant.xsl" processor="XSLT" type="exec" mode="interpret" condition=".[/root/env/param[@name='impersonateTenantCmd']!='']" mandatory="false">
  52. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  53. </xts:block>
  54. <!-- Save changes to the state info in a cookie -->
  55. <xts:block mode="interpret" processor="XSLT" type="exec"
  56. id="setSession"
  57. path="portal/set_session.xml"
  58. dependency="groupEdit buildSession getContent"
  59. condition=".[/root/updateSession]"
  60. mandatory="false"/>
  61. <!--
  62. =============================================
  63. Request properties of the current container
  64. =============================================
  65. -->
  66. <xts:block id="getPath" processor="XSLT" type="exec" dependency="buildSession">
  67. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  68. <xts:logicsheet path="logicsheets/cm-logic.xsl"/>
  69. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/" xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/" xmlns:cml="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/cml/1/">
  70. <xsl:output method="xml" version="1.0" encoding="UTF-8" omit-xml-declaration="yes" indent="no"/>
  71. <cml:object-predicates/>
  72. <xsl:template match="root">
  73. <xsl:variable name="m_path" select="/root/env/param[@name='m_path']"/>
  74. <xsl:variable name="path">
  75. <xsl:choose>
  76. <xsl:when test="not($m_path='/content')">
  77. <xsl:value-of select="$m_path"/>
  78. </xsl:when>
  79. <xsl:otherwise>
  80. <xsl:value-of select="''"/>
  81. </xsl:otherwise>
  82. </xsl:choose>
  83. </xsl:variable>
  84. <xsl:if test="$path != ''">
  85. <xts:sequence>
  86. <xts:append>
  87. <path>
  88. <!-- Request properties of the current container. -->
  89. <xts:transform src="transforms/CM/post-process.xslt" processor="XSLT">
  90. <send:request provider="cm">
  91. <xts:transform src="transforms/CM/pre-process.xslt" processor="XSLT">
  92. <cm:query>
  93. <cm:search>
  94. <xsl:value-of select="$path"/><xsl:value-of select="$hidden-objects-predicate"/>
  95. </cm:search>
  96. <cm:properties>
  97. <cm:property name="objectClass"/>
  98. <cm:property name="defaultName"/>
  99. <cm:property name="ancestors"/>
  100. <cm:property name="permissions"/>
  101. <cm:property name="searchPath"/>
  102. <cm:property name="credentialNamespaces"/>
  103. <cm:property name="hidden"/>
  104. <cm:property name="userInterfaces"/>
  105. </cm:properties>
  106. </cm:query>
  107. </xts:transform>
  108. </send:request>
  109. </xts:transform>
  110. </path>
  111. </xts:append>
  112. </xts:sequence>
  113. </xsl:if>
  114. </xsl:template>
  115. </xsl:stylesheet>
  116. </xts:block>
  117. <!--
  118. ======================================
  119. Generate the search expression
  120. ======================================
  121. -->
  122. <xts:block id="generateSearchExp" processor="XSLT" type="exec" dependency="getPath" condition=".[/root/env/param[@name='search']]" mandatory="false">
  123. <xts:logicsheet path="logicsheets/searchlogic.xslt"/>
  124. <xts:logicsheet path="logicsheets/cm-logic.xsl"/>
  125. <xsl:stylesheet version="1.0"
  126. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  127. xmlns:xts="http://developer.cognos.com/schemas/xts/"
  128. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  129. xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
  130. xmlns:cml="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/cml/1/"
  131. xmlns:search="http://developer.cognos.com/schemas/xts/logicsheets/xslt/searchlogic/" exclude-result-prefixes="xsl xts xtsext pf cml search">
  132. <xsl:output method="xml" version="1.0" encoding="UTF-8" omit-xml-declaration="yes" indent="no"/>
  133. <cml:object-predicates/>
  134. <xsl:template match="/root">
  135. <xsl:variable name="path">
  136. <xsl:choose>
  137. <xsl:when test=" /root/env/param[@name='m_path'] != '' ">
  138. <xsl:value-of select="/root/env/param[@name='m_path']"/>
  139. </xsl:when>
  140. <xsl:otherwise>
  141. <xsl:value-of select="'/content'"/>
  142. </xsl:otherwise>
  143. </xsl:choose>
  144. </xsl:variable>
  145. <xsl:if test="/root/env/param[@name='m_path']=''">
  146. <xts:sequence>
  147. <xts:replace select="/root/env/param[@name='m_path']">
  148. <param name="m_path">/content</param>
  149. </xts:replace>
  150. </xts:sequence>
  151. </xsl:if>
  152. <xts:sequence>
  153. <search:gen-search-exp>
  154. <search:defaultTypes>
  155. <search:defaultType>package</search:defaultType>
  156. <search:defaultType>drillPath</search:defaultType>
  157. <search:defaultType>navigationPath</search:defaultType>
  158. <search:defaultType>folder</search:defaultType>
  159. </search:defaultTypes>
  160. </search:gen-search-exp>
  161. </xts:sequence>
  162. </xsl:template>
  163. </xsl:stylesheet>
  164. </xts:block>
  165. <!--
  166. =============================================
  167. Request properties of the drill thru
  168. =============================================
  169. -->
  170. <xts:block id="getContent" processor="XSLT" type="exec" dependency="generateSearchExp" xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/" xmlns:cml="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/cml/1/">
  171. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  172. <xts:logicsheet path="logicsheets/cm-logic.xsl"/>
  173. <xsl:stylesheet version="1.0"
  174. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  175. xmlns:xts="http://developer.cognos.com/schemas/xts/"
  176. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  177. xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
  178. xmlns:cml="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/cml/1/"
  179. xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/" exclude-result-prefixes="xsl xts xtsext cm cml send">
  180. <xsl:output method="xml" version="1.0" encoding="UTF-8" omit-xml-declaration="yes" indent="no"/>
  181. <cml:object-predicates/>
  182. <xsl:template match="root">
  183. <xsl:variable name="userPrefs" select="/root/session/param"/>
  184. <xsl:variable name="userPrefsDefault" select="/root/system/param[@name='defaultPortalPreferences']"/>
  185. <xsl:variable name="drillPath">
  186. <xsl:choose>
  187. <xsl:when test=" /root/env/param[@name='m_path'] != '' ">
  188. <xsl:value-of select="/root/env/param[@name='m_path']"/>
  189. </xsl:when>
  190. <xsl:otherwise>
  191. <xsl:value-of select="'/content'"/>
  192. </xsl:otherwise>
  193. </xsl:choose>
  194. </xsl:variable>
  195. <xsl:variable name="maxObjects">
  196. <xsl:choose>
  197. <xsl:when test="string(/root/env/param[@name = 'm_pagerto']) !='' and string(/root/env/param[@name = 'm_pagerfrom']) !=''">
  198. <xsl:value-of select="(/root/env/param[@name = 'm_pagerto'] - /root/env/param[@name = 'm_pagerfrom']) + 1"/>
  199. </xsl:when>
  200. <xsl:when test="$userPrefs[@name='linesPerPage']!=''">
  201. <xsl:value-of select="$userPrefs[@name='linesPerPage']"/>
  202. </xsl:when>
  203. <xsl:otherwise>
  204. <xsl:value-of select="$userPrefsDefault/pref[@name='lines']"/>
  205. </xsl:otherwise>
  206. </xsl:choose>
  207. </xsl:variable>
  208. <xsl:variable name="skipObjects">
  209. <xsl:choose>
  210. <xsl:when test="/root/env/param[@name = 'm_pagerfrom'] and /root/env/param[@name = 'm_pagerfrom']!=''">
  211. <xsl:value-of select="(/root/env/param[@name = 'm_pagerfrom'])-1"/>
  212. </xsl:when>
  213. <xsl:when test="/root/env/param[@name='m_section']!=''">
  214. <xsl:choose>
  215. <xsl:when test="/root/env/param[@name='m_section']!='-1'">
  216. <xsl:value-of select="((/root/env/param[@name='m_section']) -1)"/>
  217. </xsl:when>
  218. <xsl:otherwise>
  219. <xsl:value-of select="($maxObjects) * -1"/>
  220. </xsl:otherwise>
  221. </xsl:choose>
  222. </xsl:when>
  223. <xsl:otherwise>0</xsl:otherwise>
  224. </xsl:choose>
  225. </xsl:variable>
  226. <xsl:variable name="m_sort" select="/root/session/param[@name='s_ct']"/>
  227. <xsl:variable name="parentPath">
  228. <xsl:choose>
  229. <xsl:when test="string(/root/env/param[@name='m_path'])!=''">
  230. <xsl:value-of select="/root/env/param[@name='m_path']"/>
  231. </xsl:when>
  232. <xsl:otherwise>
  233. <xsl:text>/content</xsl:text>
  234. </xsl:otherwise>
  235. </xsl:choose>
  236. </xsl:variable>
  237. <xsl:variable name="path">
  238. <xsl:choose>
  239. <xsl:when test="string(/root/env/param[@name='m_path'])!='' and /root/env/param[@name='m_path'] != '/content'">
  240. <xsl:value-of select="/root/env/param[@name='m_path']"/><xsl:text>/*[@objectClass='drillPath' or @objectClass='package' or @objectClass='folder']</xsl:text>
  241. </xsl:when>
  242. <xsl:otherwise>
  243. <xsl:text>/content/*[@objectClass='package' or @objectClass='folder']</xsl:text>
  244. </xsl:otherwise>
  245. </xsl:choose>
  246. <!-- Append permission restrictions -->
  247. <!--xsl:value-of select="'[permission(&quot;read&quot;)]'"/-->
  248. </xsl:variable>
  249. <xsl:variable name="myFoldersPath">
  250. <xsl:value-of select="/root/session/param[@name='e_mrootpath']"/>
  251. </xsl:variable>
  252. <xsl:variable name="atRoot">
  253. <xsl:choose>
  254. <xsl:when test="/root/env/param[@name='m_pathRoot']">true</xsl:when>
  255. <xsl:otherwise>false</xsl:otherwise>
  256. </xsl:choose>
  257. </xsl:variable>
  258. <xts:sequence>
  259. <xts:append>
  260. <content>
  261. <!-- Request properties of the packages. -->
  262. <xts:transform src="transforms/CM/post-process.xslt" processor="XSLT">
  263. <send:request provider="cm">
  264. <xts:transform src="transforms/CM/pre-process.xslt" processor="XSLT">
  265. <cm:query>
  266. <cm:requests>
  267. <xsl:choose>
  268. <xsl:when test="$atRoot='true'">
  269. <cm:query>
  270. <cm:search>/content<xsl:value-of select="$hidden-objects-predicate"/></cm:search>
  271. <cm:properties>
  272. <cm:property name="defaultName"/>
  273. <cm:property name="hasChildren"/>
  274. <cm:property name="permissions"/>
  275. <cm:property name="searchPath"/>
  276. <cm:property name="modificationTime"/>
  277. <cm:property name="disabled"/>
  278. <cm:property name="userInterfaces"/>
  279. <cm:property name="displaySequence"/>
  280. <cm:property name="position"/>
  281. <cm:property name="defaultScreenTip"/>
  282. <cm:property name="target"/>
  283. <cm:property name="iconURI"/>
  284. <cm:property name="hidden"/>
  285. </cm:properties>
  286. </cm:query>
  287. <cm:query>
  288. <cm:search><xsl:value-of select="$myFoldersPath"/><xsl:value-of select="$hidden-objects-predicate"/></cm:search>
  289. <cm:properties>
  290. <cm:property name="defaultName"/>
  291. <cm:property name="hasChildren"/>
  292. <cm:property name="permissions"/>
  293. <cm:property name="searchPath"/>
  294. <cm:property name="modificationTime"/>
  295. <cm:property name="disabled"/>
  296. <cm:property name="userInterfaces"/>
  297. <cm:property name="displaySequence"/>
  298. <cm:property name="position"/>
  299. <cm:property name="defaultScreenTip"/>
  300. <cm:property name="target"/>
  301. <cm:property name="iconURI"/>
  302. <cm:property name="hidden"/>
  303. </cm:properties>
  304. </cm:query>
  305. </xsl:when>
  306. <xsl:otherwise>
  307. <cm:query>
  308. <cm:search><xsl:value-of select="$parentPath"/><xsl:value-of select="$visibility-predicate"/></cm:search>
  309. <cm:properties>
  310. <cm:property name="defaultName"/>
  311. <cm:property name="permissions"/>
  312. <cm:property name="ancestors"/>
  313. <cm:property name="searchPath"/>
  314. <cm:property name="hidden"/>
  315. <cm:property name="disabled"/>
  316. </cm:properties>
  317. </cm:query>
  318. <xsl:if test="/root/search/expression or not(/root/search)">
  319. <cm:query>
  320. <cm:search>
  321. <xsl:choose>
  322. <xsl:when test="/root/search/expression">
  323. <xsl:value-of select="/root/search/expression"/><xsl:value-of select="$visibility-predicate"/>
  324. </xsl:when>
  325. <xsl:otherwise>
  326. <xsl:value-of select="$path"/><xsl:value-of select="$visibility-predicate"/>
  327. </xsl:otherwise>
  328. </xsl:choose>
  329. </cm:search>
  330. <cm:properties>
  331. <cm:property name="defaultName"/>
  332. <cm:property name="hasChildren"/>
  333. <cm:property name="ancestors"/>
  334. <cm:property name="permissions"/>
  335. <cm:property name="searchPath"/>
  336. <cm:property name="modificationTime"/>
  337. <cm:property name="disabled"/>
  338. <cm:property name="userInterfaces"/>
  339. <cm:property name="displaySequence"/>
  340. <cm:property name="position"/>
  341. <cm:property name="defaultScreenTip"/>
  342. <cm:property name="target"/>
  343. <!-- We need this property to get the target information for Abacab Targets -->
  344. <cm:property name="deploymentReferences"/>
  345. <cm:property name="iconURI"/>
  346. <cm:property name="usage"/>
  347. <cm:property name="hidden"/>
  348. </cm:properties>
  349. <cm:options schemaInfo="true">
  350. <cm:maxObjects><xsl:value-of select="$maxObjects + 1"/></cm:maxObjects>
  351. <cm:skipObjects><xsl:value-of select="$skipObjects"/></cm:skipObjects>
  352. <cm:refProps>
  353. <!-- Get target info for shortcut objects -->
  354. <cm:refProp refPropName="target">
  355. <cm:properties>
  356. <cm:property name="defaultName"/>
  357. <cm:property name="searchPath"/>
  358. <cm:property name="ancestors"/>
  359. <cm:property name="permissions"/>
  360. <cm:property name="hidden"/>
  361. <cm:property name="disabled"/>
  362. </cm:properties>
  363. </cm:refProp>
  364. </cm:refProps>
  365. </cm:options>
  366. <cm:sortBy>
  367. <xsl:if test="/root/session/param[@name='eom'] != '2'">
  368. <xsl:choose>
  369. <xsl:when test="/root/session/param[@name='eom'] = '0'">
  370. <cm:sort name="usage" order="ascending"/>
  371. </xsl:when>
  372. <xsl:otherwise>
  373. <cm:sort name="usage" order="descending"/>
  374. </xsl:otherwise>
  375. </xsl:choose>
  376. </xsl:if>
  377. <xsl:choose>
  378. <xsl:when test="not(/root/search)">
  379. <xsl:choose>
  380. <xsl:when test="$m_sort = 'da'">
  381. <cm:sort name="modificationTime" order="ascending"/>
  382. </xsl:when>
  383. <xsl:when test="$m_sort = 'dd'">
  384. <cm:sort name="modificationTime" order="descending"/>
  385. </xsl:when>
  386. <xsl:when test="$m_sort = 'nd'">
  387. <cm:sort name="defaultName" order="descending"/>
  388. </xsl:when>
  389. <xsl:otherwise>
  390. <cm:sort name="defaultName" order="ascending"/>
  391. </xsl:otherwise>
  392. </xsl:choose>
  393. </xsl:when>
  394. <xsl:otherwise>
  395. <xsl:choose>
  396. <xsl:when test="$m_sort = 'nd'">
  397. <cm:sort name="defaultName" order="descending"/>
  398. </xsl:when>
  399. <xsl:otherwise>
  400. <cm:sort name="defaultName" order="ascending"/>
  401. </xsl:otherwise>
  402. </xsl:choose>
  403. </xsl:otherwise>
  404. </xsl:choose>
  405. </cm:sortBy>
  406. </cm:query>
  407. </xsl:if>
  408. </xsl:otherwise>
  409. </xsl:choose>
  410. </cm:requests>
  411. </cm:query>
  412. </xts:transform>
  413. </send:request>
  414. </xts:transform>
  415. </content>
  416. </xts:append>
  417. <xts:delete select="/root/env/param[@name='pagerfrom' or @name='pagerto' or @name='pagerfrom_d' or @name='pagerto_d']"/>
  418. <xsl:variable name="stateEnvParams">
  419. <xsl:choose>
  420. <xsl:when test="/root/search">m_path</xsl:when>
  421. <xsl:otherwise>m_path m_section m_pagerfrom m_pagerto</xsl:otherwise>
  422. </xsl:choose>
  423. </xsl:variable>
  424. <xts:delete select="root/env/param[@name='m_stateEnvParams']"/>
  425. <xts:append select="/root/env">
  426. <param name="m_stateEnvParams"><xsl:value-of select="$stateEnvParams"/></param>
  427. </xts:append>
  428. </xts:sequence>
  429. </xsl:template>
  430. </xsl:stylesheet>
  431. </xts:block>
  432. <!--
  433. ============================================================================
  434. Block: mergeTenantNames
  435. Purpose: merge the tenant names into the response
  436. output: replaces tenantID with defaultName from applicable tenant object
  437. =============================================================================
  438. -->
  439. <xts:block processor="XSLT" type="exec" mandatory="false"
  440. path="/portal/tenancy/mergeTenantNames.xslt"
  441. id="mergeTenantNames"
  442. dependency="getContent"
  443. condition=".[/root/session/param[@name='e_showTenantInfo']='true']">
  444. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  445. </xts:block>
  446. <!--
  447. ===============================================================================================
  448. Block: getTargetsInformation
  449. Purpose: get the target information for those drill paths that do not contain target information
  450. output: root/targets
  451. Additional Info: Currently this is mainly used for Abacab targets since we don't store their information in drill path.
  452. ===============================================================================================
  453. -->
  454. <xts:block id="getTargetsInformation" dependency="getContent" condition="/root/content/*[local-name()='queryResponse']/*[local-name()='queryReply']/*[local-name()='drillPath']" processor="XSLT" type="exec" mandatory="false" nodelist="env,header,content">
  455. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  456. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/" xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/" xmlns:xts="http://developer.cognos.com/schemas/xts/" exclude-result-prefixes="xsl send xts cm">
  457. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  458. <xsl:template match="/">
  459. <xts:sequence>
  460. <xsl:if test="/root/content/*[local-name()='queryResponse']/*[local-name()='queryReply']/*[local-name()='drillPath']/*[local-name()='deploymentReferences']/*[local-name()='deploymentReference']/*/*[local-name()='searchPath']">
  461. <xts:append>
  462. <targets>
  463. <xts:transform src="transforms/CM/post-process.xslt" processor="XSLT">
  464. <send:request provider="cm">
  465. <xts:transform src="transforms/CM/pre-process.xslt" processor="XSLT">
  466. <cm:query>
  467. <cm:requests>
  468. <xsl:for-each select="/root/content/*[local-name()='queryResponse']/*[local-name()='queryReply']/*[local-name()='drillPath']">
  469. <xsl:if test="./*[local-name()='deploymentReferences']/*[local-name()='deploymentReference']/*/*[local-name()='searchPath']">
  470. <cm:item>
  471. <cm:search>
  472. <xsl:value-of select="./*[local-name()='deploymentReferences']/*[local-name()='deploymentReference']/*/*[local-name()='searchPath']"/>
  473. </cm:search>
  474. <cm:properties>
  475. <cm:property name="defaultName"/>
  476. <cm:property name="searchPath"/>
  477. <cm:property name="ancestors"/>
  478. <cm:property name="permissions"/>
  479. <cm:property name="hidden"/>
  480. <cm:property name="storeID"/>
  481. </cm:properties>
  482. </cm:item>
  483. </xsl:if>
  484. </xsl:for-each>
  485. </cm:requests>
  486. </cm:query>
  487. </xts:transform>
  488. </send:request>
  489. </xts:transform>
  490. </targets>
  491. </xts:append>
  492. </xsl:if>
  493. </xts:sequence>
  494. </xsl:template>
  495. </xsl:stylesheet>
  496. </xts:block>
  497. <!--
  498. ===============================================================================================
  499. Block: setTargetsInformation
  500. Purpose: combine and transform the result of getContent and getTargetsInformation blocks to have complete information about the targets
  501. output: replaces root/content with a new one containing the required information related to abacab targets
  502. ===============================================================================================
  503. -->
  504. <xts:block id="setTargetsInformation" dependency="getContent getTargetsInformation" condition="/root/targets" processor="XSLT" type="exec" mandatory="false" nodelist="env,header,content,targets">
  505. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  506. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/" xmlns:xts="http://developer.cognos.com/schemas/xts/" exclude-result-prefixes="xsl send xts">
  507. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  508. <xsl:template match="/">
  509. <xts:sequence>
  510. <xts:replace select="/root/content">
  511. <content>
  512. <queryResponse xmlns="http://developer.cognos.com/schemas/xts-cm/1/">
  513. <xts:transform processor="XSLT" src="portal/drillthru/common/transforms/targetInfoLogic.xslt" mimeType="text/xml">
  514. <content>
  515. <xsl:copy-of select="root/content/*"/>
  516. <targetInfo>
  517. <xsl:copy-of select="root/targets/*[local-name()='queryResponse']/*[local-name()='queryReply']/*"/>
  518. </targetInfo>
  519. </content>
  520. </xts:transform>
  521. </queryResponse>
  522. </content>
  523. </xts:replace>
  524. </xts:sequence>
  525. </xsl:template>
  526. </xsl:stylesheet>
  527. </xts:block>
  528. <!--
  529. ===============================================================================================
  530. head - This block generates the HTML <head> tag.
  531. ===============================================================================================
  532. -->
  533. <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/">
  534. <xts:logicsheet path="logicsheets/toollogic2.xslt"/>
  535. <xts:logicsheet path="logicsheets/portal.xsl"/>
  536. <xts:logicsheet path="logicsheets/presentation/main/framework.xsl"/>
  537. <xts:logicsheet path="logicsheets/presentation/main/presentation.xsl"/>
  538. <xts:logicsheet path="logicsheets/validation.xslt"/> <xts:logicsheet path="logicsheets/presentation/touch_up.xslt"/>
  539. <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">
  540. <xsl:output method="html" encoding="utf-8" indent="no"/>
  541. <!-- current file name -->
  542. <xsl:variable name="mname" select="'cc_drillthrough.xts'"/>
  543. <tool:variables formName="frmEntryAdmin" useEnvParams="/root/env/param[@name='m_stateEnvParams']"/>
  544. <xsl:template match="/">
  545. <tool:head title="IDS_TOOLS_DRILLPATH" helpid="HID_DRILL_THROUGH_ACTIONS"/>
  546. </xsl:template>
  547. </xsl:stylesheet>
  548. </xts:block>
  549. <!--
  550. ===============================================================================================
  551. banner - This block generates the portal banner at the top of the tool.
  552. ===============================================================================================
  553. -->
  554. <xts:block id="banner" type="exec" mode="output" processor="XSLT" dependency="getContent mergeTenantNames" mimeType="text/html" contentId="banner" partId="1" xmlns:tool="http://developer.cognos.com/schemas/xts/logicsheets/xslt/toollogic/" xmlns:pf="http://developer.cognos.com/schemas/xts/pf" 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/">
  555. <xts:logicsheet path="logicsheets/toollogic2.xslt"/>
  556. <!-- Cognos Central main behaviour logic -->
  557. <xts:logicsheet path="logicsheets/portal.xsl"/>
  558. <xts:logicsheet path="logicsheets/presentation/main/framework.xsl"/>
  559. <xts:logicsheet path="logicsheets/presentation/main/presentation.xsl"/>
  560. <!-- Cognos Central controls logic -->
  561. <xts:logicsheet path="logicsheets/presentation/controls/framework.xsl"/>
  562. <xts:logicsheet path="logicsheets/presentation/controls/presentation.xsl"/>
  563. <xts:logicsheet path="logicsheets/validation.xslt"/>
  564. <xts:logicsheet path="logicsheets/presentation/touch_up.xslt"/>
  565. <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 mf mt cf cp cm xtsext xts">
  566. <xsl:output method="html" encoding="utf-8" indent="no"/>
  567. <!-- current file name -->
  568. <xsl:variable name="mname" select="'cc_drillthrough.xts'"/>
  569. <xsl:variable name="drillthru_view">
  570. <xsl:choose>
  571. <xsl:when test="/root/search">N</xsl:when>
  572. <xsl:when test="string(/root/path/cm:queryResponse/*/cm:objectClass)='package'">Y</xsl:when>
  573. <xsl:otherwise>N</xsl:otherwise>
  574. </xsl:choose>
  575. </xsl:variable>
  576. <tool:variables formName="frmEntryAdmin" useEnvParams="/root/env/param[@name='m_stateEnvParams']" type="drillthru"/>
  577. <xsl:variable name="rootPath" select="count(/root/path/cm:queryResponse/*/cm:ancestors/cm:ancestorInfo)=0"/>
  578. <xsl:variable name="startPathTitle"><xts:string id="IDS_TOOLS_DRILLPATH"/></xsl:variable>
  579. <xsl:variable name="atRoot">
  580. <xsl:choose>
  581. <xsl:when test="/root/env/param[@name='m_pathRoot']">true</xsl:when>
  582. <xsl:otherwise>false</xsl:otherwise>
  583. </xsl:choose>
  584. </xsl:variable>
  585. <xsl:variable name="start-at-path">
  586. <xsl:if test="starts-with(/root/path/cm:queryResponse/*/cm:searchPath, 'CAMID')">
  587. <xsl:value-of select="key('session-param', 'e_mrootpath')"/>
  588. </xsl:if>
  589. </xsl:variable>
  590. <cp:flyoutControl/>
  591. <xsl:template match="/">
  592. <tool:banner title="IDS_TOOLS_DRILLPATH" mode="drillthrough" jumpToMain="false" id="headerBackA11Y">
  593. <tool:path>
  594. <div role="navigation" lang="{$contentLocale}">
  595. <xsl:if test="$atRoot='false'">
  596. <a>
  597. <xsl:attribute name="href">
  598. <xsl:value-of select="$gateway"/>?b_action=xts.run&amp;m=<xsl:value-of select="key('env-param','m')"/><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>&amp;m_pathRoot<xsl:text/>
  599. </xsl:attribute>
  600. <xsl:text/><xsl:value-of select="$startPathTitle"/><xsl:text/>
  601. </a>
  602. <xsl:text/><span class="pathSeparator"> &gt; </span><xsl:text/>
  603. </xsl:if>
  604. <cf:do-the-path-link>
  605. <cf:param name="familytree">/root/content/*[local-name()='queryResponse']/*[local-name()='queryReply'][1]/*/*[local-name()='ancestors']</cf:param>
  606. <cf:param name="familymember">/root/content/*[local-name()='queryResponse']/*[local-name()='queryReply'][1]/*/*[local-name()='defaultName']</cf:param>
  607. <cf:param name="isRootPath"><xsl:value-of select="$rootPath"/></cf:param>
  608. <cf:param name="home"><xsl:value-of select="$start-at-path"/></cf:param>
  609. <cf:param name="home-title">
  610. <xsl:if test="$atRoot='true'"><xsl:value-of select="$startPathTitle"/></xsl:if>
  611. </cf:param>
  612. <cf:param name="anchorpath">
  613. <xsl:choose>
  614. <xsl:when test="$home-title!='' and (string(position())=$start-position or position() = 1)">
  615. <a>
  616. <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>
  617. <xsl:if test="$isBidiEnabled = 'true'">
  618. <xsl:attribute name="dir">
  619. <xsl:value-of select="xtsext:getBTD($home-title, $baseTextDirection, $productLocale)"/>
  620. </xsl:attribute>
  621. </xsl:if>
  622. <xsl:text/><xsl:value-of select="$home-title"/><xsl:text/>
  623. </a>
  624. </xsl:when>
  625. <xsl:otherwise>
  626. <a>
  627. <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>
  628. <xsl:if test="$isBidiEnabled = 'true'">
  629. <xsl:attribute name="dir">
  630. <xsl:value-of select="xtsext:getBTD(cm:title, $baseTextDirection, $productLocale)"/>
  631. </xsl:attribute>
  632. </xsl:if>
  633. <xsl:text/><xsl:value-of select="cm:title"/><xsl:text/>
  634. </a>
  635. </xsl:otherwise>
  636. </xsl:choose>
  637. </cf:param>
  638. </cf:do-the-path-link>
  639. </div>
  640. </tool:path>
  641. <tool:actions>
  642. <mt:toolbar>
  643. <mt:tool-group hideDivider="true">
  644. <xsl:choose>
  645. <xsl:when test="$drillthru_view = 'Y'">
  646. <xsl:choose>
  647. <xsl:when test="contains(/root/path/cm:queryResponse/cm:package/cm:permissions,'write') and contains(/root/path/cm:queryResponse/cm:package/cm:permissions,'traverse')">
  648. <mt:tool name="new" new-class="drillPath"/>
  649. </xsl:when>
  650. <xsl:otherwise>
  651. <mt:tool name="new" new-class="drillPath" disable="true"/>
  652. </xsl:otherwise>
  653. </xsl:choose>
  654. <mt:tool-group>
  655. <mt:tool name="cut"/>
  656. <mt:tool name="copy"/>
  657. <mt:tool name="paste" mode="tools"/>
  658. <mt:tool name="delete" mode="tools"/>
  659. </mt:tool-group>
  660. </xsl:when>
  661. <xsl:when test="/root/search/expression">
  662. <mt:tool name="copy"/>
  663. <mt:tool name="delete" mode="tools"/>
  664. </xsl:when>
  665. </xsl:choose>
  666. <xsl:if test="$atRoot!='true' and not(/root/search)">
  667. <mt:tool name="search"/>
  668. </xsl:if>
  669. <xsl:if test="$atRoot='true'">
  670. <mt:tool name="search" disable="true"/>
  671. </xsl:if>
  672. </mt:tool-group>
  673. </mt:toolbar>
  674. </tool:actions>
  675. </tool:banner>
  676. </xsl:template>
  677. </xsl:stylesheet>
  678. </xts:block>
  679. <xts:block id="classNames" type="exec" mode="input" processor="XML" path="/portal/uiExtensions.xml" >
  680. <xts:logicsheet path="/logicsheets/uiobjects/uiobjects_names.xslt"/>
  681. </xts:block>
  682. <!--
  683. ===============================================================================================
  684. body - This block generates the tool contents.
  685. ===============================================================================================
  686. -->
  687. <xts:block id="body" type="exec" mode="output" processor="XSLT" dependency="getContent setTargetsInformation classNames" 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:dp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/presentation/">
  688. <xts:logicsheet path="logicsheets/toollogic2.xslt"/>
  689. <!-- Cognos Central main behaviour logic -->
  690. <xts:logicsheet path="logicsheets/portal.xsl"/>
  691. <xts:logicsheet path="logicsheets/permissions.xsl"/>
  692. <xts:logicsheet path="logicsheets/presentation/main/framework.xsl"/>
  693. <xts:logicsheet path="logicsheets/presentation/main/presentation.xsl"/>
  694. <xts:logicsheet path="logicsheets/presentation/main/search.xsl"/>
  695. <xts:logicsheet path="logicsheets/presentation/layout.xsl"/>
  696. <!-- Cognos Central controls logic -->
  697. <xts:logicsheet path="logicsheets/presentation/controls/framework.xsl"/>
  698. <xts:logicsheet path="logicsheets/presentation/controls/presentation.xsl"/>
  699. <xts:logicsheet path="logicsheets/presentation/dialog/presentation.xsl"/>
  700. <xts:logicsheet path="logicsheets/validation.xslt"/>
  701. <xts:logicsheet path="logicsheets/presentation/touch_up.xslt"/>
  702. <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">
  703. <xsl:output method="html" encoding="utf-8" indent="no"/>
  704. <!-- current file name -->
  705. <xsl:variable name="mname" select="'cc_drillthrough.xts'"/>
  706. <xsl:variable name="user_permissions">
  707. <xsl:choose>
  708. <xsl:when test="/root/path/cm:queryResponse/*/*">
  709. <xsl:value-of select="/root/path/cm:queryResponse/*/cm:permissions"/>
  710. </xsl:when>
  711. <xsl:otherwise>na</xsl:otherwise>
  712. </xsl:choose>
  713. </xsl:variable>
  714. <xsl:variable name="userCanNotTraverse" select="not(contains($user_permissions, 'traverse')) and not(contains($user_permissions, 'na'))"/>
  715. <xsl:variable name="drillthru_view">
  716. <xsl:choose>
  717. <xsl:when test="/root/search">N</xsl:when>
  718. <xsl:when test="string(/root/path/cm:queryResponse/*/cm:objectClass)='package'">Y</xsl:when>
  719. <xsl:otherwise>N</xsl:otherwise>
  720. </xsl:choose>
  721. </xsl:variable>
  722. <tool:variables formName="frmEntryAdmin" useEnvParams="/root/env/param[@name='m_stateEnvParams']"/>
  723. <cp:flyoutControl/>
  724. <xsl:template match="/">
  725. <xsl:variable name="showTenantInfo" select="/root/session/param[@name='e_showTenantInfo']='true'"/>
  726. <xsl:if test="/root/search">
  727. <xsl:variable name="isPanelMain" select="not($userCanNotTraverse) and not(/root/search/emptySearchExpression) and not(/root/env/param[@name='m_pathRoot']) and not(/root/search/expression or not(root/search))"/>
  728. <xsl:choose>
  729. <xsl:when test="$isPanelMain">
  730. <div id="maincontent" role="main" tabindex="-1">
  731. <xsl:call-template name="search-panel"/>
  732. </div>
  733. </xsl:when>
  734. <xsl:otherwise>
  735. <xsl:call-template name="search-panel"/>
  736. </xsl:otherwise>
  737. </xsl:choose>
  738. <!-- Insert search control panel -->
  739. </xsl:if>
  740. <xsl:if test="not(/root/search) and /root/content/cm:queryResponse/cm:queryReply[2]/* and $drillthru_view = 'N'">
  741. <dp:description mainContentHandled="true">
  742. <xts:string id="IDS_TOOLS_DRILLPATH_DESCRIPTION"/>
  743. </dp:description>
  744. </xsl:if>
  745. <tool:content formName="frmEntryAdmin" nomode="true">
  746. <xsl:choose>
  747. <xsl:when test="$userCanNotTraverse">
  748. <div id="maincontent" tabindex="-1">
  749. <mt:objectNoneFound id="IDS_NO_TRAVERSE_CONTAINER"/>
  750. </div>
  751. </xsl:when>
  752. <xsl:when test="/root/search/emptySearchExpression">
  753. <div id="maincontent" tabindex="-1">
  754. <mt:objectNoneFound id="IDS_EMPTY_QUERY"/>
  755. </div>
  756. </xsl:when>
  757. <xsl:when test="/root/env/param[@name='m_pathRoot']">
  758. <cf:main-pager-section virtualPage="true" width="100%" noEntriesMsgID="IDS_NO_CONTENT" role="main" id="maincontent">
  759. <cf:param name="target">concat(concat($app,'/'),$mname)</cf:param>
  760. <cf:param name="item-path">root/content/cm:queryResponse/*/*</cf:param>
  761. <cf:param name="lines-per-page">
  762. <xsl:value-of select="key('session-param', 'linesPerPage')"/>
  763. </cf:param>
  764. <cf:param name="rows">
  765. <cp:tableHeader session-name="s_ct">
  766. <cp:columnHeader width="20"/>
  767. <cp:columnHeader width="100%">
  768. <xts:string id="IDS_NAME"/>
  769. </cp:columnHeader>
  770. <cp:columnHeader sort="d">
  771. <cp:sortHref>
  772. <xsl:value-of select="$back-url"/>&amp;m_s_ct=<xsl:choose>
  773. <xsl:when test="key('session-param', 's_ct') = 'da' ">dd</xsl:when>
  774. <xsl:when test="key('session-param', 's_ct') = 'dd' ">sa</xsl:when>
  775. <xsl:otherwise>da</xsl:otherwise>
  776. </xsl:choose>
  777. </cp:sortHref>
  778. <xts:string id="IDS_MODIFIED"/>
  779. </cp:columnHeader>
  780. <cp:columnHeader width="100">
  781. <xsl:if test="@valign and @valign!=''">
  782. <xsl:attribute name="valign">
  783. <xsl:value-of select="@valign"/>
  784. </xsl:attribute>
  785. </xsl:if>
  786. <cp:columnCondition><xsl:value-of select="$showTenantInfo"/></cp:columnCondition>
  787. <xts:string id="IDS_OBJ_TENANT"/>
  788. </cp:columnHeader>
  789. </cp:tableHeader>
  790. <cp:tableContent>
  791. <cp:common-render-variables>
  792. <!-- Common variables used in rendering icons, actions .. etc. -->
  793. <pm:permissions/>
  794. <mf:common-entry-varaibles/>
  795. </cp:common-render-variables>
  796. <cp:columnContent>
  797. <xsl:variable name="gen-icon-class">
  798. <xsl:choose>
  799. <xsl:when test="$class='folder'">pfr</xsl:when>
  800. <xsl:otherwise><xsl:value-of select="$class"/></xsl:otherwise>
  801. </xsl:choose>
  802. </xsl:variable>
  803. <xsl:call-template name="gen-icon">
  804. <xsl:with-param name="class" select="$gen-icon-class"/>
  805. <xsl:with-param name="hiddenObject" select="cm:hidden"/>
  806. <xsl:with-param name="effectiveUserCapabilities" select="$effectiveUserCapabilities"/>
  807. </xsl:call-template>
  808. </cp:columnContent>
  809. <cp:columnContent>
  810. <mf:entry-name/>
  811. <xsl:text>&#160;&#160;</xsl:text>
  812. </cp:columnContent>
  813. <cp:columnContent>
  814. <nobr>
  815. <!-- 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 -->
  816. <xsl:value-of select="xtsext:formatDateFromUTC( string( cm:modificationTime ), number( '2' ), number( '3' ), string( $timeZone ), string( $contentLocale ) )"/>
  817. </nobr>
  818. </cp:columnContent>
  819. <cp:columnContent>
  820. <cp:columnCondition><xsl:value-of select="$showTenantInfo"/></cp:columnCondition>
  821. <xsl:value-of select="cm:tenantName"/>
  822. </cp:columnContent>
  823. </cp:tableContent>
  824. </cf:param>
  825. </cf:main-pager-section>
  826. </xsl:when>
  827. <xsl:when test="/root/search/expression or not(root/search)">
  828. <cf:main-pager-section virtualPage="true" width="100%" role="main" id="maincontent">
  829. <cf:param name="target">concat(concat($app,'/'),$mname)</cf:param>
  830. <cf:param name="item-path">root/content/cm:queryResponse/cm:queryReply[2]/*</cf:param>
  831. <cf:param name="lines-per-page">
  832. <xsl:value-of select="key('session-param', 'linesPerPage')"/>
  833. </cf:param>
  834. <cf:param name="rows">
  835. <cp:tableHeader session-name="s_ct">
  836. <xsl:if test="$drillthru_view = 'Y' or /root/search/expression">
  837. <cp:columnHeader toggleName="checkbox_" form="pfrmEntryAdmin" noLabel="true" id="checkbox_0"/>
  838. </xsl:if>
  839. <cp:columnHeader width="20px"/>
  840. <xsl:variable name="sizing">
  841. <xsl:choose>
  842. <xsl:when test="$drillthru_view='Y'">50</xsl:when>
  843. <xsl:otherwise>100</xsl:otherwise>
  844. </xsl:choose>
  845. </xsl:variable>
  846. <cp:columnHeader sort="n" width="{$sizing}%" id="columnHeaderName">
  847. <cp:sortHref>
  848. <xsl:value-of select="$back-url"/><xsl:value-of select="concat('&amp;m_path=', xtsext:protect(xtsext:urlencode(string(/root/env/param[@name='m_path'])),'url','searchPath','getdata'))"/>&amp;m_s_ct=<xsl:choose>
  849. <xsl:when test="key('session-param', 's_ct') = 'na' ">nd</xsl:when>
  850. <xsl:when test="key('session-param', 's_ct') = 'nd' ">sa</xsl:when>
  851. <xsl:otherwise>na</xsl:otherwise>
  852. </xsl:choose>
  853. </cp:sortHref>
  854. <xsl:if test="/root/search">
  855. <img height="5" width="1" border="0"><xsl:attribute name="src"><xsl:value-of select="$webcontent"/>/images/space.gif</xsl:attribute></img>
  856. <xsl:text/><xts:string id="IDS_PATH_INDICATOR"/><xsl:text>&#160;</xsl:text>
  857. <img height="5" width="1" border="0"><xsl:attribute name="src"><xsl:value-of select="$webcontent"/>/images/space.gif</xsl:attribute></img>
  858. </xsl:if>
  859. <xts:string id="IDS_NAME"/>
  860. </cp:columnHeader>
  861. <xsl:if test="$drillthru_view = 'Y'">
  862. <cp:columnHeader width="50%">
  863. <xts:string id="IDS_TARGET"/>
  864. </cp:columnHeader>
  865. </xsl:if>
  866. <cp:columnHeader sort="d" width="200px" id="columnHeaderModified">
  867. <cp:sortHref>
  868. <xsl:value-of select="$back-url"/>&amp;m_s_ct=<xsl:choose>
  869. <xsl:when test="key('session-param', 's_ct') = 'da' ">dd</xsl:when>
  870. <xsl:when test="key('session-param', 's_ct') = 'dd' ">sa</xsl:when>
  871. <xsl:otherwise>da</xsl:otherwise>
  872. </xsl:choose>
  873. </cp:sortHref>
  874. <xts:string id="IDS_MODIFIED"/>
  875. </cp:columnHeader>
  876. <cp:columnHeader width="100">
  877. <xsl:if test="@valign and @valign!=''">
  878. <xsl:attribute name="valign">
  879. <xsl:value-of select="@valign"/>
  880. </xsl:attribute>
  881. </xsl:if>
  882. <cp:columnCondition><xsl:value-of select="$showTenantInfo"/></cp:columnCondition>
  883. <xts:string id="IDS_OBJ_TENANT"/>
  884. </cp:columnHeader>
  885. <cp:columnHeader width="170px">
  886. <xts:string id="IDS_HEADING_ACTIONS"/>
  887. </cp:columnHeader>
  888. </cp:tableHeader>
  889. <cp:tableContent>
  890. <cp:common-render-variables>
  891. <!-- Common variables used in rendering icons, actions .. etc. -->
  892. <pm:permissions/>
  893. <mf:common-entry-varaibles/>
  894. </cp:common-render-variables>
  895. <xsl:if test="$drillthru_view = 'Y' or /root/search/expression">
  896. <cp:columnContent>
  897. <xsl:if test="cm:objectClass='drillPath'">
  898. <xsl:variable name="checkboxLabel"><xts:string id="IDS_SELECTION_FOR_PAGER_ITEM" encode="html"><xts:param name="pagerItemName"><xsl:value-of select="cm:defaultName"/></xts:param></xts:string></xsl:variable>
  899. <input type="checkbox" value="{xtsext:urlencode(string(cm:searchPath))}" name="checkbox_{position()}" id="checkbox_{position()}" aria-label="{$checkboxLabel}"/>
  900. </xsl:if>
  901. </cp:columnContent>
  902. </xsl:if>
  903. <cp:columnContent>
  904. <xsl:call-template name="gen-icon">
  905. <xsl:with-param name="class" select="$class"/>
  906. <xsl:with-param name="userInterfaces" select="$userInterfaces"/>
  907. <xsl:with-param name="hiddenObject" select="cm:hidden"/>
  908. <xsl:with-param name="effectiveUserCapabilities" select="$effectiveUserCapabilities"/>
  909. </xsl:call-template>
  910. </cp:columnContent>
  911. <cp:columnContent wrap="wrap" width="50%" scope="row">
  912. <xsl:if test="/root/search">
  913. <img width="20" height="16" align="absmiddle" src="{$skin_images}path.gif">
  914. <xsl:attribute name="alt">
  915. <cf:do-the-path-link>
  916. <cf:param name="familytree">cm:ancestors</cf:param>
  917. <cf:param name="familymember">cm:defaultName</cf:param>
  918. </cf:do-the-path-link>
  919. </xsl:attribute>
  920. </img><xsl:text>&#160;</xsl:text>
  921. </xsl:if>
  922. <!-- Logic to figure out if an entry is to be hyperlinked and if it is what the URL should be -->
  923. <xsl:choose>
  924. <xsl:when test="cm:hasChildren='true'">
  925. <mf:entry-name/>
  926. </xsl:when>
  927. <xsl:otherwise>
  928. <xsl:value-of select="xtsext:enforceBTD(string(cm:defaultName), $baseTextDirection, $productLocale, boolean($isBidiEnabled='true'))"/>
  929. <!-- Render the disabled icon if this entry is disabled -->
  930. <xsl:choose>
  931. <xsl:when test="cm:disabled = 'true'">
  932. <img height="16" width="16" hspace="4" align="absmiddle" src="{$image_root}state_disabled.gif">
  933. <xsl:attribute name="alt"><xts:string id="IDS_DISABLED"/></xsl:attribute>
  934. </img>
  935. </xsl:when>
  936. <xsl:when test="cm:target/*/cm:disabled = 'true' or cm:base/*/cm:disabled = 'true'">
  937. <img height="16" width="16" hspace="4" align="absmiddle" src="{$image_root}state_source_disabled.gif">
  938. <xsl:attribute name="alt"><xts:string id="IDS_DISABLED"/></xsl:attribute>
  939. </img>
  940. </xsl:when>
  941. </xsl:choose>
  942. </xsl:otherwise>
  943. </xsl:choose>
  944. <xsl:text>&#160;&#160;</xsl:text>
  945. </cp:columnContent>
  946. <xsl:if test="$drillthru_view = 'Y'">
  947. <cp:columnContent wrap="wrap" width="50%">
  948. <xsl:variable name="object-start-at-path">
  949. <xsl:choose>
  950. <!-- Do not provide a path for contact otherwise invalid path displayed for logged on user -->
  951. <xsl:when test="string(key('env-param','search_base'))='contact' or string(key('env-param','search_base'))='account'"/>
  952. <xsl:when test="starts-with(cm:target/*/cm:searchPath, '~') or starts-with(cm:target/*/cm:searchPath,key('session-param', 'e_hp'))">
  953. <xsl:value-of select="concat(key('session-param', 'e_hp'), '/folder')"/>
  954. </xsl:when>
  955. <xsl:when test="starts-with(cm:target/*/cm:searchPath,'/content')">
  956. <xsl:value-of select="$defaultContentRoot"/>
  957. </xsl:when>
  958. </xsl:choose>
  959. </xsl:variable>
  960. <xsl:if test="cm:objectClass='drillPath'">
  961. <xsl:choose>
  962. <xsl:when test="string(cm:target/@nil)='' and not(cm:target/cm:nil)">
  963. <xsl:choose>
  964. <xsl:when test="contains(string(cm:target/*/cm:permissions),'read') or contains(string(cm:target/*/cm:permissions),'execute')">
  965. <cf:do-the-path-link>
  966. <cf:param name="familytree">cm:target/*/cm:ancestors</cf:param>
  967. <cf:param name="familymember">cm:target/*/cm:defaultName</cf:param>
  968. <cf:param name="home">
  969. <xsl:value-of select="$object-start-at-path"/>
  970. </cf:param>
  971. </cf:do-the-path-link>
  972. </xsl:when>
  973. <xsl:otherwise>
  974. <xts:string id="IDS_TOOLS_DRILLPATH_NOTARGET"/>
  975. </xsl:otherwise>
  976. </xsl:choose>
  977. </xsl:when>
  978. <xsl:otherwise>
  979. <xts:string id="IDS_PROP_DRILLPATH_TARGETNOTSPECIFIED"/>
  980. </xsl:otherwise>
  981. </xsl:choose>
  982. </xsl:if>
  983. <xsl:text>&#160;&#160;</xsl:text>
  984. </cp:columnContent>
  985. </xsl:if>
  986. <cp:columnContent width="200px">
  987. <nobr>
  988. <!-- 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 -->
  989. <xsl:variable name="modifTime">
  990. <xsl:value-of select="xtsext:formatDateFromUTC( string( cm:modificationTime ), number( '2' ), number( '3' ), string( $timeZone ), string( $contentLocale ) )"/>
  991. </xsl:variable>
  992. <xsl:value-of select="xtsext:enforceBTD($modifTime, 'auto', $productLocale, boolean($isBidiEnabled='true'))"/>
  993. </nobr>
  994. </cp:columnContent>
  995. <cp:columnContent>
  996. <cp:columnCondition><xsl:value-of select="$showTenantInfo"/></cp:columnCondition>
  997. <xsl:value-of select="cm:tenantName"/>
  998. </cp:columnContent>
  999. <cp:columnContent width="170px">
  1000. <nobr>
  1001. <xsl:call-template name="action-properties">
  1002. <xsl:with-param name="class" select="$class"/>
  1003. <xsl:with-param name="supportPropertiesAction" select="true()"/>
  1004. <xsl:with-param name="supportAllActionsAction" select="true()"/>
  1005. <xsl:with-param name="effectiveUserCapabilities" select="$effectiveUserCapabilities"/>
  1006. </xsl:call-template>
  1007. </nobr>
  1008. </cp:columnContent>
  1009. </cp:tableContent>
  1010. </cf:param>
  1011. </cf:main-pager-section>
  1012. </xsl:when>
  1013. </xsl:choose>
  1014. </tool:content>
  1015. </xsl:template>
  1016. <xsl:template name="search-panel">
  1017. <mt:search type="tools">
  1018. <mt:scopes>
  1019. <mt:scope>fb</mt:scope>
  1020. <mt:scope>fo</mt:scope>
  1021. <mt:scope>p</mt:scope>
  1022. </mt:scopes>
  1023. <mt:close-params>
  1024. <param>backURL</param>
  1025. <param>m_path</param>
  1026. </mt:close-params>
  1027. <mt:stypes>
  1028. <mt:stype name="drillPath"><xts:string id="IDS_OBJ_DRILLPATH"/></mt:stype>
  1029. <mt:stype name="package"><xts:string id="IDS_OBJ_PACKAGE"/></mt:stype>
  1030. <mt:stype name="folder"><xts:string id="IDS_OBJ_FOLDER"/></mt:stype>
  1031. </mt:stypes>
  1032. </mt:search>
  1033. </xsl:template>
  1034. <!-- Insert common templates -->
  1035. <mt:actions mode="tools"/>
  1036. <pf:gen-action/>
  1037. <pf:gen-icon/>
  1038. <pf:gen-url/>
  1039. </xsl:stylesheet>
  1040. </xts:block>
  1041. <!--
  1042. ===============================================================================================
  1043. render-page - Main page rendering block.
  1044. ===============================================================================================
  1045. -->
  1046. <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">
  1047. <xts:logicsheet path="logicsheets/portal.xsl"/>
  1048. <!-- Cognos Central main behaviour logic -->
  1049. <xts:logicsheet path="logicsheets/presentation/main/presentation.xsl"/>
  1050. <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">
  1051. <xsl:output method="xml" version="1.0" encoding="utf-8" indent="no"/>
  1052. <pf:variables/>
  1053. <xsl:template match="/root">
  1054. <xts:sequence>
  1055. <xts:replace select="/root/output/*[local-name() = 'part']">
  1056. <xos:part>
  1057. <xos:entityHeader>
  1058. <xos:param name="Content-Type">text/html; charset=utf-8</xos:param>
  1059. </xos:entityHeader>
  1060. <xos:entityBody>
  1061. <!-- Note: DOCTYPE is handled by mt:page -->
  1062. <html lang="{$productLocale}">
  1063. <!-- copy in the head content -->
  1064. <xsl:copy-of select="output/xos:part/xos:entityBody/xos:content[@id = 'head']"/>
  1065. <mt:page region="IDS_TOOLS_DRILLPATH">
  1066. <!-- copy in the banner -->
  1067. <xsl:copy-of select="output/xos:part/xos:entityBody/xos:content[@id = 'banner']"/>
  1068. <!-- copy in the body -->
  1069. <xsl:copy-of select="output/xos:part/xos:entityBody/xos:content[@id = 'body']"/>
  1070. </mt:page>
  1071. </html>
  1072. </xos:entityBody>
  1073. </xos:part>
  1074. </xts:replace>
  1075. </xts:sequence>
  1076. </xsl:template>
  1077. </xsl:stylesheet>
  1078. </xts:block>
  1079. <!--
  1080. =============================================
  1081. Output debug dump
  1082. =============================================
  1083. -->
  1084. <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">
  1085. <!-- get the debug logic sheet -->
  1086. <xts:logicsheet path="logicsheets/debuglogic.xslt"/>
  1087. <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">
  1088. <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no"/>
  1089. <xsl:template match="/">
  1090. <dbg:dumpxml select="/root"/>
  1091. </xsl:template>
  1092. </xsl:stylesheet>
  1093. </xts:block>
  1094. </xts:morphlet>