12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- Licensed Materials - Property of IBM
- IBM Cognos Products: ps
- (C) Copyright IBM Corp. 2005, 2015
- US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
- -->
- <!--
- Copyright (C) 2008 Cognos ULC, an IBM Company. All rights reserved.
- Cognos (R) is a trademark of Cognos ULC, (formerly Cognos Incorporated).
- -->
- <!--
- =================================================================================================================================
- add_entries.xts
- view add_entries_interface.xml for information on the API.
- =================================================================================================================================
- -->
- <xts:morphlet xmlns:xts="http://developer.cognos.com/schemas/xts/" messageBase="messages/portalRL.xml, messages/portal.xml">
- <!--
- ===============================================================================================
- initialBlock
- - Default any params that weren't passed in. Also this is where we would do validation (when time permits).
- - If the user modified any of the cc, bcc, cc, attachment or link checkboxes, then we have to rebuild
- the xml blob.
- ===============================================================================================
- -->
- <xts:block
- nodelist="env,credential"
- id="initialBlock"
- processor="XSLT"
- type="exec">
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- exclude-result-prefixes="xsl xtsext">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:template match="/">
- <xts:sequence>
- <!-- replace the requestParams element with one that doesn't have a namespace -->
- <xts:replace select="/root/*[local-name()='requestParams']">
- <requestParams>
- <xts:queryNode select="/root/*[local-name()='requestParams']/*"/>
- <xts:transform src="portal/controls/gen_default_parameters.xslt" processor="XSLT">
- <root>
- <xts:transform name="XML">
- <xts:param name="systemId">portal/addEntries/add_entries_interface.xml</xts:param>
- </xts:transform>
- <xts:queryNode select="/root/*[local-name()='requestParams']"/>
- </root>
- </xts:transform>
- </requestParams>
- </xts:replace>
- </xts:sequence>
- <!-- update the xml blob of added entries if needed -->
- <xsl:if test="/root/env/param[@name='typeChanged']='true' and /root/env/param[@name='selectedEntries']!=''">
- <xts:sequence>
- <xsl:variable name="passport">
- <xsl:value-of select="/root/credential/param[@name='CAM']/*[local-name() ='CAM']/*[local-name() = 'CAMPassport']/*[local-name() = 'id']"/>
- </xsl:variable>
- <xts:replace select="/root/*[local-name()='env']/*[local-name()='param' and @name='selectedEntries']">
- <xts:transform src="portal/controls/create_web64_param.xslt" processor="XSLT">
- <param name="selectedEntries">
- <passport><xsl:value-of select="$passport"/></passport>
- <markup>
- <xts:transform name="XMLEncode">
- <xts:transform src="portal/addEntries/transforms/updateSelectedEntries.xslt" processor="XSLT">
- <root>
- <selectedEntries>
- <xts:transform name="XMLDecode">
- <xsl:value-of select="xtsext:web64decode(xtsext:cafaction('sign_unwrap',string(/root/env/param[@name='selectedEntries'])), true())"/>
- </xts:transform>
- </selectedEntries>
- <xsl:copy-of select="/root/env"/>
- </root>
- </xts:transform>
- </xts:transform>
- </markup>
- </param>
- </xts:transform>
- </xts:replace>
- </xts:sequence>
- </xsl:if>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
-
-
-
- ===============================================================================================
- Load searchItems map
- ===============================================================================================
- -->
- <xts:block id="getSearchSet" type="exec" mode="input" processor="XML" path="/portal/uiExtensions.xml">
- <xts:logicsheet path="/logicsheets/uiobjects/uiobjects_search.xslt"/>
- </xts:block>
-
-
-
- <!--
- ===============================================================================================
- returnResult - We're done with the email options morphlet, so return the appropriate response
- ===============================================================================================
- -->
- <xts:block id="returnResult"
- type="exec"
- processor="XSLT"
- dependency="initialBlock"
- nodelist="requestParams,output,env"
- condition=".[/root/requestParams/*[local-name()='param' and @name='requestState'] = 'finished' or /root/requestParams/*[local-name()='param' and @name='requestState'] = 'canceled']"
- mandatory="false">
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:xos="http://developer.cognos.com/schemas/xts/output/"
- exclude-result-prefixes="xsl xos">
- <xsl:output method="xml" encoding="utf-8" indent="no"/>
- <xsl:key name="request-param" match="/root/requestParams/*[local-name()='param']" use="@name"/>
- <xsl:template match="/">
- <xts:sequence>
- <xts:append select="/root/output">
- <!-- build a part -->
- <xts:transform name="Null" option="part" mimeType="text/xml">
- <xsl:element name="{key('request-param','resultNode')}" namespace="">
- <xsl:choose>
- <xsl:when test="key('request-param','requestState') = 'canceled'">
- <canceled/>
- </xsl:when>
- <xsl:otherwise>
- <selectedEntries>
- <xsl:value-of select="/root/env/param[@name='selectedEntries']"/>
- </selectedEntries>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:element>
- </xts:transform>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ===============================================================================================
- getCgetContainerContent - Get the container information
- ===============================================================================================
- -->
- <xts:block
- id="getContainerContent"
- type="exec"
- mode="interpret"
- processor="XSLT"
- dependency="initialBlock">
- <xts:logicsheet path="logicsheets/buslogic.xslt"/>
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- exclude-result-prefixes="xsl send xtsext">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:key name="request-param" match="/root/requestParams/*[local-name()='param']" use="@name"/>
- <xsl:key name="env-param" match="/root/*[local-name()='env']/*[local-name()='param']" use="@name"/>
- <xsl:variable name="searchPath">
- <xsl:choose>
- <xsl:when test="key('env-param','select_path')!=''">
- <xsl:value-of select="key('env-param','select_path')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="key('request-param','defaultSearchPath')"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:template match="/">
- <xts:sequence>
- <xts:append select="/root">
- <containerInfo>
- <xts:transform src="transforms/CM/post-process.xslt" processor="XSLT">
- <send:request provider="cm">
- <xts:transform src="transforms/CM/pre-process.xslt" processor="XSLT">
- <cm:query xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
- <cm:requests>
- <!-- get the container details -->
- <cm:query>
- <cm:search>
- <xsl:value-of select="$searchPath"/>
- </cm:search>
- <cm:properties>
- <cm:property name="defaultName"/>
- <cm:property name="searchPath"/>
- <cm:property name="ancestors"/>
- <cm:property name="objectClass"/>
- </cm:properties>
- </cm:query>
- </cm:requests>
- </cm:query>
- </xts:transform>
- </send:request>
- </xts:transform>
- </containerInfo>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!--
- =======================================================================================
- When the enable-3rdparty-namespace-browsing system.xml parameter is set to false, we
- force the UI into search mode whenever we enter any part of a 3rd party namespace.
- =======================================================================================
- -->
- <xts:block id="secure-3rdpartyNS-browsing" nodelist="system,containerInfo,requestParams" processor="XSLT" type="exec"
- dependency="initialBlock getContainerContent"
- condition=".[/root/requestParams/*[local-name()='param' and @name='requestState' and starts-with(.,'navigate')]]"
- mandatory="false">
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
- xmlns:req-params="http://developer.cognos.com/schemas/request/params">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" omit-xml-declaration="yes" indent="no"/>
- <xsl:template match="root">
- <xsl:variable name="m_path" select="/root/containerInfo/cm:queryResponse/cm:queryReply/*/cm:searchPath"/>
- <xsl:variable name="objectClass" select="/root/containerInfo/cm:queryResponse/cm:queryReply/*/cm:objectClass"/>
- <xsl:variable name="insideCognosNamespace" select="(starts-with($m_path, "CAMID(':") or starts-with($m_path, 'CAMID(":'))"/>
- <xsl:variable name="inside3rdPartyNamespace" select="($objectClass='namespace' or /root/containerInfo/cm:queryResponse/cm:queryReply/*/cm:ancestors/cm:ancestorInfo/cm:objectClass='namespace') and not($insideCognosNamespace)"/>
- <xsl:variable name="canBrowse3rdPartyNamespace" select="not(/root/system/param[@name='enable-3rdparty-namespace-browsing']='false')"/>
- <xsl:if test="$inside3rdPartyNamespace and not($canBrowse3rdPartyNamespace)">
- <xts:sequence>
- <xts:replace select="/root/requestParams/*[local-name()='param' and @name='requestState']">
- <req-params:param name="requestState">
- <xsl:value-of select="concat('search', substring-after(/root/requestParams/*[local-name()='param' and @name='requestState'], 'navigate'))"/>
- </req-params:param>
- </xts:replace>
- </xts:sequence>
- </xsl:if>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ===============================================================================================
- ckSearchChange:
- When there's a new search, the 'm_page' navpager variables must be deleted before recalculating maxObjects and skipObjects.
- ===============================================================================================
- -->
- <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']]">
- <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/">
- <xsl:key name="env-param" match="/root/env/param" use="@name"/>
- <xsl:template match="/">
- <xts:sequence>
- <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']"/>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ===============================================================================================
- getContent - Get the content to be displayed in the navigation pager
- ===============================================================================================
- -->
- <xts:block id="getContent"
- nodelist="containerInfo, requestParams, env, header, http, cookies, system, session, searchSets"
- type="exec"
- mode="interpret"
- processor="XSLT"
- dependency="secure-3rdpartyNS-browsing ckSearchChange getSearchSet"
- condition=".[/root/requestParams/*[local-name()='param' and @name='requestState' and (starts-with(.,'navigate') or starts-with(.,'type') or starts-with(.,'search'))]]"
- mandatory="false">
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- <xts:logicsheet path="portal/addEntries/logicsheets/add_entries_templates.xsl"/>
- <xts:logicsheet path="logicsheets/buslogic.xslt"/>
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
- xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/"
- xmlns:aet="http://developer.cognos.com/schemas/xts/portal/addEntries/logicsheets/add_entries_templates/"
- xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- xmlns:nav="http://developer.cognos.com/schemas/cps/navigation/1/"
- exclude-result-prefixes="xsl send xtsext aet cm nav">
- <pf:variables/>
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:key name="request-param" match="/root/requestParams/*[local-name()='param']" use="@name"/>
- <xsl:key name="env-param" match="/root/*[local-name()='env']/*[local-name()='param']" use="@name"/>
- <aet:variables/>
- <aet:pagerQueryVars/>
- <xsl:variable name="action" select="substring-after(key('request-param','requestState'),'|')"/>
- <xsl:variable name="currentState">
- <xsl:choose>
- <xsl:when test="contains(key('request-param','requestState'),'|')">
- <xsl:value-of select="substring-before(key('request-param','requestState'),'|')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="key('request-param','requestState')"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="searchPath">
- <xsl:choose>
- <xsl:when test="key('env-param','select_path')!=''">
- <xsl:value-of select="key('env-param','select_path')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="key('request-param','defaultSearchPath')"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:template match="/">
- <xts:sequence>
- <xts:append select="/root">
- <response>
- <!-- transform that performs the add/delete action or does nothing (Null) -->
- <xts:transform>
- <xsl:choose>
- <xsl:when test="$action != ''">
- <xsl:attribute name="processor">XSLT</xsl:attribute>
- <xsl:attribute name="src">portal/addEntries/transforms/performAction.xslt</xsl:attribute>
- </xsl:when>
- <xsl:otherwise>
- <xsl:attribute name="name">Null</xsl:attribute>
- </xsl:otherwise>
- </xsl:choose>
- <content>
- <addedQueryPosition>2</addedQueryPosition>
- <xsl:choose>
- <xsl:when test="$currentState='type'">
- <xsl:call-template name="parse-entries">
- <xsl:with-param name="entries" select="/root/env/param[@name='type_entries']"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <xsl:choose>
- <!-- start here the burgandy search -->
- <xsl:when test="$currentState!='navigate' and ($currentState='search' and /root/env/param[@name='search_keywords_bas']!='' and /root/env/param[@name='search_find'] = 'b')">
- <xts:append>
- <navContent>
- <xts:request href="bus://dispatcher" protocol="NAV" responseEnvelope="false" outputHeader="false">
- <SOAP-ENV:Envelope
- xmlns:bus="http://developer.cognos.com/schemas/bibus/3/"
- xmlns:nav="http://developer.cognos.com/schemas/cps/navigation/1/"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
- xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:xs="http://www.w3.org/2001/XMLSchema">
- <SOAP-ENV:Header>
- <xsl:copy-of select="/root/header/bus:biBusHeader"/>
- </SOAP-ENV:Header>
- <SOAP-ENV:Body>
- <nav:search>
- <nav:validateTag fault="true"/>
- <xsl:call-template name="generateNAVSearchSpec"/>
- <nav:skipObjects><xsl:value-of select="$skipObjects"/></nav:skipObjects>
- <nav:maxObjects><xsl:value-of select="$maxObjects"/></nav:maxObjects>
- <nav:property name="internalId"/>
- <nav:property name="fullName"/>
- <nav:property name="alt"/>
- <nav:property name="icons"/>
- <nav:property name="pathStepType"/>
- <nav:property name="permissions"/>
- <nav:property name="hasChildren"/>
- <nav:property name="searchPath"/>
- <nav:property name="URLID"/>
- <nav:property name="storeID"/>
- <nav:property name="position"/>
- <nav:property name="ancestors"/>
- <nav:property name="searchPathForURL"/>
- <nav:property name="screenTip"/>
- <nav:param name="portalAgent">cognos</nav:param>
- <nav:param name="webContentURL">..</nav:param>
- </nav:search>
- </SOAP-ENV:Body>
- </SOAP-ENV:Envelope>
- </xts:request>
- </navContent>
- </xts:append>
- <xts:transform src="transforms/CM/post-process.xslt" processor="XSLT">
- <send:request provider="cm">
- <xts:transform src="transforms/CM/pre-process.xslt" processor="XSLT">
- <cm:query xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
- <cm:requests>
- <!-- get the container details -->
- <cm:query>
- <cm:search>
- <xsl:value-of select="$searchPath"/>
- </cm:search>
- <cm:properties>
- <cm:property name="defaultName"/>
- <cm:property name="searchPath"/>
- <cm:property name="ancestors"/>
- </cm:properties>
- </cm:query>
- <!-- query for any entries that the user is adding -->
- <xsl:if test="starts-with($action,'add') and key('env-param','nav_checkbox')">
- <xsl:for-each select="key('env-param','nav_checkbox')">
- <cm:query>
- <cm:search>
- <xsl:value-of select="string(.)"/>
- </cm:search>
- <cm:properties>
- <aet:properties/>
- </cm:properties>
- <cm:options>
- <aet:refProps/>
- </cm:options>
- </cm:query>
- </xsl:for-each>
- </xsl:if>
- </cm:requests>
- </cm:query>
- </xts:transform>
- </send:request>
- </xts:transform>
- </xsl:when>
- <!-- navigate or basic search -->
- <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']!=''))">
- <xts:transform src="transforms/CM/post-process.xslt" processor="XSLT">
- <send:request provider="cm">
- <xts:transform src="transforms/CM/pre-process.xslt" processor="XSLT">
- <cm:query xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
- <cm:requests>
- <xsl:choose>
- <xsl:when test="$searchPath='/'">
- <cm:query>
- <cm:search>
- <xsl:choose>
- <xsl:when test="key('request-param','addEntriesUI')='packagesAndLocations' or key('request-param','addEntriesUI')='indexUpdateLocations'or key('request-param','addEntriesUI')='deploymentObjects'">
- <!-- packages can be found in myFolders as well so make sure we allow the user to find them -->
- <xsl:choose>
- <xsl:when test="($hasCSTCapability and not(key('request-param','addEntriesUI')='deploymentObjects'))">
- <xsl:value-of select="concat('/content',$classFilter, '| /directory' ,$classFilter, '| ~/folder', $classFilter)"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="concat('/content',$classFilter, '| /directory' ,$classFilter, '| /catalog', $classFilter)"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:when test="key('request-param','addEntriesUI')='rolapDataSources'">
- <xsl:value-of select="concat('/CAMID(":")','')"/>
- </xsl:when>
- <xsl:when test="key('request-param','addEntriesUI')='packagesAndFolders'">
- <xsl:value-of select="concat('/content','')"/>
- </xsl:when>
- <xsl:when test="key('request-param','addEntriesUI')='publicFoldersPackagesAndFolders'">
- <xsl:value-of select="concat('/content','')"/>
- </xsl:when>
-
- <xsl:otherwise>
- <!-- don't show adminFolder if user does not have Content Store Tool Access capability -->
- <xsl:choose>
- <xsl:when test="$hasCSTCapability">
- <xsl:value-of select="concat('/content',$classFilter, '| ~/folder', $classFilter, '| /adminFolder',$classFilter)"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="concat('/content',$classFilter, '| ~/folder', $classFilter)"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:text>[@shown='true']</xsl:text>
- </cm:search>
- <cm:properties>
- <aet:properties/>
- </cm:properties>
- <cm:options maxObjects="{(($maxObjects) + 1)}" skipObjects="{$skipObjects}"/>
- </cm:query>
- </xsl:when>
- <xsl:otherwise>
- <cm:query>
- <cm:search>
- <xsl:choose>
- <!-- add entries navigate -->
- <xsl:when test="$currentState = 'navigate'">
- <xsl:value-of select="concat($searchPath,'/*')"/>
-
- <!-- Don't include the parent(target) tenant in the tenant members pick list -->
- <xsl:if test="key('request-param','addEntriesUI') = 'tenantMembers'">
- <xsl:variable name="sq" select='"'"'/>
- <xsl:variable name="tenantName" select="key('env-param','m_name')"/>
- <xsl:variable name="cmEncodedTenantName" select="xtsext:replace(string($tenantName), string($sq), concat($sq,$sq)) "/>
- <xsl:value-of select="concat('[@defaultName!=',$sq,$cmEncodedTenantName,$sq,']')"/>
- </xsl:if>
-
- <xsl:if test="$searchPath='/directory' and key('env-param','m_class')='tenant'">
- <xsl:text>[@id != ":"]</xsl:text>
- </xsl:if>
- <xsl:value-of select="$classFilter"/>
- <xsl:choose>
- <xsl:when test="key('request-param','addEntriesUI')='jmxProxyHostDispatchers'">
- <xsl:value-of select="concat('/presentationService/parent::dispatcher','')"/>
- </xsl:when>
- <!-- if we're retrieving a list of namespaces apply the namespace_filter and the shown filter -->
- <xsl:when test="$searchPath = '/directory'">
- <xsl:text/><xsl:value-of select="/root/system/param[@name='namespace_filter']"/><xsl:text/>
- <xsl:text>[@shown='true']</xsl:text>
- </xsl:when>
- <!-- only add the security and shown filter if we're not in a third party namesapce -->
- <xsl:when test="starts-with(key('env-param','select_path'), "CAMID(':") or starts-with(key('env-param','select_path'), 'CAMID(":') or not(starts-with(key('env-param','select_path'), 'CAMID('))">
- <xsl:value-of select="/root/system/param[@name='visible']"/>
- <xsl:text>[@shown='true']</xsl:text>
- </xsl:when>
- </xsl:choose>
- <!-- if we're browsing /directory then only query for active namespaces,
- unless where in the packages and locations add entries -->
- <xsl:if test="$searchPath = '/directory' and key('request-param','addEntriesUI')!='packagesAndLocations'and key('request-param','addEntriesUI')!='indexUpdateLocations'">[@active='true']</xsl:if>
- </xsl:when>
- <!-- add entries search -->
- <xsl:when test="$currentState = 'search'">
- <xsl:variable name="sq">'</xsl:variable>
- <xsl:variable name="searchText" select="xtsext:replace(string(key('env-param','search_keywords_bas')), string($sq), concat($sq,$sq))"/>
- <xsl:variable name="t-ns-path">
- <xsl:choose>
- <xsl:when test="/root/containerInfo/cm:queryResponse/cm:queryReply/child::*[local-name() = 'namespace']">
- <xsl:value-of select="/root/containerInfo/cm:queryResponse/cm:queryReply/child::*/cm:searchPath"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="/root/containerInfo/cm:queryResponse/cm:queryReply/child::*/cm:ancestors/cm:ancestorInfo[./cm:objectClass = 'namespace']/cm:searchPath"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="ns-path">
- <xsl:choose>
- <xsl:when test="$t-ns-path != ''"><xsl:value-of select="$t-ns-path"/></xsl:when>
- <!-- By default, use cognos namespace.-->
- <xsl:otherwise>
- <xsl:value-of select="'CAMID(":")'"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="searchPathRoot">
- <xsl:choose>
- <xsl:when test="key('env-param', 'search_scope')='descendant'">
- <xsl:value-of select="key('env-param','select_path')"/><xsl:text>/descendant::*</xsl:text>
- </xsl:when>
- <xsl:when test="key('env-param','search_scope')='child'">
- <xsl:value-of select="key('env-param','select_path')"/><xsl:text>/*</xsl:text>
- </xsl:when>
- <xsl:when test="key('env-param','search_scope')='proot'">
- <xsl:text>/*[@objectClass='content']/descendant::*</xsl:text>
- </xsl:when>
- <xsl:when test="key('env-param','search_scope')='mroot'">
- <xsl:text>~/folder/descendant::*</xsl:text>
- </xsl:when>
- <xsl:when test="key('env-param','search_scope')='any'">
- <xsl:value-of select="concat($ns-path, '/descendant::*')"/>
- </xsl:when>
- <xsl:when test="key('env-param','search_scope')='admin'">
- <xsl:text>/adminFolder/*</xsl:text>
- </xsl:when>
- </xsl:choose>
- </xsl:variable>
- <xsl:value-of select="$searchPathRoot"/>
- <!-- method -->
- <!-- Default is "Name field" -->
- <xsl:variable name="method" select="string(key('env-param', 'search_method'))"/>
- <xsl:choose>
- <xsl:when test="key('env-param', 'search_find') = 'n' or string(key('env-param', 'search_find'))='' or key('env-param', 'search_find') ='none'">
- <xsl:choose>
- <xsl:when test="$method = 'equals'">[@defaultName = '<xsl:value-of select="$searchText"/>']</xsl:when>
- <xsl:when test="$method = 'starts'">[starts-with(@defaultName, '<xsl:value-of select="$searchText"/>')]</xsl:when>
- <xsl:otherwise>[contains(@defaultName, '<xsl:value-of select="$searchText"/>')]</xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:when test="/root/env/param[@name = 'search_find'] = 'd'">
- <xsl:choose>
- <xsl:when test="$method = 'equals'">[@defaultDescription = '<xsl:value-of select="$searchText"/>']</xsl:when>
- <xsl:when test="$method = 'starts'">[starts-with(@defaultDescription, '<xsl:value-of select="$searchText"/>' )]</xsl:when>
- <xsl:otherwise>[contains(@defaultDescription, '<xsl:value-of select="$searchText"/>' )]</xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:otherwise>
- <xsl:choose>
- <xsl:when test="$method = 'equals'">[@defaultDescription = '<xsl:value-of select="$searchText"/>' or @defaultName = '<xsl:value-of select="$searchText"/>']</xsl:when>
- <xsl:when test="$method = 'starts'">[starts-with(@defaultDescription, '<xsl:value-of select="$searchText"/>' ) or starts-with(@defaultName, '<xsl:value-of select="$searchText"/>')]</xsl:when>
- <xsl:otherwise>[contains(@defaultDescription, '<xsl:value-of select="$searchText"/>' ) or contains(@defaultName, '<xsl:value-of select="$searchText"/>')]</xsl:otherwise>
- </xsl:choose>
- </xsl:otherwise>
- </xsl:choose>
- <!-- Modified date -->
- <xsl:if test="string(key('env-param','search_modified')) != 'any' and string(key('env-param','search_modified'))!=''">
- <xsl:variable name="offsetamt">
- <xsl:choose>
- <xsl:when test="key('env-param','search_modified') = 't'">0</xsl:when>
- <xsl:when test="key('env-param','search_modified') = 'l3d'">-259200</xsl:when>
- <xsl:when test="key('env-param','search_modified') = 'lw'">-604800</xsl:when>
- <xsl:when test="key('env-param','search_modified') = 'lm'">-2629743</xsl:when>
- <xsl:when test="key('env-param','search_modified') = 'l3m'">-7889231</xsl:when>
- <xsl:when test="key('env-param','search_modified') = 'l6m'">-15778463</xsl:when>
- <xsl:when test="key('env-param','search_modified') = 'ly'">-31556926</xsl:when>
- <xsl:when test="key('env-param','search_modified') = 'l3y'">-94670777</xsl:when>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="offsetunit">second</xsl:variable>
- <xsl:text/>[@modificationTime > '<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/>
- </xsl:if>
- <!-- type -->
- <xsl:if test="key('env-param','search_type') != ''">
- <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')]/.."/>
- <xsl:variable name="classes" select="$item/*[local-name()='classes']/*[local-name()='class']"/>
- <xsl:choose>
- <xsl:when test="key('env-param','search_type')='namespaces'">
- <xsl:value-of select="$selectable-classes"/>
- </xsl:when>
- <xsl:when test="key('env-param','search_type')='all'">
- <xsl:value-of select="$selectable-classes"/>
- </xsl:when>
- <xsl:when test="count($classes) > 0">
- <xsl:variable name="apos" select='"'"'/>
- <xsl:text>[</xsl:text>
- <xsl:for-each select="$item/*[local-name()='classes']/*[local-name()='class']">
- <xsl:if test="position() > 1"><xsl:text> or </xsl:text></xsl:if>
- <xsl:value-of select="concat('@objectClass=',$apos,*[local-name()='name'],$apos)"/>
- </xsl:for-each>
- <xsl:text>]</xsl:text>
- </xsl:when>
- </xsl:choose>
- </xsl:if>
- <!-- if it's a search on mypages - need to apply a filter -->
- <xsl:if test="key('request-param','addEntriesUI')='mypages'"><xsl:value-of select="$selectable-classes"/></xsl:if>
- <!-- if it's a search on portlet - need to apply a filter -->
- <xsl:if test="key('request-param','addEntriesUI')='portlet'"><xsl:value-of select="$selectable-classes"/></xsl:if>
- <!-- only add the security and shown filter if we're not in a third party namesapce -->
- <xsl:if test="starts-with($searchPathRoot, "CAMID(':") or starts-with($searchPathRoot, 'CAMID(":') or not(starts-with($searchPathRoot, 'CAMID('))">
- <xsl:value-of select="/root/system/param[@name='visible']"/>
- <xsl:text>[@shown='true']</xsl:text>
- </xsl:if>
- <!-- only show DISPs with presentationServices for JMX proxy host dispatchers -->
- <xsl:if test="key('request-param','addEntriesUI')='jmxProxyHostDispatchers'">
- <xsl:value-of select="concat('/presentationService/parent::dispatcher','')"/>
- </xsl:if>
- </xsl:when>
- </xsl:choose>
- </cm:search>
- <cm:properties>
- <aet:properties/>
- <xsl:if test="$searchPath = '/directory'">
- <cm:property name="active"/>
- </xsl:if>
- <xsl:if test="starts-with($searchPath,'/content')">
- <cm:property name="userInterfaces"/>
- </xsl:if>
- </cm:properties>
- <cm:sortBy>
- <cm:sort name="usage" order="ascending"/>
- <cm:sort name="defaultName" order="ascending"/>
- <xsl:if test="key('env-param','addentries_showusers')='true'">
- <cm:sort name="userName" order="ascending"/>
- </xsl:if>
- </cm:sortBy>
- <cm:options maxObjects="{(($maxObjects) + 1)}" skipObjects="{$skipObjects}">
- <aet:refProps/>
- </cm:options>
- </cm:query>
- </xsl:otherwise>
- </xsl:choose>
- <!-- query for any entries that the user is adding -->
- <xsl:if test="starts-with($action,'add') and key('env-param','nav_checkbox')">
- <xsl:for-each select="key('env-param','nav_checkbox')">
- <cm:query>
- <cm:search>
- <xsl:value-of select="string(.)"/>
- </cm:search>
- <cm:properties>
- <aet:properties/>
- </cm:properties>
- <cm:options>
- <aet:refProps/>
- </cm:options>
- </cm:query>
- </xsl:for-each>
- </xsl:if>
- </cm:requests>
- </cm:query>
- </xts:transform>
- </send:request>
- </xts:transform>
- </xsl:when>
- </xsl:choose>
- </xsl:otherwise>
- </xsl:choose>
- <!-- if we're performing an action, then pass in all the needed information -->
- <xsl:if test="$action != ''">
- <dialog><xsl:value-of select="$currentState"/></dialog>
- <action><xsl:value-of select="$action"/></action>
- <xsl:if test="key('env-param','selectedEntries') != ''">
- <selectedEntries>
- <xts:transform name="XMLDecode">
- <xsl:value-of select="xtsext:web64decode(xtsext:cafaction('sign_unwrap',string(key('env-param','selectedEntries'))), true())"/>
- </xts:transform>
- </selectedEntries>
- </xsl:if>
- <!-- send in the list of properties that should be in the generated list -->
- <xts:queryNode select="/root/env | /root/requestParams/*[local-name()='param' and @name='returnProperties']/*[local-name()='property']"/>
- <allowDuplicates>
- <xsl:choose>
- <xsl:when test="key('request-param','addEntriesUI') = 'deploymentObjects'">
- true
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="key('request-param','allowDuplicates')"/>
- </xsl:otherwise>
- </xsl:choose>
- </allowDuplicates>
- </xsl:if>
- </content>
- </xts:transform>
- </response>
- </xts:append>
- <xsl:choose>
- <!-- for runnables and attachments allow the user to browse up to the root -->
- <xsl:when test="key('request-param','allowRootBrowsing') = 'true'">
- <xsl:choose>
- <xsl:when test="$searchPath != '/'">
- <xts:replace select="/root/containerInfo/*[local-name()='queryResponse']/*[local-name()='queryReply']/*/*[local-name()='ancestors']">
- <ancestors xmlns="http://developer.cognos.com/schemas/xts-cm/1/">
- <ancestorInfo>
- <searchPath>/</searchPath>
- <title>
- <xsl:text><xts:string id="IDS_ADDENTRIES_ROOT_TITLE"/></xsl:text>
- </title>
- </ancestorInfo>
- <xts:queryNode select="/root/containerInfo/*[local-name()='queryResponse']/*[local-name()='queryReply']/*/*[local-name()='ancestors']/*"/>
- </ancestors>
- </xts:replace>
- </xsl:when>
- <xsl:otherwise>
- <xts:delete select="/root/containerInfo/*[local-name()='queryResponse']/*[local-name()='queryReply']/*"/>
- <xts:append select="/root/containerInfo/*[local-name()='queryResponse']/*[local-name()='queryReply']">
- <root xmlns="http://developer.cognos.com/schemas/xts-cm/1/">
- <defaultName type="cm:tokenProp">
- <xts:string id="IDS_ADDENTRIES_ROOT_TITLE"/>
- </defaultName>
- <ancestors type="cm:ancestorInfoArrayProp"/>
- </root>
- </xts:append>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <!-- for [portlets, rolapDataSources, tenantMembers] remove the first 2 ancestorInfo objects so the user cannont navigate up past portlet -->
- <xsl:when test="key('request-param','addEntriesUI') = 'portlet' or key('request-param','addEntriesUI') = 'rolapDataSources' or key('request-param','addEntriesUI') = 'tenantMembers'">
- <xts:delete select="/root/containerInfo/*[local-name()='queryResponse']/*[local-name()='queryReply']/*/*[local-name()='ancestors']/*[position()='1' or position()='2']"/>
- </xsl:when>
- </xsl:choose>
- </xts:sequence>
- </xsl:template>
- <!-- This template generates the search specs for the nav search -->
- <xsl:template name="generateNAVSearchSpec" priority="1">
- <xsl:variable name="context">
- <xsl:choose>
- <xsl:when test="key('env-param','m_navpagercontext') != ''">
- <xsl:value-of select="key('env-param','m_navpagercontext')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="''"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="scope">
- <xsl:choose>
- <xsl:when test="key('env-param','select_path') != ''">
- <xsl:value-of select="key('env-param','select_path')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="'/content'"/>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:text>[@shown='true']</xsl:text>
- </xsl:variable>
- <xsl:variable name="search_string" select="key('env-param', 'search_keywords_bas')"/>
- <xsl:variable name="search_type_filter" select="key('env-param', 'search_type_index')"/>
- <xsl:choose>
- <xsl:when test="$search_string != '' ">
- <nav:string><xsl:value-of select="$search_string"/></nav:string>
- <xsl:if test="$context != '' ">
- <nav:context><xsl:value-of select="$context"/></nav:context>
- </xsl:if>
- <nav:searchType>
- <xsl:value-of select="'content'"/>
- </nav:searchType>
- <nav:scope><xsl:value-of select="$scope"/></nav:scope>
- <nav:recursive><xsl:value-of select="'true'"/></nav:recursive>
- <nav:match><xsl:value-of select="'contains'"/></nav:match>
- <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]/.."/>
- <xsl:variable name="classes" select="$item/*[local-name()='classes']/*[local-name()='class']"/>
- <xsl:choose>
- <xsl:when test="string($search_type_filter) = 'all' or string($search_type_filter) = ''">
- <xsl:variable name="indexedItems" select="/root/*[local-name()='searchSets']/*[local-name()='searchSet']/*[local-name()='name' and text()=key('request-param','addEntriesUI')]/..//*[local-name()='item']"/>
- <xsl:variable name="indexedClasses" select="$indexedItems/*[local-name()='classes']/*[local-name()='class']"/>
- <xsl:if test="count($indexedClasses) > 0">
- <nav:itemTypes>
- <xsl:for-each select="$indexedClasses">
- <nav:itemType><xsl:value-of select="*[local-name()='name']"/></nav:itemType>
- </xsl:for-each>
- </nav:itemTypes>
- </xsl:if>
- </xsl:when>
- <xsl:when test="count($classes) > 0">
- <nav:itemTypes>
- <xsl:for-each select="$item/*[local-name()='classes']/*[local-name()='class']">
- <nav:itemType><xsl:value-of select="*[local-name()='name']"/></nav:itemType>
- </xsl:for-each>
- </nav:itemTypes>
- </xsl:when>
- </xsl:choose>
- <nav:sort>
- <xsl:attribute name="order"> <xsl:value-of select="'ascending'"/></xsl:attribute><xsl:attribute name="usage"><xsl:value-of select="'ascending'"/></xsl:attribute>
- </nav:sort>
- </xsl:when>
- </xsl:choose>
- </xsl:template>
- <!-- This template parses the given string into fragments resembling:
- <entries>
- <entry>
- <namespace-name></namespace-name>
- <object-name></object-name>
- </entry>
- </entries>
- -->
- <xsl:template name="parse-entries">
- <xsl:param name="entries" select="''"/>
- <xsl:param name="parsed-entries" select="';'"/>
- <xsl:if test="$entries!=''">
- <xsl:variable name="before">
- <xsl:choose>
- <xsl:when test="contains($entries,';')">
- <xsl:value-of select="normalize-space(substring-before($entries,';'))"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="normalize-space($entries)"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="after">
- <xsl:if test="contains($entries,';')">
- <xsl:value-of select="normalize-space(substring-after($entries,';'))"/>
- </xsl:if>
- </xsl:variable>
- <xsl:if test="$before!='' and not(contains($parsed-entries,concat(';',$before,';')))">
- <xsl:call-template name="parse-entry">
- <xsl:with-param name="entry" select="$before"/>
- </xsl:call-template>
- </xsl:if>
- <xsl:if test="$after!=''">
- <xsl:call-template name="parse-entries">
- <xsl:with-param name="entries" select="$after"/>
- <xsl:with-param name="parsed-entries" select="concat($parsed-entries,$before,';')"/>
- </xsl:call-template>
- </xsl:if>
- </xsl:if>
- </xsl:template>
- <xsl:template name="parse-entry">
- <xsl:param name="entry" select="''"/>
- <xsl:if test="$entry!=''">
- <xsl:variable name="ns-name">
- <xsl:choose>
- <xsl:when test="contains($entry,'/')">
- <xsl:value-of select="normalize-space(substring-before($entry,'/'))"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="normalize-space($entry)"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="obj-name">
- <xsl:if test="contains($entry,'/')">
- <xsl:value-of select="normalize-space(substring-after($entry,'/'))"/>
- </xsl:if>
- </xsl:variable>
- <entry>
- <namespace-name>
- <xsl:value-of select="$ns-name"/>
- </namespace-name>
- <object-name>
- <xsl:value-of select="$obj-name"/>
- </object-name>
- <xsl:if test="$ns-name!=''">
- <xsl:variable name="sq">'</xsl:variable>
- <results>
- <xts:transform src="transforms/CM/post-process.xslt" processor="XSLT">
- <send:request provider="cm" faultBlock="type_query_fault">
- <xts:transform src="transforms/CM/pre-process.xslt" processor="XSLT">
- <cm:query>
- <cm:search>
- <xsl:text>/directory/namespace[@name='</xsl:text>
- <xsl:value-of select="$ns-name"/>
- <xsl:text>']</xsl:text>
- <xsl:if test="key('request-param','addEntriesUI')!='packagesAndLocations' and key('request-param','addEntriesUI')!='indexUpdateLocations'">
- <xsl:text>[@active='true']</xsl:text>
- </xsl:if>
- <xsl:if test="$obj-name!=''">
- <xsl:text>//*[@defaultName='</xsl:text>
- <xsl:value-of select="xtsext:replace(string($obj-name), string($sq), concat($sq,$sq))"/>
- <xsl:text>' or @userName='</xsl:text>
- <xsl:value-of select="xtsext:replace(string($obj-name), string($sq), concat($sq,$sq))"/>
- <xsl:text>']</xsl:text>
- </xsl:if>
- <xsl:value-of select="$selectable-classes"/>
- <xsl:if test="translate( $ns-name, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz' )='cognos'">
- <xsl:value-of select="/root/system/param[@name='visible']"/>
- </xsl:if>
- </cm:search>
- <cm:properties>
- <aet:properties/>
- </cm:properties>
- <cm:options>
- <aet:refProps/>
- </cm:options>
- </cm:query>
- </xts:transform>
- </send:request>
- </xts:transform>
- </results>
- </xsl:if>
- </entry>
- </xsl:if>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <xts:block id="type_query_fault" type="fault">
- <cm:queryResponse xmlns:cm="http://developer.cognos.com/schemas/bibus/3/">
- <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]">
- </queryResult>
- </cm:queryResponse>
- </xts:block>
- <!--
- ===============================================================================================
- businessRules - Take care off any business logic to simplify the UI generation
- ===============================================================================================
- -->
- <xts:block
- id="businessRules"
- nodelist="response, requestParams, env, http, session, credential, cookies, header, user, containerInfo"
- type="exec"
- processor="XSLT"
- dependency="getContent initialBlock"
- 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')]"
- mandatory="false">
-
- <xts:logicsheet path="logicsheets/portal.xsl"/>
-
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:req-params="http://developer.cognos.com/schemas/request/params"
- xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
- exclude-result-prefixes="xsl req-params xtsext cm">
- <xsl:output method="xml" encoding="utf-8" indent="no"/>
- <xsl:key name="env-param" match="/root/env/param" use="@name"/>
- <xsl:key name="request-param" match="/root/requestParams/*[local-name()='param']" use="@name"/>
- <!-- can only be navigate, search or type -->
- <xsl:variable name="currentState">
- <xsl:choose>
- <xsl:when test="contains(key('request-param','requestState'),'|')">
- <xsl:value-of select="substring-before(key('request-param','requestState'),'|')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="key('request-param','requestState')"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <pf:variables/>
-
- <xsl:template name="setBrowserTitle">
- <xsl:param name="navigateTitleWithSuffix"/>
- <xsl:param name="navigateTitleWithoutSuffix"/>
- <xsl:param name="searchTitleWithSuffix"/>
- <xsl:param name="searchTitleWithoutSuffix"/>
- <xsl:param name="typeTitleWithSuffix"/>
- <xsl:param name="typeTitleWithoutSuffix"/>
-
- <browserTitle>
- <xsl:choose>
- <xsl:when test="$currentState = 'navigate'">
- <xsl:choose>
- <xsl:when test="key('request-param','titlePostfix') != ''"><xsl:value-of select="$navigateTitleWithSuffix"/></xsl:when>
- <xsl:otherwise><xsl:value-of select="$navigateTitleWithoutSuffix"/></xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:when test="$currentState = 'search'">
- <xsl:choose>
- <xsl:when test="key('request-param','titlePostfix') != ''"><xsl:value-of select="$searchTitleWithSuffix"/></xsl:when>
- <xsl:otherwise><xsl:value-of select="$searchTitleWithoutSuffix"/></xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:when test="$currentState = 'type'">
- <xsl:choose>
- <xsl:when test="key('request-param','titlePostfix') != ''"><xsl:value-of select="$typeTitleWithSuffix"/></xsl:when>
- <xsl:otherwise><xsl:value-of select="$typeTitleWithoutSuffix"/></xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:otherwise></xsl:otherwise>
- </xsl:choose>
- </browserTitle>
-
- </xsl:template>
- <xsl:template match="/">
- <xts:sequence>
- <!-- if we have selected entries and they haven't been unpacked yet, then unpack them -->
- <xsl:choose>
- <xsl:when test="not(/root/response) and key('env-param','selectedEntries')!=''">
- <xts:append select="/root">
- <response>
- <selectedEntries>
- <xts:transform name="XMLDecode">
- <xsl:value-of select="xtsext:web64decode(xtsext:cafaction('sign_unwrap',string(key('env-param','selectedEntries'))), true())"/>
- </xts:transform>
- </selectedEntries>
- </response>
- </xts:append>
- </xsl:when>
- <xsl:when test="not(/root/response/selectedEntries) and key('env-param','selectedEntries')!=''">
- <xts:append select="/root/response">
- <selectedEntries>
- <xts:transform name="XMLDecode">
- <xsl:value-of select="xtsext:web64decode(xtsext:cafaction('sign_unwrap',string(key('env-param','selectedEntries'))), true())"/>
- </xts:transform>
- </selectedEntries>
- </xts:append>
- </xsl:when>
- </xsl:choose>
- <xts:append select="/root">
- <businessRules>
- <!-- find out which title and description to display -->
- <xsl:choose>
- <!-- runnables -->
- <xsl:when test="key('request-param','addEntriesUI')='runnables'">
- <xsl:call-template name="setBrowserTitle">
- <xsl:with-param name="navigateTitleWithSuffix">
- <xts:string id="IDS_ADD_RUNNABLES_NAV_TITLE">
- <xts:param name="obj">
- <xsl:value-of select="xtsext:enforceBTD(key('request-param','titlePostfix'), $baseTextDirection, $productLocale, boolean($isBidiEnabled='true'))"/>
- </xts:param>
- </xts:string>
- </xsl:with-param>
- <xsl:with-param name="navigateTitleWithoutSuffix">
- <xts:string id="IDS_ADD_ENTRIES_GENERIC_TITLE"/>
- </xsl:with-param>
- <xsl:with-param name="searchTitleWithSuffix">
- <xts:string id="IDS_ADD_RUNNABLES_SEARCH_TITLE">
- <xts:param name="obj"><xsl:value-of select="key('request-param','titlePostfix')"/></xts:param>
- </xts:string>
- </xsl:with-param>
- <xsl:with-param name="searchTitleWithoutSuffix">
- <xts:string id="IDS_ADD_ENTRIES_GENERIC_TITLE"/>
- </xsl:with-param>
- </xsl:call-template>
- <description>
- <xts:string id="IDS_ADDENTRIES_RUNNABLES_DESCRIPTION"/>
- </description>
- </xsl:when>
- <!-- deployment packages -->
- <xsl:when test="key('request-param','addEntriesUI')='deploymentObjects'">
- <xsl:call-template name="setBrowserTitle">
- <xsl:with-param name="navigateTitleWithSuffix">
- <xts:string id="IDS_ADD_DEPLOYMENTPACKAGES_NAV_TITLE">
- <xts:param name="obj"><xsl:value-of select="key('request-param','titlePostfix')"/></xts:param>
- </xts:string>
- </xsl:with-param>
- <xsl:with-param name="navigateTitleWithoutSuffix">
- <xts:string id="IDS_ADD_ENTRIES_GENERIC_TITLE"/>
- </xsl:with-param>
- <xsl:with-param name="searchTitleWithSuffix">
- <xts:string id="IDS_ADD_DEPLOYMENTPACKAGES_SEARCH_TITLE">
- <xts:param name="obj"><xsl:value-of select="key('request-param','titlePostfix')"/></xts:param>
- </xts:string>
- </xsl:with-param>
- <xsl:with-param name="searchTitleWithoutSuffix">
- <xts:string id="IDS_ADD_ENTRIES_GENERIC_TITLE"/>
- </xsl:with-param>
- </xsl:call-template>
- <description>
- <xts:string id="IDS_ADDENTRIES_DEPLOYMENTPACKAGES_DESCRIPTION"/>
- </description>
- </xsl:when>
- <!-- recipients -->
- <xsl:when test="key('request-param','addEntriesUI')='recipients' or key('request-param','addEntriesUI')='humanTask' or key('request-param','addEntriesUI')='recipients_distribution'">
- <xsl:call-template name="setBrowserTitle">
- <xsl:with-param name="navigateTitleWithSuffix">
- <xts:string id="IDS_ADD_RECIPIENTS_NAV_TITLE">
- <xts:param name="obj">
- <xsl:value-of select="xtsext:enforceBTD(key('request-param','titlePostfix'), $baseTextDirection, $productLocale, boolean($isBidiEnabled='true'))"/>
- </xts:param>
- </xts:string>
- </xsl:with-param>
- <xsl:with-param name="navigateTitleWithoutSuffix">
- <xts:string id="IDS_ADD_RECIPIENTS_NAV_TITLE_PREFIX"/>
- </xsl:with-param>
- <xsl:with-param name="searchTitleWithSuffix">
- <xts:string id="IDS_ADD_RECIPIENTS_SEARCH_TITLE">
- <xts:param name="obj">
- <xsl:value-of select="xtsext:enforceBTD(key('request-param','titlePostfix'), $baseTextDirection, $productLocale, boolean($isBidiEnabled='true'))"/>
- </xts:param>
- </xts:string>
- </xsl:with-param>
- <xsl:with-param name="searchTitleWithoutSuffix">
- <xts:string id="IDS_ADD_RECIPIENTS_SEARCH_TITLE_PREFIX"/>
- </xsl:with-param>
- </xsl:call-template>
- <description>
- <xsl:choose>
- <xsl:when test="key('request-param','addEntriesUI')='recipients_distribution'"><xts:string id="IDS_ADDENTRIES_RECIPIENTS_DISTRIBUTION_DESCRIPTION"/></xsl:when>
- <xsl:when test="key('request-param','addEntriesUI')='humanTask'"><xts:string id="IDS_ADDENTRIES_INBOX_RECIPIENTS_DESCRIPTION"/></xsl:when>
- <xsl:otherwise><xts:string id="IDS_ADDENTRIES_RECIPIENTS_DESCRIPTION"/></xsl:otherwise>
- </xsl:choose>
- </description>
- </xsl:when>
- <!-- members -->
- <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'">
- <xsl:call-template name="setBrowserTitle">
- <xsl:with-param name="navigateTitleWithSuffix">
- <xsl:choose>
- <xsl:when test="key('request-param','addEntriesUI')='tenantMembers'">
- <xts:string id="IDS_ADDENTRIES_TENANTMEMBERS_TITLE">
- <xts:param name="obj">
- <xsl:value-of select="xtsext:enforceBTD(key('request-param','titlePostfix'), $baseTextDirection, $productLocale, boolean($isBidiEnabled='true'))"/>
- </xts:param>
- </xts:string>
- </xsl:when>
- <xsl:otherwise>
- <xts:string id="IDS_ADD_MEMBERS_NAV_TITLE">
- <xts:param name="obj">
- <xsl:value-of select="xtsext:enforceBTD(key('request-param','titlePostfix'), $baseTextDirection, $productLocale, boolean($isBidiEnabled='true'))"/>
- </xts:param>
- </xts:string>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:with-param>
- <xsl:with-param name="navigateTitleWithoutSuffix">
- <xts:string id="IDS_ADD_ENTRIES_GENERIC_TITLE"/>
- </xsl:with-param>
- <xsl:with-param name="searchTitleWithSuffix">
- <xts:string id="IDS_ADD_MEMBERS_SEARCH_TITLE">
- <xts:param name="obj">
- <xsl:value-of select="xtsext:enforceBTD(key('request-param','titlePostfix'), $baseTextDirection, $productLocale, boolean($isBidiEnabled='true'))"/>
- </xts:param>
- </xts:string>
- </xsl:with-param>
- <xsl:with-param name="searchTitleWithoutSuffix">
- <xts:string id="IDS_ADD_ENTRIES_GENERIC_TITLE"/>
- </xsl:with-param>
- <xsl:with-param name="typeTitleWithSuffix">
- <xts:string id="IDS_ADD_MEMBERS_TYPE_TITLE">
- <xts:param name="obj">
- <xsl:value-of select="xtsext:enforceBTD(key('request-param','titlePostfix'), $baseTextDirection, $productLocale, boolean($isBidiEnabled='true'))"/>
- </xts:param>
- </xts:string>
- </xsl:with-param>
- <xsl:with-param name="typeTitleWithoutSuffix">
- <xts:string id="IDS_ADD_ENTRIES_GENERIC_TITLE"/>
- </xsl:with-param>
- </xsl:call-template>
- <description>
- <xsl:choose>
- <xsl:when test="key('request-param','addEntriesUI')='members'">
- <xts:string id="IDS_ADDENTRIES_MEMBERS_DESCRIPTION"/>
- </xsl:when>
- <xsl:when test="key('request-param','addEntriesUI')='tenantMembers'">
- <xts:string id="IDS_ADDENTRIES_TENANTMEMBERS_DESCRIPTION"/>
- </xsl:when>
- <xsl:when test="key('request-param','addEntriesUI')='groupMembers'">
- <xts:string id="IDS_ADDENTRIES_GROUPMEMBERS_DESCRIPTION"/>
- </xsl:when>
- <xsl:when test="key('request-param','addEntriesUI')='privileges'">
- <xts:string id="IDS_ADDENTRIES_PRIVILEGES_DESCRIPTION"/>
- </xsl:when>
- </xsl:choose>
- </description>
- </xsl:when>
- <!-- pagelets -->
- <xsl:when test="key('request-param','addEntriesUI')='mypages'">
- <xsl:call-template name="setBrowserTitle">
- <xsl:with-param name="navigateTitleWithSuffix">
- <xts:string id="IDS_ADD_MYPAGES_NAV_TITLE">
- <xts:param name="obj">
- <xsl:value-of select="xtsext:enforceBTD(key('request-param','titlePostfix'), $baseTextDirection, $productLocale, boolean($isBidiEnabled='true'))"/>
- </xts:param>
- </xts:string>
- </xsl:with-param>
- <xsl:with-param name="navigateTitleWithoutSuffix">
- <xts:string id="IDS_ADD_MYPAGES_NAV_TITLE_PREFIX"/>
- </xsl:with-param>
- <xsl:with-param name="searchTitleWithSuffix">
- <xts:string id="IDS_ADD_MYPAGES_SEARCH_TITLE">
- <xts:param name="obj"><xsl:value-of select="key('request-param','titlePostfix')"/></xts:param>
- </xts:string>
- </xsl:with-param>
- <xsl:with-param name="searchTitleWithoutSuffix">
- <xts:string id="IDS_ADD_MYPAGES_SEARCH_TITLE_PREFIX"/>
- </xsl:with-param>
- </xsl:call-template>
- <description>
- <xts:string id="IDS_ADDENTRIES_MYPAGES_DESCRIPTION"/>
- </description>
- </xsl:when>
- <!-- potlets -->
- <xsl:when test="key('request-param','addEntriesUI')='portlet'">
- <xsl:call-template name="setBrowserTitle">
- <xsl:with-param name="navigateTitleWithSuffix">
- <xts:string id="IDS_MP_ADD_PORTLETS_NAVIGATE">
- <xts:param name="obj"><xsl:value-of select="key('request-param','titlePostfix')"/></xts:param>
- </xts:string>
- </xsl:with-param>
- <xsl:with-param name="navigateTitleWithoutSuffix">
- <xts:string id="IDS_MP_ADD_PORTLETS_NAVIGATE_PREFIX"/>
- </xsl:with-param>
- <xsl:with-param name="searchTitleWithSuffix">
- <xts:string id="IDS_MP_ADD_PORTLETS_SEARCH">
- <xts:param name="obj"><xsl:value-of select="key('request-param','titlePostfix')"/></xts:param>
- </xts:string>
- </xsl:with-param>
- <xsl:with-param name="searchTitleWithoutSuffix">
- <xts:string id="IDS_MP_ADD_PORTLETS_SEARCH_PREFIX"/>
- </xsl:with-param>
- </xsl:call-template>
- <description>
- <xts:string id="IDS_MP_ADD_PORTLETS_INTRO"/>
- </description>
- </xsl:when>
- <!-- links -->
- <xsl:when test="key('request-param','addEntriesUI')='links'">
- <xsl:call-template name="setBrowserTitle">
- <xsl:with-param name="navigateTitleWithSuffix">
- <xts:string id="IDS_ADD_ATTACHMENTS_NAV_TITLE">
- <xts:param name="obj"><xsl:value-of select="key('request-param','titlePostfix')"/></xts:param>
- </xts:string>
- </xsl:with-param>
- <xsl:with-param name="navigateTitleWithoutSuffix">
- <xts:string id="IDS_ADD_ATTACHMENTS_NAV_TITLE_PREFIX"/>
- </xsl:with-param>
- <xsl:with-param name="searchTitleWithSuffix">
- <xts:string id="IDS_ADD_ATTACHMENTS_SEARCH_TITLE">
- <xts:param name="obj"><xsl:value-of select="key('request-param','titlePostfix')"/></xts:param>
- </xts:string>
- </xsl:with-param>
- <xsl:with-param name="searchTitleWithoutSuffix">
- <xts:string id="IDS_ADD_ATTACHMENTS_SEARCH_TITLE_PREFIX"/>
- </xsl:with-param>
- </xsl:call-template>
- <description>
- <xts:string id="IDS_ADDENTRIES_LINKS_DESCRIPTION"/>
- </description>
- </xsl:when>
- <xsl:when test="key('request-param','addEntriesUI')='packagesAndLocations' or key('request-param','addEntriesUI')='indexUpdateLocations' or key('request-param','addEntriesUI')='packagesAndFolders'">
- <xsl:call-template name="setBrowserTitle">
- <xsl:with-param name="navigateTitleWithSuffix">
- <xts:string id="IDS_ADDENTRIES_TITLE_PACKAGES_LOCATIONS">
- <xts:param name="obj"><xsl:value-of select="key('request-param','titlePostfix')"/></xts:param>
- </xts:string>
- </xsl:with-param>
- <xsl:with-param name="navigateTitleWithoutSuffix">
- <xts:string id="IDS_ADD_ENTRIES_GENERIC_TITLE"/>
- </xsl:with-param>
- <xsl:with-param name="searchTitleWithSuffix">
- <xts:string id="IDS_ADDENTRIES_TITLE_PACKAGES_LOCATIONS">
- <xts:param name="obj"><xsl:value-of select="key('request-param','titlePostfix')"/></xts:param>
- </xts:string>
- </xsl:with-param>
- <xsl:with-param name="searchTitleWithoutSuffix">
- <xts:string id="IDS_ADD_ENTRIES_GENERIC_TITLE"/>
- </xsl:with-param>
- <xsl:with-param name="typeTitleWithSuffix">
- <xts:string id="IDS_ADDENTRIES_TITLE_PACKAGES_LOCATIONS">
- <xts:param name="obj"><xsl:value-of select="key('request-param','titlePostfix')"/></xts:param>
- </xts:string>
- </xsl:with-param>
- <xsl:with-param name="typeTitleWithoutSuffix">
- <xts:string id="IDS_ADD_ENTRIES_GENERIC_TITLE"/>
- </xsl:with-param>
- </xsl:call-template>
- <description>
- <xsl:choose>
- <xsl:when test="key('request-param','addEntriesUI')='packagesAndFolders'">
- <xts:string id="IDS_ADDENTRIES_INDEX_UPDATE_TASK_DESCRIPTION"/>
- </xsl:when>
- <xsl:otherwise>
- <xts:string id="IDS_ADDENTRIES_PACKAGES_LOCATIONS_DESCRIPTION"/>
- </xsl:otherwise>
- </xsl:choose>
- </description>
- </xsl:when>
- <xsl:when test="key('request-param','addEntriesUI')='publicFoldersPackagesAndFolders'">
- <xsl:call-template name="setBrowserTitle">
- <xsl:with-param name="navigateTitleWithSuffix">
- <xts:string id="IDS_ADDENTRIES_PLUBLICFOLDERS_PACKAGES_FOLDERS">
- <xts:param name="obj"><xsl:value-of select="key('request-param','titlePostfix')"/></xts:param>
- </xts:string>
- </xsl:with-param>
- <xsl:with-param name="navigateTitleWithoutSuffix">
- <xts:string id="IDS_ADD_ENTRIES_GENERIC_TITLE"/>
- </xsl:with-param>
- <xsl:with-param name="searchTitleWithSuffix">
- <xts:string id="IDS_ADDENTRIES_PLUBLICFOLDERS_PACKAGES_FOLDERS">
- <xts:param name="obj"><xsl:value-of select="key('request-param','titlePostfix')"/></xts:param>
- </xts:string>
- </xsl:with-param>
- <xsl:with-param name="searchTitleWithoutSuffix">
- <xts:string id="IDS_ADD_ENTRIES_GENERIC_TITLE"/>
- </xsl:with-param>
- </xsl:call-template>
- <description>
- <xts:string id="IDS_ADDENTRIES_PUBLICFOLDERS_PACKAGES_FOLDERS_DESCRIPTION"/>
- </description>
- </xsl:when>
- <xsl:when test="key('request-param','addEntriesUI')='rolapDataSources'">
- <xsl:call-template name="setBrowserTitle">
- <xsl:with-param name="navigateTitleWithSuffix">
- <xts:string id="IDS_ADDENTRIES_ROLAP_DATA_SOURCE">
- <xts:param name="obj"><xsl:value-of select="key('request-param','titlePostfix')"/></xts:param>
- </xts:string>
- </xsl:with-param>
- <xsl:with-param name="navigateTitleWithoutSuffix">
- <xts:string id="IDS_ADD_ENTRIES_GENERIC_TITLE"/>
- </xsl:with-param>
- <xsl:with-param name="searchTitleWithSuffix">
- <xts:string id="IDS_ADDENTRIES_ROLAP_DATA_SOURCE">
- <xts:param name="obj"><xsl:value-of select="key('request-param','titlePostfix')"/></xts:param>
- </xts:string>
- </xsl:with-param>
- <xsl:with-param name="searchTitleWithoutSuffix">
- <xts:string id="IDS_ADD_ENTRIES_GENERIC_TITLE"/>
- </xsl:with-param>
- </xsl:call-template>
- <description>
- <xts:string id="IDS_ADDENTRIES_ROLAP_DATA_SOURCE_DESCRIPTION"/>
- </description>
- </xsl:when>
- <xsl:when test="key('request-param','addEntriesUI')='jmxProxyHostDispatchers'">
- <xsl:call-template name="setBrowserTitle">
- <xsl:with-param name="navigateTitleWithSuffix">
- <xts:string id="IDS_ADDENTRIES_JMX_PROXY_HOST_DISPATCHERS">
- <xts:param name="obj"><xsl:value-of select="key('request-param','titlePostfix')"/></xts:param>
- </xts:string>
- </xsl:with-param>
- <xsl:with-param name="navigateTitleWithoutSuffix">
- <xts:string id="IDS_ADD_ENTRIES_GENERIC_TITLE"/>
- </xsl:with-param>
- <xsl:with-param name="searchTitleWithSuffix">
- <xts:string id="IDS_ADDENTRIES_JMX_PROXY_HOST_DISPATCHERS">
- <xts:param name="obj"><xsl:value-of select="key('request-param','titlePostfix')"/></xts:param>
- </xts:string>
- </xsl:with-param>
- <xsl:with-param name="searchTitleWithoutSuffix">
- <xts:string id="IDS_ADD_ENTRIES_GENERIC_TITLE"/>
- </xsl:with-param>
- </xsl:call-template>
- <description>
- <xts:string id="IDS_ADDENTRIES_JMX_PROXY_HOST_DISPATCHERS_DESCRIPTION"/>
- </description>
- </xsl:when>
- </xsl:choose>
-
- <xsl:if test="$currentState = 'search'">
- <!--<xsl:variable name="nsSearchPath" select="/root/containerInfo/cm:queryResponse/cm:queryReply/cm:namespace/cm:searchPath"/>-->
- <xsl:variable name="inside3rdPartyNamespace">
- <xsl:variable name="nsObj" select="/root/containerInfo/cm:queryResponse/cm:queryReply/*"/>
- <xsl:variable name="insideCognosNamespace" select="(starts-with($nsObj/cm:searchPath, "CAMID(':") or starts-with($nsObj/cm:searchPath, 'CAMID(":'))"/>
- <xsl:value-of select="($nsObj/cm:objectClass='namespace' or $nsObj/cm:ancestors/cm:ancestorInfo/cm:objectClass='namespace') and not($insideCognosNamespace)"/>
- </xsl:variable>
- <xsl:if test="$inside3rdPartyNamespace = 'true'">
- <queryNamespaceSearchDefaultMethodOptionSetting>true</queryNamespaceSearchDefaultMethodOptionSetting>
- </xsl:if>
- </xsl:if>
-
- </businessRules>
- </xts:append>
- <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']"/>
- <!-- if we performed an action -->
- <xsl:if test="contains(key('request-param','requestState'),'|')">
- <!-- delete the old selectedEntries web64encoded list -->
- <xts:delete select="/root/env/param[@name='selectedEntries']"/>
- <!-- recreate the selectedEntries web64encoded list -->
- <xts:append select="/root/env">
- <xts:transform src="portal/controls/create_web64_param.xslt" processor="XSLT">
- <param name="selectedEntries">
- <passport><xsl:value-of select="$passport"/></passport>
- <markup>
- <xts:transform name="XMLEncode">
- <xts:queryNode select="/root/*[local-name()='response']/*[local-name()='selectedEntries']/*"/>
- </xts:transform>
- </markup>
- </param>
- </xts:transform>
- </xts:append>
- <xts:replace select="/root/requestParams/*[local-name()='param' and @name='requestState']">
- <req-params:param name="requestState">
- <xsl:value-of select="$currentState"/>
- </req-params:param>
- </xts:replace>
- <xts:replace select="/root/*[local-name()='env']/*[local-name()='param' and @name='controller_state']">
- <param name="controller_state">
- <xsl:value-of select="xtsext:substringBeforeLast(string(key('env-param','controller_state')),'|')"/>
- </param>
- </xts:replace>
- </xsl:if>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ===============================================================================================
- getObjects - get object class names
- ===============================================================================================
- -->
- <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">
- <xts:logicsheet path="/logicsheets/uiobjects/uiobjects_names.xslt"/>
- </xts:block>
- <!--
- ===============================================================================================
- genMarkup -
- ===============================================================================================
- -->
- <xts:block id="genMarkup"
- type="exec"
- processor="XSLT"
- dependency="getSearchSet initialBlock businessRules classNames"
- condition=".[/root/requestParams/*[local-name()='param' and @name='requestState' and (. = 'navigate' or . = 'search' or . = 'type')]]"
- mandatory="false">
- <!-- logicsheets -->
- <!-- portal specific information -->
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- <!-- Dialog specific logicsheets -->
- <xts:logicsheet path="portal/addEntries/logicsheets/add_entries_templates.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/dialog/controller-templates.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/dialog/framework.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/layout.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/dialog/presentation.xsl"/>
- <xts:logicsheet path="portal/addEntries/logicsheets/pagers.xsl"/>
- <!-- Generic logicsheets -->
- <xts:logicsheet path="logicsheets/presentation/controls/framework.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/controls/presentation.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/main/presentation.xsl"/>
- <xts:logicsheet path="logicsheets/validation.xslt"/>
- <xts:logicsheet path="logicsheets/presentation/touch_up.xslt"/>
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:xts="http://developer.cognos.com/schemas/xts/"
- xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
- xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- xmlns:lyt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/layout/"
- xmlns:dp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/presentation/"
- xmlns:df="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/framework/"
- xmlns:cf="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/framework/"
- xmlns:xos="http://developer.cognos.com/schemas/xts/output/"
- xmlns:cp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/presentation/"
- xmlns:dlgctrl="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/controller-templates/"
- xmlns:aet="http://developer.cognos.com/schemas/xts/portal/addEntries/logicsheets/add_entries_templates/"
- xmlns:aep="http://developer.cognos.com/schemas/xts/portal/addEntries/logicsheets/pagers/"
- xmlns:mt="http://developer.cognos.com/schemas/xts/logicsheets/presentation/main/mt"
- exclude-result-prefixes="xts xsl cm pf xtsext lyt dp df cf cp xos dlgctrl aep aet mt ">
- <xsl:output method="xml" encoding="utf-8" indent="no"/>
- <xsl:key name="business-rules" match="/root/businessRules/*" use="local-name()"/>
- <xsl:key name="request-param" match="/root/requestParams/*[local-name()='param']" use="@name"/>
- <pf:variables/>
- <!-- Bidi common templates -->
- <pf:common-bidi-templates/>
- <pf:gen-icon/>
- <aet:variables/>
- <cp:flyoutControl/>
- <xsl:variable name="agentStudio" select="key('request-param','agentStudio') = 'true'"/>
- <mt:actions mode="portlets"/>
- <xsl:variable name="current_path">
- <xsl:choose>
- <xsl:when test="key('env-param','select_path') != ''">
- <xsl:value-of select="key('env-param','select_path')"/>
- </xsl:when>
- <xsl:when test="/root/containerInfo/cm:queryResponse/cm:queryReply/*/cm:searchPath != ''">
- <xsl:value-of select="/root/containerInfo/cm:queryResponse/cm:queryReply/*/cm:searchPath"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="key('request-param','defaultSearchPath')"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <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"/>
- <xsl:variable name="uiModeAllowsBurgandySearch" select="key('request-param', 'addEntriesUI')='runnables' or key('request-param', 'addEntriesUI')='links' or key('request-param', 'addEntriesUI')='mypages'"/>
- <xsl:variable name="allowedBurgandySearch" select="$userCanUseIndexSearch and $uiModeAllowsBurgandySearch and $inIndexableFolder"/>
- <xsl:variable name="objectClass" select="/root/containerInfo/cm:queryResponse/cm:queryReply/*/cm:objectClass"/>
- <xsl:variable name="insideCognosNamespace" select="(starts-with($current_path, "CAMID(':") or starts-with($current_path, 'CAMID(":'))"/>
- <xsl:variable name="inside3rdPartyNamespace" select="($objectClass='namespace' or /root/containerInfo/cm:queryResponse/cm:queryReply/*/cm:ancestors/cm:ancestorInfo/cm:objectClass='namespace') and not($insideCognosNamespace)"/>
- <xsl:variable name="canBrowse3rdPartyNamespace" select="not(/root/system/param[@name='enable-3rdparty-namespace-browsing']='false')"/>
- <xsl:template match="/root">
- <xts:sequence>
- <xts:append select="/root/output">
- <xos:part>
- <xos:entityHeader>
- <xos:param name="Content-Type">text/xml; charset=utf-8</xos:param>
- </xos:entityHeader>
- <xos:entityBody>
- <xsl:element name="{key('request-param','resultNode')}" namespace="">
- <markup>
- <xts:transform name="XMLEncode">
- <div role="region" aria-labelledby="add_entries_title_span add_entries_title_span_ext">
- <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>
- <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>
- <a href="#maincontent" tabindex="0" class="showOnFocus"><xts:string id="IDS_SECTION508_JUMPTOMAIN"/></a>
- <!-- adds standard hidden inputs and javascript -->
- <dlgctrl:markupHelper/>
-
- <dp:header div="div">
- <dp:title>
- <xsl:value-of select="key('business-rules','browserTitle')"/>
- </dp:title>
- <dp:description>
- <xsl:value-of select="key('business-rules','description')"/>
- </dp:description>
- <dp:close>
- <a href="#">
- <xsl:attribute name="onclick">
- <xsl:if test="key('request-param','isPopup')='true'">document.pform.target='_parent';</xsl:if>
- controller_changeState('canceled'); controller_submitForm('cancel');
- </xsl:attribute>
- <dp:closeMarker/>
- </a>
- </dp:close>
- <dp:headerLinks>
- <xsl:choose>
- <!-- navigate, search and type links in the header -->
- <xsl:when test="key('request-param','requestState') = 'navigate'">
- <xsl:if test="key('request-param','typeDialog')='true'">
- <dp:headerLink>
- <dp:hl_attribute name="href">#</dp:hl_attribute>
- <dp:hl_attribute name="class">class="dialogHeaderLink"</dp:hl_attribute>
- <dp:hl_attribute name="onclick">controller_changeState('type'); controller_submitForm('default');</dp:hl_attribute>
- <dp:hl_attribute name="label"><xts:string id="IDS_ADD_RECIPIENTS_TYPE_LINK"/></dp:hl_attribute>
- </dp:headerLink>
- </xsl:if>
- <xsl:choose>
- <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')">
- <dp:headerLink>
- <dp:hl_attribute name="href">#</dp:hl_attribute>
- <dp:hl_attribute name="class">class="dialogHeaderLink"</dp:hl_attribute>
- <dp:hl_attribute name="onclick">javascript:clearPagerVariables();controller_changeState('search'); controller_submitForm('default');</dp:hl_attribute>
- <dp:hl_attribute name="label"><xts:string id="IDS_ADD_RECIPIENTS_SEARCH_LINK"/></dp:hl_attribute>
- </dp:headerLink>
- </xsl:when>
- <xsl:otherwise>
- <dp:headerLinkInactive>
- <dp:inactiveHRef><xts:string id="IDS_ADD_RECIPIENTS_SEARCH_LINK"/></dp:inactiveHRef>
- </dp:headerLinkInactive>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:when test="key('request-param','requestState') = 'search'">
- <xsl:if test="key('request-param','typeDialog')='true'">
- <dp:headerLink>
- <dp:hl_attribute name="class">class="dialogHeaderLink"</dp:hl_attribute>
- <dp:hl_attribute name="href">#</dp:hl_attribute>
- <dp:hl_attribute name="onclick">controller_changeState('type'); controller_submitForm('default');</dp:hl_attribute>
- <dp:hl_attribute name="label"><xts:string id="IDS_ADD_RECIPIENTS_TYPE_LINK"/></dp:hl_attribute>
- </dp:headerLink>
- </xsl:if>
- <xsl:if test="not($inside3rdPartyNamespace) or $canBrowse3rdPartyNamespace">
- <dp:headerLink>
- <dp:hl_attribute name="class">class="dialogHeaderLink"</dp:hl_attribute>
- <dp:hl_attribute name="href">#</dp:hl_attribute>
- <dp:hl_attribute name="onclick">javascript:clearPagerVariables();controller_changeState('navigate'); controller_submitForm('default');</dp:hl_attribute>
- <dp:hl_attribute name="label"><xts:string id="IDS_ADD_RECIPIENTS_NAVIGATE_LINK"/></dp:hl_attribute>
- </dp:headerLink>
- </xsl:if>
- </xsl:when>
- <xsl:when test="key('request-param','requestState') = 'type'">
- <xsl:if test="not($inside3rdPartyNamespace) or $canBrowse3rdPartyNamespace">
- <dp:headerLink>
- <dp:hl_attribute name="class">class="dialogHeaderLink"</dp:hl_attribute>
- <dp:hl_attribute name="href">#</dp:hl_attribute>
- <dp:hl_attribute name="onclick">controller_changeState('navigate'); controller_submitForm('default');</dp:hl_attribute>
- <dp:hl_attribute name="label"><xts:string id="IDS_ADD_RECIPIENTS_NAVIGATE_LINK"/></dp:hl_attribute>
- </dp:headerLink>
- </xsl:if>
- <xsl:choose>
- <xsl:when test="(key('env-param','select_path')='/directory' and key('env-param','select_path')!='/') or not(key('env-param','select_path'))">
- <dp:headerLinkInactive>
- <dp:inactiveHRef><xts:string id="IDS_ADD_RECIPIENTS_SEARCH_LINK"/></dp:inactiveHRef>
- </dp:headerLinkInactive>
- </xsl:when>
- <xsl:otherwise>
- <dp:headerLink>
- <dp:hl_attribute name="class">class="dialogHeaderLink"</dp:hl_attribute>
- <dp:hl_attribute name="href">#</dp:hl_attribute>
- <dp:hl_attribute name="onclick">controller_changeState('search'); controller_submitForm('default');</dp:hl_attribute>
- <dp:hl_attribute name="label"><xts:string id="IDS_ADD_RECIPIENTS_SEARCH_LINK"/></dp:hl_attribute>
- </dp:headerLink>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- </xsl:choose>
- </dp:headerLinks>
- <dp:useDIVS>
- <xsl:choose>
- <xsl:when test="$agentStudio">
- <xsl:text>false</xsl:text>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text>true</xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- </dp:useDIVS>
- </dp:header>
-
- <pf:help context=""/>
-
- <input type="hidden" name="select_path">
- <xsl:attribute name="value">
- <xsl:choose>
- <xsl:when test="key('env-param','select_path') != ''"><xsl:value-of select="key('env-param','select_path')"/></xsl:when>
- <xsl:otherwise><xsl:value-of select="key('request-param','defaultSearchPath')"/></xsl:otherwise>
- </xsl:choose>
- </xsl:attribute>
- </input>
-
- <input type="hidden" name="selectedEntries" value="{key('env-param','selectedEntries')}"/>
- <input type="hidden" name="ps_nav_op" value=""/>
-
- <xsl:if test="/root/env/param[@name='m_pagerfromnavpager']">
- <input name="m_navpagersection" type="hidden" value="{key('env-param','m_navpagersection')}"/>
- <input name="m_listpagersection" type="hidden" value="{key('env-param','m_listpagersection')}"/>
- <input name="m_pagerfromnavpager" type="hidden" value="{key('env-param','m_pagerfromnavpager')}"/>
- <input name="m_pagertonavpager" type="hidden" value="{key('env-param','m_pagertonavpager')}"/>
- <input name="m_pagerfromlistpager" type="hidden" value="{key('env-param','m_pagerfromlistpager')}"/>
- <input name="m_pagertolistpager" type="hidden" value="{key('env-param','m_pagertolistpager')}"/>
- <input name="m_pg_elistpager" type="hidden" value="{key('env-param','m_pg_elistpager')}"/>
- <input name="m_pg_enavpager" type="hidden" value="{key('env-param','m_pg_enavpager')}"/>
- <!-- Nav -->
- <input name="m_navpagercontext" type="hidden" value="{key('env-param','m_navpagercontext')}"/>
- <!-- To track search change so we can delete 'm_pager' values -->
- <input type="hidden" name="m_navpagerSearchChange" value="false"/>
- </xsl:if>
-
- <xsl:variable name="search_find"> <!-- {basic | index} search -->
- <xsl:choose>
- <xsl:when test="string(key('env-param', 'search_find')) != ''">
- <xsl:value-of select="string(key('env-param','search_find'))"/>
- </xsl:when>
- <xsl:when test="$allowedBurgandySearch"><xsl:value-of select="'b'"/></xsl:when>
- <xsl:otherwise>
- <!-- user initiates index search but has no capability - switch to basic search mode -->
- <xsl:value-of select="'none'"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
-
- <xsl:variable name="passport">
- <xsl:value-of select="/root/credential/param[@name='CAM']/*[local-name() ='CAM']/*[local-name() = 'CAMPassport']/*[local-name() = 'id']"/>
- </xsl:variable>
-
- <script language="javascript">
-
- var cafContextId = "<xsl:text/>
- <xsl:if test="$passport != '' and string(key('env-param','ui.compid')) != ''">
- <xsl:value-of select="xtsext:cafaction(concat('get_contextid_setcomponent_',concat(key('env-param', 'ui.compid'),concat('_settemplatename_addentries_setpassportid_', $passport))), '')"/>
- </xsl:if>
- <xsl:text/>";
- if ( window.external && window.external.HasSetCAFContextId ) {
- window.external.SetCAFContextId(cafContextId);
- }
- function validate()
- {
- var frm = document.pform;
- for (var i=0; i < frm.elements.length; i++)
- {
- if (frm.elements[i].name == 'nav_checkbox' && frm.elements[i].checked)
- {
- alert('<xts:string id="IDS_ADDENTRIES_SELECTED_ERROR" encode="javascript"/>');
- return false;
- }
- }
-
- return true;
- }
-
- function init()
- {
- <xsl:if test="key('request-param','requestState') = 'search' ">
- var smode = '<xsl:value-of select="xtsext:javascriptencode(string($search_find))"/>';
- toggleSearchMode(smode);
-
- </xsl:if>
- <xsl:if test="key('request-param','isPopup')='true'">
- if (parent.show_div) {
- parent.show_div('makeModalDiv');
- }
-
- if (parent.show_iFrame) {
- parent.show_iFrame('addEntriesFrame');
- }
- </xsl:if>
-
- <!-- if we're in the type tab then set the focus to the textarea -->
- <xsl:if test="key('request-param','requestState') = 'type'">
- if (document.pform.type_entries)
- {
- document.pform.type_entries.focus();
- }
- </xsl:if>
- <xsl:if test="$baseTextDirection = 'auto'">
- if (isBidiEnabled && typeof document.pform.search_keywords_bas != "undefined")
- {
- document.pform.search_keywords_bas.dir = bidi.resolveStrBtd(document.pform.search_keywords_bas.value);
- }
- </xsl:if>
- return;
-
- }
-
- function showUsers()
- {
- var frm = document.pform;
- var entrySelected = false;
-
- for (var i=0; i < frm.elements.length; i++)
- {
- if (frm.elements[i].name == 'nav_checkbox' && frm.elements[i].checked)
- {
- entrySelected = true;
- break;
- }
- }
-
- if (entrySelected && window.confirm("<xts:string id='IDS_ADDENTRIES_SELECTED_SHOW_USERS' encode="javascript"/>"))
- {
- <xsl:choose>
- <xsl:when test="key('request-param','addEntriesUI')='recipients' or key('request-param','addEntriesUI')='humanTask'">
- controller_changeState('<xsl:value-of select="key('request-param','requestState')"/>|add_to');
- </xsl:when>
- <xsl:otherwise>
- controller_changeState('<xsl:value-of select="key('request-param','requestState')"/>|add');
- </xsl:otherwise>
- </xsl:choose>
- }
- controller_submitForm('default');
- }
-
- function clearPagerVariables()
- {
- var frm = document.pform;
- if (frm.m_pagerfromnavpager) {
- frm.m_pagerfromnavpager.value="";
- }
- if (frm.m_pagertonavpager) {
- frm.m_pagertonavpager.value="";
- }
- if (frm.m_navpagersection) {
- frm.m_navpagersection.value="";
- }
- if (frm.m_listpagersection) {
- frm.m_listpagersection.value="";
- }
- if (frm.m_pagerfromlistpager) {
- frm.m_pagerfromlistpager.value="";
- }
- if (frm.m_pagertolistpager) {
- frm.m_pagertolistpager.value="";
- }
- if (frm.m_pg_elistpager){
- frm.m_pg_elistpager.value="";
- }
- if (frm.m_pg_enavpager){
- frm.m_pg_enavpager.value="";
- }
- if (frm.m_navpagersection) {
- frm.m_navpagersection.value="";
- }
- }
-
- </script>
-
- <!-- body -->
- <lyt:layout style="1">
- <lyt:section>
- <div>
- <dp:box valign="top" width="100%">
- <!-- what's the maximum number of entries the navigate pager should show -->
- <xsl:variable name="maxNavPagerObjs">
- <xsl:choose>
- <xsl:when test="string(/root/env/param[@name = 'm_pagertonavpager']) !='' and string(/root/env/param[@name = 'm_pagerfromnavpager']) !=''">
- <xsl:value-of select="(/root/env/param[@name = 'm_pagertonavpager'] - /root/env/param[@name = 'm_pagerfromnavpager'])+1"/>
- </xsl:when>
- <xsl:when test="/root/*[local-name()='session']/*[local-name()='param'][@name='linesPerPage']!=''">
- <xsl:value-of select="/root/*[local-name()='session']/*[local-name()='param'][@name='linesPerPage']"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="/root/*[local-name()='system']/*[local-name()='param'][@name='defaultPortalPreferences']/pref[@name='lines']"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <!-- number of items in the cm response -->
- <xsl:variable name="responseCount" select="count(/root/*[local-name()='response']/*[local-name()='content']/cm:queryResponse/cm:queryReply[position()='2']/*)"/>
- <!-- how many items are currently being shown -->
- <xsl:variable name="responseDisplayCount">
- <xsl:choose>
- <xsl:when test="$responseCount > $maxNavPagerObjs">
- <xsl:value-of select="$maxNavPagerObjs"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$responseCount"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <!-- what's the maximum number of entries the added entries paged can show -->
- <xsl:variable name="maxListPagerObjs">
- <xsl:choose>
- <xsl:when test="string(/root/env/param[@name = 'm_pagertolistpager']) !='' and string(/root/env/param[@name = 'm_pagerfromlistpager']) !=''">
- <xsl:value-of select="(/root/env/param[@name = 'm_pagertolistpager'] - /root/env/param[@name = 'm_pagerfromlistpager']) + 1"/>
- </xsl:when>
- <xsl:when test="/root/*[local-name()='session']/*[local-name()='param'][@name='linesPerPage']!=''">
- <xsl:value-of select="/root/*[local-name()='session']/*[local-name()='param'][@name='linesPerPage']"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="/root/*[local-name()='system']/*[local-name()='param'][@name='defaultPortalPreferences']/pref[@name='lines']"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <!-- number of added entries -->
- <xsl:variable name="selectedCount" select="count(/root/*[local-name()='response']/*[local-name()='selectedEntries']/*)"/>
- <!-- calculate how many objects are being displayed in the right pager -->
- <xsl:variable name="addedDisplayCount">
- <xsl:choose>
- <xsl:when test="$selectedCount < $maxListPagerObjs">
- <xsl:value-of select="$selectedCount"/>
- </xsl:when>
- <xsl:when test="not(key('env-param','m_listpagersection') > 1)">
- <xsl:value-of select="$maxListPagerObjs"/>
- </xsl:when>
- <xsl:when test="($selectedCount - key('env-param','m_listpagersection')) > $maxListPagerObjs">
- <xsl:value-of select="$maxListPagerObjs"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="($selectedCount - key('env-param','m_listpagersection'))"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <!-- left side of the page -->
- <dp:boxSection width="40%" valign="top" wrap="wrap">
- <div tabindex="-1" role="group">
- <xsl:attribute name="aria-label">
- <xts:string id="IDS_ADDENTRIES_AVAILABLE_ENTRIES"/>
- </xsl:attribute>
- <dp:division title="IDS_ADDENTRIES_AVAILABLE_ENTRIES"/>
- <xsl:if test="key('request-param','requestState') = 'navigate' or key('request-param','requestState') = 'search'">
- <!-- Must cast key('session-param','e_hp') into a string to give the correct result since we are comparing two node values.-->
- <xsl:variable name="isPersonalFoldersRoot" select="$current_path = '~' or string(key('session-param','e_hp')) = $current_path"/>
- <!-- Specify start path and title when we do not want to show the navigation path starting at the root of the ancestors tree. -->
- <xsl:variable name="start-at-path">
- <xsl:if test="starts-with($current_path, key('session-param', 'e_hp')) or (starts-with($current_path, '~'))">
- <xsl:value-of select="key('session-param', 'e_hp')"/>
- </xsl:if>
- </xsl:variable>
- <xsl:variable name="start-at-path-title">
- <xsl:if test="starts-with($current_path, key('session-param', 'e_hp')) or (starts-with($current_path, '~'))">
- <xsl:text>
- <xts:string id="IDS_ADDENTRIES_ROOT_TITLE"/>
- </xsl:text>
- </xsl:if>
- </xsl:variable>
- <div>
- <cf:do-the-path-link>
- <cf:param name="familytree">*[local-name()='containerInfo']/cm:queryResponse/cm:queryReply/*/cm:ancestors</cf:param>
- <cf:param name="familymember">*[local-name()='containerInfo']/cm:queryResponse/cm:queryReply/*/cm:defaultName</cf:param>
- <cf:param name="isRootPath">
- <xsl:value-of select="$isPersonalFoldersRoot"/>
- </cf:param>
- <cf:param name="home">
- <xsl:value-of select="$start-at-path"/>
- </cf:param>
- <cf:param name="home-title">
- <xsl:value-of select="$start-at-path-title"/>
- </cf:param>
- <cf:param name="anchorpath">
- <xsl:choose>
- <xsl:when test="$home-title!='' and (string(position())=$start-position or position() = 1)">
- <xsl:variable name="encodedPath" select="xtsext:javascriptencode(string('/'))"/>
- <a href="#" onClick="document.pform.select_path.value = '{$encodedPath}'; document.pform.m_navpagersection.value = '1'; controller_changeState('navigate'); controller_submitForm('default');">
- <xsl:if test="$isBidiEnabled = 'true'">
- <xsl:attribute name="dir">
- <xsl:value-of select="xtsext:getBTD($home-title, $baseTextDirection, $productLocale)"/>
- </xsl:attribute>
- </xsl:if>
- <xsl:value-of select="$home-title"/>
- </a>
- </xsl:when>
- <xsl:otherwise>
- <xsl:variable name="encodedPath" select="xtsext:javascriptencode(string(cm:searchPath))"/>
- <a href="#" onClick="document.pform.select_path.value = '{$encodedPath}'; document.pform.m_navpagersection.value = '1'; controller_changeState('navigate'); controller_submitForm('default');">
- <xsl:if test="$isBidiEnabled = 'true'">
- <xsl:attribute name="dir">
- <xsl:value-of select="xtsext:getBTD(cm:title, $baseTextDirection, $productLocale)"/>
- </xsl:attribute>
- </xsl:if>
- <xsl:value-of select="cm:title"/>
- </a>
- </xsl:otherwise>
- </xsl:choose>
- </cf:param>
- </cf:do-the-path-link>
- </div>
- </xsl:if>
- <xsl:choose>
- <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx NAVIGATExxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->
- <xsl:when test="key('request-param','requestState') = 'navigate'">
- <!-- keep track of the search specific fields -->
- <input type="hidden" name="search_method" value="{key('env-param','search_method')}"/>
- <input type="hidden" name="search_scope" value="{key('env-param','search_scope')}"/>
- <input type="hidden" name="search_type" value="{key('env-param','search_type')}"/>
- <input type="hidden" name="search_find" value="{key('env-param','search_find')}"/>
- <input type="hidden" name="search_modified" value="{key('env-param','search_modified')}"/>
- <input type="hidden" name="search_type_index" value="{key('env-param','search_type_index')}"/>
- <!-- show users checkbox -->
- <xsl:choose>
- <xsl:when test="key('request-param','showUsers') = 'true' and key('system-param', 'enable-show-users-support')!='false'">
- <dp:choice>
- <dp:section1>
- <input type="checkbox" id="addentries_showusers" name="addentries_showusers" value="true" onclick="showUsers()">
- <xsl:if test="key('env-param','addentries_showusers')!=''">
- <xsl:attribute name="checked">checked</xsl:attribute>
- </xsl:if>
- </input>
- </dp:section1>
- <dp:section2>
- <label for="addentries_showusers">
- <xts:string id="IDS_ADDENTRIES_NAVIGATE_SHOWUSERS"/>
- </label>
- </dp:section2>
- </dp:choice>
- </xsl:when>
- <xsl:otherwise>
- <!-- if the right pager has more then 25 entries, then the remove action will also show up over
- the pager. Add a spacer to make sure the middle buttons still align with the top of the pager -->
- <xsl:if test="$addedDisplayCount > 25">
- <table border="0" cellspacing="0" cellpadding="0" role="presentation">
- <tr>
- <td class="formLink"> </td>
- </tr>
- </table>
- </xsl:if>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx SEARCH xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->
- <!-- search -->
- <xsl:when test="key('request-param','requestState') = 'search'">
- <!-- keep track of form fields specific to the other add entries dialogs -->
- <input type="hidden" name="addentries_showusers" value="{key('env-param','addentries_showusers')}"/>
- <script language="javascript" src="{$webcontent}/{$app}/js/CCflyoutMenu.js"></script>
- <script language="javascript">
- function search()
- {
- var frm = document.pform;
- if (frm.m_navpagerSearchChange) {
- frm.m_navpagerSearchChange.value = 'true';
- }
- <xsl:if test="$allowedBurgandySearch">
- if (frm.search_find.value == 'b' || frm.search_find.value == 'none' || frm.search_find.value=='')
- {
- frm.search_keywords.value = frm.search_keywords_bas.value
- }
- </xsl:if>
- controller_submitForm('default');
- setTimeout('document.images["imgSearch"].src="<xsl:value-of select="xtsext:javascriptencode(string($image_root))"/>action_search_ani.gif"',1);
- }
- function searchKeyHandler()
- {
- var Key;
- if (window.event)
- {
- Key = window.event.keyCode;
- if (Key==13)
- {
- search();
- }
- }
- }
- <!-- Toggle search mode -->
- function toggleSearchMode(smode)
- {
- var allowedBurgandySearch = <xsl:value-of select="$allowedBurgandySearch"/>;
- var searchOptions_index = document.getElementById('searchOptions_index');
- var searchOptions_basic = document.getElementById('searchOptions_basic');
- if (!allowedBurgandySearch) {
- searchOptions_basic.style.display = '';
- } else {
- if (smode != 'b' && smode != 'none') {
- searchOptions_basic.style.display = "";
- searchOptions_index.style.display = 'none';
- } else {
- searchOptions_index.style.display = '';
- searchOptions_basic.style.display = 'none';
- }
- }
- }
- <!-- +++++++++++++ Set Flyout Caption Functions ++++++++++++++ -->
- function setFindTextIn(selected_value, caption)
- {
- var findTextInMenu_caption = document.getElementById("findTextInMenu_caption");
- if (findTextInMenu_caption) {
- findTextInMenu_caption.innerHTML = caption;
- }
- var obj = document.getElementById('search_find');
- if (obj) {
- obj.value = selected_value;
- }
- toggleSearchMode(selected_value);
- }
- function setSearchMethod(selected_value,caption)
- {
- var searchMethodMenu_caption = document.getElementById("searchMethodMenu_caption");
- if( searchMethodMenu_caption ) {
- searchMethodMenu_caption.innerHTML = caption;
- }
- var obj = document.getElementById('search_method');
- if (obj) {
- obj.value = selected_value;
- }
- }
- function setSearchModified(selected_value,caption)
- {
- var searchModifiedMenu_caption = document.getElementById("searchModifiedMenu_caption");
- if( searchModifiedMenu_caption ) {
- searchModifiedMenu_caption.innerHTML = caption;
- }
- var obj = document.getElementById('search_modified');
- if (obj) {
- obj.value = selected_value;
- }
- }
- function setSearchType(selected_value,caption)
- {
- var searchTypeMenu_caption = document.getElementById("searchTypeMenu_caption");
- if( searchTypeMenu_caption ) {
- searchTypeMenu_caption.innerHTML = caption;
- }
- var obj = document.getElementById('search_type');
- if (obj) {
- obj.value = selected_value;
- }
- }
- function setSearchIndexType(selected_value,caption)
- {
- var searchTypeMenu_caption = document.getElementById("searchIndexTypeMenu_caption");
- if( searchTypeMenu_caption ) {
- searchTypeMenu_caption.innerHTML = caption;
- }
- var obj = document.getElementById('search_type_index');
- if (obj) {
- obj.value = selected_value;
- }
- }
- function setSearchScope(selected_value,caption)
- {
- var searchScopeMenu_caption = document.getElementById("searchScopeMenu_caption");
- if( searchScopeMenu_caption ) {
- searchScopeMenu_caption.innerHTML = caption;
- }
- var obj = document.getElementById('search_scope');
- if (obj) {
- obj.value = selected_value;
- }
- }
- </script>
- <!-- search_find will now determine the which search to use: burgandy or basic search -->
- <xsl:variable name="findTextInMenu">
- <flyout id="findTextInMenu">
- <items>
- <itemGroup id="findTextInMenuGroup">
- <xsl:if test="$allowedBurgandySearch">
- <item id="findTextInMenu_b">
- <xsl:if test="$search_find='b' or $search_find='none'">
- <xsl:attribute name="itemSelectedState">checked</xsl:attribute>
- </xsl:if>
- <text>
- <xts:string id="IDS_KEYWORD"/>
- </text>
- <action>
- CCPopupMenu.activeMenu.setMenuItemChecked("findTextInMenu_b");setFindTextIn('b','<xts:string id="IDS_KEYWORD" encode="javascript"/>');
- </action>
- </item>
- </xsl:if>
- <item id="findTextInMenu_n">
- <xsl:if test="$search_find='n' or (not($allowedBurgandySearch) and $search_find='none')">
- <xsl:attribute name="itemSelectedState">checked</xsl:attribute>
- </xsl:if>
- <text>
- <xts:string id="IDS_NAME_FIELD"/>
- </text>
- <action>
- CCPopupMenu.activeMenu.setMenuItemChecked("findTextInMenu_n");setFindTextIn('n','<xts:string id="IDS_NAME_FIELD" encode="javascript"/>');
- </action>
- </item>
- <item id="findTextInMenu_d">
- <xsl:if test="$search_find='d'">
- <xsl:attribute name="itemSelectedState">checked</xsl:attribute>
- </xsl:if>
- <text>
- <xts:string id="IDS_DESC_FIELD"/>
- </text>
- <action>
- CCPopupMenu.activeMenu.setMenuItemChecked("findTextInMenu_d");setFindTextIn('d','<xts:string id="IDS_DESC_FIELD" encode="javascript"/>');
- </action>
- </item>
- <item id="findTextInMenu_nd">
- <xsl:if test="$search_find='nd'">
- <xsl:attribute name="itemSelectedState">checked</xsl:attribute>
- </xsl:if>
- <text>
- <xts:string id="IDS_NAME_DESC_FIELD"/>
- </text>
- <action>
- CCPopupMenu.activeMenu.setMenuItemChecked("findTextInMenu_nd");setFindTextIn('nd','<xts:string id="IDS_NAME_DESC_FIELD" encode="javascript"/>');
- </action>
- </item>
- </itemGroup>
- </items>
- </flyout>
- </xsl:variable>
- <dp:list>
- <dp:section>
- <div>
- <dp:list>
- <dp:section valign="middle">
- <dp:label valign="top" width="1%" nospace="true">
- <label id="find_text_in_label">
- <xts:string id="IDS_ADDENTRIES_SEARCH_FIND_TXT_IN"/>
- </label>
- </dp:label>
- <dp:link wrap="wrap" valign="top">
- <input id="search_find" name="search_find" type="hidden" value="{$search_find}"/>
- <div id="findTextInMenu_span" style="margin-left:5px;z-index:10;position: relative;">
- <a href="#" onclick="return CCPopupMenu.dropDown(event,0,0,'findTextInMenu');" role="button" aria-haspopup="true">
- <div style="white-space: nowrap;" aria-labelledby="find_text_in_label">
- <span id="findTextInMenu_caption" style="vertical-align: top;">
- <xsl:choose>
- <xsl:when test="$allowedBurgandySearch and ($search_find = 'b' or $search_find='none')">
- <xts:string id="IDS_KEYWORD"/>
- </xsl:when>
- <xsl:when test="$search_find='n' or (not($allowedBurgandySearch) and $search_find='none')">
- <xts:string id="IDS_NAME_FIELD"/>
- </xsl:when>
- <xsl:when test="$search_find = 'd'">
- <xts:string id="IDS_DESC_FIELD"/>
- </xsl:when>
- <xsl:when test="$search_find = 'nd'">
- <xts:string id="IDS_NAME_DESC_FIELD"/>
- </xsl:when>
- </xsl:choose>
- </span>
- <span style="vertical-align: middle;">
- <img name="findTextInMenu_imgFlyControl" src="{$skin_shared_images}dropdown_arrow.gif" title="" alt="" border="0"/>
- </span>
- </div>
- </a>
- </div>
- </dp:link>
- <xsl:call-template name="renderPopup">
- <xsl:with-param name="flyoutXML">
- <xsl:copy-of select="$findTextInMenu"/>
- </xsl:with-param>
- <xsl:with-param name="controlID">findTextInMenu_span</xsl:with-param>
- </xsl:call-template>
- </dp:section>
- </dp:list>
- </div>
- </dp:section>
- <dp:section>
- <div>
- <table border="0" width="100%" cellpadding="0" cellspacing="0">
- <tr>
- <td>
- <xsl:variable name="keywords" select="key('env-param','search_keywords_bas')"/>
- <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}">
- <xsl:call-template name="add-bidi-onfocus-event">
- <xsl:with-param name="value" select="$keywords"/>
- </xsl:call-template>
- </input>
- <xsl:if test="$allowedBurgandySearch">
- <input type="hidden" name="search_keywords" value=""/>
- </xsl:if>
- </td>
- <dp:button>
- <dp:defaultAct>search();</dp:defaultAct>
- <a href="javascript:search()">
- <dp:buttonText>
- <xts:string id="IDS_SEARCH_BUTTON"/>
- </dp:buttonText>
- <dp:buttonImage name="imgSearch" dp:tooltip="IDS_SEARCH_BUTTON">{$image_root}action_search.gif</dp:buttonImage>
- </a>
- </dp:button>
- <td>
- <cf:dynamicExpandingSectionTop indent="no" name="b_search" title="IDS_ADV_SEARCH_OPTIONS" expanding="yes" border="no"/>
- </td>
- </tr>
- <tr>
- <td colspan="4">
- <!-- Advanced options - flyout -->
- <cf:dynamicExpandingSectionBody name="b_search" title="IDS_ADV_SEARCH_OPTIONS" expanding="yes" border="no">
- <table width="100%">
- <tr>
- <!-- <dp:groupItem><img height="1" width="10" src="{'{$webcontent}'}/images/space.gif" alt=""/></dp:groupItem>-->
- <td width="100%" class="sectionBackground">
- <xsl:if test="$allowedBurgandySearch">
- <div id="searchOptions_index">
- <aet:searchOptionsIndex/>
- </div>
- </xsl:if>
- <!-- Basic search options -->
- <div id="searchOptions_basic">
- <xsl:choose>
- <!-- Disable the modified search when inside a third party namespace -->
- <xsl:when test="(starts-with(key('env-param','select_path'), 'CAMID')) and not((starts-with(key('env-param','select_path'), "CAMID(':") or starts-with(key('env-param','select_path'), 'CAMID(":')))">
- <aet:searchOptionsBasic modified="no"/>
- </xsl:when>
- <xsl:otherwise>
- <aet:searchOptionsBasic/>
- </xsl:otherwise>
- </xsl:choose>
- </div>
- </td>
- </tr>
- </table>
- </cf:dynamicExpandingSectionBody>
- </td>
- </tr>
- </table>
- </div>
- </dp:section>
- </dp:list>
- </xsl:when>
- <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx TYPE xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->
- <!-- type -->
- <xsl:when test="key('request-param','requestState') = 'type'">
- <!-- keep track of form fields specific to the other add entries dialogs -->
- <input type="hidden" name="addentries_showusers" value="{key('env-param','addentries_showuser')}"/>
- <!-- keep track of the search specific fields -->
- <input type="hidden" name="search_method" value="{key('env-param','search_method')}"/>
- <input type="hidden" name="search_scope" value="{key('env-param','search_scope')}"/>
- <input type="hidden" name="search_type" value="{key('env-param','search_type')}"/>
- <dp:list>
- <dp:section>
- <dp:label id="lbl_type_entries">
- <xts:string id="IDS_ADD_MEMBERS_TYPE_NAMES"/>
- </dp:label>
- </dp:section>
- <dp:section>
- <dp:text wrap="wrap" tdClass="dialogHeaderText">
- <span id="desc_type_entries">
- <xts:string id="IDS_ADD_MEMBERS_TYPE_HINT"/>
- </span>
- </dp:text>
- </dp:section>
- <dp:section>
- <textarea name="type_entries" cols="80" rows="10" style="width:100%" aria-labelledby="lbl_type_entries" aria-describedby="desc_type_entries">
- <xsl:choose>
- <!-- if we have a invalid_typed_entries element, then we just performed an add operation.
- Make sure we display any entries that aren't valid -->
- <xsl:when test="/root/response/*[local-name()='invalid_typed_entries']">
- <xsl:value-of select="/root/response/*[local-name()='invalid_typed_entries']"/>
- </xsl:when>
- <!-- we didn't perform an add operation, so make sure we keep track of any entries that
- the user type before the page got reloaded -->
- <xsl:otherwise>
- <xsl:value-of select="key('env-param','type_entries')"/>
- </xsl:otherwise>
- </xsl:choose>
- </textarea>
- </dp:section>
- </dp:list>
- </xsl:when>
- </xsl:choose>
- <!-- if the right pager has more then 25 entries, then the remove action will also show up over
- the pager. Add a spacer to make sure the middle buttons still align with the top of the pager -->
- <xsl:choose>
- <xsl:when test="key('request-param','requestState') = 'type'">
- <!-- todo -->
- </xsl:when>
- <xsl:otherwise>
- <script language="javascript" src="{$webcontent}/{$app}/js/list.js"></script>
- <a>
- <xsl:attribute name="name">
- <xts:string id="IDS_ADDENTRIES_AVAILABLE_ENTRIES"/>
- </xsl:attribute>
- </a>
- <aep:navigatePager/>
- </xsl:otherwise>
- </xsl:choose>
- </div>
- </dp:boxSection>
- <!-- middle buttons -->
- <dp:boxSection width="10%" align="center" valign="top">
- <xsl:attribute name="height">
- <xsl:choose>
- <xsl:when test="$browser='safari'">
- <!--
- The Safari browser has a known problem with height="100%"
- when we set the height to anything less than the height of the box, safari will grab the box height
- -->
- <xsl:text>1</xsl:text>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text>100%</xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:attribute>
- <!-- if the right pager has more then 25 entries, then the remove action will also show up over
- the pager. Add a spacer to make sure the middle buttons still align with the top of the pager -->
- <xsl:if test="$addedDisplayCount > 25">
- <dp:label class="formLink"> </dp:label>
- </xsl:if>
- <table border="0" cellspacing="0" cellpadding="1" height="100%" role="presentation">
- <tr>
- <td valign="top">
- <img height="34" width="1" src="{$webcontent}/images/space.gif" alt=""/>
- </td>
- </tr>
- <tr>
- <td valign="top">
- <xsl:if test="$addedDisplayCount < 26 and $responseDisplayCount < 26">
- <xsl:attribute name="height">100%</xsl:attribute>
- </xsl:if>
- <a>
- <xsl:attribute name="name">
- <xts:string id="IDS_ADDENTRIES_ACTIONS"/>
- </xsl:attribute>
- </a>
- <xsl:call-template name="middleButtons"/>
- </td>
- </tr>
- <xsl:if test="$addedDisplayCount > 25 or $responseDisplayCount > 25">
- <tr>
- <td height="100%" valign="bottom" nowrap="nowrap">
- <xsl:call-template name="middleButtons"/>
- <xsl:choose>
- <xsl:when test="$addedDisplayCount >= $responseDisplayCount">
- <img height="44" width="1" src="{$webcontent}/images/space.gif" alt=""/>
- <dp:label class="formLink"> </dp:label>
- </xsl:when>
- <xsl:otherwise>
- <img height="22" width="1" src="{$webcontent}/images/space.gif" alt=""/>
- </xsl:otherwise>
- </xsl:choose>
- </td>
- </tr>
- </xsl:if>
- </table>
- </dp:boxSection>
- <!-- right side of the page -->
- <dp:boxSection width="40%" valign="top" height="100%">
- <div role="group" tabindex="-1">
- <xsl:attribute name="aria-label">
- <xts:string id="IDS_ADDENTRIES_SELECTED_ENTRIES"/>
- </xsl:attribute>
- <dp:division title="IDS_ADDENTRIES_SELECTED_ENTRIES"/>
- <a>
- <xsl:attribute name="name">
- <xts:string id="IDS_ADDENTRIES_SELECTED_ENTRIES"/>
- </xsl:attribute>
- </a>
- <aep:selectedEntriesPager/>
- </div>
- </dp:boxSection>
- </dp:box>
- </div>
- </lyt:section>
- </lyt:layout>
- <!-- footer -->
- <xsl:choose>
- <xsl:when test="key('request-param','displayButtons') != 'false'">
- <dp:footer div="div">
- <xsl:choose>
- <xsl:when test="key('request-param','inWizard') = 'true'">
- <dlgctrl:wizardButtons validateFunction="validate"/>
- </xsl:when>
- <xsl:otherwise>
- <dlgctrl:okCancelButtons validateFunction="validate"/>
- </xsl:otherwise>
- </xsl:choose>
- <dp:useDIVS>
- <xsl:choose>
- <xsl:when test="$agentStudio">
- <xsl:text>false</xsl:text>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text>true</xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- </dp:useDIVS>
- </dp:footer>
- </xsl:when>
- <xsl:otherwise>
- <dp:emptyFooter div="div"/>
- </xsl:otherwise>
- </xsl:choose>
-
- <!-- if the user tried to add a duplicate entry -->
- <xsl:if test="/root/response/*[local-name()='duplicateEntry'] = 'true'">
- <script language="javascript">
- alert("<xts:string id="IDS_ADDENTRIES_DUPLICATE_WARNING" encode="javascript"/>");
- </script>
- </xsl:if>
- <xsl:if test="/root/response/*[local-name()='invalid_typed_entries'] != ''">
- <script language="javascript">
- 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']))"/>");
- </script>
- </xsl:if>
- </div>
- </xts:transform>
- </markup>
- <browserTitle>
- <xsl:if test="key('business-rules','browserTitle') != ''">
- <xts:transform name="XMLEncode">
- <xsl:value-of select="key('business-rules','browserTitle')"/>
- </xts:transform>
- </xsl:if>
- </browserTitle>
- <isPopup>
- <xsl:value-of select="key('request-param','isPopup')"/>
- </isPopup>
- </xsl:element>
- </xos:entityBody>
- </xos:part>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- <xsl:template name="middleButtons">
- <xsl:choose>
- <xsl:when test="key('request-param','addEntriesUI')='recipients' and key('request-param','withCC') = 'false'">
- <dp:columnButtonGroup align="center" skipColumnButtons="true" label="IDS_ADDENTRIES_AVAILABLE_ENTRIES">
- <dp:columnButton>
- <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');">
- <df:image df:tooltip="IDS_ADD_RECIPIENTS_TO">{$image_root}move_right.gif</df:image>
- </df:button>
- </dp:columnButton>
- </dp:columnButtonGroup>
- </xsl:when>
- <xsl:when test="key('request-param','addEntriesUI')='recipients' and key('request-param','withBCC') = 'true'">
- <dp:columnButtonGroup align="center" skipColumnButtons="true" label="IDS_ADDENTRIES_AVAILABLE_ENTRIES">
- <dp:columnButton>
- <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');">
- <df:image df:tooltip="IDS_ADD_RECIPIENTS_TO_TOOLTIP">{$image_root}move_right.gif</df:image>
- </df:button>
- </dp:columnButton>
- <dp:columnButton>
- <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');">
- <df:image df:tooltip="IDS_ADD_RECIPIENTS_CC_TOOLTIP">{$image_root}move_right.gif</df:image>
- </df:button>
- </dp:columnButton>
- <dp:columnButton>
- <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');">
- <df:image df:tooltip="IDS_ADD_RECIPIENTS_BCC_TOOLTIP">{$image_root}move_right.gif</df:image>
- </df:button>
- </dp:columnButton>
- </dp:columnButtonGroup>
- </xsl:when>
- <xsl:when test="key('request-param','addEntriesUI')='recipients' and key('request-param','withBCC') = 'false'">
- <dp:columnButtonGroup align="center" skipColumnButtons="true" label="IDS_ADDENTRIES_AVAILABLE_ENTRIES">
- <dp:columnButton>
- <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');">
- <df:image df:tooltip="IDS_ADD_RECIPIENTS_TO_TOOLTIP">{$image_root}move_right.gif</df:image>
- </df:button>
- </dp:columnButton>
- <dp:columnButton>
- <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');">
- <df:image df:tooltip="IDS_ADD_RECIPIENTS_CC_TOOLTIP">{$image_root}move_right.gif</df:image>
- </df:button>
- </dp:columnButton>
- </dp:columnButtonGroup>
- </xsl:when>
- <xsl:when test="key('request-param','addEntriesUI')='humanTask'">
- <dp:columnButtonGroup align="center" skipColumnButtons="true" label="IDS_ADDENTRIES_AVAILABLE_ENTRIES">
- <dp:columnButton>
- <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');">
- <df:image df:tooltip="IDS_ADD_RECIPIENTS_POTENTIAL_OWNER_TOOLTIP">{$image_root}move_right.gif</df:image>
- </df:button>
- </dp:columnButton>
- <dp:columnButton>
- <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');">
- <df:image df:tooltip="IDS_ADD_RECIPIENTS_STAKEHOLDER_TOOLTIP">{$image_root}move_right.gif</df:image>
- </df:button>
- </dp:columnButton>
- </dp:columnButtonGroup>
- </xsl:when>
- <xsl:otherwise>
- <dp:columnButtonGroup width="20" label="IDS_ADDENTRIES_AVAILABLE_ENTRIES">
- <dp:columnButton>
- <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');">
- <df:image df:tooltip="IDS_SELECT_LANG_ADD">{$image_root}move_right.gif</df:image>
- </df:button>
- </dp:columnButton>
- </dp:columnButtonGroup>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ===============================================================================================
- debug - special debug block for nested requests
- ===============================================================================================
- -->
- <xts:block id="debug" type="exec" processor="XSLT" mimeType="text/html" dependency="genMarkup returnResult" condition=".[/root/session/param[@name='debug']='1']" mandatory="false">
- <!-- get the debug logic sheet -->
- <xts:logicsheet path="logicsheets/debuglogic.xslt"/>
- <xsl:stylesheet version="1.0"
- xmlns:xos="http://developer.cognos.com/schemas/xts/output/"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:dbg="http://developer.cognos.com/schemas/xts/logicsheets/xslt/debug/"
- exclude-result-prefixes="dbg xos">
- <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no" omit-xml-declaration="yes"/>
- <xsl:template match="/">
- <xts:sequence>
- <xsl:if test="/root/requestParams/*[local-name()='param' and @name='requestState'] != 'canceled' or /root/requestParams/*[local-name()='param' and @name='requestState'] != 'finished'">
- <xsl:variable name="resultNode" select="/root/requestParams/*[local-name()='param' and @name='resultNode']"/>
- <xts:append select="/root/output/*[local-name() = 'part']/*[local-name() = 'entityBody']/*[local-name()='{$resultNode}']">
- <debugDump>
- <xts:transform name="XMLEncode">
- <dbg:dumpxml select="/root/*[local-name()!='header' and local-name()!='output' and local-name()!='system' and local-name()!='http' and local-name()!='session']">
- <dbg:title>add_entries.xts</dbg:title>
- </dbg:dumpxml>
- </xts:transform>
- </debugDump>
- </xts:append>
- </xsl:if>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- </xts:morphlet>
|