gen_page.xslt 32 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794
  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. <xsl:stylesheet version="1.0"
  13. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  14. xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
  15. xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
  16. xmlns:pm="http://developer.cognos.com/schemas/xts/pm"
  17. xmlns:mt="http://developer.cognos.com/schemas/xts/logicsheets/presentation/main/mt"
  18. xmlns:mf="http://developer.cognos.com/schemas/xts/logicsheets/presentation/main/mf"
  19. xmlns:xts="http://developer.cognos.com/schemas/xts/"
  20. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  21. xmlns:cf="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/framework/"
  22. xmlns:cp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/presentation/"
  23. xmlns:rss="http://developer.cognos.com/schemas/xts/rss/"
  24. xmlns:bus="http://developer.cognos.com/schemas/bibus/3/"
  25. xmlns:out="dummy-uri"
  26. xmlns:cps="http://developer.cognos.com/schemas/cps/asm/objects/1/"
  27. xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
  28. xmlns:mvc="http://developer.cognos.com/schemas/xts/mvc"
  29. exclude-result-prefixes="xsl cps cm pf pm mt mf xts xtsext cf cp rss out bus xts SOAP-ENV mvc">
  30. <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no" omit-xml-declaration="yes"/>
  31. <!-- Global vars -->
  32. <!-- ================================================= -->
  33. <mf:variables stateParams="mvc-sfolder m_ts m_folder m_folder2 m_nbid m_nbid2 m_section m_pagerfrom m_pagerto m_pg_e m_tab rui m_page backURL m_portlet" mode="main"/>
  34. <pf:variables/>
  35. <pf:documentFormats/>
  36. <mf:main-variables/>
  37. <rss:variables/>
  38. <mf:TabRenderingTemplates/>
  39. <cp:flyoutControl/>
  40. <xsl:variable name="cmd-form" select="'cform'"/>
  41. <xsl:variable name="edit-form" select="'pform'"/>
  42. <!-- Container security -->
  43. <xsl:variable name="canTraverseFolder" select="contains(string($rootReply/*/cm:permissions), 'traverse')"/>
  44. <xsl:variable name="canWriteFolder" select="contains(string($rootReply/*/cm:permissions), 'write')"/>
  45. <!-- For paths pointing to the personal folder space ONLY, we hide the first part of the path (i.e. /directory/namespace/...). We show My Folders instead. -->
  46. <xsl:variable name="start-at-path">
  47. <xsl:if test="$isMFNav">
  48. <xsl:value-of select="key('session-param', 'e_mrootpath')"/>
  49. </xsl:if>
  50. <xsl:if test="$isPFNav and $defaultContentRoot != '/content' and not($showingUPF)">
  51. <xsl:value-of select="$defaultContentRoot"/>
  52. </xsl:if>
  53. </xsl:variable>
  54. <!-- start the output -->
  55. <!-- ================================================= -->
  56. <xsl:template match="/root">
  57. <xsl:variable name="oTitle">
  58. <xsl:choose>
  59. <xsl:when test="$pageName != ''">
  60. <xsl:value-of select="$pageName"/>
  61. </xsl:when>
  62. <xsl:when test="$pageNotFound != ''">
  63. <xts:string id="IDS_PAGE_UNAVAILABLE"/>
  64. </xsl:when>
  65. </xsl:choose>
  66. </xsl:variable>
  67. <xsl:variable name="invalidContent" select="not(count($rootReply/*)=0 or (count($rootReply/*)=1 and ($rootReply/*/cm:ancestors/cm:ancestorInfo[cm:objectClass='content'] or $rootReply/*/cm:ancestors/cm:ancestorInfo[cm:objectClass='directory'] or $rootReply/*[cm:objectClass='content'])))"/>
  68. <xsl:variable name="thisURL" select="concat($gateway,'?b_action=xts.run&amp;m=portal/cc.xts')"/>
  69. <!-- Note: DOCTYPE is handled by mt:page -->
  70. <html lang="{$productLocale}" encodeDocType="false">
  71. <!-- MVC - Content Reference -->
  72. <xsl:if test="$isMFNav and $mvc-N-enabled">
  73. <mvc:remotePersonalRCRCreation/>
  74. </xsl:if>
  75. <xsl:choose>
  76. <xsl:when test="$invalidContent">
  77. <head>
  78. <meta http-equiv="refresh">
  79. <xsl:attribute name="content">0; URL=<xsl:value-of select="$thisURL"/></xsl:attribute>
  80. </meta>
  81. </head>
  82. <body/>
  83. </xsl:when>
  84. <xsl:otherwise>
  85. <head>
  86. <pf:meta expires="false"/>
  87. <title>
  88. <xsl:value-of select="$oTitle"/> -
  89. <xsl:choose>
  90. <xsl:when test="$displayMode = 'viewer'"><xts:string id="REPORT_VIEWER_WINDOW_TITLE"/></xsl:when>
  91. <xsl:otherwise><xts:string id="IDS_PORTAL"/></xsl:otherwise>
  92. </xsl:choose>
  93. </title>
  94. <mt:stylesheet/>
  95. <mf:head/>
  96. <pf:help context=""/>
  97. <pf:launch/>
  98. <xsl:if test="$pageType = 'PFMF'">
  99. <!-- link for Active Bookmarks (RSS) in FireFox -->
  100. <rss:link/>
  101. </xsl:if>
  102. </head>
  103. <!-- HTML body -->
  104. <mt:page mode="main" region="IDS_PORTAL">
  105. <!-- Render the top headers. -->
  106. <xsl:call-template name="render-header"/>
  107. <xsl:variable name="isHomeCommand" select="key('env-param', 'gohome')"/>
  108. <xsl:variable name="invalidHomeHandler">
  109. <script>
  110. alert("<xts:string id="IDS_PAGE_INVALID_HOME" encode="javascript"/>");
  111. var url = "<xsl:value-of select="xtsext:javascriptencode($gateway)"/>?<xsl:value-of select="xtsext:javascriptencode($baseCCQS)"/>";
  112. location.href = url;
  113. </script>
  114. </xsl:variable>
  115. <xsl:choose>
  116. <!-- Render standard PF/MF tabs -->
  117. <xsl:when test="$pageType = 'PFMF'">
  118. <form name="pform" method="post" action="{$gateway}" style="margin:0px">
  119. <mf:edit-vars/>
  120. <xsl:choose>
  121. <!-- MVC - Content Reference -->
  122. <xsl:when test="$mvc-N-enabled and $mvc-remoteNav">
  123. <xsl:call-template name="mvcNavigateRemoteContent"/>
  124. </xsl:when>
  125. <!-- Handle Zero access or deleted folder scenarios (this is when the user has none of the 5 security permissions) or the folder no longer exists -->
  126. <xsl:when test="not($rootReply/*) and not($showingUPF)">
  127. <xsl:choose>
  128. <xsl:when test="$isHomeCommand">
  129. <xsl:copy-of select="$invalidHomeHandler"/>
  130. </xsl:when>
  131. <xsl:otherwise>
  132. <mt:containerNoAccess/>
  133. </xsl:otherwise>
  134. </xsl:choose>
  135. </xsl:when>
  136. <!-- detailed view -->
  137. <xsl:when test="$defaultNavigationView = 'newspaper'">
  138. <xsl:choose>
  139. <xsl:when test="not($childReply/*[cm:usage != 'subObject']) and not($showingUPF)">
  140. <mt:objectNoneFound/>
  141. </xsl:when>
  142. <xsl:otherwise>
  143. <!-- Define all necessary variables that we will need to render detailed view here so they will have a global scope -->
  144. <xsl:variable name="columns" select="number(key('session-param', 'columnsPerPage'))"/>
  145. <!-- Column width in percent of the total row width with 1% spacers. -->
  146. <xsl:variable name="width">
  147. <xsl:choose>
  148. <xsl:when test="$columns = '2'">49</xsl:when>
  149. <xsl:when test="$columns = '3'">32</xsl:when>
  150. <xsl:when test="$columns = '4'">24</xsl:when>
  151. <xsl:when test="$columns = '5'">19</xsl:when>
  152. <xsl:otherwise>49</xsl:otherwise>
  153. </xsl:choose>
  154. </xsl:variable>
  155. <p/>
  156. <!-- Render the Entries -->
  157. <!-- Show CM data if the user can traverse the container -->
  158. <xsl:choose>
  159. <xsl:when test="$canTraverseFolder and count($childReply/*[cm:usage != 'subObject']) > 0">
  160. <xsl:for-each select="$childReply/*[cm:usage != 'subObject']">
  161. <xsl:call-template name="render-detail">
  162. <xsl:with-param name="columns" select="$columns"/>
  163. <xsl:with-param name="width" select="$width"/>
  164. </xsl:call-template>
  165. </xsl:for-each>
  166. <rss:button/>
  167. </xsl:when>
  168. <xsl:when test="count($childReply/*[cm:usage != 'subObject']) = 0 and ($isRootFolder) ">
  169. <mt:objectNoneFound/>
  170. </xsl:when>
  171. <xsl:otherwise>
  172. <xsl:if test="not($showingUPF)">
  173. <mt:objectNoneFound id="IDS_NO_TRAVERSE_CONTAINER"/>
  174. </xsl:if>
  175. </xsl:otherwise>
  176. </xsl:choose>
  177. <!-- Show UPF content -->
  178. <xsl:if test="$showingUPF">
  179. <!-- Insert some space between UPF and CC -->
  180. <xsl:if test="$rootReply/*">
  181. <div style="padding-top:50px;"/>
  182. </xsl:if>
  183. <xsl:choose>
  184. <xsl:when test="upfContent/cm:queryResponse/cm:queryReply[2]/*[cm:usage != 'subObject']">
  185. <xsl:for-each select="upfContent/cm:queryResponse/cm:queryReply[2]/*[cm:usage != 'subObject']">
  186. <xsl:call-template name="render-detail">
  187. <xsl:with-param name="columns" select="$columns"/>
  188. <xsl:with-param name="width" select="$width"/>
  189. </xsl:call-template>
  190. </xsl:for-each>
  191. </xsl:when>
  192. <xsl:otherwise>
  193. <mt:objectNoneFound/>
  194. </xsl:otherwise>
  195. </xsl:choose>
  196. </xsl:if>
  197. </xsl:otherwise>
  198. </xsl:choose>
  199. </xsl:when>
  200. <!-- list view -->
  201. <xsl:otherwise>
  202. <xsl:if test="$isRootFolder or not($showingUPF)">
  203. <xsl:choose>
  204. <xsl:when test="$canTraverseFolder">
  205. <xsl:call-template name="renderCMContentInList"/>
  206. </xsl:when>
  207. <xsl:otherwise>
  208. <mt:objectNoneFound id="IDS_NO_TRAVERSE_CONTAINER"/>
  209. </xsl:otherwise>
  210. </xsl:choose>
  211. <p/>
  212. </xsl:if>
  213. <!-- Show UPF content -->
  214. <xsl:choose>
  215. <xsl:when test="count(upfContent/cm:queryResponse/cm:queryReply[2]/*[cm:usage != 'subObject']) > 0">
  216. <xsl:call-template name="renderUPFContentInList"/>
  217. </xsl:when>
  218. <xsl:otherwise>
  219. <xsl:if test="$showingUPF">
  220. <mt:objectNoneFound/>
  221. </xsl:if>
  222. </xsl:otherwise>
  223. </xsl:choose>
  224. </xsl:otherwise>
  225. </xsl:choose>
  226. </form>
  227. </xsl:when>
  228. <!-- No pages in portal -->
  229. <xsl:when test="$pageID = '' and count($portalPages/*) = 0">
  230. <mt:errorMessage>
  231. <xts:string id="IDS_PAGE_NO_PAGES"/>
  232. <br/>
  233. <br/>
  234. <xsl:variable name="action">
  235. <a href="javascript:pageCmd('add')">
  236. <xts:string id="IDS_PAGE_ADD_PAGES"/>
  237. </a>
  238. </xsl:variable>
  239. <xsl:if test="$canWriteToAccount">
  240. <xts:string id="IDS_PAGE_ACTION">
  241. <xts:param name="pageAction">
  242. <xsl:copy-of select="$action"/>
  243. </xts:param>
  244. </xts:string>
  245. </xsl:if>
  246. </mt:errorMessage>
  247. <xsl:if test="$isHomeCommand and key('env-param', 'm_tabPath')">
  248. <xsl:copy-of select="$invalidHomeHandler"/>
  249. </xsl:if>
  250. </xsl:when>
  251. <!-- Page Not found -->
  252. <xsl:when test="($pageNotFound or ($pageDisabled and not($pageCanWrite)) or not($pageCanRead)) and $pageID != 'portlet'">
  253. <mt:errorMessage>
  254. <xts:string id="IDS_PAGE_UNAVAILABLE_DESC"/>
  255. <xsl:variable name="action">
  256. <a href="javascript:pageCmd('remove')">
  257. <xts:string id="IDS_PAGE_MENU_REMOVE_PAGE"/>
  258. </a>
  259. </xsl:variable>
  260. <br/>
  261. <!-- Add a "remove portal tab" when in protal tab mode -->
  262. <xsl:if test="$isPersonalPortalPage and $canWriteToAccount and $displayMode = 'portal'">
  263. <xts:string id="IDS_PAGE_ACTION">
  264. <xts:param name="pageAction">
  265. <xsl:copy-of select="$action"/>
  266. </xts:param>
  267. </xts:string>
  268. </xsl:if>
  269. <xsl:if test="$isHomeCommand and $pageNotFound and key('env-param', 'm_tabPath')">
  270. <xsl:copy-of select="$invalidHomeHandler"/>
  271. </xsl:if>
  272. </mt:errorMessage>
  273. </xsl:when>
  274. <!-- Render the page -->
  275. <xsl:otherwise>
  276. <xsl:value-of select="/root/assembler/*[1]/cps:pageletMarkup/cps:markupString" disable-output-escaping="yes"/>
  277. </xsl:otherwise>
  278. </xsl:choose>
  279. <form name="cform" method="post" action="{$gateway}">
  280. <mf:cmd-vars/>
  281. </form>
  282. <!-- End of HTML body -->
  283. </mt:page>
  284. </xsl:otherwise>
  285. </xsl:choose>
  286. </html>
  287. </xsl:template>
  288. <!-- common templates. -->
  289. <mt:actions mode="main"/>
  290. <pf:gen-action/>
  291. <pf:gen-icon/>
  292. <pf:gen-url/>
  293. <pf:utilities/>
  294. <!-- MVC - Content Reference -->
  295. <mvc:instance-vars/>
  296. <xsl:template name="mvcNavigateRemoteContent">
  297. <xsl:variable name="hasAccess" select="contains($rootReply/*/cm:permissions, 'traverse') and contains($rootReply/*/cm:permissions, 'read')"/>
  298. <xsl:choose>
  299. <xsl:when test="$hasAccess">
  300. <xsl:variable name="fragment-params">
  301. <xsl:variable name="mvc-sfolder">
  302. <xsl:choose>
  303. <xsl:when test="/root/env/param[@name='mvc-sfolder']">
  304. <xsl:value-of select="/root/env/param[@name='mvc-sfolder']"/>
  305. </xsl:when>
  306. <xsl:when test="$rootReply/*/cm:specification/*[local-name()='specification']/*[local-name()='param'][@name='startingFolder']">
  307. <xsl:value-of select="$rootReply/*/cm:specification/*[local-name()='specification']/*[local-name()='param'][@name='startingFolder']"/>
  308. </xsl:when>
  309. </xsl:choose>
  310. </xsl:variable>
  311. <xsl:choose>
  312. <xsl:when test="$rcr-id = $cookied-rcr-id"></xsl:when>
  313. <xsl:when test="$mvc-sfolder">&amp;containerId=<xsl:value-of select="xtsext:urlencode($mvc-sfolder)"/></xsl:when>
  314. <xsl:when test="$mvc-remotePFNav">&amp;containerId=systemDefault</xsl:when>
  315. <xsl:when test="$mvc-remoteMFNav">&amp;containerId=userDefault</xsl:when>
  316. </xsl:choose>
  317. </xsl:variable>
  318. <mvc:instance id="'navigator'" fragment-params="$fragment-params"/>
  319. </xsl:when>
  320. <xsl:otherwise>
  321. <mt:containerNoAccess/>
  322. </xsl:otherwise>
  323. </xsl:choose>
  324. </xsl:template>
  325. <xsl:template name="renderCMContentInList">
  326. <mf:long-description-scripts/>
  327. <cf:main-pager-section width="100%" virtualPage="true">
  328. <cf:param name="target">concat(concat($app,'/'),$mname)</cf:param>
  329. <cf:param name="item-path">$childReply/*[cm:usage != 'subObject']</cf:param>
  330. <cf:param name="lines-per-page">
  331. <xsl:value-of select="key('session-param', 'linesPerPage')"/>
  332. </cf:param>
  333. <cf:param name="rows">
  334. <cp:tableHeader session-name="s_cc">
  335. <cp:columnHeader width="16" toggleName="checkbox_" noLabel="true" id="checkbox_0"/>
  336. <cp:columnHeader width="20"/>
  337. <cp:columnHeader sort="n" width="100%" wrap="true" id="columnHeaderName">
  338. <cp:sortHref>
  339. <xsl:value-of select="$back-url"/>&amp;m_s_cc=<xsl:choose><xsl:when test="key('session-param', 's_cc') = 'na' ">nd</xsl:when><xsl:when test="key('session-param', 's_cc') = 'nd' "/><xsl:otherwise>na</xsl:otherwise></xsl:choose>
  340. </cp:sortHref>
  341. <xts:string id="IDS_NAME"/>
  342. </cp:columnHeader>
  343. <cp:columnHeader width="200" sort="d" id="columnHeaderModified">
  344. <cp:sortHref>
  345. <xsl:value-of select="$back-url"/>&amp;m_s_cc=<xsl:choose><xsl:when test="key('session-param', 's_cc') = 'da' ">dd</xsl:when><xsl:when test="key('session-param', 's_cc') = 'dd' "/><xsl:otherwise>da</xsl:otherwise></xsl:choose>
  346. </cp:sortHref>
  347. <xts:string id="IDS_MODIFIED"/>
  348. </cp:columnHeader>
  349. <cp:columnHeader width="100" wrap="false">
  350. <cp:columnCondition><xsl:value-of select="/root/session/param[@name='e_showTenantInfo']='true'"/></cp:columnCondition>
  351. <xts:string id="IDS_OBJ_TENANT"/>
  352. </cp:columnHeader>
  353. <cp:columnHeader width="170">
  354. <xts:string id="IDS_HEADING_ACTIONS"/>
  355. </cp:columnHeader>
  356. </cp:tableHeader>
  357. <cp:tableContent>
  358. <cp:common-render-variables>
  359. <!-- Common variables used in rendering icons, actions .. etc. -->
  360. <pm:permissions/>
  361. <mf:common-entry-varaibles/>
  362. </cp:common-render-variables>
  363. <cp:columnContent>
  364. <xsl:if test="$defaultNavigationView = 'detail'"><xsl:attribute name="valign">top</xsl:attribute></xsl:if>
  365. <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>
  366. <input type="checkbox" value="{xtsext:urlencode(string(cm:searchPathID))}" name="checkbox_{position()}" id="checkbox_{position()}" aria-label="{$checkboxLabel}">
  367. <xsl:if test="key('env-param',concat('checkbox_' , position()))">
  368. <xsl:attribute name="checked">checked</xsl:attribute>
  369. </xsl:if>
  370. </input>
  371. </cp:columnContent>
  372. <cp:columnContent>
  373. <xsl:if test="$defaultNavigationView = 'detail'"><xsl:attribute name="valign">top</xsl:attribute></xsl:if>
  374. <xsl:call-template name="gen-icon">
  375. <xsl:with-param name="class" select="$class"/>
  376. <xsl:with-param name="userInterfaces" select="$userInterfaces"/>
  377. <xsl:with-param name="targetUserInterfaces" select="$targetUserInterfaces"/>
  378. <xsl:with-param name="canRead" select="$canRead"/>
  379. <xsl:with-param name="canWrite" select="$canWrite"/>
  380. <xsl:with-param name="canExecute" select="$canExecute"/>
  381. <xsl:with-param name="canTraverse" select="$canTraverse"/>
  382. <xsl:with-param name="isDangling" select="$isDangling"/>
  383. <xsl:with-param name="output_format" select="$output_format"/>
  384. <xsl:with-param name="action" select="$action"/>
  385. <xsl:with-param name="executionFormat" select="$executionFormat"/>
  386. <xsl:with-param name="hiddenObject" select="$hiddenObject"/>
  387. <xsl:with-param name="effectiveUserCapabilities" select="$effectiveUserCapabilities"/>
  388. </xsl:call-template>
  389. </cp:columnContent>
  390. <cp:columnContent width="100%" wrap="true">
  391. <xsl:if test="$defaultNavigationView = 'detail'"><xsl:attribute name="valign">top</xsl:attribute></xsl:if>
  392. <!-- Logic to figure out if an entry is to be hyperlinked and if it is what the URL should be -->
  393. <mf:entry-name/>
  394. <mf:long-description/>
  395. </cp:columnContent>
  396. <cp:columnContent width="200">
  397. <xsl:if test="$defaultNavigationView = 'detail'"><xsl:attribute name="valign">top</xsl:attribute></xsl:if>
  398. <nobr>
  399. <!-- 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 -->
  400. <xsl:variable name="modifTime">
  401. <xsl:value-of select="xtsext:formatDateFromUTC( string( cm:modificationTime ), number( '2' ), number( '3' ), string( $timeZone ), string( $contentLocale ) )"/>
  402. </xsl:variable>
  403. <xsl:value-of select="xtsext:enforceBTD($modifTime, 'auto', $productLocale, boolean($isBidiEnabled='true'))"/>
  404. </nobr>
  405. </cp:columnContent>
  406. <cp:columnContent width="100">
  407. <cp:columnCondition><xsl:value-of select="/root/session/param[@name='e_showTenantInfo']='true'"/></cp:columnCondition>
  408. <xsl:value-of select="xtsext:enforceBTD(cm:tenantName, $baseTextDirection, $productLocale, boolean($isBidiEnabled='true'))"/>
  409. </cp:columnContent>
  410. <cp:columnContent width="170">
  411. <xsl:if test="$defaultNavigationView = 'detail'"><xsl:attribute name="valign">top</xsl:attribute></xsl:if>
  412. <nobr>
  413. <xsl:call-template name="action-properties">
  414. <xsl:with-param name="supportRunOptionsAction" select="true()"/>
  415. <xsl:with-param name="supportScheduleAction" select="true()"/>
  416. <xsl:with-param name="canRead" select="$canRead"/>
  417. <xsl:with-param name="canWrite" select="$canWrite"/>
  418. <xsl:with-param name="canExecute" select="$canExecute"/>
  419. <xsl:with-param name="canTraverse" select="$canTraverse"/>
  420. <xsl:with-param name="class" select="$class"/>
  421. <xsl:with-param name="userInterfaces" select="$userInterfaces"/>
  422. <xsl:with-param name="targetUserInterfaces" select="$targetUserInterfaces"/>
  423. <xsl:with-param name="output_format" select="$output_format"/>
  424. <xsl:with-param name="isDangling" select="$isDangling"/>
  425. <xsl:with-param name="effectiveUserCapabilities" select="$effectiveUserCapabilities"/>
  426. </xsl:call-template>
  427. </nobr>
  428. </cp:columnContent>
  429. </cp:tableContent>
  430. </cf:param>
  431. <cf:param name="pagerSummary"><xts:string id="IDS_MAINPAGER_SUMMARY"/></cf:param>
  432. </cf:main-pager-section>
  433. <rss:button/>
  434. </xsl:template>
  435. <!-- UPF in list mode -->
  436. <xsl:template name="renderUPFContentInList">
  437. <cf:main-pager-section width="100%" virtualPage="false" name="upf">
  438. <cf:param name="target">concat($app,'/',$mname)</cf:param>
  439. <cf:param name="item-path">upfContent/cm:queryResponse/cm:queryReply[2]/*[cm:usage != 'subObject']</cf:param>
  440. <cf:param name="lines-per-page">
  441. <xsl:value-of select="key('session-param', 'linesPerPage')"/>
  442. </cf:param>
  443. <cf:param name="rows">
  444. <cp:tableContent>
  445. <cp:common-render-variables>
  446. <!-- Common variables used in rendering icons, actions .. etc. -->
  447. <pm:permissions/>
  448. <mf:common-entry-varaibles/>
  449. </cp:common-render-variables>
  450. <cp:columnContent>
  451. <img src="{$webcontent}/images/space.gif" alt="" width="16" height="1"/>
  452. </cp:columnContent>
  453. <cp:columnContent>
  454. <xsl:call-template name="gen-icon">
  455. <xsl:with-param name="class" select="$class"/>
  456. <xsl:with-param name="userInterfaces" select="$userInterfaces"/>
  457. <xsl:with-param name="canRead" select="$canRead"/>
  458. <xsl:with-param name="canWrite" select="$canWrite"/>
  459. <xsl:with-param name="canExecute" select="$canExecute"/>
  460. <xsl:with-param name="canTraverse" select="$canTraverse"/>
  461. <xsl:with-param name="isDangling" select="$isDangling"/>
  462. <xsl:with-param name="output_format" select="$output_format"/>
  463. <xsl:with-param name="hiddenObject" select="$hiddenObject"/>
  464. <xsl:with-param name="effectiveUserCapabilities" select="$effectiveUserCapabilities"/>
  465. </xsl:call-template>
  466. </cp:columnContent>
  467. <cp:columnContent width="100%">
  468. <!-- Logic to figure out if an entry is to be hyperlinked and if it is what the URL should be -->
  469. <mf:entry-name/>
  470. </cp:columnContent>
  471. <cp:columnContent width="200">
  472. <nobr>
  473. <xsl:value-of select="cm:updateDate"/>
  474. </nobr>
  475. </cp:columnContent>
  476. <cp:columnContent width="170">
  477. <nobr>
  478. <xsl:call-template name="action-properties">
  479. <xsl:with-param name="supportRunOptionsAction" select="true()"/>
  480. <xsl:with-param name="supportScheduleAction" select="true()"/>
  481. <xsl:with-param name="canRead" select="$canRead"/>
  482. <xsl:with-param name="canWrite" select="$canWrite"/>
  483. <xsl:with-param name="canExecute" select="$canExecute"/>
  484. <xsl:with-param name="canTraverse" select="$canTraverse"/>
  485. <xsl:with-param name="class" select="$class"/>
  486. <xsl:with-param name="output_format" select="$output_format"/>
  487. <xsl:with-param name="isDangling" select="$isDangling"/>
  488. <xsl:with-param name="effectiveUserCapabilities" select="$effectiveUserCapabilities"/>
  489. </xsl:call-template>
  490. </nobr>
  491. </cp:columnContent>
  492. </cp:tableContent>
  493. </cf:param>
  494. </cf:main-pager-section>
  495. </xsl:template>
  496. <xsl:template name="render-detail">
  497. <xsl:param name="columns"/>
  498. <xsl:param name="width"/>
  499. <mt:detailedEntryView>
  500. <!-- Common variables used in rendering icons, actions .. etc. -->
  501. <mt:object-variables>
  502. <pm:permissions/>
  503. <mf:common-entry-varaibles/>
  504. </mt:object-variables>
  505. <!-- Logic to figure out if an entry is to be hyperlinked and if it is what the URL should be -->
  506. <mt:object-name>
  507. <mf:entry-name/>
  508. </mt:object-name>
  509. </mt:detailedEntryView>
  510. </xsl:template>
  511. <xsl:template name="render-header">
  512. <mt:h1 mode="main" id="headerBackA11Y">
  513. <mt:title>
  514. <xsl:choose>
  515. <xsl:when test="$displayMode = 'viewer'">
  516. <xsl:choose>
  517. <xsl:when test="$pageName != ''">
  518. <xsl:value-of select="$pageName"/>
  519. </xsl:when>
  520. <xsl:when test="$pageNotFound != ''">
  521. <xts:string id="IDS_PAGE_UNAVAILABLE"/>
  522. </xsl:when>
  523. </xsl:choose>
  524. </xsl:when>
  525. <xsl:otherwise>
  526. <xts:string id="IDS_PORTAL"/>
  527. </xsl:otherwise>
  528. </xsl:choose>
  529. </mt:title>
  530. </mt:h1>
  531. <!-- only render these headers when in portal mode -->
  532. <xsl:if test="$displayMode = 'portal'">
  533. <mt:h3 mode="main">
  534. <mt:tabs/>
  535. </mt:h3>
  536. <mt:h4>
  537. <mt:path>
  538. <div id="breadcrumbContainer" tabindex="0" aria-labelledby="pathInfo">
  539. <span id="pathInfo" style="position: absolute;margin-top: -9999px; ">Current Path</span>
  540. <xsl:choose>
  541. <xsl:when test="$mvc-N-enabled and $mvc-remoteNav">
  542. <!-- Breadcrumb is computed by remote fragment -->
  543. </xsl:when>
  544. <xsl:when test="$pageType = 'PFMF'">
  545. <!-- the path can be either a crn path or a path to a upfront object. -->
  546. <!-- If we are browsing an upfront object we do not make the requests for crn data -->
  547. <!-- the results below will work out as either one or the other (crn queries or upfront queries) will have data-->
  548. <!-- not both -->
  549. <cf:do-the-path-link>
  550. <cf:param name="familytree">$rootReply/*/cm:ancestors | upfContent/cm:queryResponse/cm:queryReply[1]/*/cm:ancestors</cf:param>
  551. <cf:param name="familymember">concat($rootReply/*/cm:defaultName, upfContent/cm:queryResponse/cm:queryReply[1]/*/cm:defaultName)</cf:param>
  552. <cf:param name="home"><xsl:value-of select="$start-at-path"/></cf:param>
  553. <cf:param name="anchorpath">
  554. <a>
  555. <xsl:attribute name="href">
  556. <xsl:value-of select="$gateway"/>?b_action=xts.run&amp;m=<xsl:value-of select="key('env-param','m')"/>
  557. <xsl:choose>
  558. <xsl:when test="cm:searchID">
  559. <xsl:text/>&amp;m_nbid=<xsl:value-of select="cm:searchID"/>
  560. </xsl:when>
  561. <xsl:otherwise>
  562. <xsl:text/>&amp;m_folder=<xsl:value-of select="cm:storeID"/>
  563. </xsl:otherwise>
  564. </xsl:choose>
  565. <xsl:if test="$m_nbid2 != ''">
  566. <xsl:text/>&amp;m_nbid2=<xsl:value-of select="xtsext:protect(xtsext:urlencode(string($m_nbid2)),'url','','getdata')"/>
  567. </xsl:if>
  568. <xsl:if test="$m_folder2 != ''">
  569. <xsl:text/>&amp;m_folder2=<xsl:value-of select="$m_folder2"/>
  570. </xsl:if>
  571. <xsl:value-of select="$request-url-params"/>
  572. </xsl:attribute>
  573. <xsl:variable name="cmTitle">
  574. <xsl:value-of select="cm:title"/>
  575. </xsl:variable>
  576. <xsl:if test="$isBidiEnabled = 'true'">
  577. <xsl:attribute name="dir">
  578. <xsl:value-of select="xtsext:getBTD($cmTitle, $baseTextDirection, $productLocale)"/>
  579. </xsl:attribute>
  580. </xsl:if>
  581. <xsl:value-of select="$cmTitle"/>
  582. </a>
  583. </cf:param>
  584. <cf:param name="kbA11y">true</cf:param>
  585. </cf:do-the-path-link>
  586. </xsl:when>
  587. </xsl:choose>
  588. </div>
  589. </mt:path>
  590. <mt:toolbar>
  591. <xsl:if test="not($mvc-N-enabled and $mvc-remoteNav)">
  592. <mt:tool-group hideDivider="true">
  593. <xsl:if test="$pageType = 'PFMF'">
  594. <mt:tool name="list"/>
  595. <mt:tool name="detail"/>
  596. </xsl:if>
  597. <xsl:if test="$pageType = 'custom'">
  598. <mt:tool name="new" new-class="pagelet"/>
  599. <xsl:if test="$canAddPageToPortal">
  600. <mt:tool name="add_page"/>
  601. </xsl:if>
  602. </xsl:if>
  603. </mt:tool-group>
  604. <xsl:if test="$pageType = 'custom' and not($pageNotFound) and $pageCanWrite and $pageCanRead">
  605. <mt:tool-group>
  606. <mt:tool name="edit_pagelet"/>
  607. </mt:tool-group>
  608. </xsl:if>
  609. <xsl:if test="$pageType = 'PFMF'">
  610. <mt:tool-group>
  611. <xsl:if test="$current-class = 'folder' or $current-class = 'package' or $current-class = 'content' ">
  612. <mt:tool name="new" new-class="folder"/>
  613. <xsl:if test="$userCanUseSelfServicePackageWizard">
  614. <mt:tool name="new" new-class="self-service-package"/>
  615. </xsl:if>
  616. <xsl:if test="$userCanUseMetricsManagerAdministration">
  617. <xsl:choose>
  618. <xsl:when test="$canTraverseFolder and $canWriteFolder">
  619. <mt:tool name="new" new-class="metricsPackage"/>
  620. </xsl:when>
  621. <xsl:otherwise>
  622. <mt:tool name="new" new-class="metricsPackage" disable="true"/>
  623. </xsl:otherwise>
  624. </xsl:choose>
  625. </xsl:if>
  626. <xsl:if test="$userCanUseDashboardViewer and $userCanUseAdvancedDashboardFeatures">
  627. <mt:tool name="new" new-class="dashboard"/>
  628. </xsl:if>
  629. <mt:tool name="new" new-class="jobDefinition"/>
  630. <xsl:if test="$userCanUseMetricsManagerAdministration">
  631. <mt:tool name="new" new-class="metricsIntegrationTaskGroup"/>
  632. </xsl:if>
  633. <xsl:if test="not(key('system-param', 'disableURLObjectCreation') = 'true')">
  634. <mt:tool name="new" new-class="URL"/>
  635. </xsl:if>
  636. <mt:tool name="new" new-class="pagelet"/>
  637. <xsl:if test="$mvc-N-enabled">
  638. <xsl:choose>
  639. <xsl:when test="$isMFNav">
  640. <mt:tool name="new" new-class="launchable" class-subType="application/vnd.ibm.cognos.instance" context="Personal"/>
  641. </xsl:when>
  642. <xsl:otherwise>
  643. <mt:tool name="new" new-class="launchable" class-subType="application/vnd.ibm.cognos.instance"/>
  644. </xsl:otherwise>
  645. </xsl:choose>
  646. </xsl:if>
  647. </xsl:if>
  648. </mt:tool-group>
  649. <xsl:if test="$defaultNavigationView = 'newspaper' and not(not($isRootFolder) and $showingUPF)">
  650. <mt:tool-group>
  651. <mt:tool name="selectall"/>
  652. <mt:tool name="deselectall"/>
  653. </mt:tool-group>
  654. </xsl:if>
  655. <mt:tool-group>
  656. <xsl:choose>
  657. <xsl:when test="$canTraverseFolder and $canWriteFolder">
  658. <mt:tool name="cut" mode="main"/>
  659. <mt:tool name="copy" mode="main"/>
  660. <mt:tool name="paste"/>
  661. <mt:tool name="delete"/>
  662. </xsl:when>
  663. <xsl:otherwise>
  664. <mt:tool name="cut" mode="main" disable="true"/>
  665. <mt:tool name="copy" mode="main"/>
  666. <mt:tool name="paste" disable="true"/>
  667. <mt:tool name="delete" disable="true"/>
  668. </xsl:otherwise>
  669. </xsl:choose>
  670. </mt:tool-group>
  671. <mt:tool-group>
  672. <mt:tool name="properties"/>
  673. <mt:tool name="order"/>
  674. </mt:tool-group>
  675. </xsl:if>
  676. </xsl:if>
  677. </mt:toolbar>
  678. </mt:h4>
  679. </xsl:if>
  680. <xsl:if test="$displayMode = 'viewer' and $pageID != 'portlet'">
  681. <mt:h4>
  682. <mt:toolbar>
  683. <xsl:if test="$pageType = 'custom'">
  684. <mt:tool-group hideDivider="true">
  685. <mt:tool name="refreshUsingGet"/>
  686. </mt:tool-group>
  687. <xsl:choose>
  688. <xsl:when test="$canAddPageToPortal">
  689. <mt:tool-group>
  690. <mt:tool name="add_page"/>
  691. </mt:tool-group>
  692. </xsl:when>
  693. <!-- We typically should check for page level access here but we can cheat a bit and
  694. show a disabled icon when the page is already in the user's portal. -->
  695. <xsl:when test="$isPersonalPortalPage">
  696. <mt:tool-group>
  697. <mt:tool name="add_page" disable="true"/>
  698. </mt:tool-group>
  699. </xsl:when>
  700. </xsl:choose>
  701. <xsl:if test="$canEditPage">
  702. <mt:tool-group>
  703. <mt:tool name="edit_pagelet"/>
  704. </mt:tool-group>
  705. </xsl:if>
  706. </xsl:if>
  707. </mt:toolbar>
  708. </mt:h4>
  709. </xsl:if>
  710. </xsl:template>
  711. <cp:tabControl/>
  712. </xsl:stylesheet>