add_entries_templates.xsl 37 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. Licensed Materials - Property of IBM
  4. IBM Cognos Products: ps
  5. (C) Copyright IBM Corp. 2005, 2015
  6. US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  7. -->
  8. <!--
  9. Copyright (C) 2008 Cognos ULC, an IBM Company. All rights reserved.
  10. Cognos (R) is a trademark of Cognos ULC, (formerly Cognos Incorporated).
  11. -->
  12. <xsl:stylesheet version="1.0"
  13. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  14. xmlns:aet="http://developer.cognos.com/schemas/xts/portal/addEntries/logicsheets/add_entries_templates/"
  15. xmlns:dp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/presentation/"
  16. xmlns:df="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/framework/"
  17. xmlns:xts="http://developer.cognos.com/schemas/xts/"
  18. xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
  19. xmlns:cf="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/framework/"
  20. xmlns:cp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/presentation/"
  21. xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
  22. xmlns:out="dummy-uri"
  23. exclude-result-prefixes="xsl aet dp df xts pf cf cp cm">
  24. <xsl:output method="xml" encoding="UTF-8" indent="no"/>
  25. <xsl:namespace-alias stylesheet-prefix="out" result-prefix="xsl"/>
  26. <!--
  27. This stylesheet (add_entries_templates.xsl) consists of the following templates:
  28. aet:refProps
  29. aet:pagerQueryVars
  30. aet:properties
  31. aet:variables
  32. aet:searchOptionsBasic
  33. aet:searchOptionsIndex
  34. aet:searchFooter
  35. aet:searchFooterIndex
  36. -->
  37. <!-- create any refProps that were asked for -->
  38. <xsl:template match="aet:refProps">
  39. <out:if test="count(/root/*[local-name()='requestParams']/*[local-name()='param' and @name='refProp'])>0">
  40. <cm:refProps>
  41. <out:for-each select="/root/*[local-name()='requestParams']/*[local-name()='param' and @name='refProp']/*[local-name()='refProp']">
  42. <cm:refProp refPropName="{'{./@name}'}">
  43. <cm:properties>
  44. <out:for-each select="*[local-name()='property']">
  45. <cm:property name="{'{./@name}'}"/>
  46. </out:for-each>
  47. </cm:properties>
  48. </cm:refProp>
  49. </out:for-each>
  50. </cm:refProps>
  51. </out:if>
  52. </xsl:template>
  53. <!-- standard set of variables used by both the navigate and search dialogs -->
  54. <xsl:template match="aet:pagerQueryVars">
  55. <out:variable name="userPrefs" select="/root/*[local-name()='session']/*[local-name()='param']"/>
  56. <out:variable name="userPrefsDefault" select="/root/*[local-name()='system']/*[local-name()='param'][@name='defaultPortalPreferences']"/>
  57. <out:variable name="maxObjects">
  58. <out:choose>
  59. <out:when test="string(/root/env/param[@name = 'm_pagertonavpager']) !='' and string(/root/env/param[@name = 'm_pagerfromnavpager']) !=''"><out:value-of select="(/root/env/param[@name = 'm_pagertonavpager'] - /root/env/param[@name = 'm_pagerfromnavpager']) + 1"/></out:when>
  60. <out:when test="$userPrefs[@name='linesPerPage']!=''">
  61. <out:value-of select="$userPrefs[@name='linesPerPage']"/>
  62. </out:when>
  63. <out:otherwise>
  64. <out:value-of select="$userPrefsDefault/pref[@name='lines']"/>
  65. </out:otherwise>
  66. </out:choose>
  67. </out:variable>
  68. <out:variable name="skipObjects">
  69. <out:choose>
  70. <out:when test="/root/env/param[@name = 'm_pagerfromnavpager'] and /root/env/param[@name = 'm_pagerfromnavpager']!=''">
  71. <out:value-of select="(/root/env/param[@name = 'm_pagerfromnavpager'])-1"/>
  72. </out:when>
  73. <out:when test="key('env-param','m_navpagersection')!=''">
  74. <out:choose>
  75. <out:when test="key('env-param','m_navpagersection')!='-1'">
  76. <out:value-of select="((key('env-param','m_navpagersection')) -1)"/>
  77. </out:when>
  78. <out:otherwise>
  79. <out:value-of select="($maxObjects) * -1"/>
  80. </out:otherwise>
  81. </out:choose>
  82. </out:when>
  83. <out:otherwise>0</out:otherwise>
  84. </out:choose>
  85. </out:variable>
  86. </xsl:template>
  87. <!-- the list of properties to query for in the navigate, search and type add entry dialogs -->
  88. <xsl:template match="aet:properties">
  89. <cm:property name="defaultName"/>
  90. <cm:property name="hidden"/>
  91. <cm:property name="searchPath"/>
  92. <cm:property name="permissions"/>
  93. <cm:property name="position"/>
  94. <cm:property name="searchPathForURL"/>
  95. <cm:property name="storeID"/>
  96. <cm:property name="ancestors"/>
  97. <cm:property name="hasChildren"/>
  98. <cm:property name="base"/>
  99. <out:for-each select="/root/*[local-name()='requestParams']/*[local-name()='param' and @name='returnProperties']/*[local-name()='property']">
  100. <out:if test="@name!='base' and @name != 'ancestors' and @name != 'objectClass' and @name != 'position' and @name != 'defaultName' and @name != 'searchPath' and @name != 'ancestors' and @name != 'permissions' and @name != 'searchPathForURL' and @name != 'storeID'">
  101. <cm:property name="{'{@name}'}"/>
  102. </out:if>
  103. </out:for-each>
  104. </xsl:template>
  105. <!-- variables used in the navigate, search and type dialogs -->
  106. <xsl:template match="aet:variables">
  107. <out:variable name="classFilter">
  108. <out:variable name="classes" select="/root/*[local-name()='searchSets']/*[local-name()='searchSet']/*[local-name()='name' and text()=key('request-param','addEntriesUI')]/..//*[local-name()='classes' and not(contains(@exclude,'classFilter'))]/*[local-name()='class' and not(contains(@exclude,'classFilter'))]"/>
  109. <out:choose>
  110. <!-- used when adding steps to a job -->
  111. <out:when test="count($classes) &gt; 0">
  112. <out:variable name="apos" select='"&apos;"'/>
  113. <xsl:text>[</xsl:text>
  114. <out:variable name="distinctObjectClasses" select="$classes[not(*[local-name()='name'] = preceding-sibling::*[local-name()='class' and not(contains(@exclude,'classFilter'))]/*[local-name()='name'])]"/>
  115. <out:for-each select="$distinctObjectClasses">
  116. <out:if test="position() &gt; 1"><xsl:text> or </xsl:text></out:if>
  117. <out:variable name="permissions" select=".//*[local-name()='permission' and not(contains(@exclude,'classFilter'))]"/>
  118. <out:if test="count($permissions) &gt; 0">
  119. <out:value-of select="'('"/>
  120. </out:if>
  121. <out:value-of select="concat('@objectClass=',$apos,*[local-name()='name'],$apos)"/>
  122. <out:for-each select="$permissions">
  123. <out:value-of select="concat(' and permission(&quot;',text(),'&quot;)')"/>
  124. </out:for-each>
  125. <out:if test="count($permissions) &gt; 0">
  126. <out:value-of select="')'"/>
  127. </out:if>
  128. </out:for-each>
  129. <!-- only add the account objectClass if the show users checkbox is checked or it's specified on ae:variables -->
  130. <out:if test="key('env-param','addentries_showusers')='true' or '{@account}'='true'">
  131. <xsl:text> or @objectClass='account'</xsl:text>
  132. </out:if>
  133. <xsl:text>]</xsl:text>
  134. </out:when>
  135. </out:choose>
  136. </out:variable>
  137. <out:variable name="selectable-classes">
  138. <out:variable name="classes" select="/root/*[local-name()='searchSets']/*[local-name()='searchSet']/*[local-name()='name' and text()=key('request-param','addEntriesUI')]/..//*[local-name()='classes' and not(contains(@exclude,'selectable'))]/*[local-name()='class' and not(contains(@exclude,'selectable'))]"/>
  139. <out:choose>
  140. <out:when test="count($classes) &gt; 0">
  141. <out:variable name="apos" select='"&apos;"'/>
  142. <xsl:text>[</xsl:text>
  143. <out:variable name="distinctObjectClasses" select="$classes[not(*[local-name()='name'] = preceding-sibling::*[local-name()='class' and not(contains(@exclude,'selectable'))]/*[local-name()='name'])]"/>
  144. <out:for-each select="$distinctObjectClasses">
  145. <out:variable name="permissions" select=".//*[local-name()='permission' and not(contains(@exclude,'selectable'))]"/>
  146. <out:if test="position() &gt; 1"><xsl:text> or </xsl:text></out:if>
  147. <out:if test="count($permissions) &gt; 0">
  148. <xsl:text>(</xsl:text>
  149. </out:if>
  150. <out:value-of select="concat('@objectClass=',$apos,*[local-name()='name'],$apos)"/>
  151. <out:for-each select="$permissions">
  152. <out:value-of select="concat(' and permission(&quot;',text(),'&quot;)')"/>
  153. </out:for-each>
  154. <out:if test="count($permissions) &gt; 0">
  155. <xsl:text>)</xsl:text>
  156. </out:if>
  157. </out:for-each>
  158. <xsl:text>]</xsl:text>
  159. </out:when>
  160. </out:choose>
  161. </out:variable>
  162. <out:variable name="folder-classes">
  163. <out:choose>
  164. <out:when test="key('request-param','addEntriesUI')='runnables'"><xsl:value-of select="' adminFolder content package folder '"/></out:when>
  165. <out:when test="key('request-param','addEntriesUI')='mypages'"><xsl:value-of select="' adminFolder content package folder '"/></out:when>
  166. <out:when test="key('request-param','addEntriesUI')='portlet'"><xsl:value-of select="' portletProducer '"/></out:when>
  167. <out:when test="key('request-param','addEntriesUI')='links'"><xsl:value-of select="' content package folder '"/></out:when>
  168. <out:when test="key('request-param','addEntriesUI')='packagesAndLocations' or key('request-param','addEntriesUI')='indexUpdateLocations'"><xsl:value-of select="' content directory package folder '"/></out:when>
  169. <out:when test="key('request-param','addEntriesUI')='packagesAndFolders'"><xsl:value-of select="' content package folder '"/></out:when>
  170. <out:when test="key('request-param','addEntriesUI')='publicFoldersPackagesAndFolders'"><xsl:value-of select="' content package folder '"/></out:when>
  171. <out:when test="key('request-param','addEntriesUI')='deploymentObjects'"><xsl:value-of select="' content package folder directory namespace namespaceFolder catalog catalogFolder '"/></out:when>
  172. <out:otherwise><xsl:value-of select="' namespace namespaceFolder '"/></out:otherwise>
  173. </out:choose>
  174. </out:variable>
  175. </xsl:template>
  176. <!-- HTML that will appear in the search options popup dialog -->
  177. <xsl:template match="aet:searchOptionsBasic">
  178. <out:variable name="method" select="key('env-param','search_method')"/>
  179. <out:variable name="modified" select="key('env-param','search_modified')"/>
  180. <out:variable name="type" select="key('env-param','search_type')"/>
  181. <out:variable name="scope" select="key('env-param','search_scope')"/>
  182. <out:variable name="smethodDefault">
  183. <out:choose>
  184. <out:when test="key('business-rules','queryNamespaceSearchDefaultMethodOptionSetting') = 'true'">
  185. <out:variable name="option" select="/root/configProps/param[@name='cc']/property[@name='portal.namespaceSearchDefaultMethodOption']"/>
  186. <out:choose>
  187. <out:when test="$option = 'contains'">contains</out:when>
  188. <out:when test="$option = 'starts'">starts</out:when>
  189. <out:when test="$option = 'equals'">equals</out:when>
  190. <out:otherwise>contains</out:otherwise>
  191. </out:choose>
  192. </out:when>
  193. <out:otherwise>contains</out:otherwise>
  194. </out:choose>
  195. </out:variable>
  196. <dp:list width="100%">
  197. <dp:section width="100%">
  198. <dp:list width="50%">
  199. <dp:section role="group" aria-labelledby="lbl_searchMethod">
  200. <dp:label id="lbl_searchMethod" valign="top" width="1%" nospace="true"><xts:string id="IDS_SEARCH_METHOD"/></dp:label>
  201. <dp:link wrap="wrap" valign="top">
  202. <input name="search_method" id="search_method" type="hidden">
  203. <out:attribute name="value">
  204. <out:choose>
  205. <out:when test="$method = ''"><out:value-of select="$smethodDefault"/></out:when>
  206. <out:otherwise><out:value-of select="$method"/></out:otherwise>
  207. </out:choose>
  208. </out:attribute>
  209. </input>
  210. <out:variable name="searchMethodMenu">
  211. <flyout id="searchMethodMenu">
  212. <items>
  213. <itemGroup id="searchMethodGroup">
  214. <item id="searchMethod_contains">
  215. <out:if test="$method = 'contains' or ($method = '' and $smethodDefault = 'contains')">
  216. <out:attribute name="itemSelectedState">checked</out:attribute>
  217. </out:if>
  218. <text><xts:string id="IDS_ADDENTRIES_SEARCH_METHOD2"/></text>
  219. <action>CCPopupMenu.activeMenu.setMenuItemChecked("searchMethod_contains");setSearchMethod('contains','<xts:string id="IDS_CONTAINS" encode="javascript"/>');</action>
  220. </item>
  221. <item id="searchMethod_starts">
  222. <out:if test="$method = 'starts' or ($method = '' and $smethodDefault = 'starts')">
  223. <out:attribute name="itemSelectedState">checked</out:attribute>
  224. </out:if>
  225. <text><xts:string id="IDS_ADDENTRIES_SEARCH_METHOD1"/></text>
  226. <action>CCPopupMenu.activeMenu.setMenuItemChecked("searchMethod_starts");setSearchMethod('starts','<xts:string id="IDS_STARTS_WITH" encode="javascript"/>');</action>
  227. </item>
  228. <item id="searchMethod_equals">
  229. <out:if test="$method = 'equals' or ($method = '' and $smethodDefault = 'equals')">
  230. <out:attribute name="itemSelectedState">checked</out:attribute>
  231. </out:if>
  232. <text><xts:string id="IDS_ADDENTRIES_SEARCH_METHOD3"/></text>
  233. <action>CCPopupMenu.activeMenu.setMenuItemChecked("searchMethod_equals");setSearchMethod('equals','<xts:string id="IDS_EQUALS" encode="javascript"/>');</action>
  234. </item>
  235. </itemGroup>
  236. </items>
  237. </flyout>
  238. </out:variable>
  239. <div id="searchMethodMenu_span" style="margin-left:5px;z-index:9;position: relative;">
  240. <a href="#" onclick="return CCPopupMenu.dropDown(event,0,0,'searchMethodMenu');" role="button" aria-haspopup="true">
  241. <div style="white-space: nowrap;">
  242. <span id="searchMethodMenu_caption" style="vertical-align: top;">
  243. <out:choose>
  244. <out:when test="$method = 'contains' or ($method = '' and $smethodDefault = 'contains')">
  245. <xts:string id="IDS_ADDENTRIES_SEARCH_METHOD2"/>
  246. </out:when>
  247. <out:when test="$method = 'starts' or ($method = '' and $smethodDefault = 'starts')">
  248. <xts:string id="IDS_ADDENTRIES_SEARCH_METHOD1"/>
  249. </out:when>
  250. <out:when test="$method = 'equals' or ($method = '' and $smethodDefault = 'equals')">
  251. <xts:string id="IDS_ADDENTRIES_SEARCH_METHOD3"/>
  252. </out:when>
  253. </out:choose>
  254. </span>
  255. <span style="vertical-align: middle;">
  256. <img name="searchMethodMenu_imgFlyControl" src="{'{$skin_shared_images}'}dropdown_arrow.gif" title="" alt="" border="0"/>
  257. </span>
  258. </div>
  259. </a>
  260. </div>
  261. <out:call-template name="renderPopup">
  262. <out:with-param name="flyoutXML">
  263. <out:copy-of select="$searchMethodMenu"/>
  264. </out:with-param>
  265. <out:with-param name="controlID">searchMethodMenu_span</out:with-param>
  266. </out:call-template>
  267. </dp:link>
  268. </dp:section>
  269. <xsl:choose>
  270. <xsl:when test="not(@modified) or @modified != 'no'">
  271. <dp:section role="group" aria-labelledby="lbl_searchModified">
  272. <dp:label id="lbl_searchModified" valign="top" width="1%" nospace="true"><xts:string id="IDS_SEARCH_MODIFIED"/></dp:label>
  273. <dp:link wrap="wrap" valign="top">
  274. <input name="search_modified" id="search_modified" type="hidden">
  275. <out:attribute name="value">
  276. <out:choose>
  277. <out:when test="$modified = ''">any</out:when>
  278. <out:otherwise><out:value-of select="$modified"/></out:otherwise>
  279. </out:choose>
  280. </out:attribute>
  281. </input>
  282. <out:variable name="searchModifiedMenu">
  283. <flyout id="searchModifiedMenu">
  284. <items>
  285. <itemGroup id="searchModifiedGroup">
  286. <item id="searchModified_a">
  287. <out:if test="$modified = 'any' or $modified = ''">
  288. <out:attribute name="itemSelectedState">checked</out:attribute>
  289. </out:if>
  290. <text><xts:string id="IDS_ANY_DATE"/></text>
  291. <action>CCPopupMenu.activeMenu.setMenuItemChecked("searchModified_a");setSearchModified('any','<xts:string id="IDS_ANY_DATE" encode="javascript"/>');</action>
  292. </item>
  293. <item id="searchModified_t">
  294. <out:if test="$modified = '2'">
  295. <out:attribute name="itemSelectedState">checked</out:attribute>
  296. </out:if>
  297. <text><xts:string id="IDS_MODIFIED_TODAY"/></text>
  298. <action>CCPopupMenu.activeMenu.setMenuItemChecked("searchModified_t");setSearchModified('t','<xts:string id="IDS_MODIFIED_TODAY" encode="javascript"/>');</action>
  299. </item>
  300. <item id="searchModified_l3d">
  301. <out:if test="$modified = 'l3d'">
  302. <out:attribute name="itemSelectedState">checked</out:attribute>
  303. </out:if>
  304. <text><xts:string id="IDS_MODIFIED_LAST3DAYS"/></text>
  305. <action>CCPopupMenu.activeMenu.setMenuItemChecked("searchModified_l3d");setSearchModified('l3d','<xts:string id="IDS_MODIFIED_LAST3DAYS" encode="javascript"/>');</action>
  306. </item>
  307. <item id="searchModified_lw">
  308. <out:if test="$modified = 'lw'">
  309. <out:attribute name="itemSelectedState">checked</out:attribute>
  310. </out:if>
  311. <text><xts:string id="IDS_MODIFIED_LASTWEEK"/></text>
  312. <action>CCPopupMenu.activeMenu.setMenuItemChecked("searchModified_lw");setSearchModified('lw','<xts:string id="IDS_MODIFIED_LASTWEEK" encode="javascript"/>');</action>
  313. </item>
  314. <item id="searchModified_lm">
  315. <out:if test="$modified = 'lm'">
  316. <out:attribute name="itemSelectedState">checked</out:attribute>
  317. </out:if>
  318. <text><xts:string id="IDS_MODIFIED_LASTMONTH"/></text>
  319. <action>CCPopupMenu.activeMenu.setMenuItemChecked("searchModified_lm");setSearchModified('lm','<xts:string id="IDS_MODIFIED_LASTMONTH" encode="javascript"/>');</action>
  320. </item>
  321. <item id="searchModified_l3m">
  322. <out:if test="$modified = 'l3m'">
  323. <out:attribute name="itemSelectedState">checked</out:attribute>
  324. </out:if>
  325. <text><xts:string id="IDS_MODIFIED_LAST3MONTH"/></text>
  326. <action>CCPopupMenu.activeMenu.setMenuItemChecked("searchModified_l3m");setSearchModified('l3m','<xts:string id="IDS_MODIFIED_LAST3MONTH" encode="javascript"/>');</action>
  327. </item>
  328. <item id="searchModified_l6m">
  329. <out:if test="$modified = 'l6m'">
  330. <out:attribute name="itemSelectedState">checked</out:attribute>
  331. </out:if>
  332. <text><xts:string id="IDS_MODIFIED_LAST6MONTH"/></text>
  333. <action>CCPopupMenu.activeMenu.setMenuItemChecked("searchModified_l6m");setSearchModified('l6m','<xts:string id="IDS_MODIFIED_LAST6MONTH" encode="javascript"/>');</action>
  334. </item>
  335. <item id="searchModified_ly">
  336. <out:if test="$modified = 'ly'">
  337. <out:attribute name="itemSelectedState">checked</out:attribute>
  338. </out:if>
  339. <text><xts:string id="IDS_MODIFIED_LASTYEAR"/></text>
  340. <action>CCPopupMenu.activeMenu.setMenuItemChecked("searchModified_ly");setSearchModified('ly','<xts:string id="IDS_MODIFIED_LASTYEAR" encode="javascript"/>');</action>
  341. </item>
  342. <item id="searchModified_l3y">
  343. <out:if test="$modified = 'l3y'">
  344. <out:attribute name="itemSelectedState">checked</out:attribute>
  345. </out:if>
  346. <text><xts:string id="IDS_MODIFIED_LAST3YEARS"/></text>
  347. <action>CCPopupMenu.activeMenu.setMenuItemChecked("searchModified_l3y");setSearchModified('l3y','<xts:string id="IDS_MODIFIED_LAST3YEARS" encode="javascript"/>');</action>
  348. </item>
  349. </itemGroup>
  350. </items>
  351. </flyout>
  352. </out:variable>
  353. <div id="searchModifiedMenu_span" style="margin-left:5px;z-index:8;position: relative;">
  354. <a href="#" onclick="return CCPopupMenu.dropDown(event,0,0,'searchModifiedMenu');" role="button" aria-haspopup="true">
  355. <div style="white-space: nowrap;">
  356. <span id="searchModifiedMenu_caption" style="vertical-align: top;">
  357. <out:choose>
  358. <out:when test=" $modified = 'any' or $modified = ''">
  359. <xts:string id="IDS_ANY_DATE"/>
  360. </out:when>
  361. <out:when test=" $modified = 't' ">
  362. <xts:string id="IDS_MODIFIED_TODAY"/>
  363. </out:when>
  364. <out:when test=" $modified = 'l3d' ">
  365. <xts:string id="IDS_MODIFIED_LAST3DAYS"/>
  366. </out:when>
  367. <out:when test=" $modified = 'lw' ">
  368. <xts:string id="IDS_MODIFIED_LASTWEEK"/>
  369. </out:when>
  370. <out:when test=" $modified = 'lm' ">
  371. <xts:string id="IDS_MODIFIED_LASTMONTH"/>
  372. </out:when>
  373. <out:when test=" $modified = 'l3m' ">
  374. <xts:string id="IDS_MODIFIED_LAST3MONTH"/>
  375. </out:when>
  376. <out:when test=" $modified = 'l6m' ">
  377. <xts:string id="IDS_MODIFIED_LAST6MONTH"/>
  378. </out:when>
  379. <out:when test=" $modified = 'ly' ">
  380. <xts:string id="IDS_MODIFIED_LASTYEAR"/>
  381. </out:when>
  382. <out:when test=" $modified = 'l3y' ">
  383. <xts:string id="IDS_MODIFIED_LAST3YEARS"/>
  384. </out:when>
  385. </out:choose>
  386. </span>
  387. <span style="vertical-align: middle;">
  388. <img name="searchModifiedMenu_imgFlyControl" src="{'{$skin_shared_images}'}dropdown_arrow.gif" title="" alt="" border="0"/>
  389. </span>
  390. </div>
  391. </a>
  392. </div>
  393. <out:call-template name="renderPopup">
  394. <out:with-param name="flyoutXML">
  395. <out:copy-of select="$searchModifiedMenu"/>
  396. </out:with-param>
  397. <out:with-param name="controlID">searchModifiedMenu_span</out:with-param>
  398. </out:call-template>
  399. </dp:link>
  400. </dp:section>
  401. </xsl:when>
  402. <xsl:otherwise>
  403. <dp:section>
  404. <table cellpadding="0" cellspacing="0">
  405. <tr>
  406. <td>&#160;</td>
  407. </tr>
  408. </table>
  409. </dp:section>
  410. </xsl:otherwise>
  411. </xsl:choose>
  412. </dp:list>
  413. <dp:list width="50%">
  414. <out:if test="key('request-param','addEntriesUI')!='mypages' and key('request-param','addEntriesUI')!='portlet'">
  415. <dp:section role="group" aria-labelledby="lbl_searchType">
  416. <dp:label id="lbl_searchType" valign="top" width="1%" nospace="true"><xts:string id="IDS_ADDENTRIES_SEARCH_DIALOG_TYPE"/></dp:label>
  417. <dp:link wrap="wrap" valign="top">
  418. <!-- Create flyout for type -->
  419. <out:variable name="searchTypeMenu">
  420. <flyout id="searchTypeMenu">
  421. <items>
  422. <itemGroup id="searchTypeGroup">
  423. <item id="searchtype_all">
  424. <out:if test="$type = 'all' or $type = '' or not($type)">
  425. <out:attribute name="itemSelectedState">checked</out:attribute>
  426. </out:if>
  427. <text><xts:string id="IDS_ADDENTRIES_SEARCH_FILTER_ALL"/></text>
  428. <action>CCPopupMenu.activeMenu.setMenuItemChecked("searchtype_all");setSearchType('all','<xts:string id="IDS_ADDENTRIES_SEARCH_FILTER_ALL" encode="javascript"/>');</action>
  429. </item>
  430. <out:variable name="searchSet" select="/root/*[local-name()='searchSets']/*[local-name()='searchSet']/*[local-name()='name' and text()=key('request-param','addEntriesUI')]"/>
  431. <out:choose>
  432. <out:when test="$searchSet != ''">
  433. <out:for-each select="$searchSet/..//*[local-name()='item']">
  434. <out:variable name="searchType" select="*[local-name()='itemType']"/>
  435. <item>
  436. <out:attribute name="id"><out:value-of select="concat('searchtype_',$searchType)"/></out:attribute>
  437. <out:if test="$type = $searchType or ($type='' and @default='true')">
  438. <out:attribute name="itemSelectedState">checked</out:attribute>
  439. </out:if>
  440. <out:variable name="label" select="*[local-name()='idsString']"/>
  441. <text><out:value-of select="$label"/></text>
  442. <action>CCPopupMenu.activeMenu.setMenuItemChecked("<out:value-of select="concat('searchtype_',$searchType)"/>");setSearchType('<out:value-of select="$searchType"/>','<out:value-of select="$label"/>');</action>
  443. </item>
  444. </out:for-each>
  445. </out:when>
  446. </out:choose>
  447. </itemGroup>
  448. </items>
  449. </flyout>
  450. </out:variable>
  451. <input name="search_type" id="search_type" type="hidden">
  452. <out:attribute name="value">
  453. <out:choose>
  454. <out:when test="$type = ''"><out:value-of select="substring-after($searchTypeMenu//item[@itemSelectedState='checked']/@id,'searchtype_')"/></out:when>
  455. <out:otherwise><out:value-of select="$type"/></out:otherwise>
  456. </out:choose>
  457. </out:attribute>
  458. </input>
  459. <div id="searchTypeMenu_span" style="margin-left:5px;z-index:9;position: relative;">
  460. <a href="#" onclick="return CCPopupMenu.dropDown(event,0,0,'searchTypeMenu');" role="button" aria-haspopup="true">
  461. <div style="white-space: nowrap;">
  462. <span id="searchTypeMenu_caption" style="vertical-align: top;">
  463. <out:value-of select="string($searchTypeMenu//item[@itemSelectedState='checked']/text)"/>
  464. </span>
  465. <span style="vertical-align: middle;">
  466. <img name="searchTypeMenu_imgFlyControl" src="{'{$skin_shared_images}'}dropdown_arrow.gif" title="" alt="" border="0"/>
  467. </span>
  468. </div>
  469. </a>
  470. </div>
  471. <out:call-template name="renderPopup">
  472. <out:with-param name="flyoutXML">
  473. <out:copy-of select="$searchTypeMenu"/>
  474. </out:with-param>
  475. <out:with-param name="controlID">searchTypeMenu_span</out:with-param>
  476. </out:call-template>
  477. </dp:link>
  478. </dp:section>
  479. </out:if>
  480. <!-- Scope: -->
  481. <dp:section role="group" aria-labelledby="lbl_searchScope">
  482. <dp:label id="lbl_searchScope" valign="top" width="1%" nospace="true"><xts:string id="IDS_SCOPE"/></dp:label>
  483. <dp:link wrap="wrap" valign="top">
  484. <!-- Create flyout for scope -->
  485. <input name="search_scope" id="search_scope" type="hidden">
  486. <out:attribute name="value">
  487. <out:choose>
  488. <out:when test="$scope = ''">descendant</out:when>
  489. <out:otherwise><out:value-of select="$scope"/></out:otherwise>
  490. </out:choose>
  491. </out:attribute>
  492. </input>
  493. <out:variable name="searchScopeMenu">
  494. <flyout id="searchScopeMenu">
  495. <items>
  496. <itemGroup id="searchScopeGroup">
  497. <item id="searchscope_descendant">
  498. <out:if test="$scope = 'descendant' or $scope=''">
  499. <out:attribute name="itemSelectedState">checked</out:attribute>
  500. </out:if>
  501. <text><xts:string id="IDS_ADDENTRIES_SEARCH_SCOPE1"/></text>
  502. <action>CCPopupMenu.activeMenu.setMenuItemChecked("searchscope_descendant");setSearchScope('descendant','<xts:string id="IDS_ADDENTRIES_SEARCH_SCOPE1" encode="javascript"/>');</action>
  503. </item>
  504. <item id="searchscope_child">
  505. <out:if test="$scope = 'child'">
  506. <out:attribute name="itemSelectedState">checked</out:attribute>
  507. </out:if>
  508. <text><xts:string id="IDS_ADDENTRIES_SEARCH_SCOPE2"/></text>
  509. <action>CCPopupMenu.activeMenu.setMenuItemChecked("searchscope_child");setSearchScope('child','<xts:string id="IDS_ADDENTRIES_SEARCH_SCOPE2" encode="javascript"/>');</action>
  510. </item>
  511. <out:choose>
  512. <out:when test="key('request-param','addEntriesUI')='runnables' or key('request-param','addEntriesUI')='links' or key('request-param','addEntriesUI')='mypages'">
  513. <item id="searchscope_proot">
  514. <out:if test="$scope = 'proot'">
  515. <out:attribute name="itemSelectedState">checked</out:attribute>
  516. </out:if>
  517. <text><out:value-of select="key('session-param', 'e_proot')"/></text>
  518. <action>CCPopupMenu.activeMenu.setMenuItemChecked("searchscope_proot");setSearchScope('proot','<out:value-of select="xtsext:javascriptencode(string(key('session-param', 'e_proot')))"/>');</action>
  519. </item>
  520. <item id="searchscope_mroot">
  521. <out:if test="$scope='mroot'">
  522. <out:attribute name="itemSelectedState">checked</out:attribute>
  523. </out:if>
  524. <text><out:value-of select="key('session-param', 'e_mroot')"/></text>
  525. <action>CCPopupMenu.activeMenu.setMenuItemChecked("searchscope_mroot");setSearchScope('mroot','<out:value-of select="xtsext:javascriptencode(string(key('session-param', 'e_mroot')))"/>');</action>
  526. </item>
  527. </out:when>
  528. <out:when test="contains(' recipients humanTask recipients_distribution members groupMembers privileges deploymentObjects ',concat(' ',key('request-param','addEntriesUI'),' '))">
  529. <item id="searchscope_any">
  530. <out:if test="$scope = 'any'">
  531. <out:attribute name="itemSelectedState">checked</out:attribute>
  532. </out:if>
  533. <text><xts:string id="IDS_FILTER_CURRENT_NAMESPACE"/></text>
  534. <action>CCPopupMenu.activeMenu.setMenuItemChecked("searchscope_any");setSearchScope('any','<xts:string id="IDS_FILTER_CURRENT_NAMESPACE" encode="javascript"/>');</action>
  535. </item>
  536. </out:when>
  537. </out:choose>
  538. <out:if test="key('request-param','addEntriesUI')='runnables'">
  539. <item id="searchscope_admin">
  540. <out:if test="$scope = 'admin'">
  541. <out:attribute name="itemSelectedState">checked</out:attribute>
  542. </out:if>
  543. <text><xts:string id="IDS_ADDENTRIES_SEARCH_ADMINISTRATION"/></text>
  544. <action>CCPopupMenu.activeMenu.setMenuItemChecked("searchscope_admin");setSearchScope('admin','<xts:string id="IDS_ADDENTRIES_SEARCH_ADMINISTRATION" encode="javascript"/>');</action>
  545. </item>
  546. </out:if>
  547. </itemGroup>
  548. </items>
  549. </flyout>
  550. </out:variable>
  551. <div id="searchScopeMenu_span" style="margin-left:5px;z-index:8;position: relative;">
  552. <a href="#" onclick="return CCPopupMenu.dropDown(event,0,0,'searchScopeMenu');" role="button" aria-haspopup="true">
  553. <div style="white-space: nowrap;">
  554. <span id="searchScopeMenu_caption" style="vertical-align: top;">
  555. <out:value-of select="$searchScopeMenu//item[string(@itemSelectedState)='checked']/*"/>
  556. </span>
  557. <span style="vertical-align: middle;">
  558. <img name="searchScopeMenu_imgFlyControl" src="{'{$skin_shared_images}'}dropdown_arrow.gif" title="" alt="" border="0"/>
  559. </span>
  560. </div>
  561. </a>
  562. </div>
  563. <out:call-template name="renderPopup">
  564. <out:with-param name="flyoutXML">
  565. <out:copy-of select="$searchScopeMenu"/>
  566. </out:with-param>
  567. <out:with-param name="controlID">searchScopeMenu_span</out:with-param>
  568. </out:call-template>
  569. </dp:link>
  570. </dp:section>
  571. <out:if test="not(key('request-param','addEntriesUI')!='mypages' and key('request-param','addEntriesUI')!='portlet')">
  572. <dp:section>
  573. <table cellpadding="0" cellspacing="0">
  574. <tr>
  575. <td>&#160;</td>
  576. </tr>
  577. </table>
  578. </dp:section>
  579. </out:if>
  580. </dp:list>
  581. </dp:section>
  582. </dp:list>
  583. </xsl:template>
  584. <!-- HTML that will appear in the search options popup dialog -->
  585. <xsl:template match="aet:searchOptionsIndex">
  586. <out:variable name="type" select="key('env-param','search_type_index')"/>
  587. <dp:list width="100%">
  588. <dp:section width="100%">
  589. <dp:list width="50%">
  590. <dp:section><dp:text/></dp:section>
  591. <dp:section><dp:label><xts:string id="IDS_ADDENTRIES_SEARCH_DIALOG_METHOD"/></dp:label><xts:string id="IDS_ADDENTRIES_SEARCH_INDEX_METHOD1"/></dp:section>
  592. <dp:section><dp:text/></dp:section>
  593. </dp:list>
  594. <!-- type search options -->
  595. <out:if test="key('request-param','addEntriesUI')!='mypages' and key('request-param','addEntriesUI')!='portlet'">
  596. <dp:list width="50%">
  597. <dp:section role="group" aria-labelledby="lbl_searchType">
  598. <dp:label id="lbl_searchType" valign="top" nospace="true"><xts:string id="IDS_ADDENTRIES_SEARCH_DIALOG_TYPE"/></dp:label>
  599. <dp:link wrap="wrap" valign="top">
  600. <out:variable name="searchIndexTypeMenu">
  601. <flyout id="searchIndexTypeMenu">
  602. <items>
  603. <itemGroup id="searchIndexTypeGroup">
  604. <item id="searchindextype_all">
  605. <out:if test="$type = 'all'">
  606. <out:attribute name="itemSelectedState">checked</out:attribute>
  607. </out:if>
  608. <text><xts:string id="IDS_ADDENTRIES_SEARCH_FILTER_ALL"/></text>
  609. <action>CCPopupMenu.activeMenu.setMenuItemChecked("searchindextype_all");setSearchIndexType('all','<xts:string id="IDS_ADDENTRIES_SEARCH_FILTER_ALL" encode="javascript"/>');</action>
  610. </item>
  611. <out:variable name="searchSet" select="/root/*[local-name()='searchSets']/*[local-name()='searchSet']/*[local-name()='name' and text()=key('request-param','addEntriesUI')]"/>
  612. <out:if test="$searchSet != ''">
  613. <out:for-each select="$searchSet/..//*[local-name()='item' and @isIndexed='true']">
  614. <out:variable name="searchType" select="*[local-name()='itemType']"/>
  615. <item>
  616. <out:attribute name="id"><out:value-of select="concat('searchindextype_',$searchType)"/></out:attribute>
  617. <out:if test="$type = $searchType or ($type='' and @default='true')">
  618. <out:attribute name="itemSelectedState">checked</out:attribute>
  619. </out:if>
  620. <out:variable name="label" select="*[local-name()='idsString']"/>
  621. <text><out:value-of select="$label"/></text>
  622. <action>CCPopupMenu.activeMenu.setMenuItemChecked(&quot;<out:value-of select="concat('searchindextype_',$searchType)"/>&quot;);setSearchIndexType('<out:value-of select="$searchType"/>','<out:value-of select="$label"/>');</action>
  623. </item>
  624. </out:for-each>
  625. </out:if>
  626. </itemGroup>
  627. </items>
  628. </flyout>
  629. </out:variable>
  630. <input name="search_type_index" id="search_type_index" type="hidden">
  631. <out:attribute name="value">
  632. <out:choose>
  633. <out:when test="$type = ''"><out:value-of select="substring-after($searchIndexTypeMenu//item[@itemSelectedState='checked']/@id,'searchindextype_')"/></out:when>
  634. <out:otherwise><out:value-of select="$type"/></out:otherwise>
  635. </out:choose>
  636. </out:attribute>
  637. </input>
  638. <div id="searchIndexTypeMenu_span" style="margin-left:5px;z-index:9;position: relative">
  639. <a href="#" onclick="return CCPopupMenu.dropDown(event,0,0,'searchIndexTypeMenu');" role="button" aria-haspopup="true">
  640. <div style="white-space: nowrap;">
  641. <span id="searchIndexTypeMenu_caption" style="vertical-align: top;">
  642. <out:value-of select="string($searchIndexTypeMenu//item[@itemSelectedState='checked']/text)"/>
  643. </span>
  644. <span style="vertical-align: middle;">
  645. <img name="searchIndexTypeMenu_imgFlyControl" src="{'{$skin_shared_images}'}dropdown_arrow.gif" title="" alt="" border="0"/>
  646. </span>
  647. </div>
  648. </a>
  649. </div>
  650. <out:call-template name="renderPopup">
  651. <out:with-param name="flyoutXML">
  652. <out:copy-of select="$searchIndexTypeMenu"/>
  653. </out:with-param>
  654. <out:with-param name="controlID">searchIndexTypeMenu_span</out:with-param>
  655. </out:call-template>
  656. </dp:link>
  657. </dp:section>
  658. </dp:list>
  659. </out:if>
  660. </dp:section>
  661. </dp:list>
  662. </xsl:template>
  663. <!-- footer that will appear in the search options popup dialog -->
  664. <xsl:template match="aet:searchFooter">
  665. <dp:simpleFooter>
  666. <!-- <df:button df:id="IDS_OK" df:style="href" df:href="javascript:searchOptionsDialogBasic.hide(); javascript:updateSearchOptions();"/>
  667. <df:button df:id="IDS_CANCEL" df:style="href" df:href="javascript:searchOptionsDialogBasic.hide(); javascript:cancelSetSearchOptions();"/> -->
  668. <df:button df:id="IDS_OK" df:style="href" df:href="javascript:searchOptionsDialogBasic.hide();"/>
  669. <df:button df:id="IDS_CANCEL" df:style="href" df:href="javascript:searchOptionsDialogBasic.hide();"/>
  670. </dp:simpleFooter>
  671. </xsl:template>
  672. <!-- footer that will appear in the search options popup dialog -->
  673. <xsl:template match="aet:searchFooterIndex">
  674. <dp:simpleFooter>
  675. <df:button df:id="IDS_OK" df:style="href" df:href="javascript:searchOptionsDialogIndex.hide(); javascript:updateIndexSearchOptions();"/>
  676. <df:button df:id="IDS_CANCEL" df:style="href" df:href="javascript:searchOptionsDialogIndex.hide(); javascript:cancelSetIndexSearchOptions();"/>
  677. </dp:simpleFooter>
  678. </xsl:template>
  679. <!-- The main engine -->
  680. <xsl:template match="*">
  681. <xsl:copy>
  682. <xsl:copy-of select="@*"/>
  683. <xsl:apply-templates/>
  684. </xsl:copy>
  685. </xsl:template>
  686. </xsl:stylesheet>