add_entries.xts 161 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621
  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. <!--
  13. =================================================================================================================================
  14. add_entries.xts
  15. view add_entries_interface.xml for information on the API.
  16. =================================================================================================================================
  17. -->
  18. <xts:morphlet xmlns:xts="http://developer.cognos.com/schemas/xts/" messageBase="messages/portalRL.xml, messages/portal.xml">
  19. <!--
  20. ===============================================================================================
  21. initialBlock
  22. - Default any params that weren't passed in. Also this is where we would do validation (when time permits).
  23. - If the user modified any of the cc, bcc, cc, attachment or link checkboxes, then we have to rebuild
  24. the xml blob.
  25. ===============================================================================================
  26. -->
  27. <xts:block
  28. nodelist="env,credential"
  29. id="initialBlock"
  30. processor="XSLT"
  31. type="exec">
  32. <xsl:stylesheet version="1.0"
  33. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  34. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  35. exclude-result-prefixes="xsl xtsext">
  36. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  37. <xsl:template match="/">
  38. <xts:sequence>
  39. <!-- replace the requestParams element with one that doesn't have a namespace -->
  40. <xts:replace select="/root/*[local-name()='requestParams']">
  41. <requestParams>
  42. <xts:queryNode select="/root/*[local-name()='requestParams']/*"/>
  43. <xts:transform src="portal/controls/gen_default_parameters.xslt" processor="XSLT">
  44. <root>
  45. <xts:transform name="XML">
  46. <xts:param name="systemId">portal/addEntries/add_entries_interface.xml</xts:param>
  47. </xts:transform>
  48. <xts:queryNode select="/root/*[local-name()='requestParams']"/>
  49. </root>
  50. </xts:transform>
  51. </requestParams>
  52. </xts:replace>
  53. </xts:sequence>
  54. <!-- update the xml blob of added entries if needed -->
  55. <xsl:if test="/root/env/param[@name='typeChanged']='true' and /root/env/param[@name='selectedEntries']!=''">
  56. <xts:sequence>
  57. <xsl:variable name="passport">
  58. <xsl:value-of select="/root/credential/param[@name='CAM']/*[local-name() ='CAM']/*[local-name() = 'CAMPassport']/*[local-name() = 'id']"/>
  59. </xsl:variable>
  60. <xts:replace select="/root/*[local-name()='env']/*[local-name()='param' and @name='selectedEntries']">
  61. <xts:transform src="portal/controls/create_web64_param.xslt" processor="XSLT">
  62. <param name="selectedEntries">
  63. <passport><xsl:value-of select="$passport"/></passport>
  64. <markup>
  65. <xts:transform name="XMLEncode">
  66. <xts:transform src="portal/addEntries/transforms/updateSelectedEntries.xslt" processor="XSLT">
  67. <root>
  68. <selectedEntries>
  69. <xts:transform name="XMLDecode">
  70. <xsl:value-of select="xtsext:web64decode(xtsext:cafaction('sign_unwrap',string(/root/env/param[@name='selectedEntries'])), true())"/>
  71. </xts:transform>
  72. </selectedEntries>
  73. <xsl:copy-of select="/root/env"/>
  74. </root>
  75. </xts:transform>
  76. </xts:transform>
  77. </markup>
  78. </param>
  79. </xts:transform>
  80. </xts:replace>
  81. </xts:sequence>
  82. </xsl:if>
  83. </xsl:template>
  84. </xsl:stylesheet>
  85. </xts:block>
  86. ===============================================================================================
  87. Load searchItems map
  88. ===============================================================================================
  89. -->
  90. <xts:block id="getSearchSet" type="exec" mode="input" processor="XML" path="/portal/uiExtensions.xml">
  91. <xts:logicsheet path="/logicsheets/uiobjects/uiobjects_search.xslt"/>
  92. </xts:block>
  93. <!--
  94. ===============================================================================================
  95. returnResult - We're done with the email options morphlet, so return the appropriate response
  96. ===============================================================================================
  97. -->
  98. <xts:block id="returnResult"
  99. type="exec"
  100. processor="XSLT"
  101. dependency="initialBlock"
  102. nodelist="requestParams,output,env"
  103. condition=".[/root/requestParams/*[local-name()='param' and @name='requestState'] = 'finished' or /root/requestParams/*[local-name()='param' and @name='requestState'] = 'canceled']"
  104. mandatory="false">
  105. <xsl:stylesheet version="1.0"
  106. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  107. xmlns:xos="http://developer.cognos.com/schemas/xts/output/"
  108. exclude-result-prefixes="xsl xos">
  109. <xsl:output method="xml" encoding="utf-8" indent="no"/>
  110. <xsl:key name="request-param" match="/root/requestParams/*[local-name()='param']" use="@name"/>
  111. <xsl:template match="/">
  112. <xts:sequence>
  113. <xts:append select="/root/output">
  114. <!-- build a part -->
  115. <xts:transform name="Null" option="part" mimeType="text/xml">
  116. <xsl:element name="{key('request-param','resultNode')}" namespace="">
  117. <xsl:choose>
  118. <xsl:when test="key('request-param','requestState') = 'canceled'">
  119. <canceled/>
  120. </xsl:when>
  121. <xsl:otherwise>
  122. <selectedEntries>
  123. <xsl:value-of select="/root/env/param[@name='selectedEntries']"/>
  124. </selectedEntries>
  125. </xsl:otherwise>
  126. </xsl:choose>
  127. </xsl:element>
  128. </xts:transform>
  129. </xts:append>
  130. </xts:sequence>
  131. </xsl:template>
  132. </xsl:stylesheet>
  133. </xts:block>
  134. <!--
  135. ===============================================================================================
  136. getCgetContainerContent - Get the container information
  137. ===============================================================================================
  138. -->
  139. <xts:block
  140. id="getContainerContent"
  141. type="exec"
  142. mode="interpret"
  143. processor="XSLT"
  144. dependency="initialBlock">
  145. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  146. <xsl:stylesheet version="1.0"
  147. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  148. xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/"
  149. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  150. exclude-result-prefixes="xsl send xtsext">
  151. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  152. <xsl:key name="request-param" match="/root/requestParams/*[local-name()='param']" use="@name"/>
  153. <xsl:key name="env-param" match="/root/*[local-name()='env']/*[local-name()='param']" use="@name"/>
  154. <xsl:variable name="searchPath">
  155. <xsl:choose>
  156. <xsl:when test="key('env-param','select_path')!=''">
  157. <xsl:value-of select="key('env-param','select_path')"/>
  158. </xsl:when>
  159. <xsl:otherwise>
  160. <xsl:value-of select="key('request-param','defaultSearchPath')"/>
  161. </xsl:otherwise>
  162. </xsl:choose>
  163. </xsl:variable>
  164. <xsl:template match="/">
  165. <xts:sequence>
  166. <xts:append select="/root">
  167. <containerInfo>
  168. <xts:transform src="transforms/CM/post-process.xslt" processor="XSLT">
  169. <send:request provider="cm">
  170. <xts:transform src="transforms/CM/pre-process.xslt" processor="XSLT">
  171. <cm:query xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
  172. <cm:requests>
  173. <!-- get the container details -->
  174. <cm:query>
  175. <cm:search>
  176. <xsl:value-of select="$searchPath"/>
  177. </cm:search>
  178. <cm:properties>
  179. <cm:property name="defaultName"/>
  180. <cm:property name="searchPath"/>
  181. <cm:property name="ancestors"/>
  182. <cm:property name="objectClass"/>
  183. </cm:properties>
  184. </cm:query>
  185. </cm:requests>
  186. </cm:query>
  187. </xts:transform>
  188. </send:request>
  189. </xts:transform>
  190. </containerInfo>
  191. </xts:append>
  192. </xts:sequence>
  193. </xsl:template>
  194. </xsl:stylesheet>
  195. </xts:block>
  196. <!--
  197. =======================================================================================
  198. When the enable-3rdparty-namespace-browsing system.xml parameter is set to false, we
  199. force the UI into search mode whenever we enter any part of a 3rd party namespace.
  200. =======================================================================================
  201. -->
  202. <xts:block id="secure-3rdpartyNS-browsing" nodelist="system,containerInfo,requestParams" processor="XSLT" type="exec"
  203. dependency="initialBlock getContainerContent"
  204. condition=".[/root/requestParams/*[local-name()='param' and @name='requestState' and starts-with(.,'navigate')]]"
  205. mandatory="false">
  206. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  207. xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
  208. xmlns:req-params="http://developer.cognos.com/schemas/request/params">
  209. <xsl:output method="xml" version="1.0" encoding="UTF-8" omit-xml-declaration="yes" indent="no"/>
  210. <xsl:template match="root">
  211. <xsl:variable name="m_path" select="/root/containerInfo/cm:queryResponse/cm:queryReply/*/cm:searchPath"/>
  212. <xsl:variable name="objectClass" select="/root/containerInfo/cm:queryResponse/cm:queryReply/*/cm:objectClass"/>
  213. <xsl:variable name="insideCognosNamespace" select="(starts-with($m_path, &quot;CAMID(&apos;:&quot;) or starts-with($m_path, 'CAMID(&quot;:'))"/>
  214. <xsl:variable name="inside3rdPartyNamespace" select="($objectClass='namespace' or /root/containerInfo/cm:queryResponse/cm:queryReply/*/cm:ancestors/cm:ancestorInfo/cm:objectClass='namespace') and not($insideCognosNamespace)"/>
  215. <xsl:variable name="canBrowse3rdPartyNamespace" select="not(/root/system/param[@name='enable-3rdparty-namespace-browsing']='false')"/>
  216. <xsl:if test="$inside3rdPartyNamespace and not($canBrowse3rdPartyNamespace)">
  217. <xts:sequence>
  218. <xts:replace select="/root/requestParams/*[local-name()='param' and @name='requestState']">
  219. <req-params:param name="requestState">
  220. <xsl:value-of select="concat('search', substring-after(/root/requestParams/*[local-name()='param' and @name='requestState'], 'navigate'))"/>
  221. </req-params:param>
  222. </xts:replace>
  223. </xts:sequence>
  224. </xsl:if>
  225. </xsl:template>
  226. </xsl:stylesheet>
  227. </xts:block>
  228. <!--
  229. ===============================================================================================
  230. ckSearchChange:
  231. When there's a new search, the 'm_page' navpager variables must be deleted before recalculating maxObjects and skipObjects.
  232. ===============================================================================================
  233. -->
  234. <xts:block id="ckSearchChange" processor="XSLT" type="exec" dependency="getContainerContent" mandatory="false" condition=".[/root/env/param[@name = 'm_navpagerSearchChange'] and .[/root/env/param[@name = 'm_navpagerSearchChange'] ='true']]">
  235. <xsl:stylesheet xmlns:adm="http://developer.cognos.com/schemas/xts/logicsheets/contentadmin/" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:cml="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/cml/1/" xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/" xmlns:bus="http://developer.cognos.com/schemas/bibus/3/" xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
  236. <xsl:key name="env-param" match="/root/env/param" use="@name"/>
  237. <xsl:template match="/">
  238. <xts:sequence>
  239. <xts:delete select="/root/env/param[@name='m_pagerfromnavpager' or @name='m_pagertonavpager' or @name='m_pagerfrom_dnavpager' or @name='m_pagerto_dnavpager' or @name='m_navpagersection' or @name='m_pg_enavpager' or @name='m_navpagerSearchChange']"/>
  240. </xts:sequence>
  241. </xsl:template>
  242. </xsl:stylesheet>
  243. </xts:block>
  244. <!--
  245. ===============================================================================================
  246. getContent - Get the content to be displayed in the navigation pager
  247. ===============================================================================================
  248. -->
  249. <xts:block id="getContent"
  250. nodelist="containerInfo, requestParams, env, header, http, cookies, system, session, searchSets"
  251. type="exec"
  252. mode="interpret"
  253. processor="XSLT"
  254. dependency="secure-3rdpartyNS-browsing ckSearchChange getSearchSet"
  255. condition=".[/root/requestParams/*[local-name()='param' and @name='requestState' and (starts-with(.,'navigate') or starts-with(.,'type') or starts-with(.,'search'))]]"
  256. mandatory="false">
  257. <xts:logicsheet path="logicsheets/portal.xsl"/>
  258. <xts:logicsheet path="portal/addEntries/logicsheets/add_entries_templates.xsl"/>
  259. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  260. <xsl:stylesheet version="1.0"
  261. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  262. xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
  263. xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/"
  264. xmlns:aet="http://developer.cognos.com/schemas/xts/portal/addEntries/logicsheets/add_entries_templates/"
  265. xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
  266. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  267. xmlns:nav="http://developer.cognos.com/schemas/cps/navigation/1/"
  268. exclude-result-prefixes="xsl send xtsext aet cm nav">
  269. <pf:variables/>
  270. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  271. <xsl:key name="request-param" match="/root/requestParams/*[local-name()='param']" use="@name"/>
  272. <xsl:key name="env-param" match="/root/*[local-name()='env']/*[local-name()='param']" use="@name"/>
  273. <aet:variables/>
  274. <aet:pagerQueryVars/>
  275. <xsl:variable name="action" select="substring-after(key('request-param','requestState'),'|')"/>
  276. <xsl:variable name="currentState">
  277. <xsl:choose>
  278. <xsl:when test="contains(key('request-param','requestState'),'|')">
  279. <xsl:value-of select="substring-before(key('request-param','requestState'),'|')"/>
  280. </xsl:when>
  281. <xsl:otherwise>
  282. <xsl:value-of select="key('request-param','requestState')"/>
  283. </xsl:otherwise>
  284. </xsl:choose>
  285. </xsl:variable>
  286. <xsl:variable name="searchPath">
  287. <xsl:choose>
  288. <xsl:when test="key('env-param','select_path')!=''">
  289. <xsl:value-of select="key('env-param','select_path')"/>
  290. </xsl:when>
  291. <xsl:otherwise>
  292. <xsl:value-of select="key('request-param','defaultSearchPath')"/>
  293. </xsl:otherwise>
  294. </xsl:choose>
  295. </xsl:variable>
  296. <xsl:template match="/">
  297. <xts:sequence>
  298. <xts:append select="/root">
  299. <response>
  300. <!-- transform that performs the add/delete action or does nothing (Null) -->
  301. <xts:transform>
  302. <xsl:choose>
  303. <xsl:when test="$action != ''">
  304. <xsl:attribute name="processor">XSLT</xsl:attribute>
  305. <xsl:attribute name="src">portal/addEntries/transforms/performAction.xslt</xsl:attribute>
  306. </xsl:when>
  307. <xsl:otherwise>
  308. <xsl:attribute name="name">Null</xsl:attribute>
  309. </xsl:otherwise>
  310. </xsl:choose>
  311. <content>
  312. <addedQueryPosition>2</addedQueryPosition>
  313. <xsl:choose>
  314. <xsl:when test="$currentState='type'">
  315. <xsl:call-template name="parse-entries">
  316. <xsl:with-param name="entries" select="/root/env/param[@name='type_entries']"/>
  317. </xsl:call-template>
  318. </xsl:when>
  319. <xsl:otherwise>
  320. <xsl:choose>
  321. <!-- start here the burgandy search -->
  322. <xsl:when test="$currentState!='navigate' and ($currentState='search' and /root/env/param[@name='search_keywords_bas']!='' and /root/env/param[@name='search_find'] = 'b')">
  323. <xts:append>
  324. <navContent>
  325. <xts:request href="bus://dispatcher" protocol="NAV" responseEnvelope="false" outputHeader="false">
  326. <SOAP-ENV:Envelope
  327. xmlns:bus="http://developer.cognos.com/schemas/bibus/3/"
  328. xmlns:nav="http://developer.cognos.com/schemas/cps/navigation/1/"
  329. xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  330. xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
  331. xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
  332. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  333. xmlns:xs="http://www.w3.org/2001/XMLSchema">
  334. <SOAP-ENV:Header>
  335. <xsl:copy-of select="/root/header/bus:biBusHeader"/>
  336. </SOAP-ENV:Header>
  337. <SOAP-ENV:Body>
  338. <nav:search>
  339. <nav:validateTag fault="true"/>
  340. <xsl:call-template name="generateNAVSearchSpec"/>
  341. <nav:skipObjects><xsl:value-of select="$skipObjects"/></nav:skipObjects>
  342. <nav:maxObjects><xsl:value-of select="$maxObjects"/></nav:maxObjects>
  343. <nav:property name="internalId"/>
  344. <nav:property name="fullName"/>
  345. <nav:property name="alt"/>
  346. <nav:property name="icons"/>
  347. <nav:property name="pathStepType"/>
  348. <nav:property name="permissions"/>
  349. <nav:property name="hasChildren"/>
  350. <nav:property name="searchPath"/>
  351. <nav:property name="URLID"/>
  352. <nav:property name="storeID"/>
  353. <nav:property name="position"/>
  354. <nav:property name="ancestors"/>
  355. <nav:property name="searchPathForURL"/>
  356. <nav:property name="screenTip"/>
  357. <nav:param name="portalAgent">cognos</nav:param>
  358. <nav:param name="webContentURL">..</nav:param>
  359. </nav:search>
  360. </SOAP-ENV:Body>
  361. </SOAP-ENV:Envelope>
  362. </xts:request>
  363. </navContent>
  364. </xts:append>
  365. <xts:transform src="transforms/CM/post-process.xslt" processor="XSLT">
  366. <send:request provider="cm">
  367. <xts:transform src="transforms/CM/pre-process.xslt" processor="XSLT">
  368. <cm:query xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
  369. <cm:requests>
  370. <!-- get the container details -->
  371. <cm:query>
  372. <cm:search>
  373. <xsl:value-of select="$searchPath"/>
  374. </cm:search>
  375. <cm:properties>
  376. <cm:property name="defaultName"/>
  377. <cm:property name="searchPath"/>
  378. <cm:property name="ancestors"/>
  379. </cm:properties>
  380. </cm:query>
  381. <!-- query for any entries that the user is adding -->
  382. <xsl:if test="starts-with($action,'add') and key('env-param','nav_checkbox')">
  383. <xsl:for-each select="key('env-param','nav_checkbox')">
  384. <cm:query>
  385. <cm:search>
  386. <xsl:value-of select="string(.)"/>
  387. </cm:search>
  388. <cm:properties>
  389. <aet:properties/>
  390. </cm:properties>
  391. <cm:options>
  392. <aet:refProps/>
  393. </cm:options>
  394. </cm:query>
  395. </xsl:for-each>
  396. </xsl:if>
  397. </cm:requests>
  398. </cm:query>
  399. </xts:transform>
  400. </send:request>
  401. </xts:transform>
  402. </xsl:when>
  403. <!-- navigate or basic search -->
  404. <xsl:when test="$currentState='navigate' or ($currentState='search' and ( /root/env/param[@name='search_find'] != 'b' and /root/env/param[@name='search_find'] != '' and /root/env/param[@name='search_keywords_bas']!=''))">
  405. <xts:transform src="transforms/CM/post-process.xslt" processor="XSLT">
  406. <send:request provider="cm">
  407. <xts:transform src="transforms/CM/pre-process.xslt" processor="XSLT">
  408. <cm:query xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
  409. <cm:requests>
  410. <xsl:choose>
  411. <xsl:when test="$searchPath='/'">
  412. <cm:query>
  413. <cm:search>
  414. <xsl:choose>
  415. <xsl:when test="key('request-param','addEntriesUI')='packagesAndLocations' or key('request-param','addEntriesUI')='indexUpdateLocations'or key('request-param','addEntriesUI')='deploymentObjects'">
  416. <!-- packages can be found in myFolders as well so make sure we allow the user to find them -->
  417. <xsl:choose>
  418. <xsl:when test="($hasCSTCapability and not(key('request-param','addEntriesUI')='deploymentObjects'))">
  419. <xsl:value-of select="concat('/content',$classFilter, '| /directory' ,$classFilter, '| ~/folder', $classFilter)"/>
  420. </xsl:when>
  421. <xsl:otherwise>
  422. <xsl:value-of select="concat('/content',$classFilter, '| /directory' ,$classFilter, '| /catalog', $classFilter)"/>
  423. </xsl:otherwise>
  424. </xsl:choose>
  425. </xsl:when>
  426. <xsl:when test="key('request-param','addEntriesUI')='rolapDataSources'">
  427. <xsl:value-of select="concat('/CAMID(&quot;:&quot;)','')"/>
  428. </xsl:when>
  429. <xsl:when test="key('request-param','addEntriesUI')='packagesAndFolders'">
  430. <xsl:value-of select="concat('/content','')"/>
  431. </xsl:when>
  432. <xsl:when test="key('request-param','addEntriesUI')='publicFoldersPackagesAndFolders'">
  433. <xsl:value-of select="concat('/content','')"/>
  434. </xsl:when>
  435. <xsl:otherwise>
  436. <!-- don't show adminFolder if user does not have Content Store Tool Access capability -->
  437. <xsl:choose>
  438. <xsl:when test="$hasCSTCapability">
  439. <xsl:value-of select="concat('/content',$classFilter, '| ~/folder', $classFilter, '| /adminFolder',$classFilter)"/>
  440. </xsl:when>
  441. <xsl:otherwise>
  442. <xsl:value-of select="concat('/content',$classFilter, '| ~/folder', $classFilter)"/>
  443. </xsl:otherwise>
  444. </xsl:choose>
  445. </xsl:otherwise>
  446. </xsl:choose>
  447. <xsl:text>[@shown='true']</xsl:text>
  448. </cm:search>
  449. <cm:properties>
  450. <aet:properties/>
  451. </cm:properties>
  452. <cm:options maxObjects="{(($maxObjects) + 1)}" skipObjects="{$skipObjects}"/>
  453. </cm:query>
  454. </xsl:when>
  455. <xsl:otherwise>
  456. <cm:query>
  457. <cm:search>
  458. <xsl:choose>
  459. <!-- add entries navigate -->
  460. <xsl:when test="$currentState = 'navigate'">
  461. <xsl:value-of select="concat($searchPath,'/*')"/>
  462. <!-- Don't include the parent(target) tenant in the tenant members pick list -->
  463. <xsl:if test="key('request-param','addEntriesUI') = 'tenantMembers'">
  464. <xsl:variable name="sq" select='"&apos;"'/>
  465. <xsl:variable name="tenantName" select="key('env-param','m_name')"/>
  466. <xsl:variable name="cmEncodedTenantName" select="xtsext:replace(string($tenantName), string($sq), concat($sq,$sq)) "/>
  467. <xsl:value-of select="concat('[@defaultName!=',$sq,$cmEncodedTenantName,$sq,']')"/>
  468. </xsl:if>
  469. <xsl:if test="$searchPath='/directory' and key('env-param','m_class')='tenant'">
  470. <xsl:text>[@id != ":"]</xsl:text>
  471. </xsl:if>
  472. <xsl:value-of select="$classFilter"/>
  473. <xsl:choose>
  474. <xsl:when test="key('request-param','addEntriesUI')='jmxProxyHostDispatchers'">
  475. <xsl:value-of select="concat('/presentationService/parent::dispatcher','')"/>
  476. </xsl:when>
  477. <!-- if we're retrieving a list of namespaces apply the namespace_filter and the shown filter -->
  478. <xsl:when test="$searchPath = '/directory'">
  479. <xsl:text/><xsl:value-of select="/root/system/param[@name='namespace_filter']"/><xsl:text/>
  480. <xsl:text>[@shown='true']</xsl:text>
  481. </xsl:when>
  482. <!-- only add the security and shown filter if we're not in a third party namesapce -->
  483. <xsl:when test="starts-with(key('env-param','select_path'), &quot;CAMID(&apos;:&quot;) or starts-with(key('env-param','select_path'), 'CAMID(&quot;:') or not(starts-with(key('env-param','select_path'), 'CAMID('))">
  484. <xsl:value-of select="/root/system/param[@name='visible']"/>
  485. <xsl:text>[@shown='true']</xsl:text>
  486. </xsl:when>
  487. </xsl:choose>
  488. <!-- if we're browsing /directory then only query for active namespaces,
  489. unless where in the packages and locations add entries -->
  490. <xsl:if test="$searchPath = '/directory' and key('request-param','addEntriesUI')!='packagesAndLocations'and key('request-param','addEntriesUI')!='indexUpdateLocations'">[@active='true']</xsl:if>
  491. </xsl:when>
  492. <!-- add entries search -->
  493. <xsl:when test="$currentState = 'search'">
  494. <xsl:variable name="sq">'</xsl:variable>
  495. <xsl:variable name="searchText" select="xtsext:replace(string(key('env-param','search_keywords_bas')), string($sq), concat($sq,$sq))"/>
  496. <xsl:variable name="t-ns-path">
  497. <xsl:choose>
  498. <xsl:when test="/root/containerInfo/cm:queryResponse/cm:queryReply/child::*[local-name() = 'namespace']">
  499. <xsl:value-of select="/root/containerInfo/cm:queryResponse/cm:queryReply/child::*/cm:searchPath"/>
  500. </xsl:when>
  501. <xsl:otherwise>
  502. <xsl:value-of select="/root/containerInfo/cm:queryResponse/cm:queryReply/child::*/cm:ancestors/cm:ancestorInfo[./cm:objectClass = 'namespace']/cm:searchPath"/>
  503. </xsl:otherwise>
  504. </xsl:choose>
  505. </xsl:variable>
  506. <xsl:variable name="ns-path">
  507. <xsl:choose>
  508. <xsl:when test="$t-ns-path != ''"><xsl:value-of select="$t-ns-path"/></xsl:when>
  509. <!-- By default, use cognos namespace.-->
  510. <xsl:otherwise>
  511. <xsl:value-of select="'CAMID(&quot;:&quot;)'"/>
  512. </xsl:otherwise>
  513. </xsl:choose>
  514. </xsl:variable>
  515. <xsl:variable name="searchPathRoot">
  516. <xsl:choose>
  517. <xsl:when test="key('env-param', 'search_scope')='descendant'">
  518. <xsl:value-of select="key('env-param','select_path')"/><xsl:text>/descendant::*</xsl:text>
  519. </xsl:when>
  520. <xsl:when test="key('env-param','search_scope')='child'">
  521. <xsl:value-of select="key('env-param','select_path')"/><xsl:text>/*</xsl:text>
  522. </xsl:when>
  523. <xsl:when test="key('env-param','search_scope')='proot'">
  524. <xsl:text>/*[@objectClass='content']/descendant::*</xsl:text>
  525. </xsl:when>
  526. <xsl:when test="key('env-param','search_scope')='mroot'">
  527. <xsl:text>~/folder/descendant::*</xsl:text>
  528. </xsl:when>
  529. <xsl:when test="key('env-param','search_scope')='any'">
  530. <xsl:value-of select="concat($ns-path, '/descendant::*')"/>
  531. </xsl:when>
  532. <xsl:when test="key('env-param','search_scope')='admin'">
  533. <xsl:text>/adminFolder/*</xsl:text>
  534. </xsl:when>
  535. </xsl:choose>
  536. </xsl:variable>
  537. <xsl:value-of select="$searchPathRoot"/>
  538. <!-- method -->
  539. <!-- Default is "Name field" -->
  540. <xsl:variable name="method" select="string(key('env-param', 'search_method'))"/>
  541. <xsl:choose>
  542. <xsl:when test="key('env-param', 'search_find') = 'n' or string(key('env-param', 'search_find'))='' or key('env-param', 'search_find') ='none'">
  543. <xsl:choose>
  544. <xsl:when test="$method = 'equals'">[@defaultName = '<xsl:value-of select="$searchText"/>']</xsl:when>
  545. <xsl:when test="$method = 'starts'">[starts-with(@defaultName, '<xsl:value-of select="$searchText"/>')]</xsl:when>
  546. <xsl:otherwise>[contains(@defaultName, '<xsl:value-of select="$searchText"/>')]</xsl:otherwise>
  547. </xsl:choose>
  548. </xsl:when>
  549. <xsl:when test="/root/env/param[@name = 'search_find'] = 'd'">
  550. <xsl:choose>
  551. <xsl:when test="$method = 'equals'">[@defaultDescription = '<xsl:value-of select="$searchText"/>']</xsl:when>
  552. <xsl:when test="$method = 'starts'">[starts-with(@defaultDescription, '<xsl:value-of select="$searchText"/>' )]</xsl:when>
  553. <xsl:otherwise>[contains(@defaultDescription, '<xsl:value-of select="$searchText"/>' )]</xsl:otherwise>
  554. </xsl:choose>
  555. </xsl:when>
  556. <xsl:otherwise>
  557. <xsl:choose>
  558. <xsl:when test="$method = 'equals'">[@defaultDescription = '<xsl:value-of select="$searchText"/>' or @defaultName = '<xsl:value-of select="$searchText"/>']</xsl:when>
  559. <xsl:when test="$method = 'starts'">[starts-with(@defaultDescription, '<xsl:value-of select="$searchText"/>' ) or starts-with(@defaultName, '<xsl:value-of select="$searchText"/>')]</xsl:when>
  560. <xsl:otherwise>[contains(@defaultDescription, '<xsl:value-of select="$searchText"/>' ) or contains(@defaultName, '<xsl:value-of select="$searchText"/>')]</xsl:otherwise>
  561. </xsl:choose>
  562. </xsl:otherwise>
  563. </xsl:choose>
  564. <!-- Modified date -->
  565. <xsl:if test="string(key('env-param','search_modified')) != 'any' and string(key('env-param','search_modified'))!=''">
  566. <xsl:variable name="offsetamt">
  567. <xsl:choose>
  568. <xsl:when test="key('env-param','search_modified') = 't'">0</xsl:when>
  569. <xsl:when test="key('env-param','search_modified') = 'l3d'">-259200</xsl:when>
  570. <xsl:when test="key('env-param','search_modified') = 'lw'">-604800</xsl:when>
  571. <xsl:when test="key('env-param','search_modified') = 'lm'">-2629743</xsl:when>
  572. <xsl:when test="key('env-param','search_modified') = 'l3m'">-7889231</xsl:when>
  573. <xsl:when test="key('env-param','search_modified') = 'l6m'">-15778463</xsl:when>
  574. <xsl:when test="key('env-param','search_modified') = 'ly'">-31556926</xsl:when>
  575. <xsl:when test="key('env-param','search_modified') = 'l3y'">-94670777</xsl:when>
  576. </xsl:choose>
  577. </xsl:variable>
  578. <xsl:variable name="offsetunit">second</xsl:variable>
  579. <xsl:text/>[@modificationTime &gt; '<xsl:value-of select="xtsext:formatDateToUTC(xtsext:getDateTimeOffset(concat(xtsext:substringBeforeLast(xtsext:getCurrentDateTime(/root/user/param[@name='timeZoneID']), 'T'), 'T00:00:00Z'), $offsetamt, $offsetunit), /root/user/param[@name='timeZoneID'])"/>']<xsl:text/>
  580. </xsl:if>
  581. <!-- type -->
  582. <xsl:if test="key('env-param','search_type') != ''">
  583. <xsl:variable name="item" select="/root/*[local-name()='searchSets']/*[local-name()='searchSet']/*[local-name()='name' and text()=key('request-param','addEntriesUI')]/..//*[local-name()='item']/*[local-name()='itemType' and text()=key('env-param','search_type')]/.."/>
  584. <xsl:variable name="classes" select="$item/*[local-name()='classes']/*[local-name()='class']"/>
  585. <xsl:choose>
  586. <xsl:when test="key('env-param','search_type')='namespaces'">
  587. <xsl:value-of select="$selectable-classes"/>
  588. </xsl:when>
  589. <xsl:when test="key('env-param','search_type')='all'">
  590. <xsl:value-of select="$selectable-classes"/>
  591. </xsl:when>
  592. <xsl:when test="count($classes) &gt; 0">
  593. <xsl:variable name="apos" select='"&apos;"'/>
  594. <xsl:text>[</xsl:text>
  595. <xsl:for-each select="$item/*[local-name()='classes']/*[local-name()='class']">
  596. <xsl:if test="position() &gt; 1"><xsl:text> or </xsl:text></xsl:if>
  597. <xsl:value-of select="concat('@objectClass=',$apos,*[local-name()='name'],$apos)"/>
  598. </xsl:for-each>
  599. <xsl:text>]</xsl:text>
  600. </xsl:when>
  601. </xsl:choose>
  602. </xsl:if>
  603. <!-- if it's a search on mypages - need to apply a filter -->
  604. <xsl:if test="key('request-param','addEntriesUI')='mypages'"><xsl:value-of select="$selectable-classes"/></xsl:if>
  605. <!-- if it's a search on portlet - need to apply a filter -->
  606. <xsl:if test="key('request-param','addEntriesUI')='portlet'"><xsl:value-of select="$selectable-classes"/></xsl:if>
  607. <!-- only add the security and shown filter if we're not in a third party namesapce -->
  608. <xsl:if test="starts-with($searchPathRoot, &quot;CAMID(&apos;:&quot;) or starts-with($searchPathRoot, 'CAMID(&quot;:') or not(starts-with($searchPathRoot, 'CAMID('))">
  609. <xsl:value-of select="/root/system/param[@name='visible']"/>
  610. <xsl:text>[@shown='true']</xsl:text>
  611. </xsl:if>
  612. <!-- only show DISPs with presentationServices for JMX proxy host dispatchers -->
  613. <xsl:if test="key('request-param','addEntriesUI')='jmxProxyHostDispatchers'">
  614. <xsl:value-of select="concat('/presentationService/parent::dispatcher','')"/>
  615. </xsl:if>
  616. </xsl:when>
  617. </xsl:choose>
  618. </cm:search>
  619. <cm:properties>
  620. <aet:properties/>
  621. <xsl:if test="$searchPath = '/directory'">
  622. <cm:property name="active"/>
  623. </xsl:if>
  624. <xsl:if test="starts-with($searchPath,'/content')">
  625. <cm:property name="userInterfaces"/>
  626. </xsl:if>
  627. </cm:properties>
  628. <cm:sortBy>
  629. <cm:sort name="usage" order="ascending"/>
  630. <cm:sort name="defaultName" order="ascending"/>
  631. <xsl:if test="key('env-param','addentries_showusers')='true'">
  632. <cm:sort name="userName" order="ascending"/>
  633. </xsl:if>
  634. </cm:sortBy>
  635. <cm:options maxObjects="{(($maxObjects) + 1)}" skipObjects="{$skipObjects}">
  636. <aet:refProps/>
  637. </cm:options>
  638. </cm:query>
  639. </xsl:otherwise>
  640. </xsl:choose>
  641. <!-- query for any entries that the user is adding -->
  642. <xsl:if test="starts-with($action,'add') and key('env-param','nav_checkbox')">
  643. <xsl:for-each select="key('env-param','nav_checkbox')">
  644. <cm:query>
  645. <cm:search>
  646. <xsl:value-of select="string(.)"/>
  647. </cm:search>
  648. <cm:properties>
  649. <aet:properties/>
  650. </cm:properties>
  651. <cm:options>
  652. <aet:refProps/>
  653. </cm:options>
  654. </cm:query>
  655. </xsl:for-each>
  656. </xsl:if>
  657. </cm:requests>
  658. </cm:query>
  659. </xts:transform>
  660. </send:request>
  661. </xts:transform>
  662. </xsl:when>
  663. </xsl:choose>
  664. </xsl:otherwise>
  665. </xsl:choose>
  666. <!-- if we're performing an action, then pass in all the needed information -->
  667. <xsl:if test="$action != ''">
  668. <dialog><xsl:value-of select="$currentState"/></dialog>
  669. <action><xsl:value-of select="$action"/></action>
  670. <xsl:if test="key('env-param','selectedEntries') != ''">
  671. <selectedEntries>
  672. <xts:transform name="XMLDecode">
  673. <xsl:value-of select="xtsext:web64decode(xtsext:cafaction('sign_unwrap',string(key('env-param','selectedEntries'))), true())"/>
  674. </xts:transform>
  675. </selectedEntries>
  676. </xsl:if>
  677. <!-- send in the list of properties that should be in the generated list -->
  678. <xts:queryNode select="/root/env | /root/requestParams/*[local-name()='param' and @name='returnProperties']/*[local-name()='property']"/>
  679. <allowDuplicates>
  680. <xsl:choose>
  681. <xsl:when test="key('request-param','addEntriesUI') = 'deploymentObjects'">
  682. true
  683. </xsl:when>
  684. <xsl:otherwise>
  685. <xsl:value-of select="key('request-param','allowDuplicates')"/>
  686. </xsl:otherwise>
  687. </xsl:choose>
  688. </allowDuplicates>
  689. </xsl:if>
  690. </content>
  691. </xts:transform>
  692. </response>
  693. </xts:append>
  694. <xsl:choose>
  695. <!-- for runnables and attachments allow the user to browse up to the root -->
  696. <xsl:when test="key('request-param','allowRootBrowsing') = 'true'">
  697. <xsl:choose>
  698. <xsl:when test="$searchPath != '/'">
  699. <xts:replace select="/root/containerInfo/*[local-name()='queryResponse']/*[local-name()='queryReply']/*/*[local-name()='ancestors']">
  700. <ancestors xmlns="http://developer.cognos.com/schemas/xts-cm/1/">
  701. <ancestorInfo>
  702. <searchPath>/</searchPath>
  703. <title>
  704. <xsl:text><xts:string id="IDS_ADDENTRIES_ROOT_TITLE"/></xsl:text>
  705. </title>
  706. </ancestorInfo>
  707. <xts:queryNode select="/root/containerInfo/*[local-name()='queryResponse']/*[local-name()='queryReply']/*/*[local-name()='ancestors']/*"/>
  708. </ancestors>
  709. </xts:replace>
  710. </xsl:when>
  711. <xsl:otherwise>
  712. <xts:delete select="/root/containerInfo/*[local-name()='queryResponse']/*[local-name()='queryReply']/*"/>
  713. <xts:append select="/root/containerInfo/*[local-name()='queryResponse']/*[local-name()='queryReply']">
  714. <root xmlns="http://developer.cognos.com/schemas/xts-cm/1/">
  715. <defaultName type="cm:tokenProp">
  716. <xts:string id="IDS_ADDENTRIES_ROOT_TITLE"/>
  717. </defaultName>
  718. <ancestors type="cm:ancestorInfoArrayProp"/>
  719. </root>
  720. </xts:append>
  721. </xsl:otherwise>
  722. </xsl:choose>
  723. </xsl:when>
  724. <!-- for [portlets, rolapDataSources, tenantMembers] remove the first 2 ancestorInfo objects so the user cannont navigate up past portlet -->
  725. <xsl:when test="key('request-param','addEntriesUI') = 'portlet' or key('request-param','addEntriesUI') = 'rolapDataSources' or key('request-param','addEntriesUI') = 'tenantMembers'">
  726. <xts:delete select="/root/containerInfo/*[local-name()='queryResponse']/*[local-name()='queryReply']/*/*[local-name()='ancestors']/*[position()='1' or position()='2']"/>
  727. </xsl:when>
  728. </xsl:choose>
  729. </xts:sequence>
  730. </xsl:template>
  731. <!-- This template generates the search specs for the nav search -->
  732. <xsl:template name="generateNAVSearchSpec" priority="1">
  733. <xsl:variable name="context">
  734. <xsl:choose>
  735. <xsl:when test="key('env-param','m_navpagercontext') != ''">
  736. <xsl:value-of select="key('env-param','m_navpagercontext')"/>
  737. </xsl:when>
  738. <xsl:otherwise>
  739. <xsl:value-of select="''"/>
  740. </xsl:otherwise>
  741. </xsl:choose>
  742. </xsl:variable>
  743. <xsl:variable name="scope">
  744. <xsl:choose>
  745. <xsl:when test="key('env-param','select_path') != ''">
  746. <xsl:value-of select="key('env-param','select_path')"/>
  747. </xsl:when>
  748. <xsl:otherwise>
  749. <xsl:value-of select="'/content'"/>
  750. </xsl:otherwise>
  751. </xsl:choose>
  752. <xsl:text>[@shown='true']</xsl:text>
  753. </xsl:variable>
  754. <xsl:variable name="search_string" select="key('env-param', 'search_keywords_bas')"/>
  755. <xsl:variable name="search_type_filter" select="key('env-param', 'search_type_index')"/>
  756. <xsl:choose>
  757. <xsl:when test="$search_string != '' ">
  758. <nav:string><xsl:value-of select="$search_string"/></nav:string>
  759. <xsl:if test="$context != '' ">
  760. <nav:context><xsl:value-of select="$context"/></nav:context>
  761. </xsl:if>
  762. <nav:searchType>
  763. <xsl:value-of select="'content'"/>
  764. </nav:searchType>
  765. <nav:scope><xsl:value-of select="$scope"/></nav:scope>
  766. <nav:recursive><xsl:value-of select="'true'"/></nav:recursive>
  767. <nav:match><xsl:value-of select="'contains'"/></nav:match>
  768. <xsl:variable name="item" select="/root/*[local-name()='searchSets']/*[local-name()='searchSet']/*[local-name()='name' and text()=key('request-param','addEntriesUI')]/..//*[local-name()='item']/*[local-name()='itemType' and text()=$search_type_filter]/.."/>
  769. <xsl:variable name="classes" select="$item/*[local-name()='classes']/*[local-name()='class']"/>
  770. <xsl:choose>
  771. <xsl:when test="string($search_type_filter) = 'all' or string($search_type_filter) = ''">
  772. <xsl:variable name="indexedItems" select="/root/*[local-name()='searchSets']/*[local-name()='searchSet']/*[local-name()='name' and text()=key('request-param','addEntriesUI')]/..//*[local-name()='item']"/>
  773. <xsl:variable name="indexedClasses" select="$indexedItems/*[local-name()='classes']/*[local-name()='class']"/>
  774. <xsl:if test="count($indexedClasses) &gt; 0">
  775. <nav:itemTypes>
  776. <xsl:for-each select="$indexedClasses">
  777. <nav:itemType><xsl:value-of select="*[local-name()='name']"/></nav:itemType>
  778. </xsl:for-each>
  779. </nav:itemTypes>
  780. </xsl:if>
  781. </xsl:when>
  782. <xsl:when test="count($classes) &gt; 0">
  783. <nav:itemTypes>
  784. <xsl:for-each select="$item/*[local-name()='classes']/*[local-name()='class']">
  785. <nav:itemType><xsl:value-of select="*[local-name()='name']"/></nav:itemType>
  786. </xsl:for-each>
  787. </nav:itemTypes>
  788. </xsl:when>
  789. </xsl:choose>
  790. <nav:sort>
  791. <xsl:attribute name="order"> <xsl:value-of select="'ascending'"/></xsl:attribute><xsl:attribute name="usage"><xsl:value-of select="'ascending'"/></xsl:attribute>
  792. </nav:sort>
  793. </xsl:when>
  794. </xsl:choose>
  795. </xsl:template>
  796. <!-- This template parses the given string into fragments resembling:
  797. <entries>
  798. <entry>
  799. <namespace-name></namespace-name>
  800. <object-name></object-name>
  801. </entry>
  802. </entries>
  803. -->
  804. <xsl:template name="parse-entries">
  805. <xsl:param name="entries" select="''"/>
  806. <xsl:param name="parsed-entries" select="';'"/>
  807. <xsl:if test="$entries!=''">
  808. <xsl:variable name="before">
  809. <xsl:choose>
  810. <xsl:when test="contains($entries,';')">
  811. <xsl:value-of select="normalize-space(substring-before($entries,';'))"/>
  812. </xsl:when>
  813. <xsl:otherwise>
  814. <xsl:value-of select="normalize-space($entries)"/>
  815. </xsl:otherwise>
  816. </xsl:choose>
  817. </xsl:variable>
  818. <xsl:variable name="after">
  819. <xsl:if test="contains($entries,';')">
  820. <xsl:value-of select="normalize-space(substring-after($entries,';'))"/>
  821. </xsl:if>
  822. </xsl:variable>
  823. <xsl:if test="$before!='' and not(contains($parsed-entries,concat(';',$before,';')))">
  824. <xsl:call-template name="parse-entry">
  825. <xsl:with-param name="entry" select="$before"/>
  826. </xsl:call-template>
  827. </xsl:if>
  828. <xsl:if test="$after!=''">
  829. <xsl:call-template name="parse-entries">
  830. <xsl:with-param name="entries" select="$after"/>
  831. <xsl:with-param name="parsed-entries" select="concat($parsed-entries,$before,';')"/>
  832. </xsl:call-template>
  833. </xsl:if>
  834. </xsl:if>
  835. </xsl:template>
  836. <xsl:template name="parse-entry">
  837. <xsl:param name="entry" select="''"/>
  838. <xsl:if test="$entry!=''">
  839. <xsl:variable name="ns-name">
  840. <xsl:choose>
  841. <xsl:when test="contains($entry,'/')">
  842. <xsl:value-of select="normalize-space(substring-before($entry,'/'))"/>
  843. </xsl:when>
  844. <xsl:otherwise>
  845. <xsl:value-of select="normalize-space($entry)"/>
  846. </xsl:otherwise>
  847. </xsl:choose>
  848. </xsl:variable>
  849. <xsl:variable name="obj-name">
  850. <xsl:if test="contains($entry,'/')">
  851. <xsl:value-of select="normalize-space(substring-after($entry,'/'))"/>
  852. </xsl:if>
  853. </xsl:variable>
  854. <entry>
  855. <namespace-name>
  856. <xsl:value-of select="$ns-name"/>
  857. </namespace-name>
  858. <object-name>
  859. <xsl:value-of select="$obj-name"/>
  860. </object-name>
  861. <xsl:if test="$ns-name!=''">
  862. <xsl:variable name="sq">'</xsl:variable>
  863. <results>
  864. <xts:transform src="transforms/CM/post-process.xslt" processor="XSLT">
  865. <send:request provider="cm" faultBlock="type_query_fault">
  866. <xts:transform src="transforms/CM/pre-process.xslt" processor="XSLT">
  867. <cm:query>
  868. <cm:search>
  869. <xsl:text>/directory/namespace[@name='</xsl:text>
  870. <xsl:value-of select="$ns-name"/>
  871. <xsl:text>']</xsl:text>
  872. <xsl:if test="key('request-param','addEntriesUI')!='packagesAndLocations' and key('request-param','addEntriesUI')!='indexUpdateLocations'">
  873. <xsl:text>[@active='true']</xsl:text>
  874. </xsl:if>
  875. <xsl:if test="$obj-name!=''">
  876. <xsl:text>//*[@defaultName='</xsl:text>
  877. <xsl:value-of select="xtsext:replace(string($obj-name), string($sq), concat($sq,$sq))"/>
  878. <xsl:text>' or @userName='</xsl:text>
  879. <xsl:value-of select="xtsext:replace(string($obj-name), string($sq), concat($sq,$sq))"/>
  880. <xsl:text>']</xsl:text>
  881. </xsl:if>
  882. <xsl:value-of select="$selectable-classes"/>
  883. <xsl:if test="translate( $ns-name, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz' )='cognos'">
  884. <xsl:value-of select="/root/system/param[@name='visible']"/>
  885. </xsl:if>
  886. </cm:search>
  887. <cm:properties>
  888. <aet:properties/>
  889. </cm:properties>
  890. <cm:options>
  891. <aet:refProps/>
  892. </cm:options>
  893. </cm:query>
  894. </xts:transform>
  895. </send:request>
  896. </xts:transform>
  897. </results>
  898. </xsl:if>
  899. </entry>
  900. </xsl:if>
  901. </xsl:template>
  902. </xsl:stylesheet>
  903. </xts:block>
  904. <xts:block id="type_query_fault" type="fault">
  905. <cm:queryResponse xmlns:cm="http://developer.cognos.com/schemas/bibus/3/">
  906. <queryResult xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="SOAP-ENC:Array" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENC:arrayType="cm:baseClass[0]">
  907. </queryResult>
  908. </cm:queryResponse>
  909. </xts:block>
  910. <!--
  911. ===============================================================================================
  912. businessRules - Take care off any business logic to simplify the UI generation
  913. ===============================================================================================
  914. -->
  915. <xts:block
  916. id="businessRules"
  917. nodelist="response, requestParams, env, http, session, credential, cookies, header, user, containerInfo"
  918. type="exec"
  919. processor="XSLT"
  920. dependency="getContent initialBlock"
  921. condition=".[starts-with(/root/requestParams/*[local-name()='param' and @name='requestState'],'navigate') or starts-with(/root/requestParams/*[local-name()='param' and @name='requestState'],'search') or starts-with(/root/requestParams/*[local-name()='param' and @name='requestState'],'type')]"
  922. mandatory="false">
  923. <xts:logicsheet path="logicsheets/portal.xsl"/>
  924. <xsl:stylesheet version="1.0"
  925. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  926. xmlns:req-params="http://developer.cognos.com/schemas/request/params"
  927. xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
  928. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  929. xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
  930. exclude-result-prefixes="xsl req-params xtsext cm">
  931. <xsl:output method="xml" encoding="utf-8" indent="no"/>
  932. <xsl:key name="env-param" match="/root/env/param" use="@name"/>
  933. <xsl:key name="request-param" match="/root/requestParams/*[local-name()='param']" use="@name"/>
  934. <!-- can only be navigate, search or type -->
  935. <xsl:variable name="currentState">
  936. <xsl:choose>
  937. <xsl:when test="contains(key('request-param','requestState'),'|')">
  938. <xsl:value-of select="substring-before(key('request-param','requestState'),'|')"/>
  939. </xsl:when>
  940. <xsl:otherwise>
  941. <xsl:value-of select="key('request-param','requestState')"/>
  942. </xsl:otherwise>
  943. </xsl:choose>
  944. </xsl:variable>
  945. <pf:variables/>
  946. <xsl:template name="setBrowserTitle">
  947. <xsl:param name="navigateTitleWithSuffix"/>
  948. <xsl:param name="navigateTitleWithoutSuffix"/>
  949. <xsl:param name="searchTitleWithSuffix"/>
  950. <xsl:param name="searchTitleWithoutSuffix"/>
  951. <xsl:param name="typeTitleWithSuffix"/>
  952. <xsl:param name="typeTitleWithoutSuffix"/>
  953. <browserTitle>
  954. <xsl:choose>
  955. <xsl:when test="$currentState = 'navigate'">
  956. <xsl:choose>
  957. <xsl:when test="key('request-param','titlePostfix') != ''"><xsl:value-of select="$navigateTitleWithSuffix"/></xsl:when>
  958. <xsl:otherwise><xsl:value-of select="$navigateTitleWithoutSuffix"/></xsl:otherwise>
  959. </xsl:choose>
  960. </xsl:when>
  961. <xsl:when test="$currentState = 'search'">
  962. <xsl:choose>
  963. <xsl:when test="key('request-param','titlePostfix') != ''"><xsl:value-of select="$searchTitleWithSuffix"/></xsl:when>
  964. <xsl:otherwise><xsl:value-of select="$searchTitleWithoutSuffix"/></xsl:otherwise>
  965. </xsl:choose>
  966. </xsl:when>
  967. <xsl:when test="$currentState = 'type'">
  968. <xsl:choose>
  969. <xsl:when test="key('request-param','titlePostfix') != ''"><xsl:value-of select="$typeTitleWithSuffix"/></xsl:when>
  970. <xsl:otherwise><xsl:value-of select="$typeTitleWithoutSuffix"/></xsl:otherwise>
  971. </xsl:choose>
  972. </xsl:when>
  973. <xsl:otherwise></xsl:otherwise>
  974. </xsl:choose>
  975. </browserTitle>
  976. </xsl:template>
  977. <xsl:template match="/">
  978. <xts:sequence>
  979. <!-- if we have selected entries and they haven't been unpacked yet, then unpack them -->
  980. <xsl:choose>
  981. <xsl:when test="not(/root/response) and key('env-param','selectedEntries')!=''">
  982. <xts:append select="/root">
  983. <response>
  984. <selectedEntries>
  985. <xts:transform name="XMLDecode">
  986. <xsl:value-of select="xtsext:web64decode(xtsext:cafaction('sign_unwrap',string(key('env-param','selectedEntries'))), true())"/>
  987. </xts:transform>
  988. </selectedEntries>
  989. </response>
  990. </xts:append>
  991. </xsl:when>
  992. <xsl:when test="not(/root/response/selectedEntries) and key('env-param','selectedEntries')!=''">
  993. <xts:append select="/root/response">
  994. <selectedEntries>
  995. <xts:transform name="XMLDecode">
  996. <xsl:value-of select="xtsext:web64decode(xtsext:cafaction('sign_unwrap',string(key('env-param','selectedEntries'))), true())"/>
  997. </xts:transform>
  998. </selectedEntries>
  999. </xts:append>
  1000. </xsl:when>
  1001. </xsl:choose>
  1002. <xts:append select="/root">
  1003. <businessRules>
  1004. <!-- find out which title and description to display -->
  1005. <xsl:choose>
  1006. <!-- runnables -->
  1007. <xsl:when test="key('request-param','addEntriesUI')='runnables'">
  1008. <xsl:call-template name="setBrowserTitle">
  1009. <xsl:with-param name="navigateTitleWithSuffix">
  1010. <xts:string id="IDS_ADD_RUNNABLES_NAV_TITLE">
  1011. <xts:param name="obj">
  1012. <xsl:value-of select="xtsext:enforceBTD(key('request-param','titlePostfix'), $baseTextDirection, $productLocale, boolean($isBidiEnabled='true'))"/>
  1013. </xts:param>
  1014. </xts:string>
  1015. </xsl:with-param>
  1016. <xsl:with-param name="navigateTitleWithoutSuffix">
  1017. <xts:string id="IDS_ADD_ENTRIES_GENERIC_TITLE"/>
  1018. </xsl:with-param>
  1019. <xsl:with-param name="searchTitleWithSuffix">
  1020. <xts:string id="IDS_ADD_RUNNABLES_SEARCH_TITLE">
  1021. <xts:param name="obj"><xsl:value-of select="key('request-param','titlePostfix')"/></xts:param>
  1022. </xts:string>
  1023. </xsl:with-param>
  1024. <xsl:with-param name="searchTitleWithoutSuffix">
  1025. <xts:string id="IDS_ADD_ENTRIES_GENERIC_TITLE"/>
  1026. </xsl:with-param>
  1027. </xsl:call-template>
  1028. <description>
  1029. <xts:string id="IDS_ADDENTRIES_RUNNABLES_DESCRIPTION"/>
  1030. </description>
  1031. </xsl:when>
  1032. <!-- deployment packages -->
  1033. <xsl:when test="key('request-param','addEntriesUI')='deploymentObjects'">
  1034. <xsl:call-template name="setBrowserTitle">
  1035. <xsl:with-param name="navigateTitleWithSuffix">
  1036. <xts:string id="IDS_ADD_DEPLOYMENTPACKAGES_NAV_TITLE">
  1037. <xts:param name="obj"><xsl:value-of select="key('request-param','titlePostfix')"/></xts:param>
  1038. </xts:string>
  1039. </xsl:with-param>
  1040. <xsl:with-param name="navigateTitleWithoutSuffix">
  1041. <xts:string id="IDS_ADD_ENTRIES_GENERIC_TITLE"/>
  1042. </xsl:with-param>
  1043. <xsl:with-param name="searchTitleWithSuffix">
  1044. <xts:string id="IDS_ADD_DEPLOYMENTPACKAGES_SEARCH_TITLE">
  1045. <xts:param name="obj"><xsl:value-of select="key('request-param','titlePostfix')"/></xts:param>
  1046. </xts:string>
  1047. </xsl:with-param>
  1048. <xsl:with-param name="searchTitleWithoutSuffix">
  1049. <xts:string id="IDS_ADD_ENTRIES_GENERIC_TITLE"/>
  1050. </xsl:with-param>
  1051. </xsl:call-template>
  1052. <description>
  1053. <xts:string id="IDS_ADDENTRIES_DEPLOYMENTPACKAGES_DESCRIPTION"/>
  1054. </description>
  1055. </xsl:when>
  1056. <!-- recipients -->
  1057. <xsl:when test="key('request-param','addEntriesUI')='recipients' or key('request-param','addEntriesUI')='humanTask' or key('request-param','addEntriesUI')='recipients_distribution'">
  1058. <xsl:call-template name="setBrowserTitle">
  1059. <xsl:with-param name="navigateTitleWithSuffix">
  1060. <xts:string id="IDS_ADD_RECIPIENTS_NAV_TITLE">
  1061. <xts:param name="obj">
  1062. <xsl:value-of select="xtsext:enforceBTD(key('request-param','titlePostfix'), $baseTextDirection, $productLocale, boolean($isBidiEnabled='true'))"/>
  1063. </xts:param>
  1064. </xts:string>
  1065. </xsl:with-param>
  1066. <xsl:with-param name="navigateTitleWithoutSuffix">
  1067. <xts:string id="IDS_ADD_RECIPIENTS_NAV_TITLE_PREFIX"/>
  1068. </xsl:with-param>
  1069. <xsl:with-param name="searchTitleWithSuffix">
  1070. <xts:string id="IDS_ADD_RECIPIENTS_SEARCH_TITLE">
  1071. <xts:param name="obj">
  1072. <xsl:value-of select="xtsext:enforceBTD(key('request-param','titlePostfix'), $baseTextDirection, $productLocale, boolean($isBidiEnabled='true'))"/>
  1073. </xts:param>
  1074. </xts:string>
  1075. </xsl:with-param>
  1076. <xsl:with-param name="searchTitleWithoutSuffix">
  1077. <xts:string id="IDS_ADD_RECIPIENTS_SEARCH_TITLE_PREFIX"/>
  1078. </xsl:with-param>
  1079. </xsl:call-template>
  1080. <description>
  1081. <xsl:choose>
  1082. <xsl:when test="key('request-param','addEntriesUI')='recipients_distribution'"><xts:string id="IDS_ADDENTRIES_RECIPIENTS_DISTRIBUTION_DESCRIPTION"/></xsl:when>
  1083. <xsl:when test="key('request-param','addEntriesUI')='humanTask'"><xts:string id="IDS_ADDENTRIES_INBOX_RECIPIENTS_DESCRIPTION"/></xsl:when>
  1084. <xsl:otherwise><xts:string id="IDS_ADDENTRIES_RECIPIENTS_DESCRIPTION"/></xsl:otherwise>
  1085. </xsl:choose>
  1086. </description>
  1087. </xsl:when>
  1088. <!-- members -->
  1089. <xsl:when test="key('request-param','addEntriesUI')='members' or key('request-param','addEntriesUI')='groupMembers' or key('request-param','addEntriesUI')='tenantMembers' or key('request-param','addEntriesUI')='privileges'">
  1090. <xsl:call-template name="setBrowserTitle">
  1091. <xsl:with-param name="navigateTitleWithSuffix">
  1092. <xsl:choose>
  1093. <xsl:when test="key('request-param','addEntriesUI')='tenantMembers'">
  1094. <xts:string id="IDS_ADDENTRIES_TENANTMEMBERS_TITLE">
  1095. <xts:param name="obj">
  1096. <xsl:value-of select="xtsext:enforceBTD(key('request-param','titlePostfix'), $baseTextDirection, $productLocale, boolean($isBidiEnabled='true'))"/>
  1097. </xts:param>
  1098. </xts:string>
  1099. </xsl:when>
  1100. <xsl:otherwise>
  1101. <xts:string id="IDS_ADD_MEMBERS_NAV_TITLE">
  1102. <xts:param name="obj">
  1103. <xsl:value-of select="xtsext:enforceBTD(key('request-param','titlePostfix'), $baseTextDirection, $productLocale, boolean($isBidiEnabled='true'))"/>
  1104. </xts:param>
  1105. </xts:string>
  1106. </xsl:otherwise>
  1107. </xsl:choose>
  1108. </xsl:with-param>
  1109. <xsl:with-param name="navigateTitleWithoutSuffix">
  1110. <xts:string id="IDS_ADD_ENTRIES_GENERIC_TITLE"/>
  1111. </xsl:with-param>
  1112. <xsl:with-param name="searchTitleWithSuffix">
  1113. <xts:string id="IDS_ADD_MEMBERS_SEARCH_TITLE">
  1114. <xts:param name="obj">
  1115. <xsl:value-of select="xtsext:enforceBTD(key('request-param','titlePostfix'), $baseTextDirection, $productLocale, boolean($isBidiEnabled='true'))"/>
  1116. </xts:param>
  1117. </xts:string>
  1118. </xsl:with-param>
  1119. <xsl:with-param name="searchTitleWithoutSuffix">
  1120. <xts:string id="IDS_ADD_ENTRIES_GENERIC_TITLE"/>
  1121. </xsl:with-param>
  1122. <xsl:with-param name="typeTitleWithSuffix">
  1123. <xts:string id="IDS_ADD_MEMBERS_TYPE_TITLE">
  1124. <xts:param name="obj">
  1125. <xsl:value-of select="xtsext:enforceBTD(key('request-param','titlePostfix'), $baseTextDirection, $productLocale, boolean($isBidiEnabled='true'))"/>
  1126. </xts:param>
  1127. </xts:string>
  1128. </xsl:with-param>
  1129. <xsl:with-param name="typeTitleWithoutSuffix">
  1130. <xts:string id="IDS_ADD_ENTRIES_GENERIC_TITLE"/>
  1131. </xsl:with-param>
  1132. </xsl:call-template>
  1133. <description>
  1134. <xsl:choose>
  1135. <xsl:when test="key('request-param','addEntriesUI')='members'">
  1136. <xts:string id="IDS_ADDENTRIES_MEMBERS_DESCRIPTION"/>
  1137. </xsl:when>
  1138. <xsl:when test="key('request-param','addEntriesUI')='tenantMembers'">
  1139. <xts:string id="IDS_ADDENTRIES_TENANTMEMBERS_DESCRIPTION"/>
  1140. </xsl:when>
  1141. <xsl:when test="key('request-param','addEntriesUI')='groupMembers'">
  1142. <xts:string id="IDS_ADDENTRIES_GROUPMEMBERS_DESCRIPTION"/>
  1143. </xsl:when>
  1144. <xsl:when test="key('request-param','addEntriesUI')='privileges'">
  1145. <xts:string id="IDS_ADDENTRIES_PRIVILEGES_DESCRIPTION"/>
  1146. </xsl:when>
  1147. </xsl:choose>
  1148. </description>
  1149. </xsl:when>
  1150. <!-- pagelets -->
  1151. <xsl:when test="key('request-param','addEntriesUI')='mypages'">
  1152. <xsl:call-template name="setBrowserTitle">
  1153. <xsl:with-param name="navigateTitleWithSuffix">
  1154. <xts:string id="IDS_ADD_MYPAGES_NAV_TITLE">
  1155. <xts:param name="obj">
  1156. <xsl:value-of select="xtsext:enforceBTD(key('request-param','titlePostfix'), $baseTextDirection, $productLocale, boolean($isBidiEnabled='true'))"/>
  1157. </xts:param>
  1158. </xts:string>
  1159. </xsl:with-param>
  1160. <xsl:with-param name="navigateTitleWithoutSuffix">
  1161. <xts:string id="IDS_ADD_MYPAGES_NAV_TITLE_PREFIX"/>
  1162. </xsl:with-param>
  1163. <xsl:with-param name="searchTitleWithSuffix">
  1164. <xts:string id="IDS_ADD_MYPAGES_SEARCH_TITLE">
  1165. <xts:param name="obj"><xsl:value-of select="key('request-param','titlePostfix')"/></xts:param>
  1166. </xts:string>
  1167. </xsl:with-param>
  1168. <xsl:with-param name="searchTitleWithoutSuffix">
  1169. <xts:string id="IDS_ADD_MYPAGES_SEARCH_TITLE_PREFIX"/>
  1170. </xsl:with-param>
  1171. </xsl:call-template>
  1172. <description>
  1173. <xts:string id="IDS_ADDENTRIES_MYPAGES_DESCRIPTION"/>
  1174. </description>
  1175. </xsl:when>
  1176. <!-- potlets -->
  1177. <xsl:when test="key('request-param','addEntriesUI')='portlet'">
  1178. <xsl:call-template name="setBrowserTitle">
  1179. <xsl:with-param name="navigateTitleWithSuffix">
  1180. <xts:string id="IDS_MP_ADD_PORTLETS_NAVIGATE">
  1181. <xts:param name="obj"><xsl:value-of select="key('request-param','titlePostfix')"/></xts:param>
  1182. </xts:string>
  1183. </xsl:with-param>
  1184. <xsl:with-param name="navigateTitleWithoutSuffix">
  1185. <xts:string id="IDS_MP_ADD_PORTLETS_NAVIGATE_PREFIX"/>
  1186. </xsl:with-param>
  1187. <xsl:with-param name="searchTitleWithSuffix">
  1188. <xts:string id="IDS_MP_ADD_PORTLETS_SEARCH">
  1189. <xts:param name="obj"><xsl:value-of select="key('request-param','titlePostfix')"/></xts:param>
  1190. </xts:string>
  1191. </xsl:with-param>
  1192. <xsl:with-param name="searchTitleWithoutSuffix">
  1193. <xts:string id="IDS_MP_ADD_PORTLETS_SEARCH_PREFIX"/>
  1194. </xsl:with-param>
  1195. </xsl:call-template>
  1196. <description>
  1197. <xts:string id="IDS_MP_ADD_PORTLETS_INTRO"/>
  1198. </description>
  1199. </xsl:when>
  1200. <!-- links -->
  1201. <xsl:when test="key('request-param','addEntriesUI')='links'">
  1202. <xsl:call-template name="setBrowserTitle">
  1203. <xsl:with-param name="navigateTitleWithSuffix">
  1204. <xts:string id="IDS_ADD_ATTACHMENTS_NAV_TITLE">
  1205. <xts:param name="obj"><xsl:value-of select="key('request-param','titlePostfix')"/></xts:param>
  1206. </xts:string>
  1207. </xsl:with-param>
  1208. <xsl:with-param name="navigateTitleWithoutSuffix">
  1209. <xts:string id="IDS_ADD_ATTACHMENTS_NAV_TITLE_PREFIX"/>
  1210. </xsl:with-param>
  1211. <xsl:with-param name="searchTitleWithSuffix">
  1212. <xts:string id="IDS_ADD_ATTACHMENTS_SEARCH_TITLE">
  1213. <xts:param name="obj"><xsl:value-of select="key('request-param','titlePostfix')"/></xts:param>
  1214. </xts:string>
  1215. </xsl:with-param>
  1216. <xsl:with-param name="searchTitleWithoutSuffix">
  1217. <xts:string id="IDS_ADD_ATTACHMENTS_SEARCH_TITLE_PREFIX"/>
  1218. </xsl:with-param>
  1219. </xsl:call-template>
  1220. <description>
  1221. <xts:string id="IDS_ADDENTRIES_LINKS_DESCRIPTION"/>
  1222. </description>
  1223. </xsl:when>
  1224. <xsl:when test="key('request-param','addEntriesUI')='packagesAndLocations' or key('request-param','addEntriesUI')='indexUpdateLocations' or key('request-param','addEntriesUI')='packagesAndFolders'">
  1225. <xsl:call-template name="setBrowserTitle">
  1226. <xsl:with-param name="navigateTitleWithSuffix">
  1227. <xts:string id="IDS_ADDENTRIES_TITLE_PACKAGES_LOCATIONS">
  1228. <xts:param name="obj"><xsl:value-of select="key('request-param','titlePostfix')"/></xts:param>
  1229. </xts:string>
  1230. </xsl:with-param>
  1231. <xsl:with-param name="navigateTitleWithoutSuffix">
  1232. <xts:string id="IDS_ADD_ENTRIES_GENERIC_TITLE"/>
  1233. </xsl:with-param>
  1234. <xsl:with-param name="searchTitleWithSuffix">
  1235. <xts:string id="IDS_ADDENTRIES_TITLE_PACKAGES_LOCATIONS">
  1236. <xts:param name="obj"><xsl:value-of select="key('request-param','titlePostfix')"/></xts:param>
  1237. </xts:string>
  1238. </xsl:with-param>
  1239. <xsl:with-param name="searchTitleWithoutSuffix">
  1240. <xts:string id="IDS_ADD_ENTRIES_GENERIC_TITLE"/>
  1241. </xsl:with-param>
  1242. <xsl:with-param name="typeTitleWithSuffix">
  1243. <xts:string id="IDS_ADDENTRIES_TITLE_PACKAGES_LOCATIONS">
  1244. <xts:param name="obj"><xsl:value-of select="key('request-param','titlePostfix')"/></xts:param>
  1245. </xts:string>
  1246. </xsl:with-param>
  1247. <xsl:with-param name="typeTitleWithoutSuffix">
  1248. <xts:string id="IDS_ADD_ENTRIES_GENERIC_TITLE"/>
  1249. </xsl:with-param>
  1250. </xsl:call-template>
  1251. <description>
  1252. <xsl:choose>
  1253. <xsl:when test="key('request-param','addEntriesUI')='packagesAndFolders'">
  1254. <xts:string id="IDS_ADDENTRIES_INDEX_UPDATE_TASK_DESCRIPTION"/>
  1255. </xsl:when>
  1256. <xsl:otherwise>
  1257. <xts:string id="IDS_ADDENTRIES_PACKAGES_LOCATIONS_DESCRIPTION"/>
  1258. </xsl:otherwise>
  1259. </xsl:choose>
  1260. </description>
  1261. </xsl:when>
  1262. <xsl:when test="key('request-param','addEntriesUI')='publicFoldersPackagesAndFolders'">
  1263. <xsl:call-template name="setBrowserTitle">
  1264. <xsl:with-param name="navigateTitleWithSuffix">
  1265. <xts:string id="IDS_ADDENTRIES_PLUBLICFOLDERS_PACKAGES_FOLDERS">
  1266. <xts:param name="obj"><xsl:value-of select="key('request-param','titlePostfix')"/></xts:param>
  1267. </xts:string>
  1268. </xsl:with-param>
  1269. <xsl:with-param name="navigateTitleWithoutSuffix">
  1270. <xts:string id="IDS_ADD_ENTRIES_GENERIC_TITLE"/>
  1271. </xsl:with-param>
  1272. <xsl:with-param name="searchTitleWithSuffix">
  1273. <xts:string id="IDS_ADDENTRIES_PLUBLICFOLDERS_PACKAGES_FOLDERS">
  1274. <xts:param name="obj"><xsl:value-of select="key('request-param','titlePostfix')"/></xts:param>
  1275. </xts:string>
  1276. </xsl:with-param>
  1277. <xsl:with-param name="searchTitleWithoutSuffix">
  1278. <xts:string id="IDS_ADD_ENTRIES_GENERIC_TITLE"/>
  1279. </xsl:with-param>
  1280. </xsl:call-template>
  1281. <description>
  1282. <xts:string id="IDS_ADDENTRIES_PUBLICFOLDERS_PACKAGES_FOLDERS_DESCRIPTION"/>
  1283. </description>
  1284. </xsl:when>
  1285. <xsl:when test="key('request-param','addEntriesUI')='rolapDataSources'">
  1286. <xsl:call-template name="setBrowserTitle">
  1287. <xsl:with-param name="navigateTitleWithSuffix">
  1288. <xts:string id="IDS_ADDENTRIES_ROLAP_DATA_SOURCE">
  1289. <xts:param name="obj"><xsl:value-of select="key('request-param','titlePostfix')"/></xts:param>
  1290. </xts:string>
  1291. </xsl:with-param>
  1292. <xsl:with-param name="navigateTitleWithoutSuffix">
  1293. <xts:string id="IDS_ADD_ENTRIES_GENERIC_TITLE"/>
  1294. </xsl:with-param>
  1295. <xsl:with-param name="searchTitleWithSuffix">
  1296. <xts:string id="IDS_ADDENTRIES_ROLAP_DATA_SOURCE">
  1297. <xts:param name="obj"><xsl:value-of select="key('request-param','titlePostfix')"/></xts:param>
  1298. </xts:string>
  1299. </xsl:with-param>
  1300. <xsl:with-param name="searchTitleWithoutSuffix">
  1301. <xts:string id="IDS_ADD_ENTRIES_GENERIC_TITLE"/>
  1302. </xsl:with-param>
  1303. </xsl:call-template>
  1304. <description>
  1305. <xts:string id="IDS_ADDENTRIES_ROLAP_DATA_SOURCE_DESCRIPTION"/>
  1306. </description>
  1307. </xsl:when>
  1308. <xsl:when test="key('request-param','addEntriesUI')='jmxProxyHostDispatchers'">
  1309. <xsl:call-template name="setBrowserTitle">
  1310. <xsl:with-param name="navigateTitleWithSuffix">
  1311. <xts:string id="IDS_ADDENTRIES_JMX_PROXY_HOST_DISPATCHERS">
  1312. <xts:param name="obj"><xsl:value-of select="key('request-param','titlePostfix')"/></xts:param>
  1313. </xts:string>
  1314. </xsl:with-param>
  1315. <xsl:with-param name="navigateTitleWithoutSuffix">
  1316. <xts:string id="IDS_ADD_ENTRIES_GENERIC_TITLE"/>
  1317. </xsl:with-param>
  1318. <xsl:with-param name="searchTitleWithSuffix">
  1319. <xts:string id="IDS_ADDENTRIES_JMX_PROXY_HOST_DISPATCHERS">
  1320. <xts:param name="obj"><xsl:value-of select="key('request-param','titlePostfix')"/></xts:param>
  1321. </xts:string>
  1322. </xsl:with-param>
  1323. <xsl:with-param name="searchTitleWithoutSuffix">
  1324. <xts:string id="IDS_ADD_ENTRIES_GENERIC_TITLE"/>
  1325. </xsl:with-param>
  1326. </xsl:call-template>
  1327. <description>
  1328. <xts:string id="IDS_ADDENTRIES_JMX_PROXY_HOST_DISPATCHERS_DESCRIPTION"/>
  1329. </description>
  1330. </xsl:when>
  1331. </xsl:choose>
  1332. <xsl:if test="$currentState = 'search'">
  1333. <!--<xsl:variable name="nsSearchPath" select="/root/containerInfo/cm:queryResponse/cm:queryReply/cm:namespace/cm:searchPath"/>-->
  1334. <xsl:variable name="inside3rdPartyNamespace">
  1335. <xsl:variable name="nsObj" select="/root/containerInfo/cm:queryResponse/cm:queryReply/*"/>
  1336. <xsl:variable name="insideCognosNamespace" select="(starts-with($nsObj/cm:searchPath, &quot;CAMID(&apos;:&quot;) or starts-with($nsObj/cm:searchPath, 'CAMID(&quot;:'))"/>
  1337. <xsl:value-of select="($nsObj/cm:objectClass='namespace' or $nsObj/cm:ancestors/cm:ancestorInfo/cm:objectClass='namespace') and not($insideCognosNamespace)"/>
  1338. </xsl:variable>
  1339. <xsl:if test="$inside3rdPartyNamespace = 'true'">
  1340. <queryNamespaceSearchDefaultMethodOptionSetting>true</queryNamespaceSearchDefaultMethodOptionSetting>
  1341. </xsl:if>
  1342. </xsl:if>
  1343. </businessRules>
  1344. </xts:append>
  1345. <xts:delete select="/root/env/param[@name='pagerfromnavpager' or @name='pagertonavpager' or @name='pagerfrom_dnavpager' or @name='pagerto_dnavpager' or @name='pagerfromlistpager' or @name='pagertolistpager' or @name='pagerfrom_dlistpager' or @name='pagerto_dlistpager']"/>
  1346. <!-- if we performed an action -->
  1347. <xsl:if test="contains(key('request-param','requestState'),'|')">
  1348. <!-- delete the old selectedEntries web64encoded list -->
  1349. <xts:delete select="/root/env/param[@name='selectedEntries']"/>
  1350. <!-- recreate the selectedEntries web64encoded list -->
  1351. <xts:append select="/root/env">
  1352. <xts:transform src="portal/controls/create_web64_param.xslt" processor="XSLT">
  1353. <param name="selectedEntries">
  1354. <passport><xsl:value-of select="$passport"/></passport>
  1355. <markup>
  1356. <xts:transform name="XMLEncode">
  1357. <xts:queryNode select="/root/*[local-name()='response']/*[local-name()='selectedEntries']/*"/>
  1358. </xts:transform>
  1359. </markup>
  1360. </param>
  1361. </xts:transform>
  1362. </xts:append>
  1363. <xts:replace select="/root/requestParams/*[local-name()='param' and @name='requestState']">
  1364. <req-params:param name="requestState">
  1365. <xsl:value-of select="$currentState"/>
  1366. </req-params:param>
  1367. </xts:replace>
  1368. <xts:replace select="/root/*[local-name()='env']/*[local-name()='param' and @name='controller_state']">
  1369. <param name="controller_state">
  1370. <xsl:value-of select="xtsext:substringBeforeLast(string(key('env-param','controller_state')),'|')"/>
  1371. </param>
  1372. </xts:replace>
  1373. </xsl:if>
  1374. </xts:sequence>
  1375. </xsl:template>
  1376. </xsl:stylesheet>
  1377. </xts:block>
  1378. <!--
  1379. ===============================================================================================
  1380. getObjects - get object class names
  1381. ===============================================================================================
  1382. -->
  1383. <xts:block id="classNames" type="exec" mode="input" processor="XML" path="/portal/uiExtensions.xml" dependency="initialBlock businessRules" condition=".[/root/requestParams/*[local-name()='param' and @name='requestState' and (. = 'navigate' or . = 'search' or . = 'type')]]" mandatory="false">
  1384. <xts:logicsheet path="/logicsheets/uiobjects/uiobjects_names.xslt"/>
  1385. </xts:block>
  1386. <!--
  1387. ===============================================================================================
  1388. genMarkup -
  1389. ===============================================================================================
  1390. -->
  1391. <xts:block id="genMarkup"
  1392. type="exec"
  1393. processor="XSLT"
  1394. dependency="getSearchSet initialBlock businessRules classNames"
  1395. condition=".[/root/requestParams/*[local-name()='param' and @name='requestState' and (. = 'navigate' or . = 'search' or . = 'type')]]"
  1396. mandatory="false">
  1397. <!-- logicsheets -->
  1398. <!-- portal specific information -->
  1399. <xts:logicsheet path="logicsheets/portal.xsl"/>
  1400. <!-- Dialog specific logicsheets -->
  1401. <xts:logicsheet path="portal/addEntries/logicsheets/add_entries_templates.xsl"/>
  1402. <xts:logicsheet path="logicsheets/presentation/dialog/controller-templates.xsl"/>
  1403. <xts:logicsheet path="logicsheets/presentation/dialog/framework.xsl"/>
  1404. <xts:logicsheet path="logicsheets/presentation/layout.xsl"/>
  1405. <xts:logicsheet path="logicsheets/presentation/dialog/presentation.xsl"/>
  1406. <xts:logicsheet path="portal/addEntries/logicsheets/pagers.xsl"/>
  1407. <!-- Generic logicsheets -->
  1408. <xts:logicsheet path="logicsheets/presentation/controls/framework.xsl"/>
  1409. <xts:logicsheet path="logicsheets/presentation/controls/presentation.xsl"/>
  1410. <xts:logicsheet path="logicsheets/presentation/main/presentation.xsl"/>
  1411. <xts:logicsheet path="logicsheets/validation.xslt"/>
  1412. <xts:logicsheet path="logicsheets/presentation/touch_up.xslt"/>
  1413. <xsl:stylesheet version="1.0"
  1414. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  1415. xmlns:xts="http://developer.cognos.com/schemas/xts/"
  1416. xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
  1417. xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
  1418. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  1419. xmlns:lyt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/layout/"
  1420. xmlns:dp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/presentation/"
  1421. xmlns:df="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/framework/"
  1422. xmlns:cf="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/framework/"
  1423. xmlns:xos="http://developer.cognos.com/schemas/xts/output/"
  1424. xmlns:cp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/presentation/"
  1425. xmlns:dlgctrl="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/controller-templates/"
  1426. xmlns:aet="http://developer.cognos.com/schemas/xts/portal/addEntries/logicsheets/add_entries_templates/"
  1427. xmlns:aep="http://developer.cognos.com/schemas/xts/portal/addEntries/logicsheets/pagers/"
  1428. xmlns:mt="http://developer.cognos.com/schemas/xts/logicsheets/presentation/main/mt"
  1429. exclude-result-prefixes="xts xsl cm pf xtsext lyt dp df cf cp xos dlgctrl aep aet mt ">
  1430. <xsl:output method="xml" encoding="utf-8" indent="no"/>
  1431. <xsl:key name="business-rules" match="/root/businessRules/*" use="local-name()"/>
  1432. <xsl:key name="request-param" match="/root/requestParams/*[local-name()='param']" use="@name"/>
  1433. <pf:variables/>
  1434. <!-- Bidi common templates -->
  1435. <pf:common-bidi-templates/>
  1436. <pf:gen-icon/>
  1437. <aet:variables/>
  1438. <cp:flyoutControl/>
  1439. <xsl:variable name="agentStudio" select="key('request-param','agentStudio') = 'true'"/>
  1440. <mt:actions mode="portlets"/>
  1441. <xsl:variable name="current_path">
  1442. <xsl:choose>
  1443. <xsl:when test="key('env-param','select_path') != ''">
  1444. <xsl:value-of select="key('env-param','select_path')"/>
  1445. </xsl:when>
  1446. <xsl:when test="/root/containerInfo/cm:queryResponse/cm:queryReply/*/cm:searchPath != ''">
  1447. <xsl:value-of select="/root/containerInfo/cm:queryResponse/cm:queryReply/*/cm:searchPath"/>
  1448. </xsl:when>
  1449. <xsl:otherwise>
  1450. <xsl:value-of select="key('request-param','defaultSearchPath')"/>
  1451. </xsl:otherwise>
  1452. </xsl:choose>
  1453. </xsl:variable>
  1454. <xsl:variable name="inIndexableFolder" select="contains(' content ', concat(' ', /root/containerInfo/cm:queryResponse/cm:queryReply/*/cm:objectClass,' ')) or count(/root/containerInfo/cm:queryResponse/cm:queryReply/*/cm:ancestors/cm:ancestorInfo[contains(' content account ', concat(' ',cm:objectClass,' '))]) != 0"/>
  1455. <xsl:variable name="uiModeAllowsBurgandySearch" select="key('request-param', 'addEntriesUI')='runnables' or key('request-param', 'addEntriesUI')='links' or key('request-param', 'addEntriesUI')='mypages'"/>
  1456. <xsl:variable name="allowedBurgandySearch" select="$userCanUseIndexSearch and $uiModeAllowsBurgandySearch and $inIndexableFolder"/>
  1457. <xsl:variable name="objectClass" select="/root/containerInfo/cm:queryResponse/cm:queryReply/*/cm:objectClass"/>
  1458. <xsl:variable name="insideCognosNamespace" select="(starts-with($current_path, &quot;CAMID(&apos;:&quot;) or starts-with($current_path, 'CAMID(&quot;:'))"/>
  1459. <xsl:variable name="inside3rdPartyNamespace" select="($objectClass='namespace' or /root/containerInfo/cm:queryResponse/cm:queryReply/*/cm:ancestors/cm:ancestorInfo/cm:objectClass='namespace') and not($insideCognosNamespace)"/>
  1460. <xsl:variable name="canBrowse3rdPartyNamespace" select="not(/root/system/param[@name='enable-3rdparty-namespace-browsing']='false')"/>
  1461. <xsl:template match="/root">
  1462. <xts:sequence>
  1463. <xts:append select="/root/output">
  1464. <xos:part>
  1465. <xos:entityHeader>
  1466. <xos:param name="Content-Type">text/xml; charset=utf-8</xos:param>
  1467. </xos:entityHeader>
  1468. <xos:entityBody>
  1469. <xsl:element name="{key('request-param','resultNode')}" namespace="">
  1470. <markup>
  1471. <xts:transform name="XMLEncode">
  1472. <div role="region" aria-labelledby="add_entries_title_span add_entries_title_span_ext">
  1473. <span id="add_entries_title_span" style="position: absolute;margin-left: -9999px; margin-top: -9999px; " aria-hidden="true"><xsl:value-of select="xtsext:htmlencode(key('business-rules','browserTitle'))"/></span>
  1474. <span id="add_entries_title_span_ext" style="position: absolute;margin-left: -9999px; margin-top: -9999px; " aria-hidden="true"><xts:string id="IDS_MULTIPLE_SELECTION_DIALOG" encode="html"/></span>
  1475. <a href="#maincontent" tabindex="0" class="showOnFocus"><xts:string id="IDS_SECTION508_JUMPTOMAIN"/></a>
  1476. <!-- adds standard hidden inputs and javascript -->
  1477. <dlgctrl:markupHelper/>
  1478. <dp:header div="div">
  1479. <dp:title>
  1480. <xsl:value-of select="key('business-rules','browserTitle')"/>
  1481. </dp:title>
  1482. <dp:description>
  1483. <xsl:value-of select="key('business-rules','description')"/>
  1484. </dp:description>
  1485. <dp:close>
  1486. <a href="#">
  1487. <xsl:attribute name="onclick">
  1488. <xsl:if test="key('request-param','isPopup')='true'">document.pform.target='_parent';</xsl:if>
  1489. controller_changeState('canceled'); controller_submitForm('cancel');
  1490. </xsl:attribute>
  1491. <dp:closeMarker/>
  1492. </a>
  1493. </dp:close>
  1494. <dp:headerLinks>
  1495. <xsl:choose>
  1496. <!-- navigate, search and type links in the header -->
  1497. <xsl:when test="key('request-param','requestState') = 'navigate'">
  1498. <xsl:if test="key('request-param','typeDialog')='true'">
  1499. <dp:headerLink>
  1500. <dp:hl_attribute name="href">#</dp:hl_attribute>
  1501. <dp:hl_attribute name="class">class=&quot;dialogHeaderLink&quot;</dp:hl_attribute>
  1502. <dp:hl_attribute name="onclick">controller_changeState(&apos;type&apos;); controller_submitForm(&apos;default&apos;);</dp:hl_attribute>
  1503. <dp:hl_attribute name="label"><xts:string id="IDS_ADD_RECIPIENTS_TYPE_LINK"/></dp:hl_attribute>
  1504. </dp:headerLink>
  1505. </xsl:if>
  1506. <xsl:choose>
  1507. <xsl:when test="( key('env-param','select_path') and key('env-param','select_path')!='/directory' and key('env-param','select_path')!='/' ) or ( not(key('env-param','select_path')) and key('request-param','defaultSearchPath')!='/' and key('request-param','defaultSearchPath')!='/directory')">
  1508. <dp:headerLink>
  1509. <dp:hl_attribute name="href">#</dp:hl_attribute>
  1510. <dp:hl_attribute name="class">class=&quot;dialogHeaderLink&quot;</dp:hl_attribute>
  1511. <dp:hl_attribute name="onclick">javascript:clearPagerVariables();controller_changeState(&apos;search&apos;); controller_submitForm(&apos;default&apos;);</dp:hl_attribute>
  1512. <dp:hl_attribute name="label"><xts:string id="IDS_ADD_RECIPIENTS_SEARCH_LINK"/></dp:hl_attribute>
  1513. </dp:headerLink>
  1514. </xsl:when>
  1515. <xsl:otherwise>
  1516. <dp:headerLinkInactive>
  1517. <dp:inactiveHRef><xts:string id="IDS_ADD_RECIPIENTS_SEARCH_LINK"/></dp:inactiveHRef>
  1518. </dp:headerLinkInactive>
  1519. </xsl:otherwise>
  1520. </xsl:choose>
  1521. </xsl:when>
  1522. <xsl:when test="key('request-param','requestState') = 'search'">
  1523. <xsl:if test="key('request-param','typeDialog')='true'">
  1524. <dp:headerLink>
  1525. <dp:hl_attribute name="class">class=&quot;dialogHeaderLink&quot;</dp:hl_attribute>
  1526. <dp:hl_attribute name="href">#</dp:hl_attribute>
  1527. <dp:hl_attribute name="onclick">controller_changeState(&apos;type&apos;); controller_submitForm(&apos;default&apos;);</dp:hl_attribute>
  1528. <dp:hl_attribute name="label"><xts:string id="IDS_ADD_RECIPIENTS_TYPE_LINK"/></dp:hl_attribute>
  1529. </dp:headerLink>
  1530. </xsl:if>
  1531. <xsl:if test="not($inside3rdPartyNamespace) or $canBrowse3rdPartyNamespace">
  1532. <dp:headerLink>
  1533. <dp:hl_attribute name="class">class=&quot;dialogHeaderLink&quot;</dp:hl_attribute>
  1534. <dp:hl_attribute name="href">#</dp:hl_attribute>
  1535. <dp:hl_attribute name="onclick">javascript:clearPagerVariables();controller_changeState(&apos;navigate&apos;); controller_submitForm(&apos;default&apos;);</dp:hl_attribute>
  1536. <dp:hl_attribute name="label"><xts:string id="IDS_ADD_RECIPIENTS_NAVIGATE_LINK"/></dp:hl_attribute>
  1537. </dp:headerLink>
  1538. </xsl:if>
  1539. </xsl:when>
  1540. <xsl:when test="key('request-param','requestState') = 'type'">
  1541. <xsl:if test="not($inside3rdPartyNamespace) or $canBrowse3rdPartyNamespace">
  1542. <dp:headerLink>
  1543. <dp:hl_attribute name="class">class=&quot;dialogHeaderLink&quot;</dp:hl_attribute>
  1544. <dp:hl_attribute name="href">#</dp:hl_attribute>
  1545. <dp:hl_attribute name="onclick">controller_changeState(&apos;navigate&apos;); controller_submitForm(&apos;default&apos;);</dp:hl_attribute>
  1546. <dp:hl_attribute name="label"><xts:string id="IDS_ADD_RECIPIENTS_NAVIGATE_LINK"/></dp:hl_attribute>
  1547. </dp:headerLink>
  1548. </xsl:if>
  1549. <xsl:choose>
  1550. <xsl:when test="(key('env-param','select_path')='/directory' and key('env-param','select_path')!='/') or not(key('env-param','select_path'))">
  1551. <dp:headerLinkInactive>
  1552. <dp:inactiveHRef><xts:string id="IDS_ADD_RECIPIENTS_SEARCH_LINK"/></dp:inactiveHRef>
  1553. </dp:headerLinkInactive>
  1554. </xsl:when>
  1555. <xsl:otherwise>
  1556. <dp:headerLink>
  1557. <dp:hl_attribute name="class">class=&quot;dialogHeaderLink&quot;</dp:hl_attribute>
  1558. <dp:hl_attribute name="href">#</dp:hl_attribute>
  1559. <dp:hl_attribute name="onclick">controller_changeState(&apos;search&apos;); controller_submitForm(&apos;default&apos;);</dp:hl_attribute>
  1560. <dp:hl_attribute name="label"><xts:string id="IDS_ADD_RECIPIENTS_SEARCH_LINK"/></dp:hl_attribute>
  1561. </dp:headerLink>
  1562. </xsl:otherwise>
  1563. </xsl:choose>
  1564. </xsl:when>
  1565. </xsl:choose>
  1566. </dp:headerLinks>
  1567. <dp:useDIVS>
  1568. <xsl:choose>
  1569. <xsl:when test="$agentStudio">
  1570. <xsl:text>false</xsl:text>
  1571. </xsl:when>
  1572. <xsl:otherwise>
  1573. <xsl:text>true</xsl:text>
  1574. </xsl:otherwise>
  1575. </xsl:choose>
  1576. </dp:useDIVS>
  1577. </dp:header>
  1578. <pf:help context=""/>
  1579. <input type="hidden" name="select_path">
  1580. <xsl:attribute name="value">
  1581. <xsl:choose>
  1582. <xsl:when test="key('env-param','select_path') != ''"><xsl:value-of select="key('env-param','select_path')"/></xsl:when>
  1583. <xsl:otherwise><xsl:value-of select="key('request-param','defaultSearchPath')"/></xsl:otherwise>
  1584. </xsl:choose>
  1585. </xsl:attribute>
  1586. </input>
  1587. <input type="hidden" name="selectedEntries" value="{key('env-param','selectedEntries')}"/>
  1588. <input type="hidden" name="ps_nav_op" value=""/>
  1589. <xsl:if test="/root/env/param[@name='m_pagerfromnavpager']">
  1590. <input name="m_navpagersection" type="hidden" value="{key('env-param','m_navpagersection')}"/>
  1591. <input name="m_listpagersection" type="hidden" value="{key('env-param','m_listpagersection')}"/>
  1592. <input name="m_pagerfromnavpager" type="hidden" value="{key('env-param','m_pagerfromnavpager')}"/>
  1593. <input name="m_pagertonavpager" type="hidden" value="{key('env-param','m_pagertonavpager')}"/>
  1594. <input name="m_pagerfromlistpager" type="hidden" value="{key('env-param','m_pagerfromlistpager')}"/>
  1595. <input name="m_pagertolistpager" type="hidden" value="{key('env-param','m_pagertolistpager')}"/>
  1596. <input name="m_pg_elistpager" type="hidden" value="{key('env-param','m_pg_elistpager')}"/>
  1597. <input name="m_pg_enavpager" type="hidden" value="{key('env-param','m_pg_enavpager')}"/>
  1598. <!-- Nav -->
  1599. <input name="m_navpagercontext" type="hidden" value="{key('env-param','m_navpagercontext')}"/>
  1600. <!-- To track search change so we can delete 'm_pager' values -->
  1601. <input type="hidden" name="m_navpagerSearchChange" value="false"/>
  1602. </xsl:if>
  1603. <xsl:variable name="search_find"> <!-- {basic | index} search -->
  1604. <xsl:choose>
  1605. <xsl:when test="string(key('env-param', 'search_find')) != ''">
  1606. <xsl:value-of select="string(key('env-param','search_find'))"/>
  1607. </xsl:when>
  1608. <xsl:when test="$allowedBurgandySearch"><xsl:value-of select="'b'"/></xsl:when>
  1609. <xsl:otherwise>
  1610. <!-- user initiates index search but has no capability - switch to basic search mode -->
  1611. <xsl:value-of select="'none'"/>
  1612. </xsl:otherwise>
  1613. </xsl:choose>
  1614. </xsl:variable>
  1615. <xsl:variable name="passport">
  1616. <xsl:value-of select="/root/credential/param[@name='CAM']/*[local-name() ='CAM']/*[local-name() = 'CAMPassport']/*[local-name() = 'id']"/>
  1617. </xsl:variable>
  1618. <script language="javascript">
  1619. var cafContextId = "<xsl:text/>
  1620. <xsl:if test="$passport != '' and string(key('env-param','ui.compid')) != ''">
  1621. <xsl:value-of select="xtsext:cafaction(concat('get_contextid_setcomponent_',concat(key('env-param', 'ui.compid'),concat('_settemplatename_addentries_setpassportid_', $passport))), '')"/>
  1622. </xsl:if>
  1623. <xsl:text/>";
  1624. if ( window.external &amp;&amp; window.external.HasSetCAFContextId ) {
  1625. window.external.SetCAFContextId(cafContextId);
  1626. }
  1627. function validate()
  1628. {
  1629. var frm = document.pform;
  1630. for (var i=0; i &lt; frm.elements.length; i++)
  1631. {
  1632. if (frm.elements[i].name == 'nav_checkbox' &amp;&amp; frm.elements[i].checked)
  1633. {
  1634. alert('<xts:string id="IDS_ADDENTRIES_SELECTED_ERROR" encode="javascript"/>');
  1635. return false;
  1636. }
  1637. }
  1638. return true;
  1639. }
  1640. function init()
  1641. {
  1642. <xsl:if test="key('request-param','requestState') = 'search' ">
  1643. var smode = '<xsl:value-of select="xtsext:javascriptencode(string($search_find))"/>';
  1644. toggleSearchMode(smode);
  1645. </xsl:if>
  1646. <xsl:if test="key('request-param','isPopup')='true'">
  1647. if (parent.show_div) {
  1648. parent.show_div('makeModalDiv');
  1649. }
  1650. if (parent.show_iFrame) {
  1651. parent.show_iFrame('addEntriesFrame');
  1652. }
  1653. </xsl:if>
  1654. <!-- if we're in the type tab then set the focus to the textarea -->
  1655. <xsl:if test="key('request-param','requestState') = 'type'">
  1656. if (document.pform.type_entries)
  1657. {
  1658. document.pform.type_entries.focus();
  1659. }
  1660. </xsl:if>
  1661. <xsl:if test="$baseTextDirection = 'auto'">
  1662. if (isBidiEnabled &amp;&amp; typeof document.pform.search_keywords_bas != "undefined")
  1663. {
  1664. document.pform.search_keywords_bas.dir = bidi.resolveStrBtd(document.pform.search_keywords_bas.value);
  1665. }
  1666. </xsl:if>
  1667. return;
  1668. }
  1669. function showUsers()
  1670. {
  1671. var frm = document.pform;
  1672. var entrySelected = false;
  1673. for (var i=0; i &lt; frm.elements.length; i++)
  1674. {
  1675. if (frm.elements[i].name == 'nav_checkbox' &amp;&amp; frm.elements[i].checked)
  1676. {
  1677. entrySelected = true;
  1678. break;
  1679. }
  1680. }
  1681. if (entrySelected &amp;&amp; window.confirm("<xts:string id='IDS_ADDENTRIES_SELECTED_SHOW_USERS' encode="javascript"/>"))
  1682. {
  1683. <xsl:choose>
  1684. <xsl:when test="key('request-param','addEntriesUI')='recipients' or key('request-param','addEntriesUI')='humanTask'">
  1685. controller_changeState('<xsl:value-of select="key('request-param','requestState')"/>|add_to');
  1686. </xsl:when>
  1687. <xsl:otherwise>
  1688. controller_changeState('<xsl:value-of select="key('request-param','requestState')"/>|add');
  1689. </xsl:otherwise>
  1690. </xsl:choose>
  1691. }
  1692. controller_submitForm('default');
  1693. }
  1694. function clearPagerVariables()
  1695. {
  1696. var frm = document.pform;
  1697. if (frm.m_pagerfromnavpager) {
  1698. frm.m_pagerfromnavpager.value="";
  1699. }
  1700. if (frm.m_pagertonavpager) {
  1701. frm.m_pagertonavpager.value="";
  1702. }
  1703. if (frm.m_navpagersection) {
  1704. frm.m_navpagersection.value="";
  1705. }
  1706. if (frm.m_listpagersection) {
  1707. frm.m_listpagersection.value="";
  1708. }
  1709. if (frm.m_pagerfromlistpager) {
  1710. frm.m_pagerfromlistpager.value="";
  1711. }
  1712. if (frm.m_pagertolistpager) {
  1713. frm.m_pagertolistpager.value="";
  1714. }
  1715. if (frm.m_pg_elistpager){
  1716. frm.m_pg_elistpager.value="";
  1717. }
  1718. if (frm.m_pg_enavpager){
  1719. frm.m_pg_enavpager.value="";
  1720. }
  1721. if (frm.m_navpagersection) {
  1722. frm.m_navpagersection.value="";
  1723. }
  1724. }
  1725. </script>
  1726. <!-- body -->
  1727. <lyt:layout style="1">
  1728. <lyt:section>
  1729. <div>
  1730. <dp:box valign="top" width="100%">
  1731. <!-- what's the maximum number of entries the navigate pager should show -->
  1732. <xsl:variable name="maxNavPagerObjs">
  1733. <xsl:choose>
  1734. <xsl:when test="string(/root/env/param[@name = 'm_pagertonavpager']) !='' and string(/root/env/param[@name = 'm_pagerfromnavpager']) !=''">
  1735. <xsl:value-of select="(/root/env/param[@name = 'm_pagertonavpager'] - /root/env/param[@name = 'm_pagerfromnavpager'])+1"/>
  1736. </xsl:when>
  1737. <xsl:when test="/root/*[local-name()='session']/*[local-name()='param'][@name='linesPerPage']!=''">
  1738. <xsl:value-of select="/root/*[local-name()='session']/*[local-name()='param'][@name='linesPerPage']"/>
  1739. </xsl:when>
  1740. <xsl:otherwise>
  1741. <xsl:value-of select="/root/*[local-name()='system']/*[local-name()='param'][@name='defaultPortalPreferences']/pref[@name='lines']"/>
  1742. </xsl:otherwise>
  1743. </xsl:choose>
  1744. </xsl:variable>
  1745. <!-- number of items in the cm response -->
  1746. <xsl:variable name="responseCount" select="count(/root/*[local-name()='response']/*[local-name()='content']/cm:queryResponse/cm:queryReply[position()='2']/*)"/>
  1747. <!-- how many items are currently being shown -->
  1748. <xsl:variable name="responseDisplayCount">
  1749. <xsl:choose>
  1750. <xsl:when test="$responseCount &gt; $maxNavPagerObjs">
  1751. <xsl:value-of select="$maxNavPagerObjs"/>
  1752. </xsl:when>
  1753. <xsl:otherwise>
  1754. <xsl:value-of select="$responseCount"/>
  1755. </xsl:otherwise>
  1756. </xsl:choose>
  1757. </xsl:variable>
  1758. <!-- what's the maximum number of entries the added entries paged can show -->
  1759. <xsl:variable name="maxListPagerObjs">
  1760. <xsl:choose>
  1761. <xsl:when test="string(/root/env/param[@name = 'm_pagertolistpager']) !='' and string(/root/env/param[@name = 'm_pagerfromlistpager']) !=''">
  1762. <xsl:value-of select="(/root/env/param[@name = 'm_pagertolistpager'] - /root/env/param[@name = 'm_pagerfromlistpager']) + 1"/>
  1763. </xsl:when>
  1764. <xsl:when test="/root/*[local-name()='session']/*[local-name()='param'][@name='linesPerPage']!=''">
  1765. <xsl:value-of select="/root/*[local-name()='session']/*[local-name()='param'][@name='linesPerPage']"/>
  1766. </xsl:when>
  1767. <xsl:otherwise>
  1768. <xsl:value-of select="/root/*[local-name()='system']/*[local-name()='param'][@name='defaultPortalPreferences']/pref[@name='lines']"/>
  1769. </xsl:otherwise>
  1770. </xsl:choose>
  1771. </xsl:variable>
  1772. <!-- number of added entries -->
  1773. <xsl:variable name="selectedCount" select="count(/root/*[local-name()='response']/*[local-name()='selectedEntries']/*)"/>
  1774. <!-- calculate how many objects are being displayed in the right pager -->
  1775. <xsl:variable name="addedDisplayCount">
  1776. <xsl:choose>
  1777. <xsl:when test="$selectedCount &lt; $maxListPagerObjs">
  1778. <xsl:value-of select="$selectedCount"/>
  1779. </xsl:when>
  1780. <xsl:when test="not(key('env-param','m_listpagersection') &gt; 1)">
  1781. <xsl:value-of select="$maxListPagerObjs"/>
  1782. </xsl:when>
  1783. <xsl:when test="($selectedCount - key('env-param','m_listpagersection')) &gt; $maxListPagerObjs">
  1784. <xsl:value-of select="$maxListPagerObjs"/>
  1785. </xsl:when>
  1786. <xsl:otherwise>
  1787. <xsl:value-of select="($selectedCount - key('env-param','m_listpagersection'))"/>
  1788. </xsl:otherwise>
  1789. </xsl:choose>
  1790. </xsl:variable>
  1791. <!-- left side of the page -->
  1792. <dp:boxSection width="40%" valign="top" wrap="wrap">
  1793. <div tabindex="-1" role="group">
  1794. <xsl:attribute name="aria-label">
  1795. <xts:string id="IDS_ADDENTRIES_AVAILABLE_ENTRIES"/>
  1796. </xsl:attribute>
  1797. <dp:division title="IDS_ADDENTRIES_AVAILABLE_ENTRIES"/>
  1798. <xsl:if test="key('request-param','requestState') = 'navigate' or key('request-param','requestState') = 'search'">
  1799. <!-- Must cast key('session-param','e_hp') into a string to give the correct result since we are comparing two node values.-->
  1800. <xsl:variable name="isPersonalFoldersRoot" select="$current_path = '~' or string(key('session-param','e_hp')) = $current_path"/>
  1801. <!-- Specify start path and title when we do not want to show the navigation path starting at the root of the ancestors tree. -->
  1802. <xsl:variable name="start-at-path">
  1803. <xsl:if test="starts-with($current_path, key('session-param', 'e_hp')) or (starts-with($current_path, '~'))">
  1804. <xsl:value-of select="key('session-param', 'e_hp')"/>
  1805. </xsl:if>
  1806. </xsl:variable>
  1807. <xsl:variable name="start-at-path-title">
  1808. <xsl:if test="starts-with($current_path, key('session-param', 'e_hp')) or (starts-with($current_path, '~'))">
  1809. <xsl:text>
  1810. <xts:string id="IDS_ADDENTRIES_ROOT_TITLE"/>
  1811. </xsl:text>
  1812. </xsl:if>
  1813. </xsl:variable>
  1814. <div>
  1815. <cf:do-the-path-link>
  1816. <cf:param name="familytree">*[local-name()='containerInfo']/cm:queryResponse/cm:queryReply/*/cm:ancestors</cf:param>
  1817. <cf:param name="familymember">*[local-name()='containerInfo']/cm:queryResponse/cm:queryReply/*/cm:defaultName</cf:param>
  1818. <cf:param name="isRootPath">
  1819. <xsl:value-of select="$isPersonalFoldersRoot"/>
  1820. </cf:param>
  1821. <cf:param name="home">
  1822. <xsl:value-of select="$start-at-path"/>
  1823. </cf:param>
  1824. <cf:param name="home-title">
  1825. <xsl:value-of select="$start-at-path-title"/>
  1826. </cf:param>
  1827. <cf:param name="anchorpath">
  1828. <xsl:choose>
  1829. <xsl:when test="$home-title!='' and (string(position())=$start-position or position() = 1)">
  1830. <xsl:variable name="encodedPath" select="xtsext:javascriptencode(string('/'))"/>
  1831. <a href="#" onClick="document.pform.select_path.value = '{$encodedPath}'; document.pform.m_navpagersection.value = '1'; controller_changeState('navigate'); controller_submitForm('default');">
  1832. <xsl:if test="$isBidiEnabled = 'true'">
  1833. <xsl:attribute name="dir">
  1834. <xsl:value-of select="xtsext:getBTD($home-title, $baseTextDirection, $productLocale)"/>
  1835. </xsl:attribute>
  1836. </xsl:if>
  1837. <xsl:value-of select="$home-title"/>
  1838. </a>
  1839. </xsl:when>
  1840. <xsl:otherwise>
  1841. <xsl:variable name="encodedPath" select="xtsext:javascriptencode(string(cm:searchPath))"/>
  1842. <a href="#" onClick="document.pform.select_path.value = '{$encodedPath}'; document.pform.m_navpagersection.value = '1'; controller_changeState('navigate'); controller_submitForm('default');">
  1843. <xsl:if test="$isBidiEnabled = 'true'">
  1844. <xsl:attribute name="dir">
  1845. <xsl:value-of select="xtsext:getBTD(cm:title, $baseTextDirection, $productLocale)"/>
  1846. </xsl:attribute>
  1847. </xsl:if>
  1848. <xsl:value-of select="cm:title"/>
  1849. </a>
  1850. </xsl:otherwise>
  1851. </xsl:choose>
  1852. </cf:param>
  1853. </cf:do-the-path-link>
  1854. </div>
  1855. </xsl:if>
  1856. <xsl:choose>
  1857. <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx NAVIGATExxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->
  1858. <xsl:when test="key('request-param','requestState') = 'navigate'">
  1859. <!-- keep track of the search specific fields -->
  1860. <input type="hidden" name="search_method" value="{key('env-param','search_method')}"/>
  1861. <input type="hidden" name="search_scope" value="{key('env-param','search_scope')}"/>
  1862. <input type="hidden" name="search_type" value="{key('env-param','search_type')}"/>
  1863. <input type="hidden" name="search_find" value="{key('env-param','search_find')}"/>
  1864. <input type="hidden" name="search_modified" value="{key('env-param','search_modified')}"/>
  1865. <input type="hidden" name="search_type_index" value="{key('env-param','search_type_index')}"/>
  1866. <!-- show users checkbox -->
  1867. <xsl:choose>
  1868. <xsl:when test="key('request-param','showUsers') = 'true' and key('system-param', 'enable-show-users-support')!='false'">
  1869. <dp:choice>
  1870. <dp:section1>
  1871. <input type="checkbox" id="addentries_showusers" name="addentries_showusers" value="true" onclick="showUsers()">
  1872. <xsl:if test="key('env-param','addentries_showusers')!=''">
  1873. <xsl:attribute name="checked">checked</xsl:attribute>
  1874. </xsl:if>
  1875. </input>
  1876. </dp:section1>
  1877. <dp:section2>
  1878. <label for="addentries_showusers">
  1879. <xts:string id="IDS_ADDENTRIES_NAVIGATE_SHOWUSERS"/>
  1880. </label>
  1881. </dp:section2>
  1882. </dp:choice>
  1883. </xsl:when>
  1884. <xsl:otherwise>
  1885. <!-- if the right pager has more then 25 entries, then the remove action will also show up over
  1886. the pager. Add a spacer to make sure the middle buttons still align with the top of the pager -->
  1887. <xsl:if test="$addedDisplayCount &gt; 25">
  1888. <table border="0" cellspacing="0" cellpadding="0" role="presentation">
  1889. <tr>
  1890. <td class="formLink">&#160;</td>
  1891. </tr>
  1892. </table>
  1893. </xsl:if>
  1894. </xsl:otherwise>
  1895. </xsl:choose>
  1896. </xsl:when>
  1897. <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx SEARCH xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->
  1898. <!-- search -->
  1899. <xsl:when test="key('request-param','requestState') = 'search'">
  1900. <!-- keep track of form fields specific to the other add entries dialogs -->
  1901. <input type="hidden" name="addentries_showusers" value="{key('env-param','addentries_showusers')}"/>
  1902. <script language="javascript" src="{$webcontent}/{$app}/js/CCflyoutMenu.js"></script>
  1903. <script language="javascript">
  1904. function search()
  1905. {
  1906. var frm = document.pform;
  1907. if (frm.m_navpagerSearchChange) {
  1908. frm.m_navpagerSearchChange.value = 'true';
  1909. }
  1910. <xsl:if test="$allowedBurgandySearch">
  1911. if (frm.search_find.value == 'b' || frm.search_find.value == 'none' || frm.search_find.value=='')
  1912. {
  1913. frm.search_keywords.value = frm.search_keywords_bas.value
  1914. }
  1915. </xsl:if>
  1916. controller_submitForm('default');
  1917. setTimeout('document.images["imgSearch"].src="<xsl:value-of select="xtsext:javascriptencode(string($image_root))"/>action_search_ani.gif"',1);
  1918. }
  1919. function searchKeyHandler()
  1920. {
  1921. var Key;
  1922. if (window.event)
  1923. {
  1924. Key = window.event.keyCode;
  1925. if (Key==13)
  1926. {
  1927. search();
  1928. }
  1929. }
  1930. }
  1931. <!-- Toggle search mode -->
  1932. function toggleSearchMode(smode)
  1933. {
  1934. var allowedBurgandySearch = <xsl:value-of select="$allowedBurgandySearch"/>;
  1935. var searchOptions_index = document.getElementById('searchOptions_index');
  1936. var searchOptions_basic = document.getElementById('searchOptions_basic');
  1937. if (!allowedBurgandySearch) {
  1938. searchOptions_basic.style.display = '';
  1939. } else {
  1940. if (smode != 'b' &amp;&amp; smode != 'none') {
  1941. searchOptions_basic.style.display = "";
  1942. searchOptions_index.style.display = 'none';
  1943. } else {
  1944. searchOptions_index.style.display = '';
  1945. searchOptions_basic.style.display = 'none';
  1946. }
  1947. }
  1948. }
  1949. <!-- +++++++++++++ Set Flyout Caption Functions ++++++++++++++ -->
  1950. function setFindTextIn(selected_value, caption)
  1951. {
  1952. var findTextInMenu_caption = document.getElementById("findTextInMenu_caption");
  1953. if (findTextInMenu_caption) {
  1954. findTextInMenu_caption.innerHTML = caption;
  1955. }
  1956. var obj = document.getElementById('search_find');
  1957. if (obj) {
  1958. obj.value = selected_value;
  1959. }
  1960. toggleSearchMode(selected_value);
  1961. }
  1962. function setSearchMethod(selected_value,caption)
  1963. {
  1964. var searchMethodMenu_caption = document.getElementById("searchMethodMenu_caption");
  1965. if( searchMethodMenu_caption ) {
  1966. searchMethodMenu_caption.innerHTML = caption;
  1967. }
  1968. var obj = document.getElementById('search_method');
  1969. if (obj) {
  1970. obj.value = selected_value;
  1971. }
  1972. }
  1973. function setSearchModified(selected_value,caption)
  1974. {
  1975. var searchModifiedMenu_caption = document.getElementById("searchModifiedMenu_caption");
  1976. if( searchModifiedMenu_caption ) {
  1977. searchModifiedMenu_caption.innerHTML = caption;
  1978. }
  1979. var obj = document.getElementById('search_modified');
  1980. if (obj) {
  1981. obj.value = selected_value;
  1982. }
  1983. }
  1984. function setSearchType(selected_value,caption)
  1985. {
  1986. var searchTypeMenu_caption = document.getElementById("searchTypeMenu_caption");
  1987. if( searchTypeMenu_caption ) {
  1988. searchTypeMenu_caption.innerHTML = caption;
  1989. }
  1990. var obj = document.getElementById('search_type');
  1991. if (obj) {
  1992. obj.value = selected_value;
  1993. }
  1994. }
  1995. function setSearchIndexType(selected_value,caption)
  1996. {
  1997. var searchTypeMenu_caption = document.getElementById("searchIndexTypeMenu_caption");
  1998. if( searchTypeMenu_caption ) {
  1999. searchTypeMenu_caption.innerHTML = caption;
  2000. }
  2001. var obj = document.getElementById('search_type_index');
  2002. if (obj) {
  2003. obj.value = selected_value;
  2004. }
  2005. }
  2006. function setSearchScope(selected_value,caption)
  2007. {
  2008. var searchScopeMenu_caption = document.getElementById("searchScopeMenu_caption");
  2009. if( searchScopeMenu_caption ) {
  2010. searchScopeMenu_caption.innerHTML = caption;
  2011. }
  2012. var obj = document.getElementById('search_scope');
  2013. if (obj) {
  2014. obj.value = selected_value;
  2015. }
  2016. }
  2017. </script>
  2018. <!-- search_find will now determine the which search to use: burgandy or basic search -->
  2019. <xsl:variable name="findTextInMenu">
  2020. <flyout id="findTextInMenu">
  2021. <items>
  2022. <itemGroup id="findTextInMenuGroup">
  2023. <xsl:if test="$allowedBurgandySearch">
  2024. <item id="findTextInMenu_b">
  2025. <xsl:if test="$search_find='b' or $search_find='none'">
  2026. <xsl:attribute name="itemSelectedState">checked</xsl:attribute>
  2027. </xsl:if>
  2028. <text>
  2029. <xts:string id="IDS_KEYWORD"/>
  2030. </text>
  2031. <action>
  2032. CCPopupMenu.activeMenu.setMenuItemChecked("findTextInMenu_b");setFindTextIn('b','<xts:string id="IDS_KEYWORD" encode="javascript"/>');
  2033. </action>
  2034. </item>
  2035. </xsl:if>
  2036. <item id="findTextInMenu_n">
  2037. <xsl:if test="$search_find='n' or (not($allowedBurgandySearch) and $search_find='none')">
  2038. <xsl:attribute name="itemSelectedState">checked</xsl:attribute>
  2039. </xsl:if>
  2040. <text>
  2041. <xts:string id="IDS_NAME_FIELD"/>
  2042. </text>
  2043. <action>
  2044. CCPopupMenu.activeMenu.setMenuItemChecked("findTextInMenu_n");setFindTextIn('n','<xts:string id="IDS_NAME_FIELD" encode="javascript"/>');
  2045. </action>
  2046. </item>
  2047. <item id="findTextInMenu_d">
  2048. <xsl:if test="$search_find='d'">
  2049. <xsl:attribute name="itemSelectedState">checked</xsl:attribute>
  2050. </xsl:if>
  2051. <text>
  2052. <xts:string id="IDS_DESC_FIELD"/>
  2053. </text>
  2054. <action>
  2055. CCPopupMenu.activeMenu.setMenuItemChecked("findTextInMenu_d");setFindTextIn('d','<xts:string id="IDS_DESC_FIELD" encode="javascript"/>');
  2056. </action>
  2057. </item>
  2058. <item id="findTextInMenu_nd">
  2059. <xsl:if test="$search_find='nd'">
  2060. <xsl:attribute name="itemSelectedState">checked</xsl:attribute>
  2061. </xsl:if>
  2062. <text>
  2063. <xts:string id="IDS_NAME_DESC_FIELD"/>
  2064. </text>
  2065. <action>
  2066. CCPopupMenu.activeMenu.setMenuItemChecked("findTextInMenu_nd");setFindTextIn('nd','<xts:string id="IDS_NAME_DESC_FIELD" encode="javascript"/>');
  2067. </action>
  2068. </item>
  2069. </itemGroup>
  2070. </items>
  2071. </flyout>
  2072. </xsl:variable>
  2073. <dp:list>
  2074. <dp:section>
  2075. <div>
  2076. <dp:list>
  2077. <dp:section valign="middle">
  2078. <dp:label valign="top" width="1%" nospace="true">
  2079. <label id="find_text_in_label">
  2080. <xts:string id="IDS_ADDENTRIES_SEARCH_FIND_TXT_IN"/>
  2081. </label>
  2082. </dp:label>
  2083. <dp:link wrap="wrap" valign="top">
  2084. <input id="search_find" name="search_find" type="hidden" value="{$search_find}"/>
  2085. <div id="findTextInMenu_span" style="margin-left:5px;z-index:10;position: relative;">
  2086. <a href="#" onclick="return CCPopupMenu.dropDown(event,0,0,'findTextInMenu');" role="button" aria-haspopup="true">
  2087. <div style="white-space: nowrap;" aria-labelledby="find_text_in_label">
  2088. <span id="findTextInMenu_caption" style="vertical-align: top;">
  2089. <xsl:choose>
  2090. <xsl:when test="$allowedBurgandySearch and ($search_find = 'b' or $search_find='none')">
  2091. <xts:string id="IDS_KEYWORD"/>
  2092. </xsl:when>
  2093. <xsl:when test="$search_find='n' or (not($allowedBurgandySearch) and $search_find='none')">
  2094. <xts:string id="IDS_NAME_FIELD"/>
  2095. </xsl:when>
  2096. <xsl:when test="$search_find = 'd'">
  2097. <xts:string id="IDS_DESC_FIELD"/>
  2098. </xsl:when>
  2099. <xsl:when test="$search_find = 'nd'">
  2100. <xts:string id="IDS_NAME_DESC_FIELD"/>
  2101. </xsl:when>
  2102. </xsl:choose>
  2103. </span>
  2104. <span style="vertical-align: middle;">
  2105. <img name="findTextInMenu_imgFlyControl" src="{$skin_shared_images}dropdown_arrow.gif" title="" alt="" border="0"/>
  2106. </span>
  2107. </div>
  2108. </a>
  2109. </div>
  2110. </dp:link>
  2111. <xsl:call-template name="renderPopup">
  2112. <xsl:with-param name="flyoutXML">
  2113. <xsl:copy-of select="$findTextInMenu"/>
  2114. </xsl:with-param>
  2115. <xsl:with-param name="controlID">findTextInMenu_span</xsl:with-param>
  2116. </xsl:call-template>
  2117. </dp:section>
  2118. </dp:list>
  2119. </div>
  2120. </dp:section>
  2121. <dp:section>
  2122. <div>
  2123. <table border="0" width="100%" cellpadding="0" cellspacing="0">
  2124. <tr>
  2125. <td>
  2126. <xsl:variable name="keywords" select="key('env-param','search_keywords_bas')"/>
  2127. <input aria-labelledby="find_text_in_label findTextInMenu_caption search_keywords_bas" type="text" size="45" name="search_keywords_bas" id="search_keywords_bas" onkeypress="return searchKeyHandler(event);" style="margin-right:2px;" value="{$keywords}">
  2128. <xsl:call-template name="add-bidi-onfocus-event">
  2129. <xsl:with-param name="value" select="$keywords"/>
  2130. </xsl:call-template>
  2131. </input>
  2132. <xsl:if test="$allowedBurgandySearch">
  2133. <input type="hidden" name="search_keywords" value=""/>
  2134. </xsl:if>
  2135. </td>
  2136. <dp:button>
  2137. <dp:defaultAct>search();</dp:defaultAct>
  2138. <a href="javascript:search()">
  2139. <dp:buttonText>
  2140. <xts:string id="IDS_SEARCH_BUTTON"/>
  2141. </dp:buttonText>
  2142. <dp:buttonImage name="imgSearch" dp:tooltip="IDS_SEARCH_BUTTON">{$image_root}action_search.gif</dp:buttonImage>
  2143. </a>
  2144. </dp:button>
  2145. <td>
  2146. <cf:dynamicExpandingSectionTop indent="no" name="b_search" title="IDS_ADV_SEARCH_OPTIONS" expanding="yes" border="no"/>
  2147. </td>
  2148. </tr>
  2149. <tr>
  2150. <td colspan="4">
  2151. <!-- Advanced options - flyout -->
  2152. <cf:dynamicExpandingSectionBody name="b_search" title="IDS_ADV_SEARCH_OPTIONS" expanding="yes" border="no">
  2153. <table width="100%">
  2154. <tr>
  2155. <!-- <dp:groupItem><img height="1" width="10" src="{'{$webcontent}'}/images/space.gif" alt=""/></dp:groupItem>-->
  2156. <td width="100%" class="sectionBackground">
  2157. <xsl:if test="$allowedBurgandySearch">
  2158. <div id="searchOptions_index">
  2159. <aet:searchOptionsIndex/>
  2160. </div>
  2161. </xsl:if>
  2162. <!-- Basic search options -->
  2163. <div id="searchOptions_basic">
  2164. <xsl:choose>
  2165. <!-- Disable the modified search when inside a third party namespace -->
  2166. <xsl:when test="(starts-with(key('env-param','select_path'), 'CAMID')) and not((starts-with(key('env-param','select_path'), &quot;CAMID(&apos;:&quot;) or starts-with(key('env-param','select_path'), 'CAMID(&quot;:')))">
  2167. <aet:searchOptionsBasic modified="no"/>
  2168. </xsl:when>
  2169. <xsl:otherwise>
  2170. <aet:searchOptionsBasic/>
  2171. </xsl:otherwise>
  2172. </xsl:choose>
  2173. </div>
  2174. </td>
  2175. </tr>
  2176. </table>
  2177. </cf:dynamicExpandingSectionBody>
  2178. </td>
  2179. </tr>
  2180. </table>
  2181. </div>
  2182. </dp:section>
  2183. </dp:list>
  2184. </xsl:when>
  2185. <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx TYPE xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->
  2186. <!-- type -->
  2187. <xsl:when test="key('request-param','requestState') = 'type'">
  2188. <!-- keep track of form fields specific to the other add entries dialogs -->
  2189. <input type="hidden" name="addentries_showusers" value="{key('env-param','addentries_showuser')}"/>
  2190. <!-- keep track of the search specific fields -->
  2191. <input type="hidden" name="search_method" value="{key('env-param','search_method')}"/>
  2192. <input type="hidden" name="search_scope" value="{key('env-param','search_scope')}"/>
  2193. <input type="hidden" name="search_type" value="{key('env-param','search_type')}"/>
  2194. <dp:list>
  2195. <dp:section>
  2196. <dp:label id="lbl_type_entries">
  2197. <xts:string id="IDS_ADD_MEMBERS_TYPE_NAMES"/>
  2198. </dp:label>
  2199. </dp:section>
  2200. <dp:section>
  2201. <dp:text wrap="wrap" tdClass="dialogHeaderText">
  2202. <span id="desc_type_entries">
  2203. <xts:string id="IDS_ADD_MEMBERS_TYPE_HINT"/>
  2204. </span>
  2205. </dp:text>
  2206. </dp:section>
  2207. <dp:section>
  2208. <textarea name="type_entries" cols="80" rows="10" style="width:100%" aria-labelledby="lbl_type_entries" aria-describedby="desc_type_entries">
  2209. <xsl:choose>
  2210. <!-- if we have a invalid_typed_entries element, then we just performed an add operation.
  2211. Make sure we display any entries that aren't valid -->
  2212. <xsl:when test="/root/response/*[local-name()='invalid_typed_entries']">
  2213. <xsl:value-of select="/root/response/*[local-name()='invalid_typed_entries']"/>
  2214. </xsl:when>
  2215. <!-- we didn't perform an add operation, so make sure we keep track of any entries that
  2216. the user type before the page got reloaded -->
  2217. <xsl:otherwise>
  2218. <xsl:value-of select="key('env-param','type_entries')"/>
  2219. </xsl:otherwise>
  2220. </xsl:choose>
  2221. </textarea>
  2222. </dp:section>
  2223. </dp:list>
  2224. </xsl:when>
  2225. </xsl:choose>
  2226. <!-- if the right pager has more then 25 entries, then the remove action will also show up over
  2227. the pager. Add a spacer to make sure the middle buttons still align with the top of the pager -->
  2228. <xsl:choose>
  2229. <xsl:when test="key('request-param','requestState') = 'type'">
  2230. <!-- todo -->
  2231. </xsl:when>
  2232. <xsl:otherwise>
  2233. <script language="javascript" src="{$webcontent}/{$app}/js/list.js"></script>
  2234. <a>
  2235. <xsl:attribute name="name">
  2236. <xts:string id="IDS_ADDENTRIES_AVAILABLE_ENTRIES"/>
  2237. </xsl:attribute>
  2238. </a>
  2239. <aep:navigatePager/>
  2240. </xsl:otherwise>
  2241. </xsl:choose>
  2242. </div>
  2243. </dp:boxSection>
  2244. <!-- middle buttons -->
  2245. <dp:boxSection width="10%" align="center" valign="top">
  2246. <xsl:attribute name="height">
  2247. <xsl:choose>
  2248. <xsl:when test="$browser='safari'">
  2249. <!--
  2250. The Safari browser has a known problem with height="100%"
  2251. when we set the height to anything less than the height of the box, safari will grab the box height
  2252. -->
  2253. <xsl:text>1</xsl:text>
  2254. </xsl:when>
  2255. <xsl:otherwise>
  2256. <xsl:text>100%</xsl:text>
  2257. </xsl:otherwise>
  2258. </xsl:choose>
  2259. </xsl:attribute>
  2260. <!-- if the right pager has more then 25 entries, then the remove action will also show up over
  2261. the pager. Add a spacer to make sure the middle buttons still align with the top of the pager -->
  2262. <xsl:if test="$addedDisplayCount &gt; 25">
  2263. <dp:label class="formLink">&#160;</dp:label>
  2264. </xsl:if>
  2265. <table border="0" cellspacing="0" cellpadding="1" height="100%" role="presentation">
  2266. <tr>
  2267. <td valign="top">
  2268. <img height="34" width="1" src="{$webcontent}/images/space.gif" alt=""/>
  2269. </td>
  2270. </tr>
  2271. <tr>
  2272. <td valign="top">
  2273. <xsl:if test="$addedDisplayCount &lt; 26 and $responseDisplayCount &lt; 26">
  2274. <xsl:attribute name="height">100%</xsl:attribute>
  2275. </xsl:if>
  2276. <a>
  2277. <xsl:attribute name="name">
  2278. <xts:string id="IDS_ADDENTRIES_ACTIONS"/>
  2279. </xsl:attribute>
  2280. </a>
  2281. <xsl:call-template name="middleButtons"/>
  2282. </td>
  2283. </tr>
  2284. <xsl:if test="$addedDisplayCount &gt; 25 or $responseDisplayCount &gt; 25">
  2285. <tr>
  2286. <td height="100%" valign="bottom" nowrap="nowrap">
  2287. <xsl:call-template name="middleButtons"/>
  2288. <xsl:choose>
  2289. <xsl:when test="$addedDisplayCount &gt;= $responseDisplayCount">
  2290. <img height="44" width="1" src="{$webcontent}/images/space.gif" alt=""/>
  2291. <dp:label class="formLink">&#160;</dp:label>
  2292. </xsl:when>
  2293. <xsl:otherwise>
  2294. <img height="22" width="1" src="{$webcontent}/images/space.gif" alt=""/>
  2295. </xsl:otherwise>
  2296. </xsl:choose>
  2297. </td>
  2298. </tr>
  2299. </xsl:if>
  2300. </table>
  2301. </dp:boxSection>
  2302. <!-- right side of the page -->
  2303. <dp:boxSection width="40%" valign="top" height="100%">
  2304. <div role="group" tabindex="-1">
  2305. <xsl:attribute name="aria-label">
  2306. <xts:string id="IDS_ADDENTRIES_SELECTED_ENTRIES"/>
  2307. </xsl:attribute>
  2308. <dp:division title="IDS_ADDENTRIES_SELECTED_ENTRIES"/>
  2309. <a>
  2310. <xsl:attribute name="name">
  2311. <xts:string id="IDS_ADDENTRIES_SELECTED_ENTRIES"/>
  2312. </xsl:attribute>
  2313. </a>
  2314. <aep:selectedEntriesPager/>
  2315. </div>
  2316. </dp:boxSection>
  2317. </dp:box>
  2318. </div>
  2319. </lyt:section>
  2320. </lyt:layout>
  2321. <!-- footer -->
  2322. <xsl:choose>
  2323. <xsl:when test="key('request-param','displayButtons') != 'false'">
  2324. <dp:footer div="div">
  2325. <xsl:choose>
  2326. <xsl:when test="key('request-param','inWizard') = 'true'">
  2327. <dlgctrl:wizardButtons validateFunction="validate"/>
  2328. </xsl:when>
  2329. <xsl:otherwise>
  2330. <dlgctrl:okCancelButtons validateFunction="validate"/>
  2331. </xsl:otherwise>
  2332. </xsl:choose>
  2333. <dp:useDIVS>
  2334. <xsl:choose>
  2335. <xsl:when test="$agentStudio">
  2336. <xsl:text>false</xsl:text>
  2337. </xsl:when>
  2338. <xsl:otherwise>
  2339. <xsl:text>true</xsl:text>
  2340. </xsl:otherwise>
  2341. </xsl:choose>
  2342. </dp:useDIVS>
  2343. </dp:footer>
  2344. </xsl:when>
  2345. <xsl:otherwise>
  2346. <dp:emptyFooter div="div"/>
  2347. </xsl:otherwise>
  2348. </xsl:choose>
  2349. <!-- if the user tried to add a duplicate entry -->
  2350. <xsl:if test="/root/response/*[local-name()='duplicateEntry'] = 'true'">
  2351. <script language="javascript">
  2352. alert("<xts:string id="IDS_ADDENTRIES_DUPLICATE_WARNING" encode="javascript"/>");
  2353. </script>
  2354. </xsl:if>
  2355. <xsl:if test="/root/response/*[local-name()='invalid_typed_entries'] != ''">
  2356. <script language="javascript">
  2357. alert("<xts:string id="IDS_ERR_0002_INVALID_ENTRIES" encode="javascript"/>" + " <xsl:value-of select="xtsext:javascriptencode(string(/root/response/*[local-name()='invalid_typed_entries']))"/>");
  2358. </script>
  2359. </xsl:if>
  2360. </div>
  2361. </xts:transform>
  2362. </markup>
  2363. <browserTitle>
  2364. <xsl:if test="key('business-rules','browserTitle') != ''">
  2365. <xts:transform name="XMLEncode">
  2366. <xsl:value-of select="key('business-rules','browserTitle')"/>
  2367. </xts:transform>
  2368. </xsl:if>
  2369. </browserTitle>
  2370. <isPopup>
  2371. <xsl:value-of select="key('request-param','isPopup')"/>
  2372. </isPopup>
  2373. </xsl:element>
  2374. </xos:entityBody>
  2375. </xos:part>
  2376. </xts:append>
  2377. </xts:sequence>
  2378. </xsl:template>
  2379. <xsl:template name="middleButtons">
  2380. <xsl:choose>
  2381. <xsl:when test="key('request-param','addEntriesUI')='recipients' and key('request-param','withCC') = 'false'">
  2382. <dp:columnButtonGroup align="center" skipColumnButtons="true" label="IDS_ADDENTRIES_AVAILABLE_ENTRIES">
  2383. <dp:columnButton>
  2384. <df:button df:id="IDS_ADD_RECIPIENTS_TO" df:style="href" df:href="#" onclick="controller_changeState('{key('request-param','requestState')}|add_to'); controller_submitForm('default');">
  2385. <df:image df:tooltip="IDS_ADD_RECIPIENTS_TO">{$image_root}move_right.gif</df:image>
  2386. </df:button>
  2387. </dp:columnButton>
  2388. </dp:columnButtonGroup>
  2389. </xsl:when>
  2390. <xsl:when test="key('request-param','addEntriesUI')='recipients' and key('request-param','withBCC') = 'true'">
  2391. <dp:columnButtonGroup align="center" skipColumnButtons="true" label="IDS_ADDENTRIES_AVAILABLE_ENTRIES">
  2392. <dp:columnButton>
  2393. <df:button df:id="IDS_ADD_RECIPIENTS_TO" df:style="href" df:href="#" onclick="controller_changeState('{key('request-param','requestState')}|add_to'); controller_submitForm('default');">
  2394. <df:image df:tooltip="IDS_ADD_RECIPIENTS_TO_TOOLTIP">{$image_root}move_right.gif</df:image>
  2395. </df:button>
  2396. </dp:columnButton>
  2397. <dp:columnButton>
  2398. <df:button df:id="IDS_ADD_RECIPIENTS_CC" df:style="href" df:href="#" onclick="controller_changeState('{key('request-param','requestState')}|add_cc'); controller_submitForm('default');">
  2399. <df:image df:tooltip="IDS_ADD_RECIPIENTS_CC_TOOLTIP">{$image_root}move_right.gif</df:image>
  2400. </df:button>
  2401. </dp:columnButton>
  2402. <dp:columnButton>
  2403. <df:button df:id="IDS_ADD_RECIPIENTS_BCC" df:style="href" df:href="#" onclick="controller_changeState('{key('request-param','requestState')}|add_bcc'); controller_submitForm('default');">
  2404. <df:image df:tooltip="IDS_ADD_RECIPIENTS_BCC_TOOLTIP">{$image_root}move_right.gif</df:image>
  2405. </df:button>
  2406. </dp:columnButton>
  2407. </dp:columnButtonGroup>
  2408. </xsl:when>
  2409. <xsl:when test="key('request-param','addEntriesUI')='recipients' and key('request-param','withBCC') = 'false'">
  2410. <dp:columnButtonGroup align="center" skipColumnButtons="true" label="IDS_ADDENTRIES_AVAILABLE_ENTRIES">
  2411. <dp:columnButton>
  2412. <df:button df:id="IDS_ADD_RECIPIENTS_TO" df:style="href" df:href="#" onclick="controller_changeState('{key('request-param','requestState')}|add_to'); controller_submitForm('default');">
  2413. <df:image df:tooltip="IDS_ADD_RECIPIENTS_TO_TOOLTIP">{$image_root}move_right.gif</df:image>
  2414. </df:button>
  2415. </dp:columnButton>
  2416. <dp:columnButton>
  2417. <df:button df:id="IDS_ADD_RECIPIENTS_CC" df:style="href" df:href="#" onclick="controller_changeState('{key('request-param','requestState')}|add_cc'); controller_submitForm('default');">
  2418. <df:image df:tooltip="IDS_ADD_RECIPIENTS_CC_TOOLTIP">{$image_root}move_right.gif</df:image>
  2419. </df:button>
  2420. </dp:columnButton>
  2421. </dp:columnButtonGroup>
  2422. </xsl:when>
  2423. <xsl:when test="key('request-param','addEntriesUI')='humanTask'">
  2424. <dp:columnButtonGroup align="center" skipColumnButtons="true" label="IDS_ADDENTRIES_AVAILABLE_ENTRIES">
  2425. <dp:columnButton>
  2426. <df:button df:id="IDS_ADD_RECIPIENTS_POTENTIAL_OWNER" df:style="href" df:href="#" onclick="controller_changeState('{key('request-param','requestState')}|add_to'); controller_submitForm('default');">
  2427. <df:image df:tooltip="IDS_ADD_RECIPIENTS_POTENTIAL_OWNER_TOOLTIP">{$image_root}move_right.gif</df:image>
  2428. </df:button>
  2429. </dp:columnButton>
  2430. <dp:columnButton>
  2431. <df:button df:id="IDS_ADD_RECIPIENTS_STAKEHOLDER" df:style="href" df:href="#" onclick="controller_changeState('{key('request-param','requestState')}|add_cc'); controller_submitForm('default');">
  2432. <df:image df:tooltip="IDS_ADD_RECIPIENTS_STAKEHOLDER_TOOLTIP">{$image_root}move_right.gif</df:image>
  2433. </df:button>
  2434. </dp:columnButton>
  2435. </dp:columnButtonGroup>
  2436. </xsl:when>
  2437. <xsl:otherwise>
  2438. <dp:columnButtonGroup width="20" label="IDS_ADDENTRIES_AVAILABLE_ENTRIES">
  2439. <dp:columnButton>
  2440. <df:button df:id="IDS_SELECT_LANG_ADD" df:noText="true" df:style="href" df:href="#" onclick="controller_changeState('{key('request-param','requestState')}|add'); controller_submitForm('default');">
  2441. <df:image df:tooltip="IDS_SELECT_LANG_ADD">{$image_root}move_right.gif</df:image>
  2442. </df:button>
  2443. </dp:columnButton>
  2444. </dp:columnButtonGroup>
  2445. </xsl:otherwise>
  2446. </xsl:choose>
  2447. </xsl:template>
  2448. </xsl:stylesheet>
  2449. </xts:block>
  2450. <!--
  2451. ===============================================================================================
  2452. debug - special debug block for nested requests
  2453. ===============================================================================================
  2454. -->
  2455. <xts:block id="debug" type="exec" processor="XSLT" mimeType="text/html" dependency="genMarkup returnResult" condition=".[/root/session/param[@name='debug']='1']" mandatory="false">
  2456. <!-- get the debug logic sheet -->
  2457. <xts:logicsheet path="logicsheets/debuglogic.xslt"/>
  2458. <xsl:stylesheet version="1.0"
  2459. xmlns:xos="http://developer.cognos.com/schemas/xts/output/"
  2460. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  2461. xmlns:dbg="http://developer.cognos.com/schemas/xts/logicsheets/xslt/debug/"
  2462. exclude-result-prefixes="dbg xos">
  2463. <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no" omit-xml-declaration="yes"/>
  2464. <xsl:template match="/">
  2465. <xts:sequence>
  2466. <xsl:if test="/root/requestParams/*[local-name()='param' and @name='requestState'] != 'canceled' or /root/requestParams/*[local-name()='param' and @name='requestState'] != 'finished'">
  2467. <xsl:variable name="resultNode" select="/root/requestParams/*[local-name()='param' and @name='resultNode']"/>
  2468. <xts:append select="/root/output/*[local-name() = 'part']/*[local-name() = 'entityBody']/*[local-name()='{$resultNode}']">
  2469. <debugDump>
  2470. <xts:transform name="XMLEncode">
  2471. <dbg:dumpxml select="/root/*[local-name()!='header' and local-name()!='output' and local-name()!='system' and local-name()!='http' and local-name()!='session']">
  2472. <dbg:title>add_entries.xts</dbg:title>
  2473. </dbg:dumpxml>
  2474. </xts:transform>
  2475. </debugDump>
  2476. </xts:append>
  2477. </xsl:if>
  2478. </xts:sequence>
  2479. </xsl:template>
  2480. </xsl:stylesheet>
  2481. </xts:block>
  2482. </xts:morphlet>