render-templates.xslt 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. Licensed Materials - Property of IBM
  4. IBM Cognos Products: cpscrn
  5. (C) Copyright IBM Corp. 2005, 2011
  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:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  15. xmlns:ui="http://developer.cognos.com/schemas/cps/logic/ui/1/"
  16. xmlns:xts="http://developer.cognos.com/schemas/xts/"
  17. xmlns:bus="http://developer.cognos.com/schemas/bibus/3/"
  18. xmlns:nav="http://developer.cognos.com/schemas/cps/navigation/1/">
  19. <!--===============================-->
  20. <!-- Template to render pagination -->
  21. <!--===============================-->
  22. <xsl:template name="render-pager-control">
  23. <xsl:param name="content"/>
  24. <xsl:variable name="start" select="number($content/@start)"/>
  25. <xsl:variable name="end" select="number($content/@end)"/>
  26. <xsl:variable name="more" select="$content/@more"/>
  27. <xsl:variable name="max" select="$content/@max"/>
  28. <xsl:variable name="display-max-objects">
  29. <xsl:choose>
  30. <xsl:when test="$max">
  31. <xsl:value-of select="$max"/>
  32. </xsl:when>
  33. <xsl:otherwise>0</xsl:otherwise>
  34. </xsl:choose>
  35. </xsl:variable>
  36. <table border="0" cellpadding="0" cellspacing="0" style="padding: 1px; height: 20px;">
  37. <tr>
  38. <xsl:variable name="from_value">
  39. <xsl:choose>
  40. <xsl:when test="$start &gt; 0">
  41. <xsl:value-of select="$start"/>
  42. </xsl:when>
  43. <xsl:otherwise></xsl:otherwise>
  44. </xsl:choose>
  45. </xsl:variable>
  46. <xsl:variable name="to_value">
  47. <xsl:choose>
  48. <xsl:when test=" $end &gt; 0">
  49. <xsl:value-of select="$end"/>
  50. </xsl:when>
  51. <xsl:otherwise></xsl:otherwise>
  52. </xsl:choose>
  53. </xsl:variable>
  54. <td class="formText" align="right" nowrap="nowrap">
  55. <table border="0" cellpadding="0" cellspacing="0">
  56. <tr>
  57. <td class="formText"><xts:string id="IDS_MVC_ENTRIES"/>:&#160;</td>
  58. <td nowrap="nowrap">
  59. <input id="_THIS_from" class="formText" type="text" size="4" name="from" maxlength="9" value="{ $from_value }"/>
  60. <xsl:text/>&#160;-&#160;<xsl:text/>
  61. <input id="_THIS_to" class="formText" type="text" size="4" name="to" maxlength="9" value="{$to_value }"/>
  62. </td>
  63. </tr>
  64. </table>
  65. </td>
  66. <td class="formText" width="18" nowrap="nowrap" style="padding-left:2px; padding-right:8px">
  67. <img src="{$webRoot}/ps/images/space.gif" alt="" title="" width="2" height="1"/>
  68. <a xsl:use-attribute-sets="anchor" href="#" onclick="_THIS_goto(document.getElementById('_THIS_from').value, document.getElementById('_THIS_to').value)">
  69. <img height="16" width="16" class="button" border="0" src="{$webRoot}/skins/{$skin}/portal/images/action_go.gif" onmousedown="this.className='button_hover'" onmouseover="this.className='button_hover'" onmouseout="this.className='button'">
  70. <xsl:attribute name="alt"><xts:string id="IDS_MVC_GOTO"/></xsl:attribute>
  71. <xsl:attribute name="title"><xts:string id="IDS_MVC_GOTO"/></xsl:attribute>
  72. </img>
  73. </a>
  74. </td>
  75. <td width="1" nowrap="nowrap">
  76. <table cellspacing="0" cellpadding="0" border="0">
  77. <tbody>
  78. <tr>
  79. <td class="tableHeaderDivider">
  80. <img width="1" alt="" title="" height="15" src="{$webRoot}/ps/images/space.gif"/>
  81. </td>
  82. </tr>
  83. </tbody>
  84. </table>
  85. </td>
  86. <td class="formText" width="70" nowrap="nowrap" style="padding-left:8px;">
  87. <!-- First page button -->
  88. <xsl:choose>
  89. <xsl:when test="( ($start &gt; 1 ) or ($more='true' and $start = 0) )">
  90. <a xsl:use-attribute-sets="anchor" href="#" onclick="_THIS_retrieve('skip=0&amp;maxobjs={$linesPerPage}')">
  91. <img height="13" width="13" class="button" src="{$webRoot}/skins/{$skin}/portal/images/control_btn_top.gif" border="0" onmousedown="this.className='button_hover'" onmouseover="this.className='button_hover'" onmouseout="this.className='button'">
  92. <xsl:attribute name="alt"><xts:string id="IDS_MVC_FIRSTPAGE"/></xsl:attribute>
  93. <xsl:attribute name="title"><xts:string id="IDS_MVC_FIRSTPAGE"/></xsl:attribute>
  94. </img>
  95. </a>
  96. </xsl:when>
  97. <xsl:otherwise>
  98. <img height="13" width="13" class="button" src="{$webRoot}/skins/{$skin}/portal/images/control_btn_top_disabled.gif" border="0">
  99. <xsl:attribute name="alt"><xts:string id="IDS_MVC_FIRSTPAGE"/></xsl:attribute>
  100. <xsl:attribute name="title"><xts:string id="IDS_MVC_FIRSTPAGE"/></xsl:attribute>
  101. </img>
  102. </xsl:otherwise>
  103. </xsl:choose>
  104. <img width="2" height="1" alt="" title="" src="{$webRoot}/ps/images/space.gif"/>
  105. <!-- Previous page button -->
  106. <xsl:choose>
  107. <xsl:when test="$start &gt; 1">
  108. <xsl:variable name="skip-previous" select="$start - number($display-max-objects) - 1"/>
  109. <xsl:variable name="skip">
  110. <xsl:choose>
  111. <xsl:when test="$skip-previous &gt;= 0">
  112. <xsl:value-of select="$skip-previous"/>
  113. </xsl:when>
  114. <xsl:otherwise>0</xsl:otherwise>
  115. </xsl:choose>
  116. </xsl:variable>
  117. <a xsl:use-attribute-sets="anchor" href="#" onclick="_THIS_retrieve('skip={$skip}&amp;maxobjs={$linesPerPage}')">
  118. <img height="13" width="13" class="button" src="{$webRoot}/skins/{$skin}/portal/images/control_btn_pageup.gif" border="0" onmousedown="this.className='button_hover'" onmouseover="this.className='button_hover'" onmouseout="this.className='button'">
  119. <xsl:attribute name="alt"><xts:string id="IDS_MVC_PREVIOUSPAGE"/></xsl:attribute>
  120. <xsl:attribute name="title"><xts:string id="IDS_MVC_PREVIOUSPAGE"/></xsl:attribute>
  121. </img>
  122. </a>
  123. </xsl:when>
  124. <xsl:otherwise>
  125. <img height="13" width="13" class="button" src="{$webRoot}/skins/{$skin}/portal/images/control_btn_pageup_disabled.gif" border="0">
  126. <xsl:attribute name="alt"><xts:string id="IDS_MVC_PREVIOUSPAGE"/></xsl:attribute>
  127. <xsl:attribute name="title"><xts:string id="IDS_MVC_PREVIOUSPAGE"/></xsl:attribute>
  128. </img>
  129. </xsl:otherwise>
  130. </xsl:choose>
  131. <img src="{$webRoot}/ps/images/space.gif" alt="" title="" width="2" height="1"/>
  132. <!-- Next page button -->
  133. <xsl:choose>
  134. <xsl:when test="$more = 'true'">
  135. <xsl:variable name="skip" select="$content/@end"/>
  136. <a xsl:use-attribute-sets="anchor" href="#" onclick="_THIS_retrieve('skip={$skip}&amp;maxobjs={$linesPerPage}')">
  137. <img height="13" width="13" class="button" src="{$webRoot}/skins/{$skin}/portal/images/control_btn_pagedown.gif" border="0" onmousedown="this.className='button_hover'" onmouseover="this.className='button_hover'" onmouseout="this.className='button'">
  138. <xsl:attribute name="alt"><xts:string id="IDS_MVC_NEXTPAGE"/></xsl:attribute>
  139. <xsl:attribute name="title"><xts:string id="IDS_MVC_NEXTPAGE"/></xsl:attribute>
  140. </img>
  141. </a>
  142. </xsl:when>
  143. <xsl:otherwise>
  144. <img height="13" width="13" class="button" src="{$webRoot}/skins/{$skin}/portal/images/control_btn_pagedown_disabled.gif" border="0">
  145. <xsl:attribute name="alt"><xts:string id="IDS_MVC_NEXTPAGE"/></xsl:attribute>
  146. <xsl:attribute name="title"><xts:string id="IDS_MVC_NEXTPAGE"/></xsl:attribute>
  147. </img>
  148. </xsl:otherwise>
  149. </xsl:choose>
  150. <img src="{$webRoot}/ps/images/space.gif" alt="" title="" width="2" height="1"/>
  151. <!-- Last page button -->
  152. <xsl:choose>
  153. <xsl:when test="$more = 'true'">
  154. <xsl:variable name="skip" select="-$linesPerPage"/>
  155. <a xsl:use-attribute-sets="anchor" href="#" onclick="_THIS_retrieve('skip={$skip}&amp;maxobjs={$linesPerPage}')">
  156. <img height="13" width="13" class="button" src="{$webRoot}/skins/{$skin}/portal/images/control_btn_bottom.gif" border="0" onmousedown="this.className='button_hover'" onmouseover="this.className='button_hover'" onmouseout="this.className='button'">
  157. <xsl:attribute name="alt"><xts:string id="IDS_MVC_LASTPAGE"/></xsl:attribute>
  158. <xsl:attribute name="title"><xts:string id="IDS_MVC_LASTPAGE"/></xsl:attribute>
  159. </img>
  160. </a>
  161. </xsl:when>
  162. <xsl:otherwise>
  163. <img height="13" width="13" class="button" src="{$webRoot}/skins/{$skin}/portal/images/control_btn_bottom_disabled.gif" border="0">
  164. <xsl:attribute name="alt"><xts:string id="IDS_MVC_LASTPAGE"/></xsl:attribute>
  165. <xsl:attribute name="title"><xts:string id="IDS_MVC_LASTPAGE"/></xsl:attribute>
  166. </img>
  167. </xsl:otherwise>
  168. </xsl:choose>
  169. </td>
  170. </tr>
  171. </table>
  172. </xsl:template>
  173. <!--============================-->
  174. <!-- Template to render content -->
  175. <!--============================-->
  176. <xsl:template name="render-pager">
  177. <xsl:param name="content"/>
  178. <table border="0" cellpadding="1" cellspacing="0" valign="top" width="100%" style="border: 1px solid black;margin-top:5px;">
  179. <xsl:call-template name="render-header"/>
  180. <xsl:call-template name="render-content">
  181. <xsl:with-param name="content" select="$content"/>
  182. </xsl:call-template>
  183. </table>
  184. </xsl:template>
  185. <!--=================================-->
  186. <!-- Template to render pager header -->
  187. <!--=================================-->
  188. <xsl:template name="render-header">
  189. <xsl:variable name="sort" select="$params[@name='sort']"/>
  190. <tr class="tableHeader">
  191. <td valign="center" height="23px;" class="formText" width="20">&#160;</td>
  192. <td width="1">
  193. <table cellspacing="0" cellpadding="0" border="0">
  194. <tbody>
  195. <tr>
  196. <td class="tableHeaderDivider">
  197. <img width="1" height="15" alt="" title="" src="{$webRoot}/ps/images/space.gif"/>
  198. </td>
  199. </tr>
  200. </tbody>
  201. </table>
  202. </td>
  203. <xsl:if test="$view = 'search'">
  204. <!-- "search path" column header -->
  205. <td>
  206. <img width="20" height="16" alt="" title="" align="absmiddle" src="{$webRoot}/skins/{$skin}/portal/images/path.gif"/>
  207. </td>
  208. </xsl:if>
  209. <!-- "Name" column header -->
  210. <td valign="center" width="100%">
  211. <table cellpadding="0" cellspacing="0" border="0">
  212. <tr>
  213. <td width="100%">
  214. <table cellpadding="0" cellspacing="0" border="0">
  215. <tr>
  216. <td valign="top" class="tableTitle">
  217. <b><xts:string id="IDS_MVC_NAME"/></b>
  218. </td>
  219. <td>
  220. <a xsl:use-attribute-sets="anchor" href="#" onclick="_THIS_sort('n','{$sort}')">
  221. <xsl:variable name="sort-img">
  222. <xsl:call-template name="calculate-sortImage">
  223. <xsl:with-param name="category" select="'n'"/>
  224. <xsl:with-param name="sort" select="$sort"/>
  225. </xsl:call-template>
  226. </xsl:variable>
  227. <img height="15" width="15" border="0" src="{$webRoot}/skins/{$skin}/portal/images/{$sort-img}">
  228. <xsl:attribute name="alt"><xts:string id="IDS_MVC_SORT"/></xsl:attribute>
  229. <xsl:attribute name="title"><xts:string id="IDS_MVC_SORT"/></xsl:attribute>
  230. </img>
  231. </a>
  232. </td>
  233. </tr>
  234. </table>
  235. </td>
  236. </tr>
  237. </table>
  238. </td>
  239. <!-- "Modified" column header -->
  240. <xsl:if test="$view != 'search'">
  241. <td width="1">
  242. <table cellspacing="0" cellpadding="0" border="0">
  243. <tbody>
  244. <tr>
  245. <td class="tableHeaderDivider">
  246. <img width="1" height="15" alt="" title="" src="{$webRoot}/ps/images/space.gif"/>
  247. </td>
  248. </tr>
  249. </tbody>
  250. </table>
  251. </td>
  252. <td valign="center" nowrap="nowrap" width="200">
  253. <table cellpadding="0" cellspacing="0" border="0">
  254. <tr>
  255. <td valign="top" class="tableTitle">
  256. <b><xts:string id="IDS_MVC_MODIFIED"/></b>
  257. </td>
  258. <td>
  259. <a xsl:use-attribute-sets="anchor" href="#" onclick="_THIS_sort('d','{$sort}')">
  260. <xsl:variable name="sort-img">
  261. <xsl:call-template name="calculate-sortImage">
  262. <xsl:with-param name="category" select="'d'"/>
  263. <xsl:with-param name="sort" select="$sort"/>
  264. </xsl:call-template>
  265. </xsl:variable>
  266. <img height="15" width="15" border="0" src="{$webRoot}/skins/{$skin}/portal/images/{$sort-img}">
  267. <xsl:attribute name="alt"><xts:string id="IDS_MVC_SORT"/></xsl:attribute>
  268. <xsl:attribute name="title"><xts:string id="IDS_MVC_SORT"/></xsl:attribute>
  269. </img>
  270. </a>
  271. </td>
  272. </tr>
  273. </table>
  274. </td>
  275. </xsl:if>
  276. <td width="1">
  277. <table cellspacing="0" cellpadding="0" border="0">
  278. <tbody>
  279. <tr>
  280. <td class="tableHeaderDivider">
  281. <img width="1" height="15" alt="" title="" src="{$webRoot}/ps/images/space.gif"/>
  282. </td>
  283. </tr>
  284. </tbody>
  285. </table>
  286. </td>
  287. <!-- "Actions" column header -->
  288. <td valign="center" class="tableTitle" nowrap="nowrap" width="170">
  289. <b><xts:string id="IDS_MVC_ACTIONS"/></b>
  290. </td>
  291. </tr>
  292. </xsl:template>
  293. <!--==========================================-->
  294. <!-- Template to object contents in the pager -->
  295. <!--==========================================-->
  296. <xsl:template name="render-content">
  297. <xsl:param name="content"/>
  298. <xsl:choose>
  299. <xsl:when test="$content/*">
  300. <xsl:for-each select="$content/*[self::nav:item | self::nav:container | self::nav:shortcut]">
  301. <xsl:call-template name="render-item">
  302. <xsl:with-param name="item" select="."/>
  303. </xsl:call-template>
  304. </xsl:for-each>
  305. </xsl:when>
  306. <xsl:otherwise>
  307. <!-- No content! -->
  308. <xsl:call-template name="render-noContent">
  309. <xsl:with-param name="isInvalidContainer" select="$view = 'navigator' and not($content)"/>
  310. </xsl:call-template>
  311. </xsl:otherwise>
  312. </xsl:choose>
  313. </xsl:template>
  314. <!--=========================================================-->
  315. <!-- Template to render conditions where there is no content -->
  316. <!--=========================================================-->
  317. <xsl:template name="render-noContent">
  318. <xsl:param name="isInvalidContainer"/>
  319. <tr>
  320. <td valign="bottom" align="center" colspan="13">
  321. <p class="objectNoneFound">
  322. <xsl:choose>
  323. <xsl:when test="$isInvalidContainer">
  324. <xts:string id="IDS_MVC_VIEW_INVALID_CONTENT"/>
  325. </xsl:when>
  326. <xsl:otherwise>
  327. <xts:string id="IDS_MVC_NO_ENTRIES"/>
  328. </xsl:otherwise>
  329. </xsl:choose>
  330. </p>
  331. </td>
  332. </tr>
  333. <tr>
  334. <td valign="bottom" align="center" colspan="13">
  335. <img src="{$webRoot}/ps/images/space.gif" alt="" title="" width="15" height="40"/>
  336. </td>
  337. </tr>
  338. </xsl:template>
  339. <!--===================================================-->
  340. <!-- Template to render an object link and its actions -->
  341. <!--===================================================-->
  342. <xsl:template name="render-item">
  343. <xsl:param name="item"/>
  344. <xsl:if test="$display-separator = 'line' and position() > 1">
  345. <tr style="height:1px;">
  346. <td class="rowDividerLine" colspan="7"><img width="1px" height="1px" alt="" title="" src="{$webRoot}/ps/images/space.gif"/></td>
  347. </tr>
  348. </xsl:if>
  349. <tr style="height:1px;">
  350. <xsl:if test="($display-separator = 'background') and ((position() mod 2) = 0)"><xsl:attribute name="class">rowHighlight</xsl:attribute></xsl:if>
  351. <td class="tableText" nowrap="nowrap" align="right">
  352. <img border="0" width="16" height="16" src="{ $item/nav:imgURL }" alt="{ $item/nav:screenTip }" title="{ $item/nav:screenTip }"/>
  353. <xsl:choose>
  354. <xsl:when test="nav:defaultAction/nav:imgURL != ''">
  355. <img border="0" width="12" height="16" src="{ $item/nav:defaultAction/nav:imgURL }"/>
  356. </xsl:when>
  357. <xsl:otherwise>
  358. <img border="0" width="12" height="16" alt="" title="" src="{$webRoot}/ps/images/space.gif"/>
  359. </xsl:otherwise>
  360. </xsl:choose>
  361. </td>
  362. <td class="tableText" width="1" height="20">
  363. <img src="{$webRoot}/ps/images/space.gif" alt="" title="" width="1" height="20"/>
  364. </td>
  365. <xsl:if test="$view = 'search'">
  366. <!-- "search path" column -->
  367. <td>
  368. <img alt="" title="" width="20" height="16" align="absmiddle" src="{$webRoot}/skins/{$skin}/portal/images/path.gif">
  369. <xsl:variable name="path-indicator">
  370. <xsl:call-template name="build-breadcrumb">
  371. <xsl:with-param name="fullPath" select="$item/nav:fullPath"/>
  372. <xsl:with-param name="currentName" select="$item/nav:name"/>
  373. </xsl:call-template>
  374. </xsl:variable>
  375. <xsl:attribute name="alt">
  376. <xsl:value-of select="$path-indicator"/>
  377. </xsl:attribute>
  378. <xsl:attribute name="title">
  379. <xsl:value-of select="$path-indicator"/>
  380. </xsl:attribute>
  381. </img>
  382. </td>
  383. </xsl:if>
  384. <!-- "Name" column -->
  385. <td width="100%">
  386. <table border="0" cellpadding="0" cellspacing="0">
  387. <tr>
  388. <td class="tableText">
  389. <xsl:choose>
  390. <xsl:when test="not($item/nav:defaultAction/*)">
  391. <xsl:value-of select="$item/nav:name"/>
  392. </xsl:when>
  393. <xsl:otherwise>
  394. <xsl:choose>
  395. <xsl:when test="$item[self::nav:container or self::nav:shortcut/nav:container]">
  396. <a xsl:use-attribute-sets="anchor" href="#" onclick="_THIS_navigate('{($item/nav:id | $item/nav:container/nav:id)[last()]}');">
  397. <xsl:value-of select="$item/nav:name"/>
  398. </a>
  399. </xsl:when>
  400. <xsl:otherwise>
  401. <xsl:variable name="url">
  402. <xsl:call-template name="build-url">
  403. <xsl:with-param name="action" select="$item/nav:defaultAction"/>
  404. <xsl:with-param name="is-defaultAction" select="true()"/>
  405. </xsl:call-template>
  406. </xsl:variable>
  407. <a xsl:use-attribute-sets="anchor">
  408. <xsl:attribute name="href"><xsl:value-of select="'#'"/></xsl:attribute>
  409. <xsl:attribute name="onclick"><xsl:value-of select="$url"/></xsl:attribute>
  410. <xsl:value-of select="$item/nav:name"/>
  411. </a>
  412. </xsl:otherwise>
  413. </xsl:choose>
  414. </xsl:otherwise>
  415. </xsl:choose>
  416. <xsl:if test="$item/nav:icon/nav:name = 'disabled'">
  417. <xsl:text>&#160;</xsl:text>
  418. <img src="{ $item/nav:icon/nav:imgURL }" width="16" height="16" border="0" align="middle">
  419. <xsl:attribute name="alt"><xsl:value-of select="$item/nav:icon/nav:alt"/></xsl:attribute>
  420. <xsl:attribute name="title"><xsl:value-of select="$item/nav:icon/nav:alt"/></xsl:attribute>
  421. </img>
  422. </xsl:if>
  423. </td>
  424. </tr>
  425. <xsl:if test="$view = 'search'">
  426. <tr>
  427. <td class="tableText">
  428. <nobr><xts:string id="IDS_MVC_SEARCH_LAST_MODIFIED_TEXT"/>:&#160;<xsl:value-of select="$item/nav:lastModifiedDate"/></nobr>
  429. </td>
  430. </tr>
  431. </xsl:if>
  432. </table>
  433. </td>
  434. <!-- "Modified" column -->
  435. <xsl:if test="$view != 'search'">
  436. <td class="tableText" width="1">
  437. <img src="{$webRoot}/ps/images/space.gif" alt="" title="" width="1" height="1"/>
  438. </td>
  439. <td class="tableText" nowrap="nowrap" width="200">
  440. <nobr><xsl:value-of select="$item/nav:lastModifiedDate"/></nobr>
  441. </td>
  442. </xsl:if>
  443. <td class="tableText" width="1">
  444. <img src="{$webRoot}/ps/images/space.gif" alt="" title="" width="1" height="1"/>
  445. </td>
  446. <!-- "Actions" column -->
  447. <td class="tableText" nowrap="nowrap" width="170">
  448. <nobr>
  449. <table border="0" cellspacing="0" cellpadding="0">
  450. <tr>
  451. <xsl:for-each select="$item/nav:action">
  452. <xsl:variable name="url">
  453. <xsl:call-template name="build-url">
  454. <xsl:with-param name="action" select="."/>
  455. </xsl:call-template>
  456. </xsl:variable>
  457. <td class="objectOptions">
  458. <a xsl:use-attribute-sets="anchor">
  459. <xsl:attribute name="href"><xsl:value-of select="'#'"/></xsl:attribute>
  460. <xsl:attribute name="onclick"><xsl:value-of select="$url"/></xsl:attribute>
  461. <xsl:choose>
  462. <xsl:when test="nav:imgURL != ''">
  463. <img border="0" width="16" height="16" src="{ nav:imgURL }" alt="{ nav:alt }" title="{ nav:alt }"/>
  464. </xsl:when>
  465. <xsl:otherwise>
  466. <xsl:value-of select="nav:alt"/>
  467. </xsl:otherwise>
  468. </xsl:choose>
  469. </a>
  470. </td>
  471. <xsl:if test="position() != last()">
  472. <td class="tableText" width="3">
  473. <img width="3" height="1" alt="" title="" src="{$webRoot}/ps/images/space.gif"/>
  474. </td>
  475. </xsl:if>
  476. </xsl:for-each>
  477. </tr>
  478. </table>
  479. </nobr>
  480. </td>
  481. </tr>
  482. </xsl:template>
  483. <!--====================================-->
  484. <!-- Template to calculate a sort image -->
  485. <!--====================================-->
  486. <xsl:template name="calculate-sortImage">
  487. <xsl:param name="category"/>
  488. <xsl:param name="sort"/>
  489. <xsl:choose>
  490. <xsl:when test="$sort = concat($category, '_a')">
  491. <xsl:text>list_sort_ascending.gif</xsl:text>
  492. </xsl:when>
  493. <xsl:when test="$sort = concat($category, '_d')">
  494. <xsl:text>list_sort_descending.gif</xsl:text>
  495. </xsl:when>
  496. <xsl:otherwise>
  497. <xsl:text>list_sort_no.gif</xsl:text>
  498. </xsl:otherwise>
  499. </xsl:choose>
  500. </xsl:template>
  501. <!--================================================================-->
  502. <!-- Template to render the path links for the navigator and search -->
  503. <!--================================================================-->
  504. <xsl:template name="render-breadcrumb">
  505. <xsl:param name="path-stack"/>
  506. <xsl:choose>
  507. <xsl:when test="$view = 'search'">
  508. <xsl:for-each select="$path-stack/path">
  509. <xsl:if test="position() &gt; 1">
  510. <xsl:value-of select="$path-separator"/>
  511. </xsl:if>
  512. <xsl:value-of select="./name"/>
  513. </xsl:for-each>
  514. </xsl:when>
  515. <xsl:otherwise>
  516. <xsl:variable name="show_breadcrumb">
  517. <xsl:if test="not($params[@name='showBreadcrumb'] = 'true')">
  518. <xsl:text/>display:none<xsl:text/>
  519. </xsl:if>
  520. </xsl:variable>
  521. <div id="mvc-remote-breadcrumbContainer" style="{$show_breadcrumb}">
  522. <xsl:for-each select="$path-stack/path">
  523. <xsl:if test="position() &gt; 1">
  524. <xsl:value-of select="$path-separator"/>
  525. </xsl:if>
  526. <xsl:choose>
  527. <xsl:when test="./@virtualRoot = 'true'">
  528. <a xsl:use-attribute-sets="anchor" href="#" onclick="javascript:_THIS_navigateVirtualRoot();"><xsl:value-of select="./name"/></a>
  529. </xsl:when>
  530. <xsl:when test="./@leafNode = 'true'">
  531. <span class="pathLeafNode"><xsl:value-of select="./name"/></span>
  532. </xsl:when>
  533. <xsl:otherwise>
  534. <a xsl:use-attribute-sets="anchor" href="#" onclick="_THIS_navigate('{./id}')"><xsl:value-of select="./name"/></a>
  535. </xsl:otherwise>
  536. </xsl:choose>
  537. </xsl:for-each>
  538. </div>
  539. </xsl:otherwise>
  540. </xsl:choose>
  541. </xsl:template>
  542. </xsl:stylesheet>