search.xslt 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. Licensed Materials - Property of IBM
  4. IBM Cognos Products: cogadmin
  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" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ui="http://developer.cognos.com/schemas/ui/presentation/markup/" xmlns:uic="http://developer.cognos.com/schemas/uic/presentation/markup/" xmlns:xts="http://developer.cognos.com/schemas/xts/" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" xmlns:admui="http://developer.cognos.com/schemas/xts/admui" xmlns:pgr="http://developer.cognos.com/schemas/uic/presentation/cogadminpager/" xmlns:cm="http://developer.cognos.com/schemas/bibus/3/" xmlns:nav="http://developer.cognos.com/schemas/cps/navigation/1/" exclude-result-prefixes="ui uic xts xtsext admui nav cm">
  13. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
  14. <!-- Display variables -->
  15. <admui:variables/>
  16. <!-- Pager variables -->
  17. <admui:pagerVariables pagerName="search"/>
  18. <!-- Pager templates -->
  19. <pgr:cogadminPagerTemplates/>
  20. <xsl:variable name="searchPath" select="xtsext:javascriptencode(string(key('env-param','searchPath')))"/>
  21. <xsl:variable name="type" select="key('env-param', 'type')"/>
  22. <xsl:variable name="title" select="key('env-param', 'title')"/>
  23. <ui:commonActions/>
  24. <xsl:template match="/root">
  25. <xsl:variable name="tooltip"><xts:string id="IDS_SORT_TOOLTIP"/></xsl:variable>
  26. <uic:fragment>
  27. <!-- add the reload event listener -->
  28. <ui:standardReloadListener/>
  29. <uic:fragmentHeader>
  30. <uic:pathControl>
  31. <uic:breadcrumb>
  32. <uic:link>
  33. <uic:text>
  34. <xsl:choose>
  35. <xsl:when test="key('env-param','type')='printers'"><xts:string id="IDS_ADM_PRINTERS"/></xsl:when>
  36. <xsl:when test="key('env-param','type')='styles'"><xts:string id="IDS_ADM_STYLES"/></xsl:when>
  37. <xsl:when test="key('env-param','type')='tenants'"><xts:string id="IDS_ADM_TENANTS"/></xsl:when>
  38. <xsl:when test="key('env-param','type')='visualizations'"><xts:string id="IDS_ADM_VISUALIZATIONS"/></xsl:when>
  39. </xsl:choose>
  40. </uic:text>
  41. <uic:onclick>_THIS_.parent.retrieve('searchMode=');</uic:onclick>
  42. </uic:link>
  43. </uic:breadcrumb>
  44. <uic:breadcrumb>
  45. <xts:string id="IDS_ADM_SEARCH"/>
  46. </uic:breadcrumb>
  47. </uic:pathControl>
  48. <uic:headerActions>
  49. <xsl:variable name="permissions" select="nav:getContainerResponse/nav:container/nav:permissions"/>
  50. <xsl:variable name="canWrite" select="contains($permissions, 'write')"/>
  51. <ui:groupActionMsgs/>
  52. <!-- 'search' required in tablename for checkboxes -->
  53. <xsl:choose>
  54. <xsl:when test="nav:searchResponse/nav:content/*">
  55. <div id="_THIS_search_action" style="display: ">
  56. <xsl:choose>
  57. <xsl:when test="key('env-param','type')='tenants'">
  58. <ui:groupAction action="deleteTenants" tablename="search"/>
  59. <uic:headerSeperator/>
  60. <ui:groupAction action="exportTenants" tablename="search"/>
  61. <ui:groupAction action="createContentUtilizationInfo" tablename="search"/>
  62. <uic:headerSeperator/>
  63. <ui:groupAction action="enableDisableObj" tablename="search"/>
  64. <ui:groupAction action="terminateSessions" tablename="search"/>
  65. <uic:headerSeperator/>
  66. <ui:groupAction action="deleteTenantUserProfile" tablename="search"/>
  67. </xsl:when>
  68. <xsl:otherwise>
  69. <ui:groupAction action="delete" tablename="search"/>
  70. </xsl:otherwise>
  71. </xsl:choose>
  72. </div>
  73. </xsl:when>
  74. <xsl:otherwise>
  75. <div id="_THIS_search_action_disabled">
  76. <ui:groupAction action="delete" disable="true"/>
  77. </div>
  78. </xsl:otherwise>
  79. </xsl:choose>
  80. </uic:headerActions>
  81. </uic:fragmentHeader>
  82. <script>
  83. var _THIS_s = new com.ibm.cognos.admin.xts.search(_THIS_,{
  84. count: <xsl:value-of select="count(nav:searchResponse/nav:content/*)"/>,
  85. menuModels: [{
  86. id: "findTextInMenu",
  87. items: [{
  88. id: "n",
  89. title: '<xts:string id="IDS_SEARCH_NAME_FIELD" encode="javascript"/>'
  90. },{
  91. id: "d",
  92. title: '<xts:string id="IDS_SEARCH_DESC_FIELD" encode="javascript"/>'
  93. },{
  94. id: "nd",
  95. title: '<xts:string id="IDS_SEARCH_NAME_DESC_FIELD" encode="javascript"/>'
  96. }],
  97. fieldId: "sfield",
  98. inputValue: '<xsl:value-of select="/root/env/param[@name='sfield']"/>',
  99. defaultValue: "n"
  100. },{
  101. id: "methodMenu",
  102. items: [{
  103. id: "1",
  104. title: '<xts:string id="IDS_SEARCH_METHOD_CONTAINS" encode="javascript"/>'
  105. },{
  106. id: "2",
  107. title: '<xts:string id="IDS_SEARCH_METHOD_STARTS" encode="javascript"/>'
  108. },{
  109. id: "3",
  110. title: '<xts:string id="IDS_SEARCH_METHOD_MATCHES" encode="javascript"/>'
  111. }],
  112. fieldId: "smethod",
  113. inputValue: '<xsl:value-of select="/root/env/param[@name='smethod']"/>',
  114. defaultValue: "1"
  115. },{
  116. id: "modifiedMenu",
  117. items: [{
  118. id:'any',
  119. title: '<xts:string id="IDS_FLT_ANY" encode="javascript"/>'
  120. },{
  121. id:'t',
  122. title: '<xts:string id="IDS_SEARCH_MODIFIED_TODAY" encode="javascript"/>'
  123. },{
  124. id:'l3d',
  125. title: '<xts:string id="IDS_SEARCH_MODIFIED_3_DAYS" encode="javascript"/>'
  126. },{
  127. id:'lw',
  128. title: '<xts:string id="IDS_SEARCH_MODIFIED_LAST_WEEK" encode="javascript"/>'
  129. },{
  130. id:'lm',
  131. title: '<xts:string id="IDS_SEARCH_MODIFIED_LAST_MONTH" encode="javascript"/>'
  132. },{
  133. id:'l3m',
  134. title: '<xts:string id="IDS_SEARCH_MODIFIED_LAST_3_MONTHS" encode="javascript"/>'
  135. },{
  136. id:'l6m',
  137. title: '<xts:string id="IDS_SEARCH_MODIFIED_LAST_6_MONTHS" encode="javascript"/>'
  138. },{
  139. id:'ly',
  140. title: '<xts:string id="IDS_SEARCH_MODIFIED_LAST_12_MONTHS" encode="javascript"/>'
  141. },{
  142. id:'l3y',
  143. title: '<xts:string id="IDS_SEARCH_MODIFIED_LAST_36_MONTHS" encode="javascript"/>'
  144. }],
  145. fieldId: "smodified",
  146. inputValue: '<xsl:value-of select="/root/env/param[@name='smodified']"/>',
  147. defaultValue: "any"
  148. },{
  149. id: "scopeMenu",
  150. items: [
  151. <xsl:if test="$type != 'printers' and $type != 'tenants'">
  152. {
  153. id:'fb',
  154. title: '<xts:string id="IDS_SEARCH_SCOPE_FOLDERS_SUB" encode="javascript"/>'
  155. },
  156. </xsl:if>
  157. {
  158. id:'fo',
  159. title: '<xts:string id="IDS_SEARCH_SCOPE_FOLDER_ONLY" encode="javascript"/>'
  160. },{
  161. id:'any',
  162. title: '<xts:string id="IDS_SEARCH_SCOPE_NAMESPACE" encode="javascript"/>'
  163. }],
  164. fieldId: "sscope",
  165. inputValue: '<xsl:value-of select="/root/env/param[@name='sscope']"/>',
  166. <xsl:choose>
  167. <xsl:when test="$type != 'printers' and $type != 'tenants'">
  168. defaultValue: "fb"
  169. </xsl:when>
  170. <xsl:otherwise>
  171. defaultValue: "fo"
  172. </xsl:otherwise>
  173. </xsl:choose>
  174. },{
  175. id: "typeMenu",
  176. items: [
  177. <xsl:choose>
  178. <xsl:when test="$type = 'portlets_import'">
  179. {
  180. id:'portlet',
  181. title: '<xts:string id="IDS_SEARCH_TYPE_PORTLET" encode="javascript"/>'
  182. },{
  183. id:'portletProducer',
  184. title: '<xts:string id="IDS_SEARCH_TYPE_PORTLET_GROUP" encode="javascript"/>'
  185. }
  186. </xsl:when>
  187. <xsl:when test="$type = 'visualizations'">
  188. {
  189. id:'visualization',
  190. title: '<xts:string id="IDS_SEARCH_TYPE_VISUALIZATION" encode="javascript"/>'
  191. },{
  192. id:'catalogFolder',
  193. title: '<xts:string id="IDS_SEARCH_TYPE_CATALOG_FOLDER" encode="javascript"/>'
  194. },
  195. </xsl:when>
  196. <xsl:otherwise>
  197. {
  198. id:'contact',
  199. title: '<xts:string id="IDS_SEARCH_TYPE_CONTACT" encode="javascript"/>'
  200. },{
  201. id:'distributionList',
  202. title: '<xts:string id="IDS_SEARCH_TYPE_DISTRIBUTION" encode="javascript"/>'
  203. },{
  204. id:'namespaceFolder',
  205. title: '<xts:string id="IDS_SEARCH_TYPE_FOLDER" encode="javascript"/>'
  206. },{
  207. id:'namespace',
  208. title: '<xts:string id="IDS_SEARCH_TYPE_NAMESPACE" encode="javascript"/>'
  209. },
  210. </xsl:otherwise>
  211. </xsl:choose>
  212. {
  213. id:'any',
  214. title: '<xts:string id="IDS_FLT_ANY" encode="javascript"/>'
  215. }],
  216. fieldId: "stype",
  217. inputValue: '<xsl:value-of select="/root/env/param[@name='stype']"/>',
  218. <xsl:choose>
  219. <xsl:when test="$type = 'portlets_import'">
  220. defaultValue: "portlet"
  221. </xsl:when>
  222. <xsl:otherwise>
  223. defaultValue: "contact"
  224. </xsl:otherwise>
  225. </xsl:choose>
  226. }]
  227. });
  228. _THIS_s.initialize();
  229. </script>
  230. <form name="_THIS_search_form" id="_THIS_search_form" role="search" aria-labelledby="lbl_searchLabel">
  231. <div style="margin-left: 10px;margin-bottom: 5px;">
  232. <table width="100%" cellspacing="0" cellpadding="1" border="0" role="presentation" id="lbl_searchLongLabel">
  233. <tbody>
  234. <tr>
  235. <td width="1%" valign="top" nowrap="" class="cogstyle-fragmentHeader-titleText" style="padding-right: 3px;" id="lbl_searchLabel"><xts:string id="IDS_SEARCH_SECTION_LABEL"/></td>
  236. <td valign="top" class="formLink">
  237. <input type="hidden" name="_THIS_sfield" id="_THIS_sfield">
  238. <xsl:attribute name="value">
  239. <xsl:choose>
  240. <xsl:when test="key('env-param', 'sfield')!=''"><xsl:value-of select="key('env-param', 'sfield')"/></xsl:when>
  241. <xsl:otherwise>n</xsl:otherwise>
  242. </xsl:choose>
  243. </xsl:attribute>
  244. </input>
  245. <a href="#" onclick="ui_menuShow(event, _THIS_s.menu.findTextInMenu);" style="white-space:nowrap;" class="ccOptions" role="button" aria-haspopup="true">
  246. <span id="_THIS_findTextInMenu_caption">
  247. <xsl:choose>
  248. <xsl:when test="key('env-param', 'sfield') = 'd'"><xts:string id="IDS_SEARCH_DESC_FIELD"/></xsl:when>
  249. <xsl:when test="key('env-param', 'sfield') = 'nd'"><xts:string id="IDS_SEARCH_NAME_DESC_FIELD"/></xsl:when>
  250. <xsl:otherwise><xts:string id="IDS_SEARCH_NAME_FIELD"/></xsl:otherwise>
  251. </xsl:choose>
  252. </span>
  253. <span>&#160;</span>
  254. <span class="frag-btn-over">
  255. <img width="7" height="16" border="0" align="top">
  256. <xsl:attribute name="src"><admui:imageURL image="dropdown_arrow_narrow.gif" type="skin"/></xsl:attribute>
  257. <xsl:attribute name="title"><xts:string id="IDS_SEARCH_GO_TO_OPTIONS" /></xsl:attribute>
  258. <xsl:attribute name="alt"><xts:string id="IDS_SEARCH_GO_TO_OPTIONS" /></xsl:attribute>
  259. </img>
  260. </span>
  261. </a>
  262. </td>
  263. </tr>
  264. </tbody>
  265. </table>
  266. <table cellspacing="0" cellpadding="0" border="0" role="presentation">
  267. <tr>
  268. <td>
  269. <input type="text" style="margin-right: 2px" value="{key('env-param', 'stext')}" size="75" name="_THIS_stext" id="_THIS_stext" aria-labelledby="lbl_searchLabel"/>
  270. </td>
  271. <td style="padding-right: 5px;">
  272. <table class="commandButton" cellspacing="0" cellpadding="0" style="padding: 2px 10px 3px" onmousedown="this.className = 'commandButtonDown'" onmouseout="this.className = 'commandButton'" onmouseover="this.className = 'commandButtonOver'" role="presentation">
  273. <tr>
  274. <td id="_THIS_btnAnchor" valign="middle" nowrap="" align="center">
  275. <img width="55" height="1" alt=""><xsl:attribute name="src"><admui:imageURL image="space.gif" type="common"/></xsl:attribute></img>
  276. <a class="btnAnchor" onmouseout="window.status='';return true;" onmouseover="window.status='';return true;" href="javascript:_THIS_s.search();" role="button">
  277. <xts:string id="IDS_ADM_SEARCH"/>
  278. <img border="0" align="top" name="_THIS_searchImage" id="_THIS_searchImage" style="position: relative; top: 1px; left: 1px; padding-right: 8px;" alt=""><xsl:attribute name="src"><admui:imageURL image="action_search.gif" type="common"/></xsl:attribute></img>
  279. </a>
  280. </td>
  281. </tr>
  282. </table>
  283. </td>
  284. <td>
  285. <table cellspacing="0" cellpadding="0" border="0" style="padding-bottom: 5px; padding-top: 5px;" role="presentation">
  286. <tbody>
  287. <tr>
  288. <td valign="bottom">
  289. <a onmouseout="window.status='';return true;" onmouseover="window.status='';return true;" href="javascript:_THIS_s.toggleDynamicSection();" role="button">
  290. <span class="formLink"><xts:string id="IDS_SEARCH_ADVANCED" /></span>
  291. <img border="0" id="_THIS_expand">
  292. <xsl:if test="key('env-param', 'bshowSearchCriteria') = 'true' or key('env-param', 'bshowSearchCriteria')=''">
  293. <xsl:attribute name="style">display: none;</xsl:attribute>
  294. </xsl:if>
  295. <xsl:attribute name="src"><admui:imageURL image="prompt_option_expand.gif" type="skin"/></xsl:attribute>
  296. <xsl:attribute name="alt"><xts:string id="IDS_ADM_SECTION_EXPAND" /></xsl:attribute>
  297. <xsl:attribute name="title"><xts:string id="IDS_ADM_SECTION_EXPAND" /></xsl:attribute>
  298. </img>
  299. <img border="0" id="_THIS_collapse">
  300. <xsl:if test="not(key('env-param', 'bshowSearchCriteria')) or key('env-param', 'bshowSearchCriteria')='false' ">
  301. <xsl:attribute name="style">display: none;</xsl:attribute>
  302. </xsl:if>
  303. <xsl:attribute name="src"><admui:imageURL image="prompt_option_collapse.gif" type="skin"/></xsl:attribute>
  304. <xsl:attribute name="alt"><xts:string id="IDS_ADM_SECTION_COLLAPSE" /></xsl:attribute>
  305. <xsl:attribute name="title"><xts:string id="IDS_ADM_SECTION_COLLAPSE" /></xsl:attribute>
  306. </img>
  307. </a>
  308. </td>
  309. </tr>
  310. </tbody>
  311. </table>
  312. </td>
  313. </tr>
  314. </table>
  315. </div>
  316. <!-- Search Criteria -->
  317. <div id="_THIS_searchCriteria">
  318. <xsl:if test="not (key('env-param', 'bshowSearchCriteria')) or key('env-param', 'bshowSearchCriteria') = 'false'">
  319. <xsl:attribute name="style">display: none;</xsl:attribute>
  320. </xsl:if>
  321. <div style="margin-left: 10px;">
  322. <table width="50%" cellspacing="0" cellpadding="1" border="0" role="presentation">
  323. <tr>
  324. <td width="50%" style="background-color: #e3e9f3;">
  325. <table role="presentation">
  326. <tr role="group" aria-labelledby="lbl_searchMethod">
  327. <td id="lbl_searchMethod" class="cogstyle-fragmentHeader-titleText searchTitle"><xts:string id="IDS_SEARCH_METHOD" /></td>
  328. <td>
  329. <input type="hidden" name="_THIS_smethod" id="_THIS_smethod">
  330. <xsl:attribute name="value">
  331. <xsl:choose>
  332. <xsl:when test="key('env-param', 'smethod')!=''"><xsl:value-of select="key('env-param', 'smethod')"/></xsl:when>
  333. <xsl:otherwise>1</xsl:otherwise>
  334. </xsl:choose>
  335. </xsl:attribute>
  336. </input>
  337. <a href="#" onclick="ui_menuShow(event, _THIS_s.menu.methodMenu);" style="white-space:nowrap;" class="ccOptions" role="button" aria-haspopup="true">
  338. <span id="_THIS_methodMenu_caption">
  339. <xsl:choose>
  340. <xsl:when test="key('env-param', 'smethod') = '3'"><xts:string id="IDS_SEARCH_METHOD_MATCHES"/></xsl:when>
  341. <xsl:when test="key('env-param', 'smethod') = '2'"><xts:string id="IDS_SEARCH_METHOD_STARTS"/></xsl:when>
  342. <xsl:otherwise><xts:string id="IDS_SEARCH_METHOD_CONTAINS"/></xsl:otherwise>
  343. </xsl:choose>
  344. </span>
  345. <span>&#160;</span>
  346. <span class="frag-btn-over">
  347. <img width="7" height="16" border="0" align="top">
  348. <xsl:attribute name="src"><admui:imageURL image="dropdown_arrow_narrow.gif" type="skin"/></xsl:attribute>
  349. <xsl:attribute name="title"><xts:string id="IDS_SEARCH_GO_TO_OPTIONS" /></xsl:attribute>
  350. <xsl:attribute name="alt"><xts:string id="IDS_SEARCH_GO_TO_OPTIONS" /></xsl:attribute>
  351. </img>
  352. </span>
  353. </a>
  354. </td>
  355. </tr>
  356. <!-- ADDED HERE -->
  357. <tr role="group" aria-labelledby="lbl_searchModified">
  358. <td id="lbl_searchModified" class="cogstyle-fragmentHeader-titleText searchTitle"><xts:string id="IDS_SEARCH_MODIFIED" /></td>
  359. <td>
  360. <input type="hidden" name="_THIS_smodified" id="_THIS_smodified">
  361. <xsl:attribute name="value">
  362. <xsl:choose>
  363. <xsl:when test="key('env-param', 'smodified')!=''"><xsl:value-of select="key('env-param', 'smodified')"/></xsl:when>
  364. <xsl:otherwise>any</xsl:otherwise>
  365. </xsl:choose>
  366. </xsl:attribute>
  367. </input>
  368. <a href="#" onclick="ui_menuShow(event, _THIS_s.menu.modifiedMenu);" style="white-space:nowrap;" class="ccOptions" role="button" aria-haspopup="true">
  369. <span id="_THIS_modifiedMenu_caption">
  370. <xsl:choose>
  371. <xsl:when test="key('env-param', 'smodified') = 't'"><xts:string id="IDS_SEARCH_MODIFIED_TODAY"/></xsl:when>
  372. <xsl:when test="key('env-param', 'smodified') = 'l3d'"><xts:string id="IDS_SEARCH_MODIFIED_3_DAYS"/></xsl:when>
  373. <xsl:when test="key('env-param', 'smodified') = 'lw'"><xts:string id="IDS_SEARCH_MODIFIED_LAST_WEEK"/></xsl:when>
  374. <xsl:when test="key('env-param', 'smodified') = 'lm'"><xts:string id="IDS_SEARCH_MODIFIED_LAST_MONTH"/></xsl:when>
  375. <xsl:when test="key('env-param', 'smodified') = 'l3m'"><xts:string id="IDS_SEARCH_MODIFIED_LAST_3_MONTHS"/></xsl:when>
  376. <xsl:when test="key('env-param', 'smodified') = 'l6m'"><xts:string id="IDS_SEARCH_MODIFIED_LAST_6_MONTHS"/></xsl:when>
  377. <xsl:when test="key('env-param', 'smodified') = 'ly'"><xts:string id="IDS_SEARCH_MODIFIED_LAST_12_MONTHS"/></xsl:when>
  378. <xsl:when test="key('env-param', 'smodified') = 'l3y'"><xts:string id="IDS_SEARCH_MODIFIED_LAST_36_MONTHS"/></xsl:when>
  379. <xsl:otherwise><xts:string id="IDS_FLT_ANY" /></xsl:otherwise>
  380. </xsl:choose>
  381. </span>
  382. <span>&#160;</span>
  383. <span class="frag-btn-over">
  384. <img width="7" height="16" border="0" align="top">
  385. <xsl:attribute name="src"><admui:imageURL image="dropdown_arrow_narrow.gif" type="skin"/></xsl:attribute>
  386. <xsl:attribute name="title"><xts:string id="IDS_SEARCH_GO_TO_OPTIONS" /></xsl:attribute>
  387. <xsl:attribute name="alt"><xts:string id="IDS_SEARCH_GO_TO_OPTIONS" /></xsl:attribute>
  388. </img>
  389. </span>
  390. </a>
  391. </td>
  392. </tr>
  393. </table>
  394. </td>
  395. <td width="50%" style="background-color: #e3e9f3;">
  396. <table role="presentation">
  397. <xsl:if test="$type != 'printers' and $type != 'styles' and $type != 'portlets_import' and $type != 'tenants'">
  398. <tr role="group" aria-labelledby="lbl_searchType">
  399. <td id="lbl_searchType" class="cogstyle-fragmentHeader-titleText searchTitle"><xts:string id="IDS_SEARCH_TYPE" /></td>
  400. <td>
  401. <input type="hidden" name="_THIS_stype" id="_THIS_stype">
  402. <xsl:attribute name="value">
  403. <xsl:choose>
  404. <xsl:when test="key('env-param', 'stype')!=''"><xsl:value-of select="key('env-param', 'stype')"/></xsl:when>
  405. <xsl:otherwise>any</xsl:otherwise>
  406. </xsl:choose>
  407. </xsl:attribute>
  408. </input>
  409. <a href="#" onclick="ui_menuShow(event, _THIS_s.menu.typeMenu);" style="white-space:nowrap;" class="ccOptions" role="button" aria-haspopup="true">
  410. <span id="_THIS_typeMenu_caption">
  411. <xsl:choose>
  412. <xsl:when test="$type = 'portlets_import'">
  413. <xsl:choose>
  414. <xsl:when test="key('env-param', 'stype') = 'portlet'"><xts:string id="IDS_SEARCH_TYPE_PORTLET"/></xsl:when>
  415. <xsl:when test="key('env-param', 'stype') = 'portletProducer'"><xts:string id="IDS_SEARCH_TYPE_PORTLET_GROUP"/></xsl:when>
  416. </xsl:choose>
  417. </xsl:when>
  418. <xsl:when test="$type = 'visualizations'">
  419. <xsl:choose>
  420. <xsl:when test="key('env-param', 'stype') = 'visualization'"><xts:string id="IDS_SEARCH_TYPE_VISUALIZATION"/></xsl:when>
  421. <xsl:when test="key('env-param', 'stype') = 'catalogFolder'"><xts:string id="IDS_SEARCH_TYPE_CATALOG_FOLDER"/></xsl:when>
  422. </xsl:choose>
  423. </xsl:when>
  424. <xsl:otherwise>
  425. <xsl:choose>
  426. <xsl:when test="key('env-param', 'stype') = 'contact'"><xts:string id="IDS_SEARCH_TYPE_CONTACT"/></xsl:when>
  427. <xsl:when test="key('env-param', 'stype') = 'distributionList'"><xts:string id="IDS_SEARCH_TYPE_DISTRIBUTION"/></xsl:when>
  428. <xsl:when test="key('env-param', 'stype') = 'namespaceFolder'"><xts:string id="IDS_SEARCH_TYPE_FOLDER"/></xsl:when>
  429. <xsl:when test="key('env-param', 'stype') = 'namespace'"><xts:string id="IDS_SEARCH_TYPE_NAMESPACE"/></xsl:when>
  430. <xsl:otherwise><xts:string id="IDS_FLT_ANY" /></xsl:otherwise>
  431. </xsl:choose>
  432. </xsl:otherwise>
  433. </xsl:choose>
  434. </span>
  435. <span>&#160;</span>
  436. <span class="frag-btn-over">
  437. <img width="7" height="16" border="0" align="top">
  438. <xsl:attribute name="src"><admui:imageURL image="dropdown_arrow_narrow.gif" type="skin"/></xsl:attribute>
  439. <xsl:attribute name="title"><xts:string id="IDS_SEARCH_GO_TO_OPTIONS" /></xsl:attribute>
  440. <xsl:attribute name="alt"><xts:string id="IDS_SEARCH_GO_TO_OPTIONS" /></xsl:attribute>
  441. </img>
  442. </span>
  443. </a>
  444. </td>
  445. </tr>
  446. </xsl:if>
  447. <xsl:if test="$type != 'styles'and $type != 'portlets_import' and $type != 'visualizations'">
  448. <tr role="group" aria-labelledby="lbl_searchScope">
  449. <td id="lbl_searchScope" class="cogstyle-fragmentHeader-titleText searchTitle"><xts:string id="IDS_SEARCH_SCOPE" /></td>
  450. <td>
  451. <input type="hidden" name="_THIS_sscope" id="_THIS_sscope">
  452. <xsl:attribute name="value">
  453. <xsl:choose>
  454. <xsl:when test="string(key('env-param', 'sscope'))!=''"><xsl:value-of select="key('env-param', 'sscope')"/></xsl:when>
  455. <xsl:when test="$type != 'printers' and $type != 'tenants'">fb</xsl:when>
  456. <xsl:otherwise>fo</xsl:otherwise>
  457. </xsl:choose>
  458. </xsl:attribute>
  459. </input>
  460. <a href="#" onclick="ui_menuShow(event, _THIS_s.menu.scopeMenu);" style="white-space:nowrap;" class="ccOptions" role="button" aria-haspopup="true">
  461. <span id="_THIS_scopeMenu_caption">
  462. <xsl:choose>
  463. <xsl:when test="key('env-param', 'sscope') = 'any'"><xts:string id="IDS_SEARCH_SCOPE_NAMESPACE"/></xsl:when>
  464. <xsl:when test="key('env-param', 'sscope') = 'fo'"><xts:string id="IDS_SEARCH_SCOPE_FOLDER_ONLY"/></xsl:when>
  465. <xsl:otherwise>
  466. <xsl:choose>
  467. <xsl:when test="$type != 'printers' and $type != 'tenants'"><xts:string id="IDS_SEARCH_SCOPE_FOLDERS_SUB"/></xsl:when>
  468. <xsl:otherwise><xts:string id="IDS_SEARCH_SCOPE_FOLDER_ONLY"/></xsl:otherwise>
  469. </xsl:choose>
  470. </xsl:otherwise>
  471. </xsl:choose>
  472. </span>
  473. <span>&#160;</span>
  474. <span class="frag-btn-over">
  475. <img width="7" height="16" border="0" align="top">
  476. <xsl:attribute name="src"><admui:imageURL image="dropdown_arrow_narrow.gif" type="skin"/></xsl:attribute>
  477. <xsl:attribute name="title"><xts:string id="IDS_SEARCH_GO_TO_OPTIONS" /></xsl:attribute>
  478. <xsl:attribute name="alt"><xts:string id="IDS_SEARCH_GO_TO_OPTIONS" /></xsl:attribute>
  479. </img>
  480. </span>
  481. </a>
  482. </td>
  483. </tr>
  484. </xsl:if>
  485. </table>
  486. </td>
  487. </tr>
  488. </table>
  489. </div>
  490. </div>
  491. </form>
  492. <xsl:choose>
  493. <!-- if the query is not specific enough, show the warning-->
  494. <xsl:when test="key('env-param', 'bshowNotSpecific') = 'true'">
  495. <p id="_THIS_notSpecific" style="color:666699; padding-top:50px; text-align:center">
  496. <xts:string id="IDS_SEARCH_NORESULTS" />
  497. </p>
  498. </xsl:when>
  499. <!-- show the query content, even it might be empty-->
  500. <xsl:when test="key('env-param', 'bshowNotSpecific') = 'false'">
  501. <div id="_THIS_mainContent">
  502. <uic:table width="100%">
  503. <uic:features>
  504. <uic:name>search</uic:name>
  505. <uic:scrollable/>
  506. <uic:type>checkbox</uic:type>
  507. <ui:tableFeatures/>
  508. <uic:aria-label><xts:string id="IDS_SEARCH_RESULTS_SUMMARY" encode="html"/></uic:aria-label>
  509. </uic:features>
  510. <xsl:call-template name="pgr:cogadminPager">
  511. <xsl:with-param name="pagerName" select="$pagerName"/>
  512. <xsl:with-param name="pageStart" select="nav:searchResponse/nav:content/@start"/>
  513. <xsl:with-param name="pageEnd" select="nav:searchResponse/nav:content/@end"/>
  514. <xsl:with-param name="pageMax" select="nav:searchResponse/nav:content/@max"/>
  515. <xsl:with-param name="pageMore" select="nav:searchResponse/nav:content/@more"/>
  516. <xsl:with-param name="linesPerPage" select="$linesPerPage"/>
  517. </xsl:call-template>
  518. <uic:header>
  519. <uic:row>
  520. <uic:column nowrap="nowrap" />
  521. <uic:column width="100%" nowrap="nowrap" sort="defaultName" iconTooltip="{$tooltip}">
  522. <uic:text>
  523. ...><span style="margin-left: 3px;"><xts:string id="IDS_HEADING_NAME"/></span>
  524. </uic:text>
  525. </uic:column>
  526. </uic:row>
  527. </uic:header>
  528. <uic:body>
  529. <xsl:apply-templates select="nav:searchResponse/nav:content/*"/>
  530. </uic:body>
  531. <uic:footer displayLastUpdate="true" />
  532. </uic:table>
  533. </div>
  534. </xsl:when>
  535. <!-- show nothing at all at the very initial display-->
  536. <xsl:otherwise/>
  537. </xsl:choose>
  538. </uic:fragment>
  539. </xsl:template>
  540. <xsl:template match="nav:item | nav:container">
  541. <xsl:variable name="value">
  542. <xsl:choose>
  543. <xsl:when test="$type='tenants'">
  544. <xsl:value-of select="nav:tenantID"/>
  545. </xsl:when>
  546. <xsl:otherwise>
  547. <xsl:value-of select="nav:searchPath"/>
  548. </xsl:otherwise>
  549. </xsl:choose>
  550. </xsl:variable>
  551. <uic:row value="{$value}" label="{xtsext:htmlencode(string(nav:name))}">
  552. <xsl:if test="$productLocale != $contentLocale">
  553. <xsl:attribute name="lang"><xsl:value-of select="$contentLocale"/></xsl:attribute>
  554. </xsl:if>
  555. <uic:column nowrap="nowrap">
  556. <uic:icon>
  557. <uic:src>
  558. <admui:imageURL type="nav">
  559. <admui:image><xsl:value-of select="nav:imgURL"/></admui:image>
  560. </admui:imageURL>
  561. </uic:src>
  562. <uic:tooltip>
  563. <xsl:value-of select="nav:screenTip"/>
  564. </uic:tooltip>
  565. </uic:icon>
  566. </uic:column>
  567. <uic:column nowrap="nowrap" scope="row" abbr="{xtsext:htmlencode(nav:name)}">
  568. <table cellspacing="0" cellpadding="0" border="0">
  569. <tr><td>
  570. <uic:icon>
  571. <uic:src><admui:imageURL image="path.gif" type="skin"/></uic:src>
  572. <uic:tooltip><xsl:value-of select="nav:fullName"/></uic:tooltip>
  573. </uic:icon>
  574. </td>
  575. <td>
  576. <uic:text>
  577. <xsl:choose>
  578. <xsl:when test="(nav:type = 'catalogFolder') and contains(string(nav:permissions), 'traverse')">
  579. <uic:link>
  580. <uic:text>
  581. <xsl:value-of select="nav:name"/><xsl:text/>
  582. </uic:text>
  583. <uic:href>#</uic:href>
  584. <uic:onclick>_THIS_.parent.retrieve('searchMode=&amp;visualization_path=<xsl:value-of select="xtsext:javascriptencode(nav:id)"/>');</uic:onclick>
  585. </uic:link>
  586. </xsl:when>
  587. <xsl:otherwise>
  588. <xsl:value-of select="nav:name"/>
  589. </xsl:otherwise>
  590. </xsl:choose>
  591. </uic:text>
  592. <!-- Render the disabled icon if this entry is disabled -->
  593. <xsl:if test="nav:icon/nav:name = 'disabled'">
  594. <uic:icon height="16" width="16" valign="middle">
  595. <uic:src>
  596. <admui:imageURL type="nav">
  597. <admui:image><xsl:value-of select="nav:icon/nav:imgURL"/></admui:image>
  598. </admui:imageURL>
  599. </uic:src>
  600. <uic:tooltip>
  601. <xsl:value-of select="nav:icon/nav:alt"/>
  602. </uic:tooltip>
  603. </uic:icon>
  604. </xsl:if>
  605. <xsl:variable name="permissions" select="nav:permissions"/>
  606. <xsl:variable name="isTenantObj" select="boolean(key('env-param','type')='tenants')"/>
  607. <xsl:variable name="isVisualizationObj" select="boolean(key('env-param','type')='visualizations')"/>
  608. <xsl:call-template name="ui:menuActions">
  609. <xsl:with-param name="obj-class" select="nav:type"/>
  610. <xsl:with-param name="obj-id" select="nav:internalId"/>
  611. <xsl:with-param name="obj-name" select="nav:name"/>
  612. <xsl:with-param name="obj-disabled" select="boolean(nav:icon/nav:name = 'disabled')"/>
  613. <xsl:with-param name="tenant-id" select="nav:tenantID"/>
  614. <xsl:with-param name="obj-path" select="nav:internalId"/>
  615. <xsl:with-param name="supportSetProperties" select="true()"/>
  616. <xsl:with-param name="supportMoreActions" select="not($isTenantObj) and not($isVisualizationObj)"/>
  617. <xsl:with-param name="supportExportTenant" select="true()"/>
  618. <xsl:with-param name="supportCreateContentUtilizationInfo" select="$isTenantObj"/>
  619. <xsl:with-param name="supportImpersonateTenant" select="$isTenantObj"/>
  620. <xsl:with-param name="supportTerminateSessions" select="$isTenantObj"/>
  621. <xsl:with-param name="supportEnableDisableObj" select="$isTenantObj"/>
  622. <xsl:with-param name="supportDelete" select="$isTenantObj or $isVisualizationObj"/>
  623. <xsl:with-param name="supportUserProfileActions" select="$isTenantObj"/>
  624. <xsl:with-param name="canRead" select="contains($permissions, 'read')"/>
  625. <xsl:with-param name="canWrite" select="contains($permissions, 'write')"/>
  626. <xsl:with-param name="canExecute" select="contains($permissions, 'execute')"/>
  627. <xsl:with-param name="canTraverse" select="contains($permissions, 'traverse')"/>
  628. <xsl:with-param name="canSetPolicy" select="contains($permissions, 'setPolicy')"/>
  629. </xsl:call-template>
  630. </td>
  631. </tr>
  632. </table>
  633. </uic:column>
  634. </uic:row>
  635. </xsl:template>
  636. </xsl:stylesheet>