view.xslt 81 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894
  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, 2014
  6. US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  7. -->
  8. <xsl:stylesheet version="1.0"
  9. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  10. xmlns:xts="http://developer.cognos.com/schemas/xts/"
  11. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  12. xmlns:nui="http://developer.cognos.com/schemas/cps/logic/nav/ui/1/"
  13. xmlns:ui="http://developer.cognos.com/schemas/cps/logic/ui/1/"
  14. xmlns:nav="http://developer.cognos.com/schemas/cps/navigation/1/"
  15. xmlns:wsrp="urn:oasis:names:tc:wsrp:v1:types"
  16. xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
  17. xmlns:bus="http://developer.cognos.com/schemas/bibus/3/"
  18. xmlns:pg="http://developer.cognos.com/schemas/xts/pg"
  19. xmlns:cs="http://developer.cognos.com/schemas/cs"
  20. exclude-result-prefixes="xts xtsext nui ui nav wsrp SOAP-ENV bus cs pg">
  21. <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no"/>
  22. <xsl:variable name="redirect-url" select="/root/nav:searchResponse/nav:redirectURL"/>
  23. <ui:capabilities/>
  24. <ui:property name="display-actions-link" select="'display_actions_link'"/>
  25. <ui:property name="display-details" select="'display_details'"/>
  26. <ui:property name="display-max-objects" select="'display_max_objects'"/>
  27. <ui:property name="display-advanced" select="'display_advanced'"/>
  28. <ui:property name="hide-desc" select="'hide_desc'"/>
  29. <ui:property name="display-maximize" select="'display_maximize'"/>
  30. <ui:property name="open-links" select="'open_links'"/>
  31. <ui:property name="channel" select="'channel'"/>
  32. <ui:property name="target" select="'target'"/>
  33. <ui:property name="sort" select="'sort'"/>
  34. <!-- create browser variable: $ui-browser -->
  35. <ui:browser/>
  36. <!-- create portal variable: $ui-consumer-info -->
  37. <ui:consumer/>
  38. <xsl:include href="cps4/portlets/nav/includes/nav-common-include.xslt"/>
  39. <xsl:variable name="consumer-escape" select="$ui-registration-params[@name = 'consumerEscape']"/>
  40. <xsl:variable name="content" select="/root/nav:searchResponse/nav:content"/>
  41. <xsl:variable name="no-filter" select="/root/no-filter"/>
  42. <xsl:variable name="is-crn" select="/root/nav:getServiceDescriptionResponse[nav:platform = 'CRN']"/>
  43. <xsl:variable name="start" select="number($content/@start)"/>
  44. <xsl:variable name="more" select="$content/@more"/>
  45. <xsl:variable name="entries_retrieved" select="$content/@total"/>
  46. <xsl:variable name="first-match" select="$ui-navigational-params[@name='first_match']"/>
  47. <xsl:variable name="searchSort">
  48. <xsl:call-template name="gen-param">
  49. <xsl:with-param name="name" select="'sort'"/>
  50. <xsl:with-param name="value" select="$sort"/>
  51. </xsl:call-template>
  52. </xsl:variable>
  53. <xsl:variable name="table-row-style">
  54. <xsl:choose>
  55. <xsl:when test="$ui-browser = 'ie'">inline</xsl:when>
  56. <xsl:otherwise>table-row</xsl:otherwise>
  57. </xsl:choose>
  58. </xsl:variable>
  59. <xsl:key name="request-params" match="/root/envelope/SOAP-ENV:Envelope/SOAP-ENV:Body/*[1]/wsrp:markupParams/wsrp:navigationalState/param" use="@name"/>
  60. <xsl:variable name="is-content-search" select="key( 'request-params', 'cps_fields' ) = 'cs' or key( 'request-params', 'cps_fields' ) = '' or not (key( 'request-params', 'cps_fields' ))"/>
  61. <xsl:variable name="is-index-tree-ui" select="$is-content-search and $ui-window-state = 'wsrp:maximized' and $content and ($ui-is-cognos-connection or $ui-is-myportal)"/>
  62. <xsl:variable name="all-filters">
  63. <xsl:choose>
  64. <xsl:when test="key( 'request-params', 'all_filters' ) != '' ">
  65. <xsl:value-of select="key( 'request-params', 'all_filters' )"/>
  66. </xsl:when>
  67. <xsl:otherwise>false</xsl:otherwise>
  68. </xsl:choose>
  69. </xsl:variable>
  70. <pg:common-variables>
  71. <pg:searchTerms>key( 'request-params', 'cps_string' )</pg:searchTerms>
  72. <pg:allFilters>$all-filters</pg:allFilters>
  73. <pg:tableTextStyle>'portlet-font'</pg:tableTextStyle>
  74. <pg:selectedCategoryStyle>'portlet-menu-item-selected'</pg:selectedCategoryStyle>
  75. <pg:categoryHoverStyle>'portlet-menu-item-hover'</pg:categoryHoverStyle>
  76. <pg:selectedCategoryHoverStyle>'portlet-menu-item-hover-selected'</pg:selectedCategoryHoverStyle>
  77. <pg:categoryHighlightStyle>'cognos-select-blur'</pg:categoryHighlightStyle>
  78. <pg:tableHeaderStyle>'portlet-table-header'</pg:tableHeaderStyle>
  79. <pg:tableTitleStyle>'portlet-table-header'</pg:tableTitleStyle>
  80. <pg:formLabelStyle>'portlet-form-label'</pg:formLabelStyle>
  81. <pg:tooltipStyle>'cognos-tooltip'</pg:tooltipStyle>
  82. <pg:searchForm>'wsrp_rewrite_form'</pg:searchForm>
  83. <pg:imageRoot>$ui-producer-images</pg:imageRoot>
  84. <pg:csnImageRoot>$ui-producer-images</pg:csnImageRoot>
  85. <pg:gateway>$ui-gateway</pg:gateway>
  86. <pg:callbackFunction>'wsrp_rewrite_restoreLastSearch();wsrp_rewrite_search(0,true,false,true)'</pg:callbackFunction>
  87. <pg:resizeFunction>'wsrp_rewrite_resize_main()'</pg:resizeFunction>
  88. <pg:popupMenu>'portlet-menu'</pg:popupMenu>
  89. <pg:popupMenuCaption>'portlet-menu-caption'</pg:popupMenuCaption>
  90. <pg:popupMenuItem>'portlet-menu-item'</pg:popupMenuItem>
  91. <pg:popupMenuItemHover>'portlet-menu-item-hover'</pg:popupMenuItemHover>
  92. <pg:imageRootSpace>$ui-producer-images</pg:imageRootSpace>
  93. <pg:browser>$ui-browser</pg:browser>
  94. </pg:common-variables>
  95. <pg:commonSupportTemplates/>
  96. <xsl:template match="/">
  97. <xsl:choose>
  98. <xsl:when test="not($ui-canUseIndexSearch or $ui-canUseCMSearch)">
  99. <!-- no search is available -->
  100. <table border="0" cellspacing="0" cellpadding="0" width="100%" role="presentation">
  101. <tr>
  102. <td class="portlet-font" align="center" valign="middle" height="100">
  103. <xts:string id="IDS_PRO_NOC_LABEL_NO_CONTENT"/>
  104. </td>
  105. </tr>
  106. </table>
  107. </xsl:when>
  108. <xsl:otherwise>
  109. <!-- search is available -->
  110. <pg:common-script/>
  111. <pg:common-popup-script/>
  112. <nui:script-validate-range minRange="0" maxObjects="$display-max-objects"/>
  113. <script language="javascript">
  114. <xsl:if test="not( $is-crn ) and ( $display-advanced = 'true' )">
  115. function wsrp_rewrite_radEntries()
  116. {
  117. var cForm = document.wsrp_rewrite_form;
  118. if ( cForm.cps_objects[1].checked == false ) {
  119. cForm.cps_itemType.disabled = true;
  120. cForm.cps_itemState.disabled = true;
  121. cForm.cps_itemModified.disabled = true;
  122. } else {
  123. cForm.cps_itemType.disabled = false;
  124. cForm.cps_itemState.disabled = false;
  125. cForm.cps_itemModified.disabled = false;
  126. }
  127. }
  128. </xsl:if>
  129. <xsl:if test="$consumer-escape != ''">
  130. function wsrp_rewrite_urlUnicodeEncode( str )
  131. {
  132. var len = str.length;
  133. var out = "";
  134. for (i = 0; i &lt; len; i++) {
  135. var c = str.charCodeAt( i );
  136. if (c == 0x25) {
  137. out += "%%";
  138. } else if (c &lt;= 0x7f) {
  139. out += str.charAt( i );
  140. } else {
  141. var e = c.toString( 16 );
  142. out += "%u" + ("0000" + e).substring(e.length);
  143. }
  144. }
  145. return out;
  146. }
  147. </xsl:if>
  148. function wsrp_rewrite_toggleAdvancedMode()
  149. {
  150. document.wsrp_rewrite_form.display_advanced.value='<xsl:value-of select="not(string($display-advanced) = 'true')"/>';
  151. wsrp_rewrite_submit();
  152. }
  153. <xsl:if test="$content">
  154. <!--
  155. We need to clear all the advanced settings. We only keep the state of the advanced settings section (expanded or collapsed) and the search type (e.g. index search, or regular search .. )
  156. -->
  157. function wsrp_rewrite_clearResults()
  158. {
  159. var url = "wsrp_rewrite?wsrp-urlType=blockingAction&amp;wsrp-interactionState=nav&amp;wsrp-windowState=<xsl:value-of select="xtsext:javascriptencode($ui-window-state)"/>&amp;wsrp-mode=wsrp:view&amp;execute=false&amp;display_advanced=<xsl:value-of select="xtsext:javascriptencode(xtsext:urlencode($display-advanced))"/>&amp;cps_fields=<xsl:value-of select="xtsext:javascriptencode(xtsext:urlencode(key( 'request-params', 'cps_fields' ) ))"/>/wsrp_rewrite";
  160. document.location = url;
  161. }
  162. </xsl:if>
  163. function wsrp_rewrite_submit(validateRange)
  164. {
  165. var cForm = document.wsrp_rewrite_form;
  166. if (!wsrp_rewrite_validate(validateRange)) {
  167. return;
  168. }
  169. if (cForm.action == null || cForm.action == "") {
  170. cForm.action = 'wsrp_rewrite?wsrp-urlType=blockingAction&amp;wsrp-interactionState=nav&amp;wsrp-windowState=<xsl:value-of select="$ui-window-state"/>&amp;wsrp-mode=wsrp:view/wsrp_rewrite';
  171. }
  172. <xsl:if test="$consumer-escape != ''">
  173. cForm.<xsl:value-of select="$consumer-escape"/>cps_string.value = wsrp_rewrite_urlUnicodeEncode( cForm.cps_string.value );
  174. </xsl:if>
  175. cForm.submit();
  176. }
  177. function wsrp_rewrite_restoreInput(input,value){
  178. if (input){
  179. if (value=="" &amp;&amp; input.selectedIndex){
  180. input.selectedIndex = 0;
  181. return;
  182. }
  183. input.value=value;
  184. }
  185. }
  186. function wsrp_rewrite_restoreLastSearch(){
  187. var cform = document.wsrp_rewrite_form;
  188. wsrp_rewrite_restoreInput(cform.cps_string, "<xsl:value-of select="xtsext:javascriptencode(/root/lastSearch/param[@name='cps_string'])"/>");
  189. wsrp_rewrite_restoreInput(cform.cps_fields, "<xsl:value-of select="xtsext:javascriptencode(/root/lastSearch/param[@name='cps_fields'])"/>");
  190. wsrp_rewrite_restoreInput(cform.cps_itemType, "<xsl:value-of select="xtsext:javascriptencode(/root/lastSearch/param[@name='cps_itemType'])"/>");
  191. wsrp_rewrite_restoreInput(cform.cps_objects, "<xsl:value-of select="xtsext:javascriptencode(/root/lastSearch/param[@name='cps_objects'])"/>");
  192. wsrp_rewrite_restoreInput(cform.cps_match, "<xsl:value-of select="xtsext:javascriptencode(/root/lastSearch/param[@name='cps_match'])"/>");
  193. wsrp_rewrite_restoreInput(cform.cps_itemModified, "<xsl:value-of select="xtsext:javascriptencode(/root/lastSearch/param[@name='cps_itemModified'])"/>");
  194. wsrp_rewrite_restoreInput(cform.cps_scope, "<xsl:value-of select="xtsext:javascriptencode(/root/lastSearch/param[@name='cps_scope'])"/>");
  195. wsrp_rewrite_restoreInput(cform.cps_itemState, "<xsl:value-of select="xtsext:javascriptencode(/root/lastSearch/param[@name='cps_itemState'])"/>");
  196. }
  197. function wsrp_rewrite_search( skip, execute, animateButton, animateIndicator )
  198. {
  199. if (!execute){
  200. wsrp_rewrite_restoreLastSearch();
  201. }
  202. <xsl:variable name="new-window-state">
  203. <xsl:choose>
  204. <xsl:when test="$display-maximize = 'true'">wsrp:maximized</xsl:when>
  205. <xsl:otherwise>
  206. <xsl:value-of select="$ui-window-state"/>
  207. </xsl:otherwise>
  208. </xsl:choose>
  209. </xsl:variable>
  210. var cForm = document.wsrp_rewrite_form;
  211. cForm.action = 'wsrp_rewrite?wsrp-urlType=blockingAction&amp;wsrp-interactionState=nav&amp;wsrp-windowState=<xsl:value-of select="$new-window-state"/>&amp;wsrp-mode=wsrp:view/wsrp_rewrite';
  212. if (skip != null) {
  213. cForm.skip.value = skip;
  214. if (cForm.from != null) {
  215. cForm.from.value = "";
  216. }
  217. if (cForm.to != null) {
  218. cForm.to.value = "";
  219. }
  220. }
  221. if (execute) {
  222. cForm.execute.value = execute;
  223. cForm.context.value = "";
  224. if (cForm.last_search != null) {
  225. cForm.last_search.value = "";
  226. }
  227. if (cForm.cs_filter){
  228. <!-- check if we need to clear the index search filters -->
  229. var isNewSearch = wsrp_rewrite_isNewSearchTerms(cForm.cps_string.value, "<xsl:value-of select="xtsext:javascriptencode(key( 'request-params', 'cps_string' ))"/>");
  230. if(isNewSearch){
  231. cForm.cs_filter.value= "";
  232. cForm.open_list.value= "";
  233. }
  234. }
  235. }
  236. wsrp_rewrite_submit();
  237. if (animateButton){
  238. var srchbtn = document.getElementById("wsrp_rewrite_srchbtn");
  239. var srchbtn_anim = document.getElementById("wsrp_rewrite_srchbtn_anim");
  240. if (srchbtn &amp;&amp; srchbtn_anim){
  241. srchbtn.src = srchbtn_anim.src;
  242. }
  243. }
  244. <xsl:if test="$ui-is-cognos-connection or $ui-is-myportal">
  245. if(animateIndicator &amp;&amp; cForm.cps_fields.value == 'cs' ){
  246. wsrp_rewrite_showSearchBusy(true);
  247. }
  248. </xsl:if>
  249. }
  250. function wsrp_rewrite_validate(validateRange)
  251. {
  252. if(validateRange != null &amp;&amp; validateRange==true){
  253. return wsrp_rewrite_validateRange();
  254. }
  255. else {
  256. return true;
  257. }
  258. }
  259. function wsrp_rewrite_doSort(name){
  260. var sortvalue = document.wsrp_rewrite_form.sort.value;
  261. if (sortvalue == name + "_a"){
  262. document.wsrp_rewrite_form.sort.value = name + "_d";
  263. }
  264. else if (sortvalue == name + "_d"){
  265. document.wsrp_rewrite_form.sort.value= "";
  266. }
  267. else {
  268. document.wsrp_rewrite_form.sort.value=name + "_a";
  269. }
  270. wsrp_rewrite_submit();
  271. }
  272. <xsl:if test="$ui-canUseIndexSearch">
  273. var normalTypes = new Array(
  274. <xsl:text>"<xts:string id="IDS_NAV_VEW_SEARCH_ENTRIES_REPORT_TYPE_ANY"/>", "any"</xsl:text>
  275. <xsl:for-each select="/root/nav:getItemTypesResponse/nav:items[@type='normal']/nav:itemType">
  276. <xsl:text>, "</xsl:text><xsl:value-of select="xtsext:javascriptencode(nav:description)"/><xsl:text>","</xsl:text><xsl:value-of select="xtsext:javascriptencode(nav:id)"/><xsl:text>"</xsl:text>
  277. </xsl:for-each>
  278. );
  279. var contentTypes = new Array(
  280. <xsl:text>"<xts:string id="IDS_NAV_VEW_SEARCH_ENTRIES_REPORT_TYPE_ANY"/>", "any"</xsl:text>
  281. <xsl:for-each select="/root/nav:getItemTypesResponse/nav:items[@type='content']/nav:itemType">
  282. <xsl:text>, "</xsl:text><xsl:value-of select="xtsext:javascriptencode(nav:description)"/><xsl:text>","</xsl:text><xsl:value-of select="xtsext:javascriptencode(nav:id)"/><xsl:text>"</xsl:text>
  283. </xsl:for-each>
  284. );
  285. <xsl:choose>
  286. <xsl:when test="$display-advanced = 'true' ">
  287. function wsrp_rewrite_setSearchContent()
  288. {
  289. var cForm = document.wsrp_rewrite_form;
  290. var searchContent = cForm.cps_fields.value == "cs";
  291. var content_specific = new Array("wsrp_rewrite_content_stype");
  292. var normal_specific = new Array(
  293. "wsrp_rewrite_normal_stype",
  294. "wsrp_rewrite_normal_srchin",
  295. "wsrp_rewrite_normal_srchin2",
  296. "wsrp_rewrite_normal_modf",
  297. "wsrp_rewrite_normal_modf2",
  298. "wsrp_rewrite_normal_scope",
  299. "wsrp_rewrite_normal_scope2"
  300. )
  301. var style_normal;
  302. var style_content;
  303. if (searchContent){
  304. style_normal = "none";
  305. style_content = "";
  306. selectedArray = contentTypes;
  307. }
  308. else{
  309. style_normal = "";
  310. style_content = "none";
  311. selectedArray = normalTypes;
  312. }
  313. for (i =0; i &lt; normal_specific.length; i++){
  314. var oDiv = document.getElementById(normal_specific[i]);
  315. if (oDiv){
  316. oDiv.style.display = style_normal;
  317. }
  318. }
  319. for (i =0; i &lt; content_specific.length; i++){
  320. var oDiv = document.getElementById(content_specific[i]);
  321. if (oDiv){
  322. oDiv.style.display = style_content;
  323. }
  324. }
  325. var selectedType = cForm.cps_itemType.options[cForm.cps_itemType.selectedIndex].value;
  326. cForm.cps_itemType.options.length = 0;
  327. for (i =0 ; i &lt; selectedArray.length; i= i+2){
  328. index = i/2;
  329. cForm.cps_itemType.options[index]= new Option(selectedArray[i], selectedArray[i+1]);
  330. if (selectedType == cForm.cps_itemType.options[index].value){
  331. cForm.cps_itemType.options[index].selected= true;
  332. }
  333. }
  334. <xsl:if test="$is-index-tree-ui">
  335. wsrp_rewrite_resize_main();
  336. </xsl:if>
  337. }
  338. </xsl:when>
  339. <xsl:otherwise>
  340. function wsrp_rewrite_setSearchContent()
  341. {
  342. <!--
  343. If the selected item type is not supported by content search, we default to the first type in the types list ('any')
  344. -->
  345. var cForm = document.wsrp_rewrite_form;
  346. var searchContent = cForm.cps_fields.value == "cs";
  347. if (cForm.cps_itemType){
  348. var selectedType = cForm.cps_itemType.value;
  349. if (selectedType != ""){
  350. if (searchContent){
  351. selectedArray = contentTypes;
  352. }
  353. else{
  354. selectedArray = normalTypes;
  355. }
  356. for (i =0 ; i &lt; selectedArray.length; i= i+2){
  357. index = i/2;
  358. if (selectedType == selectedArray[i+1]){
  359. return;
  360. }
  361. }
  362. cForm.cps_itemType.value = selectedArray[1];
  363. }
  364. }
  365. }
  366. </xsl:otherwise>
  367. </xsl:choose>
  368. </xsl:if>
  369. <xsl:if test="$is-content-search and $display-details='true'">
  370. <xsl:variable name="icon-expand">
  371. <xsl:value-of select="xtsext:javascriptencode($ui-producer-images)"/><xsl:text>advanced_off.gif</xsl:text>
  372. </xsl:variable>
  373. <xsl:variable name="icon-collapse">
  374. <xsl:value-of select="xtsext:javascriptencode($ui-producer-images)"/><xsl:text>advanced_on.gif</xsl:text>
  375. </xsl:variable>
  376. function wsrp_rewrite_expandMatch(id) {
  377. var match = document.getElementById(id + "match");
  378. if (match != null){
  379. match.style.display = 'block';
  380. }
  381. var icon = document.getElementById(id + "srcharw");
  382. if (icon != null){
  383. icon.src ="<xsl:value-of select="$icon-collapse"/>";
  384. icon.alt="<xts:string id="IDS_SEARCHADV_COLLAPSE" encode="javascript"/>";
  385. icon.title="<xts:string id="IDS_SEARCHADV_COLLAPSE" encode="javascript"/>";
  386. }
  387. }
  388. function wsrp_rewrite_collapseMatch(id) {
  389. var match = document.getElementById(id + "match");
  390. if (match != null){
  391. match.style.display = 'none';
  392. }
  393. var icon = document.getElementById(id + "srcharw");
  394. if (icon != null){
  395. icon.src ="<xsl:value-of select="$icon-expand"/>";
  396. icon.alt="<xts:string id="IDS_SEARCHADV_EXPAND" encode="javascript"/>";
  397. icon.title="<xts:string id="IDS_SEARCHADV_EXPAND" encode="javascript"/>";
  398. }
  399. }
  400. function wsrp_rewrite_toggleMatch(id) {
  401. var match = document.getElementById(id + "match");
  402. if (match.style.overflow == 'hidden'){
  403. wsrp_rewrite_expandMatch(id);
  404. }
  405. else{
  406. wsrp_rewrite_collapseMatch(id);
  407. }
  408. }
  409. var wsrp_rewrite_desc_expanded = true;
  410. function wsrp_rewrite_toggleMatchAll(count) {
  411. var icon = document.getElementById("wsrp_rewrite_srcharwall");
  412. var cform = document.wsrp_rewrite_form;
  413. if (cform.hide_desc.value == "true"){
  414. cform.hide_desc.value = "false";
  415. icon.src = "<xsl:value-of select="$icon-collapse"/>";
  416. icon.alt="<xts:string id="IDS_SEARCH_INDEXTREE_CRITERIA_TOOLTIP_CLOSE_DETAIL"/>";
  417. icon.title="<xts:string id="IDS_SEARCH_INDEXTREE_CRITERIA_TOOLTIP_CLOSE_DETAIL"/>";
  418. if (count > 0){
  419. for (i = 1; i &lt;= count; i++){
  420. wsrp_rewrite_expandMatch ("wsrp_rewrite_" + i);
  421. }
  422. }
  423. }
  424. else{
  425. cform.hide_desc.value = "true";
  426. icon.src = "<xsl:value-of select="$icon-expand"/>";
  427. icon.alt="<xts:string id="IDS_SEARCH_INDEXTREE_CRITERIA_TOOLTIP_OPEN_DETAIL"/>";
  428. icon.title="<xts:string id="IDS_SEARCH_INDEXTREE_CRITERIA_TOOLTIP_OPEN_DETAIL"/>";
  429. if (count > 0){
  430. for (i = 1; i &lt;= count; i++){
  431. wsrp_rewrite_collapseMatch("wsrp_rewrite_" + i);
  432. }
  433. }
  434. }
  435. }
  436. </xsl:if>
  437. <xsl:if test="$open-links = 'channel'">
  438. <nui:wsrp_rewrite_channel_set/>
  439. </xsl:if>
  440. </script>
  441. <xsl:call-template name="nav-script-openWindow">
  442. <xsl:with-param name="redirectURL" select="$redirect-url"/>
  443. </xsl:call-template>
  444. <form name="wsrp_rewrite_form" method="post" onsubmit="javascript:wsrp_rewrite_search(0,true)" style="margin:0px;">
  445. <input name="sort" type="hidden" value="{$sort}"/>
  446. <input type="hidden" name="cs_tree" value="true"/>
  447. <input type="hidden" name="cs_requestversion" value="2"/>
  448. <xsl:if test="$is-index-tree-ui">
  449. <input type="hidden" name="cs_filter"/>
  450. <input type="hidden" name="open_list"/>
  451. </xsl:if>
  452. <xsl:if test="$open-links = 'channel'">
  453. <input name="display_id" type="hidden" value=""/>
  454. <input name="session_id" type="hidden" value=""/>
  455. </xsl:if>
  456. <!-- if viewing results, build a form for saving the query's values -->
  457. <xsl:variable name="skip">
  458. <xsl:choose>
  459. <xsl:when test="$content and (number( $content/@start ) > 0)">
  460. <xsl:value-of select="number( $content/@start ) - 1"/>
  461. </xsl:when>
  462. <xsl:otherwise>0</xsl:otherwise>
  463. </xsl:choose>
  464. </xsl:variable>
  465. <input type="hidden" name="display_advanced" value="{ $display-advanced }"/>
  466. <input type="hidden" name="skip" value="{ $skip }"/>
  467. <input type="hidden" name="execute" value="false"/>
  468. <input type="hidden" name="context" value="{ /root/nav:searchResponse/nav:context }"/>
  469. <script type="text/javascript">
  470. <xsl:attribute name="src">
  471. <xsl:value-of select="$ui-webcontent"/>/../ccl/i18n/bidi/BidiUtils.js<xsl:text/>
  472. </xsl:attribute>
  473. </script>
  474. <script>
  475. var isBidiEnabled = <xsl:value-of select="boolean($ui-portlet-isBidiEnabled='true')"/>;
  476. if (isBidiEnabled){
  477. var bidi = BidiUtils.getInstance();
  478. bidi.setProperties('<xsl:value-of select="$ui-portlet-baseTextDirection"/>',
  479. '<xsl:value-of select="xtsext:getBTD('', $ui-portlet-baseTextDirection, $ui-portlet-product-locale)"/>',
  480. '<xsl:value-of select="$ui-portlet-product-locale"/>');
  481. }
  482. </script>
  483. <xsl:if test="key( 'request-params', 'execute' ) = 'true' or key( 'request-params', 'last_search' ) != ''">
  484. <input type="hidden" name="last_search">
  485. <xsl:attribute name="value">
  486. <xsl:choose>
  487. <xsl:when test="key( 'request-params', 'last_search' ) != ''">
  488. <xsl:value-of select="key( 'request-params', 'last_search' )"/>
  489. </xsl:when>
  490. <xsl:otherwise>
  491. <xsl:variable name="saved-search">
  492. <xsl:for-each select="$ui-navigational-params[starts-with(@name, 'cps_')]">
  493. <xsl:call-template name="gen-param"/>
  494. </xsl:for-each>
  495. <xsl:call-template name="gen-param">
  496. <xsl:with-param name="name" select="'execute'"/>
  497. <xsl:with-param name="value" select="'true'"/>
  498. </xsl:call-template>
  499. </xsl:variable>
  500. <xsl:value-of select="xtsext:base64encode( string( $saved-search ), true() )"/>
  501. </xsl:otherwise>
  502. </xsl:choose>
  503. </xsl:attribute>
  504. </input>
  505. </xsl:if>
  506. <xsl:if test="$ui-is-cognos-connection or $ui-is-myportal">
  507. <!--
  508. Busy indicator that will be used for burgundy ..
  509. -->
  510. <pg:busyIndicator/>
  511. </xsl:if>
  512. <!--
  513. Maximize script used to maximize the results and tree panes.
  514. -->
  515. <xsl:if test="$is-index-tree-ui">
  516. <script>
  517. function wsrp_rewrite_adjustTreeSectionsHeight(height){
  518. <xsl:if test="$ui-browser = 'ie'">
  519. <!-- this is to get around a problem in ie. The tree div width is set to 100%, but ie will make it wider than the advanced properties if we have a scrollable content. -->
  520. if ( document.getElementById("wsrp_rewrite_adv_table").clientWidth != 0){
  521. document.getElementById("wsrp_rewrite_div_tree").style.width = document.getElementById("wsrp_rewrite_adv_table").clientWidth +"px";
  522. }
  523. if ( document.getElementById("wsrp_rewrite_adv_table").clientWidth != 0){
  524. document.getElementById("wsrp_rewrite_div_search_filters_content").style.width = document.getElementById("wsrp_rewrite_adv_table").clientWidth +"px";
  525. }
  526. </xsl:if>
  527. var div_tree_header = document.getElementById("wsrp_rewrite_div_tree_header").offsetHeight;
  528. var div_tree_panel = height - div_tree_header - 2;
  529. if (document.getElementById("wsrp_rewrite_div_search_filters").style.display != "none") {
  530. var div_filter_header = document.getElementById("wsrp_rewrite_div_filter_header").offsetHeight;
  531. var div_filter_footer = document.getElementById("wsrp_rewrite_div_filter_footer").offsetHeight;
  532. div_tree_panel = div_tree_panel - div_filter_header - div_filter_footer ;
  533. var tree_div_section = Math.ceil(div_tree_panel * 0.75);
  534. var filters_div_section = Math.floor(div_tree_panel * 0.25);
  535. tree_div_section = tree_div_section > 0 ? tree_div_section : 1;
  536. filters_div_section = filters_div_section > 0 ? filters_div_section : 1;
  537. document.getElementById("wsrp_rewrite_div_tree").style.height = tree_div_section;
  538. document.getElementById("wsrp_rewrite_div_search_filters_content").style.height = filters_div_section;
  539. }
  540. else{
  541. document.getElementById("wsrp_rewrite_div_tree").style.height = div_tree_panel;
  542. }
  543. wsrp_rewrite_showSearchBusy(false); //force repositioning
  544. }
  545. </script>
  546. <ui:maximize-scripts>
  547. <ui:objectId>wsrp_rewrite_div_results_content</ui:objectId>
  548. <ui:objectId ui:callback="wsrp_rewrite_adjustTreeSectionsHeight">wsrp_rewrite_div_tree_panel</ui:objectId>
  549. </ui:maximize-scripts>
  550. </xsl:if>
  551. <table border="0" cellpadding="5" cellspacing="0" width="100%" id="wsrp_rewrite_search_div" role="presentation">
  552. <xsl:choose>
  553. <xsl:when test="$ui-window-state = 'wsrp:maximized'">
  554. <tr>
  555. <td valign="top">
  556. <xsl:call-template name="render-options"/>
  557. <xsl:if test="$is-index-tree-ui">
  558. <br/>
  559. <pg:treeResult width="100%" noSeparator="true">
  560. <pg:treeContent>/root/nav:searchResponse/nav:extensions/cs:subjectTree/QueryDescription/SubjectTree</pg:treeContent>
  561. </pg:treeResult>
  562. </xsl:if>
  563. </td>
  564. <td valign="top" width="100%">
  565. <xsl:choose>
  566. <xsl:when test="$content">
  567. <xsl:call-template name="render-results"/>
  568. </xsl:when>
  569. <xsl:otherwise>
  570. <table border="0" cellpadding="0" cellspacing="0" width="100%" role="presentation">
  571. <xsl:call-template name="render-back-to-mypage-link"/>
  572. </table>
  573. </xsl:otherwise>
  574. </xsl:choose>
  575. </td>
  576. </tr>
  577. <xsl:choose>
  578. <xsl:when test="$no-filter">
  579. <xsl:call-template name="render-message">
  580. <xsl:with-param name="columns" select="'2'"/>
  581. <xsl:with-param name="message"><xts:string id="IDS_NAV_VEW_NO_FILTER"/></xsl:with-param>
  582. </xsl:call-template>
  583. </xsl:when>
  584. <xsl:when test="not ($content)">
  585. <!-- place holder for the burgundy busy icon -->
  586. <tr>
  587. <td colspan="2">
  588. <div class="portlet-table-body" style="display:none;height:80px" align="center" id="wsrp_rewrite_div_results_content">
  589. </div>
  590. </td>
  591. </tr>
  592. </xsl:when>
  593. </xsl:choose>
  594. </xsl:when>
  595. <xsl:otherwise>
  596. <tr>
  597. <td>
  598. <xsl:call-template name="render-options"/>
  599. </td>
  600. </tr>
  601. <xsl:choose>
  602. <xsl:when test="$no-filter">
  603. <xsl:call-template name="render-message">
  604. <xsl:with-param name="columns" select="'1'"/>
  605. <xsl:with-param name="message"><xts:string id="IDS_NAV_VEW_NO_FILTER"/></xsl:with-param>
  606. </xsl:call-template>
  607. </xsl:when>
  608. <xsl:when test="$content">
  609. <tr>
  610. <td>
  611. <xsl:call-template name="render-results"/>
  612. </td>
  613. </tr>
  614. </xsl:when>
  615. <xsl:otherwise>
  616. <!-- place holder for the burgundy busy icon -->
  617. <tr>
  618. <td>
  619. <div class="portlet-table-body" style="display:none;height:80px" align="center" id="wsrp_rewrite_div_results_content">
  620. </div>
  621. </td>
  622. </tr>
  623. </xsl:otherwise>
  624. </xsl:choose>
  625. </xsl:otherwise>
  626. </xsl:choose>
  627. <xsl:if test="/root/uiError/message">
  628. <xsl:variable name="columns">
  629. <xsl:choose>
  630. <xsl:when test="$ui-window-state = 'wsrp:maximized'">2</xsl:when>
  631. <xsl:otherwise>1</xsl:otherwise>
  632. </xsl:choose>
  633. </xsl:variable>
  634. <xsl:call-template name="render-message">
  635. <xsl:with-param name="columns" select="$columns"/>
  636. <xsl:with-param name="message"><xsl:value-of select="/root/uiError/message"/></xsl:with-param>
  637. </xsl:call-template>
  638. </xsl:if>
  639. <xsl:if test="$ui-mode = 'wsrp:preview'">
  640. <tr>
  641. <td>
  642. <ui:preview/>
  643. </td>
  644. </tr>
  645. </xsl:if>
  646. </table>
  647. </form>
  648. </xsl:otherwise> <!-- search is available block -->
  649. </xsl:choose>
  650. </xsl:template>
  651. <xsl:template name="render-options">
  652. <table border="0" cellpadding="1" cellspacing="0" id="wsrp_rewrite_adv_table" width="230" role="presentation">
  653. <tr style="padding-bottom:10px">
  654. <td width="20" style="padding-right:5px" nowrap="nowrap">
  655. <table border="0" cellpadding="1" cellspacing="0" role="presentation">
  656. <tr>
  657. <td class="portlet-form-field-label" valign="middle" nowrap="nowrap"><label for="wsrp_rewrite_searchCriteriaField"><xts:string id="IDS_NAV_VEW_SEARCH_IN"/></label></td>
  658. <td style="padding-left:4px"><xsl:call-template name="search-fields"/></td>
  659. </tr>
  660. </table>
  661. </td>
  662. </tr>
  663. <tr>
  664. <td colspan="2">
  665. <table border="0" cellpadding="0" cellspacing="0" role="presentation">
  666. <tr>
  667. <td class="portlet-form-field">
  668. <input id="wsrp_rewrite_searchCriteriaField" class="portlet-form-input-field" type="text" name="cps_string" size="32">
  669. <xsl:attribute name="onkeypress">javascript:if( event.keyCode==13){wsrp_rewrite_search(0,true,true,true); return false;} return true;</xsl:attribute>
  670. <xsl:if test="$ui-portlet-isBidiEnabled = 'true'">
  671. <xsl:attribute name="dir">
  672. <xsl:value-of select="xtsext:getBTD(string(key( 'request-params', 'cps_string' )), $ui-portlet-baseTextDirection, $ui-portlet-product-locale)"/>
  673. </xsl:attribute>
  674. </xsl:if>
  675. <xsl:if test="$ui-portlet-isBidiEnabled = 'true' and $ui-portlet-baseTextDirection = 'auto'">
  676. <xsl:attribute name="onfocus">bidi.onfocus(this)</xsl:attribute>
  677. </xsl:if>
  678. <xsl:attribute name="value"><xsl:value-of select="key( 'request-params', 'cps_string' )"/></xsl:attribute>
  679. </input>
  680. <xsl:if test="$consumer-escape != ''">
  681. <input type="hidden" name="{$consumer-escape}cps_string"/>
  682. </xsl:if>
  683. </td>
  684. <td nowrap="nowrap" style="padding-left:3px">
  685. <div tabindex="0" style="border:#999999 1px solid; cursor:pointer; padding:1px 2px 1px 1px;" role="button">
  686. <xsl:attribute name="onclick">javascript:wsrp_rewrite_search(0,true,true,true)</xsl:attribute>
  687. <xsl:attribute name="onkeypress">javascript:if( event.keyCode==13 || event.keyCode==32 || event.charCode==32 ){this.onclick(); return false;} return true;</xsl:attribute>
  688. <img id="wsrp_rewrite_srchbtn" src="{ $ui-producer-images }action_search.gif" width="15" height="16" border="0">
  689. <xsl:attribute name="alt"><xts:string id="IDS_NAV_VEW_SEARCH_SEARCH"/></xsl:attribute>
  690. </img>
  691. <img id="wsrp_rewrite_srchbtn_anim" src="{ $ui-producer-images }action_search_ani.gif" width="15" height="16" style="display:none;" border="0">
  692. <xsl:attribute name="alt"><xts:string id="IDS_NAV_VEW_SEARCH_SEARCH"/></xsl:attribute>
  693. </img>
  694. </div>
  695. </td>
  696. </tr>
  697. <tr>
  698. <td colspan="2">
  699. <table border="0" cellpadding="2" cellspacing="0" role="presentation">
  700. <tr>
  701. <td class="portlet-form-field" nowrap="nowrap">
  702. <a xsl:use-attribute-sets="anchor" href="javascript:wsrp_rewrite_toggleAdvancedMode();">
  703. <xsl:text/><xts:string id="IDS_NAV_VEW_SEARCH_ADVANCED"><xts:param name="image"><img height="10" width="10" border="0" align="absmiddle" style="margin-left:3px">
  704. <xsl:attribute name="src">
  705. <xsl:value-of select="$ui-producer-images"/>
  706. <xsl:text>advanced_</xsl:text>
  707. <xsl:choose>
  708. <xsl:when test="$display-advanced = 'true'">on</xsl:when>
  709. <xsl:otherwise>off</xsl:otherwise>
  710. </xsl:choose>
  711. <xsl:text>.gif</xsl:text>
  712. </xsl:attribute>
  713. <xsl:attribute name="alt">
  714. <xsl:choose>
  715. <xsl:when test="$display-advanced = 'true'"><xts:string id="IDS_SEARCHADV_COLLAPSE"/></xsl:when>
  716. <xsl:otherwise><xts:string id="IDS_SEARCHADV_EXPAND"/></xsl:otherwise>
  717. </xsl:choose>
  718. </xsl:attribute>
  719. <xsl:attribute name="title">
  720. <xsl:choose>
  721. <xsl:when test="$display-advanced = 'true'"><xts:string id="IDS_SEARCHADV_COLLAPSE"/></xsl:when>
  722. <xsl:otherwise><xts:string id="IDS_SEARCHADV_EXPAND"/></xsl:otherwise>
  723. </xsl:choose>
  724. </xsl:attribute>
  725. </img></xts:param></xts:string><xsl:text/>
  726. </a>
  727. </td>
  728. <xsl:if test="$content">
  729. <td class="portlet-font" width="12">
  730. <img src="{ $ui-producer-images }sep.gif" alt="" width="12" height="16"/>
  731. </td>
  732. <td class="portlet-font" nowrap="nowrap">
  733. <a xsl:use-attribute-sets="anchor">
  734. <xsl:attribute name="href">javascript:wsrp_rewrite_clearResults();</xsl:attribute>
  735. <xsl:text/><xts:string id="IDS_NAV_VEW_SEARCH_CLEAR_RESULTS"/><xsl:text/>
  736. </a>
  737. </td>
  738. </xsl:if>
  739. </tr>
  740. </table>
  741. </td>
  742. </tr>
  743. </table>
  744. </td>
  745. </tr>
  746. <xsl:choose>
  747. <xsl:when test="$display-advanced = 'true'">
  748. <xsl:variable name="content-prop-style">
  749. <xsl:if test="not($is-content-search)">
  750. <xsl:text>display:none;</xsl:text>
  751. </xsl:if>
  752. </xsl:variable>
  753. <xsl:variable name="normal-prop-style">
  754. <xsl:if test="$is-content-search">
  755. <xsl:text>display:none;</xsl:text>
  756. </xsl:if>
  757. </xsl:variable>
  758. <tr>
  759. <td class="cognos-section-background" style="padding:5px">
  760. <table border="0" cellpadding="1" cellspacing="0" role="presentation">
  761. <tr>
  762. <td class="portlet-form-field-label" valign="top"><label for="wsrp_rewrite_cps_match_select"><xts:string id="IDS_NAV_VEW_SEARCH_MATCH_TYPE"/></label></td>
  763. </tr>
  764. <tr id="wsrp_rewrite_normal_stype" style="{$normal-prop-style}">
  765. <td class="portlet-form-field" align="left">
  766. <xsl:call-template name="search-match"/>
  767. </td>
  768. </tr>
  769. <tr id="wsrp_rewrite_content_stype" style="{$content-prop-style}">
  770. <td class="portlet-form-field"><xts:string id="IDS_NAV_VEW_SEARCH_MATCH_TYPE_FULL_KEYWORD"/></td>
  771. </tr>
  772. <xsl:if test="$is-crn">
  773. <!-- ##### CRN advanced settings ##### -->
  774. <tr>
  775. <td class="portlet-form-field-label" style="padding-top:5px"><label for="wsrp_rewrite_cps_ItemType"><xts:string id="IDS_NAV_VEW_SEARCH_ENTRIES_REPORT_TYPE"/></label></td>
  776. </tr>
  777. <tr>
  778. <td class="portlet-form-field">
  779. <xsl:call-template name="search-type"/>
  780. </td>
  781. </tr>
  782. <tr id="wsrp_rewrite_normal_modf" style="{$normal-prop-style}">
  783. <td class="portlet-form-field-label" style="padding-top:5px"><label for="wsrp_rewrite_cps_ItemModified"><xts:string id="IDS_NAV_VEW_SEARCH_ENTRIES_REPORT_MODIFIED"/></label></td>
  784. </tr>
  785. <tr id="wsrp_rewrite_normal_modf2" style="{$normal-prop-style}">
  786. <td class="portlet-form-field">
  787. <xsl:call-template name="search-modified"/>
  788. </td>
  789. </tr>
  790. <tr id="wsrp_rewrite_normal_scope" style="{$normal-prop-style}">
  791. <td class="portlet-form-field-label" valign="top" style="padding-top:5px"><label for="wsrp_rewrite_cps_scope"><xts:string id="IDS_NAV_VEW_SEARCH_SCOPE"/></label></td>
  792. </tr>
  793. <tr id="wsrp_rewrite_normal_scope2" style="{$normal-prop-style}">
  794. <td class="portlet-form-field">
  795. <xsl:call-template name="search-scope"/>
  796. </td>
  797. </tr>
  798. </xsl:if>
  799. <xsl:if test="not( $is-crn )">
  800. <!-- ##### Cognos Series 7 advanced settings ##### -->
  801. <tr>
  802. <td style="padding:5px 0px 0px 0px ">
  803. <table border="0" cellpadding="0" cellspacing="0" role="presentation">
  804. <tr>
  805. <td class="portlet-form-field">
  806. <input id="AE" type="radio" name="cps_objects" value="all" onclick="javascript:wsrp_rewrite_radEntries();">
  807. <xsl:if test="key( 'request-params', 'cps_objects' ) = 'all' or not( key( 'request-params', 'cps_objects' ) )">
  808. <xsl:attribute name="checked">checked</xsl:attribute>
  809. </xsl:if>
  810. </input>
  811. </td>
  812. <td class="portlet-form-field" valign="middle" align="left"><xts:string id="IDS_NAV_VEW_SEARCH_ENTRIES_ALL"/></td>
  813. </tr>
  814. <tr>
  815. <td class="portlet-form-field">
  816. <input id="NI" type="radio" name="cps_objects" value="items" onclick="javascript:wsrp_rewrite_radEntries();">
  817. <xsl:if test="key( 'request-params', 'cps_objects' ) = 'items'">
  818. <xsl:attribute name="checked">checked</xsl:attribute>
  819. </xsl:if>
  820. </input>
  821. </td>
  822. <td class="portlet-form-field" valign="middle" align="left"><xts:string id="IDS_NAV_VEW_SEARCH_ENTRIES_REPORTS"/></td>
  823. </tr>
  824. <tr>
  825. <td class="portlet-form-field">
  826. <br/>
  827. </td>
  828. <td valign="top" align="left">
  829. <table border="0" cellpadding="1" cellspacing="0" role="presentation">
  830. <tr>
  831. <td class="portlet-form-field-label"><xts:string id="IDS_NAV_VEW_SEARCH_ENTRIES_REPORT_TYPE"/></td>
  832. </tr>
  833. <tr>
  834. <td class="portlet-form-field">
  835. <xsl:call-template name="search-type">
  836. <xsl:with-param name="enabled" select="key( 'request-params', 'cps_objects' ) = 'items'"/>
  837. </xsl:call-template>
  838. </td>
  839. </tr>
  840. <tr>
  841. <td class="portlet-form-field-label"><xts:string id="IDS_NAV_VEW_SEARCH_ENTRIES_REPORT_STATUS"/></td>
  842. </tr>
  843. <tr>
  844. <td class="portlet-form-field">
  845. <xsl:call-template name="search-state">
  846. <xsl:with-param name="enabled" select="key( 'request-params', 'cps_objects' ) = 'items'"/>
  847. </xsl:call-template>
  848. </td>
  849. </tr>
  850. <tr>
  851. <td class="portlet-form-field-label"><xts:string id="IDS_NAV_VEW_SEARCH_ENTRIES_REPORT_MODIFIED"/></td>
  852. </tr>
  853. <tr>
  854. <td class="portlet-form-field">
  855. <xsl:call-template name="search-modified">
  856. <xsl:with-param name="enabled" select="key( 'request-params', 'cps_objects' ) = 'items'"/>
  857. </xsl:call-template>
  858. </td>
  859. </tr>
  860. </table>
  861. </td>
  862. </tr>
  863. <tr>
  864. <td class="portlet-form-field">
  865. <input id="NB" type="radio" name="cps_objects" value="containers" onclick="javascript:wsrp_rewrite_radEntries();">
  866. <xsl:if test="key( 'request-params', 'cps_objects' ) = 'containers'">
  867. <xsl:attribute name="checked">checked</xsl:attribute>
  868. </xsl:if>
  869. </input>
  870. </td>
  871. <td class="portlet-form-field">
  872. <span><xts:string id="IDS_NAV_VEW_SEARCH_ENTRIES_FOLDERS"/></span>
  873. </td>
  874. </tr>
  875. </table>
  876. </td>
  877. </tr>
  878. </xsl:if>
  879. </table>
  880. </td>
  881. </tr>
  882. </xsl:when>
  883. <xsl:otherwise>
  884. <xsl:if test="key( 'request-params', 'cps_match' )">
  885. <input type="hidden" name="cps_match" value="{ key( 'request-params', 'cps_match' ) }"/>
  886. </xsl:if>
  887. <xsl:if test=" key( 'request-params', 'cps_itemType' ) ">
  888. <input type="hidden" name="cps_itemType" value="{ key( 'request-params', 'cps_itemType' ) }"/>
  889. </xsl:if>
  890. <xsl:if test="key( 'request-params', 'cps_itemModified' ) ">
  891. <input type="hidden" name="cps_itemModified" value="{ key( 'request-params', 'cps_itemModified' ) }"/>
  892. </xsl:if>
  893. <xsl:if test="key( 'request-params', 'cps_scope' )">
  894. <input type="hidden" name="cps_scope" value="{ key( 'request-params', 'cps_scope' ) }"/>
  895. </xsl:if>
  896. </xsl:otherwise>
  897. </xsl:choose>
  898. <xsl:if test="$ui-state-params[ starts-with(@name, 'saved_n') ]">
  899. <tr>
  900. <td>
  901. <table border="0" cellpadding="0" cellspacing="0" width="100%" role="presentation">
  902. <tr>
  903. <td class="portlet-form-field-label" colspan="2">
  904. <br/>
  905. <b><xts:string id="IDS_NAV_VEW_SEARCH_SAVED"/></b>
  906. </td>
  907. </tr>
  908. <tr>
  909. <td class="portlet-form-field" colspan="2">
  910. <hr size="1"/>
  911. </td>
  912. </tr>
  913. <tr>
  914. <td class="portlet-form-field" valign="top" width="50%" nowrap="nowrap">
  915. <xsl:for-each select="$ui-state-params[ starts-with(@name, 'saved_n') ]">
  916. <xsl:sort select="." order="ascending"/>
  917. <xsl:if test="position() mod 2 != 0">
  918. <xsl:call-template name="render-saved-link"/>
  919. </xsl:if>
  920. </xsl:for-each>
  921. </td>
  922. <td class="portlet-form-field" valign="top" width="50%" nowrap="nowrap">
  923. <xsl:for-each select="$ui-state-params[ starts-with(@name, 'saved_n') ]">
  924. <xsl:sort select="." order="ascending"/>
  925. <xsl:if test="position() mod 2 = 0">
  926. <xsl:call-template name="render-saved-link"/>
  927. </xsl:if>
  928. </xsl:for-each>
  929. </td>
  930. </tr>
  931. </table>
  932. </td>
  933. </tr>
  934. </xsl:if>
  935. </table>
  936. </xsl:template>
  937. <xsl:template name="render-results">
  938. <table border="0" cellpadding="2" cellspacing="0" valign="top" width="100%" role="presentation">
  939. <xsl:call-template name="render-back-to-mypage-link"/>
  940. <tr>
  941. <td class="portlet-form-label">
  942. <xts:string id="IDS_NAV_VEW_SEARCH_RESULTS"><xts:param name="searchString"><xsl:value-of select="xtsext:enforceBTD($ui-navigational-params[@name = 'cps_string'], $ui-portlet-baseTextDirection, $ui-portlet-product-locale, boolean($ui-portlet-isBidiEnabled='true'))"/></xts:param></xts:string>
  943. </td>
  944. <xsl:if test="($ui-hide-selector!='true') or ($more='true') or ($entries_retrieved &gt; $display-max-objects) or (($start &gt; 1 ) or ($start = 0 and number($first-match) &gt; 0))">
  945. <xsl:if test="$ui-window-state != 'wsrp:maximized'">
  946. <xsl:text disable-output-escaping="yes">&lt;/tr&gt;&lt;tr&gt;</xsl:text>
  947. </xsl:if>
  948. <td align="right" valign="middle" nowrap="nowrap" width="50%">
  949. <table border="0" cellpadding="0" cellspacing="0" role="presentation">
  950. <tr>
  951. <!-- td class="portlet-table-body" align="right" valign="top" nowrap="nowrap">
  952. <xsl:choose>
  953. <xsl:when test="not( $content/@rangeIsApproximation) or ($content/@rangeIsApproximation = 'false')">
  954. <xsl:choose>
  955. <xsl:when test="$content/@total">
  956. <xsl:text/><xts:string id="IDS_NAV_VEW_BANNER_TOTAL"><xts:param name="start"><xsl:value-of select="$content/@start"/></xts:param><xts:param name="end"><xsl:value-of select="$content/@end"/></xts:param><xts:param name="total"><xsl:value-of select="$content/@total"/></xts:param></xts:string><xsl:text/>
  957. </xsl:when>
  958. <xsl:when test="$content/@estimatedTotal">
  959. <xsl:text/><xts:string id="IDS_NAV_VEW_BANNER_ESTIMATED_TOTAL"><xts:param name="start"><xsl:value-of select="$content/@start"/></xts:param><xts:param name="end"><xsl:value-of select="$content/@end"/></xts:param><xts:param name="total"><xsl:value-of select="$content/@total"/></xts:param></xts:string><xsl:text/>
  960. </xsl:when>
  961. <xsl:otherwise>
  962. <xsl:text/><xts:string id="IDS_NAV_VEW_BANNER_NO_TOTAL"><xts:param name="start"><xsl:value-of select="$content/@start"/></xts:param><xts:param name="end"><xsl:value-of select="$content/@end"/></xts:param></xts:string><xsl:text/>
  963. </xsl:otherwise>
  964. </xsl:choose>
  965. </xsl:when>
  966. <xsl:otherwise>
  967. <xsl:choose>
  968. <xsl:when test="$content/@total">
  969. <xsl:text/><xts:string id="IDS_NAV_VEW_BANNER_HIDE_RANGE_TOTAL"><xts:param name="total"><xsl:value-of select="$content/@total"/></xts:param></xts:string><xsl:text/>
  970. </xsl:when>
  971. <xsl:when test="$content/@estimatedTotal">
  972. <xsl:text/><xts:string id="IDS_NAV_VEW_BANNER_HIDE_RANGE_ESTIMATED_TOTAL"><xts:param name="total"><xsl:value-of select="$content/@estimatedTotal"/></xts:param></xts:string><xsl:text/>
  973. </xsl:when>
  974. </xsl:choose>
  975. </xsl:otherwise>
  976. </xsl:choose>
  977. </td -->
  978. <xsl:variable name="from_value">
  979. <xsl:choose>
  980. <xsl:when test="$content/@start &gt; 0"><xsl:value-of select="$content/@start"/></xsl:when>
  981. <xsl:otherwise><xsl:value-of select="$ui-navigational-params[@name = 'from']"/></xsl:otherwise>
  982. </xsl:choose>
  983. </xsl:variable>
  984. <xsl:variable name="from_label"><xts:string id="IDS_NAV_COM_ENTRIES_FROM"/></xsl:variable>
  985. <xsl:variable name="to_value">
  986. <xsl:choose>
  987. <xsl:when test="$content/@end &gt; 0"><xsl:value-of select="$content/@end"/></xsl:when>
  988. <xsl:otherwise><xsl:value-of select="$ui-navigational-params[@name = 'to']"/></xsl:otherwise>
  989. </xsl:choose>
  990. </xsl:variable>
  991. <xsl:variable name="to_label"><xts:string id="IDS_NAV_COM_ENTRIES_TO"/></xsl:variable>
  992. <xsl:variable name="first-match-value">
  993. <xsl:choose>
  994. <xsl:when test="$ui-navigational-params[@name = 'execute'] = 'true'"><xsl:value-of select="$content/@end "/></xsl:when>
  995. <xsl:otherwise><xsl:value-of select="$first-match"/></xsl:otherwise>
  996. </xsl:choose>
  997. </xsl:variable>
  998. <input type="hidden" name="display_max" value="{$display-max-objects}"/>
  999. <input type="hidden" name="first_match" value="{$first-match-value}"/>
  1000. <td class="portlet-font" align="right" valign="middle" nowrap="nowrap">
  1001. <xsl:choose>
  1002. <xsl:when test="$is-content-search">
  1003. <xsl:text/><xts:string id="IDS_NAV_VEW_SEARCH_OF_ABOUT"><xsl:text/>
  1004. <xts:param name="from">
  1005. <xsl:value-of select="$from_value"/>
  1006. </xts:param>
  1007. <xts:param name="to">
  1008. <xsl:value-of select="$to_value"/>
  1009. </xts:param>
  1010. <xts:param name="about">
  1011. <xsl:if test="$content/@estimatedTotal != '0'">
  1012. <xsl:value-of select="$content/@estimatedTotal"/>
  1013. </xsl:if>
  1014. </xts:param>
  1015. </xts:string><xsl:text/>
  1016. </xsl:when>
  1017. <xsl:otherwise>
  1018. <xsl:text/><xts:string id="IDS_NAV_COM_ENTRIES_FROM_TO"><xsl:text/>
  1019. <xts:param name="from">
  1020. <input class="portlet-form-input-field cognos-form-input-field" type="text" size="4" name="from" maxlength="9" value="{ $from_value}" title="{ $from_label }"/>
  1021. </xts:param>
  1022. <xts:param name="to">
  1023. <input class="portlet-form-input-field cognos-form-input-field" type="text" size="4" name="to" maxlength="9" value="{ $to_value }" title="{ $to_label }"/>
  1024. </xts:param>
  1025. </xts:string><xsl:text/>
  1026. </xsl:otherwise>
  1027. </xsl:choose>
  1028. </td>
  1029. <xsl:if test="not($is-content-search) ">
  1030. <td class="portlet-font" width="18">
  1031. <img src="{ $ui-producer-images }space.gif" width="2" height="1" alt=""/>
  1032. <a xsl:use-attribute-sets="anchor" href="javascript:wsrp_rewrite_restoreLastSearch();wsrp_rewrite_submit(true);">
  1033. <img height="16" width="16" src="{ $ui-producer-images }control_btn_go.gif" border="0">
  1034. <xsl:attribute name="alt"><xts:string id="IDS_NAV_VEW_GO"/></xsl:attribute>
  1035. <xsl:attribute name="title"><xts:string id="IDS_NAV_VEW_GO"/></xsl:attribute>
  1036. </img>
  1037. </a>
  1038. </td>
  1039. </xsl:if>
  1040. <td class="portlet-font" width="12">
  1041. <img src="{ $ui-producer-images }sep.gif" alt="" width="12" height="16"/>
  1042. </td>
  1043. <td class="portlet-font" align="right" width="70" nowrap="nowrap">
  1044. <xsl:attribute name="width">
  1045. <xsl:choose>
  1046. <xsl:when test="$is-content-search">52</xsl:when>
  1047. <xsl:otherwise>70</xsl:otherwise>
  1048. </xsl:choose>
  1049. </xsl:attribute>
  1050. <!--
  1051. First page button
  1052. -->
  1053. <xsl:choose>
  1054. <xsl:when test=" ( (number( $content/@start ) &gt; 1) or ( (number( $content/@start ) = 0) and (number($first-match) &gt;0) and not($ui-navigational-params[@name = 'execute'] = 'true')) )">
  1055. <a xsl:use-attribute-sets="anchor" href="javascript:wsrp_rewrite_search(0,false,false,true);">
  1056. <img height="16" width="16" src="{ $ui-producer-images }control_btn_first_page.gif" border="0">
  1057. <xsl:attribute name="alt"><xts:string id="IDS_NAV_COM_FIRST_PAGE"/></xsl:attribute>
  1058. <xsl:attribute name="title"><xts:string id="IDS_NAV_COM_FIRST_PAGE"/></xsl:attribute>
  1059. </img>
  1060. </a>
  1061. </xsl:when>
  1062. <xsl:otherwise>
  1063. <img height="16" width="16" src="{ $ui-producer-images }control_btn_first_page_disabled.gif" border="0">
  1064. <xsl:attribute name="alt"><xts:string id="IDS_NAV_COM_FIRST_PAGE"/></xsl:attribute>
  1065. <xsl:attribute name="title"><xts:string id="IDS_NAV_COM_FIRST_PAGE"/></xsl:attribute>
  1066. </img>
  1067. </xsl:otherwise>
  1068. </xsl:choose>
  1069. <img src="{ $ui-producer-images }space.gif" width="2" height="1" alt=""/>
  1070. <!--
  1071. Previous page button
  1072. -->
  1073. <xsl:choose>
  1074. <xsl:when test="number( $content/@start ) &gt; 1">
  1075. <xsl:variable name="skip-previous-value" select="number( $content/@start ) - number( $display-max-objects) - 1"/>
  1076. <xsl:variable name="skip-previous">
  1077. <xsl:choose>
  1078. <xsl:when test="$skip-previous-value &gt;= 0">
  1079. <xsl:value-of select="$skip-previous-value"/>
  1080. </xsl:when>
  1081. <xsl:otherwise>0</xsl:otherwise>
  1082. </xsl:choose>
  1083. </xsl:variable>
  1084. <a xsl:use-attribute-sets="anchor" href="javascript:wsrp_rewrite_search({ $skip-previous },false,false,true);">
  1085. <img height="16" width="16" src="{ $ui-producer-images }control_btn_previous_page.gif" border="0">
  1086. <xsl:attribute name="alt"><xts:string id="IDS_NAV_COM_PREVIOUS_PAGE"/></xsl:attribute>
  1087. <xsl:attribute name="title"><xts:string id="IDS_NAV_COM_PREVIOUS_PAGE"/></xsl:attribute>
  1088. </img>
  1089. </a>
  1090. </xsl:when>
  1091. <xsl:otherwise>
  1092. <img height="16" width="16" src="{ $ui-producer-images }control_btn_previous_page_disabled.gif" border="0">
  1093. <xsl:attribute name="alt"><xts:string id="IDS_NAV_COM_PREVIOUS_PAGE"/></xsl:attribute>
  1094. <xsl:attribute name="title"><xts:string id="IDS_NAV_COM_PREVIOUS_PAGE"/></xsl:attribute>
  1095. </img>
  1096. </xsl:otherwise>
  1097. </xsl:choose>
  1098. <img src="{ $ui-producer-images }space.gif" width="2" height="1" alt=""/>
  1099. <!--
  1100. Next page button
  1101. -->
  1102. <xsl:choose>
  1103. <xsl:when test="$content/@more = 'true'">
  1104. <a xsl:use-attribute-sets="anchor" href="javascript:wsrp_rewrite_search({ $content/@end },false,false,true);">
  1105. <img src="{ $ui-producer-images }control_btn_next_page.gif" border="0">
  1106. <xsl:attribute name="alt"><xts:string id="IDS_NAV_COM_NEXT_PAGE"/></xsl:attribute>
  1107. <xsl:attribute name="title"><xts:string id="IDS_NAV_COM_NEXT_PAGE"/></xsl:attribute>
  1108. </img>
  1109. </a>
  1110. </xsl:when>
  1111. <xsl:otherwise>
  1112. <img height="16" width="16" src="{ $ui-producer-images }control_btn_next_page_disabled.gif" border="0">
  1113. <xsl:attribute name="alt"><xts:string id="IDS_NAV_COM_NEXT_PAGE"/></xsl:attribute>
  1114. <xsl:attribute name="title"><xts:string id="IDS_NAV_COM_NEXT_PAGE"/></xsl:attribute>
  1115. </img>
  1116. </xsl:otherwise>
  1117. </xsl:choose>
  1118. <!--
  1119. Last page button
  1120. -->
  1121. <xsl:if test="not($is-content-search) ">
  1122. <img src="{ $ui-producer-images }space.gif" width="2" height="1" alt=""/>
  1123. <xsl:choose>
  1124. <xsl:when test="( ($content/@more = 'true') or ( (number( $content/@start ) = 0) and (number($first-match) &gt;0) and not($ui-navigational-params[@name = 'execute'] = 'true') ) )">
  1125. <a xsl:use-attribute-sets="anchor" href="javascript:wsrp_rewrite_search({ -$display-max-objects },false,false,true);">
  1126. <img src="{ $ui-producer-images }control_btn_last_page.gif" border="0">
  1127. <xsl:attribute name="alt"><xts:string id="IDS_NAV_COM_LAST_PAGE"/></xsl:attribute>
  1128. <xsl:attribute name="title"><xts:string id="IDS_NAV_COM_LAST_PAGE"/></xsl:attribute>
  1129. </img>
  1130. </a>
  1131. </xsl:when>
  1132. <xsl:otherwise>
  1133. <img height="16" width="16" src="{ $ui-producer-images }control_btn_last_page_disabled.gif" border="0">
  1134. <xsl:attribute name="alt"><xts:string id="IDS_NAV_COM_LAST_PAGE"/></xsl:attribute>
  1135. <xsl:attribute name="title"><xts:string id="IDS_NAV_COM_LAST_PAGE"/></xsl:attribute>
  1136. </img>
  1137. </xsl:otherwise>
  1138. </xsl:choose>
  1139. </xsl:if>
  1140. </td>
  1141. </tr>
  1142. </table>
  1143. </td>
  1144. </xsl:if>
  1145. </tr>
  1146. </table>
  1147. <xsl:variable name="results" select="$content/*[self::nav:container | self::nav:item | self::nav:shortcut]"/>
  1148. <xsl:if test="$is-content-search">
  1149. <input type="hidden" name="hide_desc" value="{$hide-desc}"/>
  1150. </xsl:if>
  1151. <div>
  1152. <!--
  1153. This div will be used for the burgundy scrollable content in ie only
  1154. -->
  1155. <xsl:if test="$is-index-tree-ui and $ui-browser = 'ie'">
  1156. <xsl:attribute name="style">overflow:auto;border: 1px solid black;width:100%;</xsl:attribute>
  1157. <xsl:attribute name="id">wsrp_rewrite_div_results_content</xsl:attribute>
  1158. </xsl:if>
  1159. <table border="0" cellpadding="0" cellspacing="0" valign="top" width="100%">
  1160. <xsl:attribute name="summary"><xts:string id="IDS_SEARCH_RESULTS_TABLE"/></xsl:attribute>
  1161. <xsl:if test="not($is-index-tree-ui and $ui-browser = 'ie')">
  1162. <xsl:attribute name="style">border: 1px solid black</xsl:attribute>
  1163. </xsl:if>
  1164. <xsl:if test="not($is-index-tree-ui)">
  1165. <xsl:attribute name="id">wsrp_rewrite_div_results_content</xsl:attribute>
  1166. </xsl:if>
  1167. <xsl:if test="$ui-browser = 'ie' and $ui-mode != 'wsrp:preview'">
  1168. <xsl:attribute name="align">left</xsl:attribute>
  1169. </xsl:if>
  1170. <thead>
  1171. <tr class="portlet-table-header" style="height:20px">
  1172. <!--
  1173. This will keep the table header from scrolling in
  1174. -->
  1175. <xsl:if test="$is-index-tree-ui and $ui-browser = 'ie'">
  1176. <xsl:attribute name="style">height:20px;position:relative;top:expression(this.offsetParent.scrollTop);</xsl:attribute>
  1177. </xsl:if>
  1178. <th scope="col" class="portlet-font" width="20">&#160;</th>
  1179. <th role="separator" scope="col" class="portlet-font" width="12">
  1180. <img src="{ $ui-producer-images }sep.gif" alt="" width="12" height="15"/>
  1181. </th>
  1182. <th scope="col"><b><xsl:text>...&gt;&#160;</xsl:text></b></th>
  1183. <th scope="col">
  1184. <xsl:attribute name="width"><xsl:choose><xsl:when test="$display-actions-link = 'true'">80%</xsl:when><xsl:otherwise>100%</xsl:otherwise></xsl:choose></xsl:attribute>
  1185. <table cellpadding="0" cellspacing="0" border="0" role="presentation">
  1186. <tr>
  1187. <td class="portlet-table-header" valign="top"><b><xts:string id="IDS_NAV_VEW_NAME_TABLE_HEADER"/></b></td>
  1188. <td>
  1189. <xsl:choose>
  1190. <xsl:when test="$is-content-search">
  1191. <xsl:if test="count($results) &gt; 0 and $display-details = 'true'">
  1192. <xsl:attribute name="style">padding-left:10px</xsl:attribute>
  1193. <a xsl:use-attribute-sets="anchor" href="javascript:wsrp_rewrite_toggleMatchAll({count($results)})">
  1194. <img id="wsrp_rewrite_srcharwall" height="10" width="10" border="0">
  1195. <xsl:attribute name="src">
  1196. <xsl:value-of select="$ui-producer-images"/>
  1197. <xsl:text>advanced_</xsl:text>
  1198. <xsl:choose>
  1199. <xsl:when test="$hide-desc = 'true'">off</xsl:when>
  1200. <xsl:otherwise>on</xsl:otherwise>
  1201. </xsl:choose>
  1202. <xsl:text>.gif</xsl:text>
  1203. </xsl:attribute>
  1204. <xsl:variable name="title">
  1205. <xsl:choose>
  1206. <xsl:when test="$hide-desc = 'true'"><xts:string id="IDS_SEARCH_INDEXTREE_CRITERIA_TOOLTIP_OPEN_DETAIL"/></xsl:when>
  1207. <xsl:otherwise><xts:string id="IDS_SEARCH_INDEXTREE_CRITERIA_TOOLTIP_CLOSE_DETAIL"/></xsl:otherwise>
  1208. </xsl:choose>
  1209. </xsl:variable>
  1210. <xsl:attribute name="alt"><xsl:value-of select="$title"/></xsl:attribute>
  1211. <xsl:attribute name="title"><xsl:value-of select="$title"/></xsl:attribute>
  1212. </img>
  1213. </a>
  1214. </xsl:if>
  1215. </xsl:when>
  1216. <xsl:otherwise>
  1217. <xsl:variable name="sort-img">
  1218. <xsl:choose>
  1219. <xsl:when test="starts-with(string($sort),'name')">
  1220. <xsl:choose>
  1221. <xsl:when test="$sort = 'name_a'"><xsl:text>list_sort_ascending.gif</xsl:text></xsl:when>
  1222. <xsl:when test="$sort = 'name_d'"><xsl:text>list_sort_descending.gif</xsl:text></xsl:when>
  1223. <xsl:otherwise><xsl:text>list_sort_no.gif</xsl:text></xsl:otherwise>
  1224. </xsl:choose>
  1225. </xsl:when>
  1226. <xsl:otherwise><xsl:text>list_sort_no.gif</xsl:text></xsl:otherwise>
  1227. </xsl:choose>
  1228. </xsl:variable>
  1229. <a xsl:use-attribute-sets="anchor" href="#" onclick="wsrp_rewrite_doSort('name')">
  1230. <img height="15" width="15" border="0" src="{ $ui-producer-images }{ $sort-img }">
  1231. <xsl:attribute name="alt"><xts:string id="IDS_NAV_COM_SORT"/></xsl:attribute>
  1232. <xsl:attribute name="title"><xts:string id="IDS_NAV_COM_SORT"/></xsl:attribute>
  1233. </img>
  1234. </a>
  1235. </xsl:otherwise>
  1236. </xsl:choose>
  1237. </td>
  1238. </tr>
  1239. </table>
  1240. </th>
  1241. <xsl:if test="$display-actions-link = 'true'">
  1242. <th role="separator" scope="col" class="portlet-font">
  1243. <img src="{ $ui-producer-images }sep.gif" alt="" width="12" height="15"/>
  1244. </th>
  1245. <th scope="col" class="portlet-table-header">
  1246. <b><xts:string id="IDS_NAV_VEW_ACTIONS_TABLE_HEADER"/></b>
  1247. </th>
  1248. </xsl:if>
  1249. <xsl:if test="$is-index-tree-ui and $ui-browser != 'ie'">
  1250. <th scope="col" width="30"><img border="0" width="30" height="16" src="{ $ui-producer-images }space.gif" alt=""/></th>
  1251. </xsl:if>
  1252. </tr>
  1253. </thead>
  1254. <xsl:variable name="columns">
  1255. <xsl:choose>
  1256. <xsl:when test="$display-actions-link = 'true'">6</xsl:when>
  1257. <xsl:otherwise>4</xsl:otherwise>
  1258. </xsl:choose>
  1259. </xsl:variable>
  1260. <tbody>
  1261. <!--
  1262. This tbody will be used for scrollable content in mozilla
  1263. -->
  1264. <xsl:if test="$is-index-tree-ui and $ui-browser != 'ie'">
  1265. <xsl:attribute name="style">overflow:auto</xsl:attribute>
  1266. <xsl:attribute name="id">wsrp_rewrite_div_results_content</xsl:attribute>
  1267. </xsl:if>
  1268. <xsl:choose>
  1269. <xsl:when test="count( $results) &gt; 0">
  1270. <xsl:apply-templates select="$results"/>
  1271. <xsl:if test="$is-index-tree-ui and $ui-browser != 'ie'">
  1272. <tr><td/></tr>
  1273. </xsl:if>
  1274. </xsl:when>
  1275. <xsl:when test="(number($first-match) &gt;0) and not($ui-navigational-params[@name = 'execute'] = 'true') ">
  1276. <xsl:call-template name="render-message">
  1277. <xsl:with-param name="columns" select="$columns"/>
  1278. <xsl:with-param name="message"><xts:string id="IDS_NAV_VEW_END_OF_LIST"/></xsl:with-param>
  1279. </xsl:call-template>
  1280. </xsl:when>
  1281. <xsl:otherwise>
  1282. <xsl:call-template name="render-message">
  1283. <xsl:with-param name="columns" select="$columns"/>
  1284. <xsl:with-param name="message"><xts:string id="IDS_NAV_VEW_SEARCH_NO_RESULTS"/></xsl:with-param>
  1285. </xsl:call-template>
  1286. </xsl:otherwise>
  1287. </xsl:choose>
  1288. </tbody>
  1289. </table>
  1290. </div>
  1291. <xsl:if test="$is-index-tree-ui">
  1292. <pg:common-tree-script>
  1293. <pg:treePath>/root/nav:searchResponse/nav:extensions/cs:subjectTree</pg:treePath>
  1294. <pg:filterContext>/root/nav:searchResponse/nav:extensions/cs:filterContext/filterContext/FilterSpecification</pg:filterContext>
  1295. <pg:openList>key( 'request-params', 'open_list' ) </pg:openList>
  1296. </pg:common-tree-script>
  1297. </xsl:if>
  1298. </xsl:template>
  1299. <xsl:template name="render-message">
  1300. <xsl:param name="columns"/>
  1301. <xsl:param name="message"/>
  1302. <tr>
  1303. <td class="portlet-table-body" style="height:80px" valign="top" colspan="{ $columns }" align="center" id="wsrp_rewrite_div_results_content">
  1304. <br/>
  1305. <span class="portlet-font-dim"><xsl:value-of select="$message"/></span>
  1306. <br/><br/>
  1307. </td>
  1308. </tr>
  1309. </xsl:template>
  1310. <xsl:template match="nav:item | nav:container | nav:shortcut">
  1311. <tr style="height:1px">
  1312. <td class="portlet-table-body" nowrap="nowrap" valign="top" align="right" style="padding-left:5px;">
  1313. <xsl:if test="nav:status[ @code = 'Error']">
  1314. <img border="0" src="{ $ui-producer-images }icon_status_error.gif" width="12" height="12" alt="{ nav:status }" title="{ nav:status }"/>
  1315. </xsl:if>
  1316. <xsl:if test="nav:newState = 'New'">
  1317. <img src="{ $ui-producer-images }state_new.gif" width="16" height="16" border="0">
  1318. <xsl:attribute name="alt"><xts:string id="IDS_NAV_VEW_SEARCH_NEW"/></xsl:attribute>
  1319. <xsl:attribute name="title"><xts:string id="IDS_NAV_VEW_SEARCH_NEW"/></xsl:attribute>
  1320. </img>
  1321. </xsl:if>
  1322. <img border="0" width="16" height="16" src="{ nav:imgURL }" alt="{ nav:screenTip }" title="{ nav:screenTip }">
  1323. <xsl:if test="nav:hidden = 'true'">
  1324. <ui:add-hidden-opacity-style/>
  1325. </xsl:if>
  1326. </img>
  1327. <xsl:choose>
  1328. <xsl:when test="nav:defaultAction/nav:imgURL != ''">
  1329. <img border="0" width="12" height="16" src="{ nav:defaultAction/nav:imgURL }" alt="{ nav:defaultAction/nav:alt }" title="{ nav:defaultAction/nav:alt }"/>
  1330. </xsl:when>
  1331. <xsl:otherwise>
  1332. <img border="0" width="12" height="16" src="{ $ui-producer-images }space.gif" alt=""/>
  1333. </xsl:otherwise>
  1334. </xsl:choose>
  1335. </td>
  1336. <td class="portlet-table-body" width="12" role="separator">
  1337. <img width="1" height="1" src="{ $ui-producer-images }space.gif" alt=""/>
  1338. </td>
  1339. <td class="portlet-table-body" nowrap="nowrap" valign="top">
  1340. <xsl:attribute name="title"><xsl:value-of select="nav:fullName"/></xsl:attribute>
  1341. <img src="{ $ui-producer-images }path.gif" alt="" width="12" height="16"/>
  1342. </td>
  1343. <td class="portlet-table-body" valign="top">
  1344. <table border="0" cellspacing="0" cellpadding="0" width="100%" role="presentation">
  1345. <tr>
  1346. <td>
  1347. <xsl:choose>
  1348. <xsl:when test="nav:defaultAction/nav:url != '' and not(self::nav:container)">
  1349. <a xsl:use-attribute-sets="anchor">
  1350. <xsl:call-template name="gen-anchor-attr">
  1351. <xsl:with-param name="redirectURL" select="$redirect-url"/>
  1352. <xsl:with-param name="url" select="nav:defaultAction/nav:url"/>
  1353. <xsl:with-param name="window-properties" select="nav:defaultAction/nav:windowProperties"/>
  1354. <xsl:with-param name="target" select="$target"/>
  1355. <xsl:with-param name="open-links" select="$open-links"/>
  1356. <xsl:with-param name="channel-onclick">
  1357. <xsl:if test="$open-links = 'channel'">
  1358. <xsl:text>wsrp_rewrite_channel_set('</xsl:text>
  1359. <xsl:value-of select="nav:id"/>
  1360. <xsl:text>')</xsl:text>
  1361. </xsl:if>
  1362. </xsl:with-param>
  1363. <xsl:with-param name="reset-channel-onclick">
  1364. <xsl:if test="$open-links = 'channel'">
  1365. <xsl:text>wsrp_rewrite_channel_set('')</xsl:text>
  1366. </xsl:if>
  1367. </xsl:with-param>
  1368. </xsl:call-template>
  1369. <xsl:if test="$ui-portlet-isBidiEnabled='true'">
  1370. <xsl:attribute name="dir">
  1371. <xsl:value-of select="xtsext:getBTD(nav:name, $ui-portlet-baseTextDirection, $ui-portlet-product-locale)"/>
  1372. </xsl:attribute>
  1373. </xsl:if>
  1374. <xsl:choose>
  1375. <xsl:when test="nav:readState = 'Unread'">
  1376. <b><xsl:value-of select="nav:name"/></b>
  1377. </xsl:when>
  1378. <xsl:otherwise>
  1379. <xsl:value-of select="nav:name"/>
  1380. </xsl:otherwise>
  1381. </xsl:choose>
  1382. </a>
  1383. </xsl:when>
  1384. <xsl:otherwise>
  1385. <xsl:value-of select="xtsext:enforceBTD(nav:name, $ui-portlet-baseTextDirection, $ui-portlet-product-locale, boolean($ui-portlet-isBidiEnabled='true'))"/>
  1386. </xsl:otherwise>
  1387. </xsl:choose>
  1388. <!-- Disabled for titan
  1389. <xsl:if test="self::nav:container and $display-actions-link = 'true' and nav:defaultAction/nav:url != ''">
  1390. <xsl:text>&#160;</xsl:text>
  1391. <a xsl:use-attribute-sets="anchor">
  1392. <xsl:call-template name="gen-anchor-attr">
  1393. <xsl:with-param name="redirectURL" select="$redirect-url"/>
  1394. <xsl:with-param name="url" select="nav:defaultAction/nav:url"/>
  1395. <xsl:with-param name="window-properties" select="nav:defaultAction/nav:windowProperties"/>
  1396. </xsl:call-template>
  1397. <img src="{ $ui-producer-images }action_open.gif" border="0" width="12" height="12" align="absmiddle">
  1398. <xsl:attribute name="alt"><xts:string id="IDS_NAV_COM_VIEW_FOLDER_ALTTOOLTIP"><xts:param name="name"><xsl:value-of select="xtsext:enforceBTD(nav:name, $ui-portlet-baseTextDirection, $ui-portlet-product-locale, boolean($ui-portlet-isBidiEnabled='true'))"/></xts:param></xts:string></xsl:attribute>
  1399. <xsl:attribute name="title"><xts:string id="IDS_NAV_COM_VIEW_FOLDER_TOOLTIP"/></xsl:attribute>
  1400. </img>
  1401. </a>
  1402. </xsl:if>
  1403. -->
  1404. <xsl:if test="nav:icon/nav:name = 'disabled'">
  1405. <xsl:text>&#160;</xsl:text>
  1406. <img src="{ nav:icon/nav:imgURL }" width="16" height="16" border="0" align="absmiddle">
  1407. <xsl:attribute name="alt"><xsl:value-of select="nav:icon/nav:alt"/></xsl:attribute>
  1408. <xsl:attribute name="title"><xsl:value-of select="nav:icon/nav:alt"/></xsl:attribute>
  1409. </img>
  1410. </xsl:if>
  1411. </td>
  1412. <xsl:if test="$is-content-search">
  1413. <td align="right" nowrap="nowrap">
  1414. <xsl:if test="nav:score != '' and nav:score != 'null'">
  1415. <xsl:value-of select="nav:score"/>
  1416. <xsl:text>%&#160;</xsl:text>
  1417. <xsl:variable name="title"><xts:string id="IDS_NAV_VEW_SEARCH_SCORE" ><xts:param name="score"><xsl:value-of select="nav:score"/></xts:param></xts:string></xsl:variable>
  1418. <img src="{nav:icon[nav:name='score']/nav:imgURL}" align="middle">
  1419. <xsl:attribute name="alt"><xsl:value-of select="$title"/></xsl:attribute>
  1420. <xsl:attribute name="title"><xsl:value-of select="$title"/></xsl:attribute>
  1421. </img>
  1422. <xsl:text>&#160;</xsl:text>
  1423. </xsl:if>
  1424. </td>
  1425. </xsl:if>
  1426. </tr>
  1427. <xsl:if test=" $display-details='true'">
  1428. <tr>
  1429. <td colspan="2">
  1430. <xsl:choose>
  1431. <xsl:when test="$is-content-search">
  1432. <xsl:variable name="desc-style">
  1433. <xsl:text>padding-bottom:2px;</xsl:text>
  1434. <xsl:if test="$hide-desc = 'true'">
  1435. <xsl:text>display:none;</xsl:text>
  1436. </xsl:if>
  1437. </xsl:variable>
  1438. <div id="wsrp_rewrite_{position()}match" style="{$desc-style}" class="portlet-font">
  1439. <xsl:if test="nav:matchDescription != ''">
  1440. <xsl:value-of disable-output-escaping="yes" select="nav:matchDescription"/>
  1441. </xsl:if>
  1442. </div>
  1443. </xsl:when>
  1444. <xsl:otherwise>
  1445. <div style="padding-right:3px; padding-bottom:3px;" class="portlet-font">
  1446. <xsl:if test="nav:description != ''">
  1447. <xsl:value-of select="xtsext:enforceBTD(nav:description, $ui-portlet-baseTextDirection, $ui-portlet-product-locale, boolean($ui-portlet-isBidiEnabled='true'))"/>
  1448. <br/>
  1449. </xsl:if>
  1450. <xsl:choose>
  1451. <xsl:when test="nav:lastModifiedDate">
  1452. <xsl:text><xts:string id="IDS_NAV_VEW_SEARCH_LAST_MODIFIED"/></xsl:text>
  1453. <xsl:value-of select="xtsext:enforceBTD(nav:lastModifiedDate, 'auto', $ui-portlet-product-locale, boolean($ui-portlet-isBidiEnabled='true'))"/>
  1454. <br/>
  1455. </xsl:when>
  1456. <xsl:when test="nav:createDate">
  1457. <xsl:text><xts:string id="IDS_NAV_VEW_SEARCH_CREATED"/></xsl:text>
  1458. <xsl:value-of select="xtsext:enforceBTD(nav:createDate, 'auto', $ui-portlet-product-locale, boolean($ui-portlet-isBidiEnabled='true'))"/>
  1459. <br/>
  1460. </xsl:when>
  1461. </xsl:choose>
  1462. </div>
  1463. </xsl:otherwise>
  1464. </xsl:choose>
  1465. </td>
  1466. </tr>
  1467. </xsl:if>
  1468. </table>
  1469. </td>
  1470. <xsl:if test="$display-actions-link = 'true'">
  1471. <td class="portlet-table-body" width="1" role="separator">
  1472. <img width="1" height="1" src="{ $ui-producer-images }space.gif" alt=""/>
  1473. </td>
  1474. <td nowrap="nowrap" valign="top" style="padding-right:3px" >
  1475. <table border="0" cellpadding="0" cellspacing="0" role="presentation">
  1476. <tr>
  1477. <!-- HACK ALERT: never display the 'run' action -->
  1478. <!-- need a better solution here, something like an 'open' action -->
  1479. <xsl:for-each select="nav:action[nav:name != 'run']">
  1480. <td class="portlet-table-body">
  1481. <a xsl:use-attribute-sets="anchor" >
  1482. <xsl:if test="nav:aria-label != ''">
  1483. <xsl:attribute name="aria-label"><xsl:value-of select="nav:aria-label"/></xsl:attribute>
  1484. </xsl:if>
  1485. <xsl:call-template name="gen-anchor-attr">
  1486. <xsl:with-param name="redirectURL" select="$redirect-url"/>
  1487. </xsl:call-template>
  1488. <xsl:choose>
  1489. <xsl:when test="nav:imgURL != ''">
  1490. <img border="0" width="16" height="16" src="{ nav:imgURL }" alt="{ nav:alt }" title="{ nav:alt }"/>
  1491. </xsl:when>
  1492. <xsl:otherwise>
  1493. <xsl:value-of select="nav:alt"/>
  1494. </xsl:otherwise>
  1495. </xsl:choose>
  1496. </a>
  1497. </td>
  1498. <xsl:if test="position() != last()">
  1499. <td class="portlet-table-body" width="3" role="separator">
  1500. <img width="3" height="1" src="{ $ui-producer-images }space.gif" alt=""/>
  1501. </td>
  1502. </xsl:if>
  1503. </xsl:for-each>
  1504. </tr>
  1505. </table>
  1506. </td>
  1507. </xsl:if>
  1508. </tr>
  1509. </xsl:template>
  1510. <xsl:template name="render-saved-link">
  1511. <xsl:variable name="saved-s" select="concat( 'saved_s', substring-after( @name, 'saved_n' ) )"/>
  1512. <xsl:variable name="searchState">
  1513. <xsl:choose>
  1514. <xsl:when test="$sort != ''">
  1515. <xsl:value-of select="xtsext:base64encode(concat(xtsext:base64decode(string($ui-state-params[@name = $saved-s]), true()), string($searchSort)), true())"/>
  1516. </xsl:when>
  1517. <xsl:otherwise>
  1518. <xsl:value-of select="$ui-state-params[@name = $saved-s]"/>
  1519. </xsl:otherwise>
  1520. </xsl:choose>
  1521. </xsl:variable>
  1522. <a xsl:use-attribute-sets="anchor" title="{ xtsext:enforceBTD(string(.), $ui-portlet-baseTextDirection, $ui-portlet-product-locale, boolean($ui-portlet-isBidiEnabled='true')) .}" href="{ $href-prefix }{ xtsext:urlencode(xtsext:validator('prepare','searchState',string($searchState))) }{ $href-suffix }">
  1523. <xsl:choose>
  1524. <xsl:when test="string-length( . ) &gt; 15">
  1525. <xsl:text/><xts:string id="IDS_NAV_VEW_SEARCH_SAVED_CUTOFF"><xts:param name="searchName"><xsl:value-of select="xtsext:enforceBTD(substring( ., 1, 15 ), $ui-portlet-baseTextDirection, $ui-portlet-product-locale, boolean($ui-portlet-isBidiEnabled='true'))"/></xts:param></xts:string><xsl:text/>
  1526. </xsl:when>
  1527. <xsl:otherwise>
  1528. <xsl:if test="$ui-portlet-isBidiEnabled='true'">
  1529. <xsl:attribute name="dir">
  1530. <xsl:value-of select="xtsext:getBTD(string(.), $ui-portlet-baseTextDirection, $ui-portlet-product-locale)"/>
  1531. </xsl:attribute>
  1532. </xsl:if>
  1533. <xsl:value-of select="."/>
  1534. </xsl:otherwise>
  1535. </xsl:choose>
  1536. </a>
  1537. <xsl:text>&#160;&#160;</xsl:text>
  1538. <br/>
  1539. </xsl:template>
  1540. <xsl:template name="render-back-to-mypage-link">
  1541. <xsl:if test="($ui-consumer-info/layout/backWhenMaximized = 'true') and ($ui-window-state = 'wsrp:maximized')">
  1542. <tr>
  1543. <td class="portlet-font" align="right" colspan="2">
  1544. <script>
  1545. function wsrp_rewrite_backToMyPage()
  1546. {
  1547. document.wsrp_rewrite_form.action = 'wsrp_rewrite?wsrp-urlType=blockingAction&amp;wsrp-interactionState=nav&amp;wsrp-windowState=wsrp:normal&amp;wsrp-mode=wsrp:view/wsrp_rewrite';
  1548. wsrp_rewrite_submit('false');
  1549. }
  1550. </script>
  1551. <a xsl:use-attribute-sets="anchor">
  1552. <xsl:attribute name="href">javascript:wsrp_rewrite_backToMyPage();</xsl:attribute>
  1553. <xsl:text/><xts:string id="IDS_PRO_CUI_BACK_TO_MYPAGE"/><xsl:text/>
  1554. </a>
  1555. </td>
  1556. </tr>
  1557. </xsl:if>
  1558. </xsl:template>
  1559. <xsl:template name="search-match">
  1560. <select id ="wsrp_rewrite_cps_match_select" class="portlet-form-input-field" name="cps_match">
  1561. <xsl:if test="not($is-crn)">
  1562. <option value="all">
  1563. <xsl:if test="key( 'request-params', 'cps_match' ) = 'all'">
  1564. <xsl:attribute name="selected">selected</xsl:attribute>
  1565. </xsl:if>
  1566. <xsl:text><xts:string id="IDS_NAV_VEW_SEARCH_MATCH_TYPE_ALL"/></xsl:text>
  1567. </option>
  1568. <option value="any">
  1569. <xsl:if test="key( 'request-params', 'cps_match' ) = 'any'">
  1570. <xsl:attribute name="selected">selected</xsl:attribute>
  1571. </xsl:if>
  1572. <xsl:text><xts:string id="IDS_NAV_VEW_SEARCH_MATCH_TYPE_ANY"/></xsl:text>
  1573. </option>
  1574. </xsl:if>
  1575. <xsl:if test="$is-crn">
  1576. <option value="contains">
  1577. <xsl:if test="key( 'request-params', 'cps_match' ) = 'contains'">
  1578. <xsl:attribute name="selected">selected</xsl:attribute>
  1579. </xsl:if>
  1580. <xsl:text><xts:string id="IDS_NAV_VEW_SEARCH_MATCH_TYPE_CONTAINS"/></xsl:text>
  1581. </option>
  1582. <option value="starts">
  1583. <xsl:if test="key( 'request-params', 'cps_match' ) = 'starts'">
  1584. <xsl:attribute name="selected">selected</xsl:attribute>
  1585. </xsl:if>
  1586. <xsl:text><xts:string id="IDS_NAV_VEW_SEARCH_MATCH_TYPE_STARTS"/></xsl:text>
  1587. </option>
  1588. </xsl:if>
  1589. <option value="exact">
  1590. <xsl:if test="key( 'request-params', 'cps_match' ) = 'exact'">
  1591. <xsl:attribute name="selected">selected</xsl:attribute>
  1592. </xsl:if>
  1593. <xsl:text><xts:string id="IDS_NAV_VEW_SEARCH_MATCH_TYPE_EXACT"/></xsl:text>
  1594. </option>
  1595. </select>
  1596. </xsl:template>
  1597. <xsl:template name="search-fields">
  1598. <pg:popup name="cps_fields" id ="wsrp_rewrite_cps_fields" icon="dropdown_arrow.gif" select="key( 'request-params', 'cps_fields' )" onChange="if(self.wsrp_rewrite_setSearchContent) wsrp_rewrite_setSearchContent()" >
  1599. <pg:item value="cs" condition="$ui-canUseIndexSearch"><xts:string id="IDS_NAV_VEW_SEARCH_IN_CONTENT"/></pg:item>
  1600. <pg:item value="nf" condition="$ui-canUseCMSearch"><xts:string id="IDS_NAV_VEW_SEARCH_IN_NAME"/></pg:item>
  1601. <pg:item value="df" condition="$ui-canUseCMSearch"><xts:string id="IDS_NAV_VEW_SEARCH_IN_DESCRIPTION"/></pg:item>
  1602. <pg:item value="ndf" condition="$ui-canUseCMSearch"><xts:string id="IDS_NAV_VEW_SEARCH_IN_ALL"/></pg:item>
  1603. <pg:item value="cf" condition="not($is-crn)"><xts:string id="IDS_NAV_VEW_SEARCH_IN_CONTACT"/></pg:item>
  1604. </pg:popup>
  1605. </xsl:template>
  1606. <xsl:template name="search-type">
  1607. <xsl:param name="enabled" select="true()"/>
  1608. <select id="wsrp_rewrite_cps_ItemType" class="portlet-form-input-field" name="cps_itemType">
  1609. <xsl:if test="not( $enabled )">
  1610. <xsl:attribute name="disabled">true</xsl:attribute>
  1611. </xsl:if>
  1612. <option value="any"><xts:string id="IDS_NAV_VEW_SEARCH_ENTRIES_REPORT_TYPE_ANY"/></option>
  1613. <xsl:variable name="search-type">
  1614. <xsl:choose>
  1615. <xsl:when test="key( 'request-params', 'cps_fields' ) = 'cs'">
  1616. <xsl:text>content</xsl:text>
  1617. </xsl:when>
  1618. <xsl:otherwise>normal</xsl:otherwise>
  1619. </xsl:choose>
  1620. </xsl:variable>
  1621. <xsl:for-each select="/root/nav:getItemTypesResponse/nav:items[@type=$search-type]/nav:itemType">
  1622. <option value="{ nav:id }">
  1623. <xsl:if test="key( 'request-params', 'cps_itemType' ) = string( nav:id )">
  1624. <xsl:attribute name="selected">selected</xsl:attribute>
  1625. </xsl:if>
  1626. <xsl:value-of select="nav:description"/>
  1627. </option>
  1628. </xsl:for-each>
  1629. </select>
  1630. </xsl:template>
  1631. <xsl:template name="search-state">
  1632. <xsl:param name="enabled" select="true()"/>
  1633. <select class="portlet-form-input-field" name="cps_itemState">
  1634. <xsl:if test="not( $enabled )">
  1635. <xsl:attribute name="disabled">true</xsl:attribute>
  1636. </xsl:if>
  1637. <option value="any">
  1638. <xsl:if test="key( 'request-params', 'cps_itemState' ) = 'any'">
  1639. <xsl:attribute name="selected">selected</xsl:attribute>
  1640. </xsl:if>
  1641. <xsl:text><xts:string id="IDS_NAV_VEW_SEARCH_ENTRIES_REPORT_STATUS_ANY"/></xsl:text>
  1642. </option>
  1643. <option value="unread">
  1644. <xsl:if test="key( 'request-params', 'cps_itemState' ) = 'unread'">
  1645. <xsl:attribute name="selected">selected</xsl:attribute>
  1646. </xsl:if>
  1647. <xsl:text><xts:string id="IDS_NAV_VEW_SEARCH_ENTRIES_REPORT_STATUS_UNREAD"/></xsl:text>
  1648. </option>
  1649. <option value="read">
  1650. <xsl:if test="key( 'request-params', 'cps_itemState' ) = 'read'">
  1651. <xsl:attribute name="selected">selected</xsl:attribute>
  1652. </xsl:if>
  1653. <xsl:text><xts:string id="IDS_NAV_VEW_SEARCH_ENTRIES_REPORT_STATUS_READ"/></xsl:text>
  1654. </option>
  1655. <option value="new">
  1656. <xsl:if test="key( 'request-params', 'cps_itemState' ) = 'new'">
  1657. <xsl:attribute name="selected">selected</xsl:attribute>
  1658. </xsl:if>
  1659. <xsl:text><xts:string id="IDS_NAV_VEW_SEARCH_ENTRIES_REPORT_STATUS_NEW"/></xsl:text>
  1660. </option>
  1661. </select>
  1662. </xsl:template>
  1663. <xsl:template name="search-modified">
  1664. <xsl:param name="enabled" select="true()"/>
  1665. <select id="wsrp_rewrite_cps_ItemModified" class="portlet-form-input-field" name="cps_itemModified">
  1666. <xsl:if test="not( $enabled )">
  1667. <xsl:attribute name="disabled">true</xsl:attribute>
  1668. </xsl:if>
  1669. <option value="any">
  1670. <xsl:if test="key( 'request-params', 'cps_itemModified' ) = 'any'">
  1671. <xsl:attribute name="selected">selected</xsl:attribute>
  1672. </xsl:if>
  1673. <xsl:text><xts:string id="IDS_NAV_VEW_SEARCH_ENTRIES_REPORT_MODIFIED_ANY"/></xsl:text>
  1674. </option>
  1675. <option value="0">
  1676. <xsl:if test="key( 'request-params', 'cps_itemModified' ) = '0'">
  1677. <xsl:attribute name="selected">selected</xsl:attribute>
  1678. </xsl:if>
  1679. <xsl:text><xts:string id="IDS_NAV_VEW_SEARCH_ENTRIES_REPORT_MODIFIED_TODAY"/></xsl:text>
  1680. </option>
  1681. <option value="259200">
  1682. <xsl:if test="key( 'request-params', 'cps_itemModified' ) = '259200'">
  1683. <xsl:attribute name="selected">selected</xsl:attribute>
  1684. </xsl:if>
  1685. <xsl:text><xts:string id="IDS_NAV_VEW_SEARCH_ENTRIES_REPORT_MODIFIED_LAST_THREE_DAYS"/></xsl:text>
  1686. </option>
  1687. <option value="604800">
  1688. <xsl:if test="key( 'request-params', 'cps_itemModified' ) = '604800'">
  1689. <xsl:attribute name="selected">selected</xsl:attribute>
  1690. </xsl:if>
  1691. <xsl:text><xts:string id="IDS_NAV_VEW_SEARCH_ENTRIES_REPORT_MODIFIED_LAST_WEEK"/></xsl:text>
  1692. </option>
  1693. <option value="2629743">
  1694. <xsl:if test="key( 'request-params', 'cps_itemModified' ) = '2629743'">
  1695. <xsl:attribute name="selected">selected</xsl:attribute>
  1696. </xsl:if>
  1697. <xsl:text><xts:string id="IDS_NAV_VEW_SEARCH_ENTRIES_REPORT_MODIFIED_LAST_MONTH"/></xsl:text>
  1698. </option>
  1699. <option value="7889231">
  1700. <xsl:if test="key( 'request-params', 'cps_itemModified' ) = '7889231'">
  1701. <xsl:attribute name="selected">selected</xsl:attribute>
  1702. </xsl:if>
  1703. <xsl:text><xts:string id="IDS_NAV_VEW_SEARCH_ENTRIES_REPORT_MODIFIED_LAST_THREE_MONTHS"/></xsl:text>
  1704. </option>
  1705. <option value="15778463">
  1706. <xsl:if test="key( 'request-params', 'cps_itemModified' ) = '15778463'">
  1707. <xsl:attribute name="selected">selected</xsl:attribute>
  1708. </xsl:if>
  1709. <xsl:text><xts:string id="IDS_NAV_VEW_SEARCH_ENTRIES_REPORT_MODIFIED_LAST_SIX_MONTHS"/></xsl:text>
  1710. </option>
  1711. <option value="31556926">
  1712. <xsl:if test="key( 'request-params', 'cps_itemModified' ) = '31556926'">
  1713. <xsl:attribute name="selected">selected</xsl:attribute>
  1714. </xsl:if>
  1715. <xsl:text><xts:string id="IDS_NAV_VEW_SEARCH_ENTRIES_REPORT_MODIFIED_LAST_YEAR"/></xsl:text>
  1716. </option>
  1717. <option value="94670777">
  1718. <xsl:if test="key( 'request-params', 'cps_itemModified' ) = '94670777'">
  1719. <xsl:attribute name="selected">selected</xsl:attribute>
  1720. </xsl:if>
  1721. <xsl:text><xts:string id="IDS_NAV_VEW_SEARCH_ENTRIES_REPORT_MODIFIED_LAST_THREE_YEARS"/></xsl:text>
  1722. </option>
  1723. </select>
  1724. </xsl:template>
  1725. <xsl:template name="search-scope">
  1726. <select class="portlet-form-input-field" name="cps_scope" id="wsrp_rewrite_cps_scope">
  1727. <option value="systemDefault">
  1728. <xsl:if test="key( 'request-params', 'cps_scope' ) = 'systemDefault'">
  1729. <xsl:attribute name="selected">selected</xsl:attribute>
  1730. </xsl:if>
  1731. <xsl:value-of select="/root/searchScope/nav:getContainerResponse/nav:container/nav:content/nav:container[nav:type = 'content']/nav:name"/>
  1732. </option>
  1733. <option value="userDefault">
  1734. <xsl:if test="key( 'request-params', 'cps_scope' ) = 'userDefault'">
  1735. <xsl:attribute name="selected">selected</xsl:attribute>
  1736. </xsl:if>
  1737. <xsl:value-of select="/root/searchScope/nav:getContainerResponse/nav:container/nav:content/nav:container[nav:type = 'folder']/nav:name"/>
  1738. </option>
  1739. </select>
  1740. </xsl:template>
  1741. <xsl:template match="nav:pathStep">
  1742. <xsl:value-of select="xtsext:enforceBTD(nav:name, $ui-portlet-baseTextDirection, $ui-portlet-product-locale, boolean($ui-portlet-isBidiEnabled='true'))"/>
  1743. <xsl:if test="nav:pathStep">
  1744. <xsl:value-of select="$path-separator"/>
  1745. <xsl:apply-templates select="nav:pathStep"/>
  1746. </xsl:if>
  1747. </xsl:template>
  1748. </xsl:stylesheet>