portal.xsl 209 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. Licensed Materials - Property of IBM
  4. IBM Cognos Products: ps
  5. (C) Copyright IBM Corp. 2005, 2019
  6. US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  7. -->
  8. <!-- This stylesheet defines global portal variables and templates. -->
  9. <xsl:stylesheet version="1.0"
  10. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  11. xmlns:out="dummy-uri"
  12. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  13. xmlns:xts="http://developer.cognos.com/schemas/xts/"
  14. xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
  15. xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
  16. xmlns:mt="http://developer.cognos.com/schemas/xts/logicsheets/presentation/main/mt"
  17. exclude-result-prefixes="xsl xtsext xts pf cm">
  18. <xsl:output method="xml" encoding="UTF-8" indent="no"/>
  19. <xsl:namespace-alias stylesheet-prefix="out" result-prefix="xsl"/>
  20. <!--
  21. This stylesheet (portal.xsl) consists of the following templates:
  22. html[mt:page] - converts html doc to standards mode
  23. pf:modalVariables - defines various global variables required by the modal dialog framework
  24. pf:variables - defines various global variables (system, user, root,...) that are used in CC pages.
  25. pf:meta - defines meta data for the CC web pages.
  26. pf:help - defines CC web page help javascript.
  27. pf:launch - Adds functions and includes necessary to run Studios.
  28. pf:gen-url - generates the gen-url template that in turn generates CC web page hyperlinks.
  29. pf:gen-icon - generates the gen-icon template that in turn generates CC web page icons.
  30. pf:gen-class-name - generates the gen-class-name template that is used to determine class names.
  31. pf:serialize-xml - generates the serialize-xml template that is used to convert a chunk of xml into a xml-encoded string.
  32. pf:utilities - misc. helper templates
  33. pf:common-bidi-templates" - enforce BTD on the given value if bidiEnabled is set to true
  34. -->
  35. <!--
  36. Template - html[mt:page]:
  37. This template adds the HTML standards mode doctype in an applicable way
  38. -->
  39. <xsl:template match="html[descendant::mt:page]">
  40. <xsl:choose>
  41. <xsl:when test="@encodeDocType='false'">
  42. <out:text disable-output-escaping='yes'>&lt;!DOCTYPE html></out:text>
  43. </xsl:when>
  44. <xsl:otherwise>
  45. <out:text disable-output-escaping="yes">&lt;![CDATA[&lt;!DOCTYPE html&gt;]]&gt;&#10;</out:text>
  46. </xsl:otherwise>
  47. </xsl:choose>
  48. <html>
  49. <xsl:copy-of select="@*[name() != 'encodeDocType']"/>
  50. <xsl:apply-templates select="./*"/>
  51. </html>
  52. </xsl:template>
  53. <!--
  54. Template - pf:modalVariables:
  55. This template defines global variables used to enable dialogs to be used in the modal dialog framework
  56. Operation:
  57. Generate global variables.
  58. -->
  59. <xsl:template match="pf:modalVariables">
  60. <out:variable name="isModal" select="/root/env/param[@name='md.callBack'] or /root/command/*[local-name()='handleFault']/*[local-name()='originalRequest']//item[name='md.callBack']"/>
  61. <out:variable name="callBackDataFormat">
  62. <out:choose>
  63. <out:when test="string(/root/env/param[@name='md.callBack']) = 'xml' or string(/root/command/*[local-name()='handleFault']/*[local-name()='originalRequest']//item[name='md.callBack']/value) = 'xml'">xml</out:when>
  64. <out:when test="string(/root/env/param[@name='md.callBack']) = 'singleValue' or string(/root/command/*[local-name()='handleFault']/*[local-name()='originalRequest']//item[name='md.callBack']/value) = 'singleValue'">singleValue</out:when><!-- TODO: get rid of this -->
  65. <out:when test="string(/root/env/param[@name='md.callBack']) != '' or string(/root/command/*[local-name()='handleFault']/*[local-name()='originalRequest']//item[name='md.callBack']/value) != ''">data</out:when>
  66. </out:choose>
  67. </out:variable>
  68. <out:variable name="callBackMode">
  69. <out:choose>
  70. <out:when test="string(/root/env/param[@name='md.callBackMode']) = 'external' or string(/root/command/*[local-name()='handleFault']/*[local-name()='originalRequest']//item[name='md.callBackMode']/value) = 'external'">external</out:when>
  71. <out:otherwise>parent</out:otherwise>
  72. </out:choose>
  73. </out:variable>
  74. <out:variable name="callBackFunctionName" select="'ccModalCallBack'"/>
  75. <out:variable name="callBackTargetJSVar">
  76. <out:choose>
  77. <out:when test="$callBackMode = 'external'">
  78. <out:text/>window.external &amp;&amp; typeof window.external.Has<out:value-of select="$callBackFunctionName"/> != "undefined" ? window.external : null<out:text/>
  79. </out:when>
  80. <out:otherwise>
  81. <out:text/>window.opener &amp;&amp; typeof window.opener.<out:value-of select="$callBackFunctionName"/> != "undefined" ? window.opener : <out:value-of select="$callBackMode"/>
  82. </out:otherwise>
  83. </out:choose>
  84. </out:variable>
  85. </xsl:template>
  86. <!-- Global JavaScript - Requires <pf:variables> -->
  87. <xsl:template match="pf:script">
  88. <script language="JavaScript">
  89. function g_PS_getWebRoot()
  90. {
  91. return "<out:value-of select="xtsext:javascriptencode($webRoot)"/>";
  92. }
  93. </script>
  94. </xsl:template>
  95. <xsl:template match="pf:mvc-variables" name="mvc-variables">
  96. <!-- MVC -->
  97. <out:variable name="mvc-remote-gateway" select="string(/root/mvcSettings/configuration/property[@name='MVC_remoteGateway'])"/>
  98. <out:variable name="mvc-remote-webcontent" select="string(/root/mvcSettings/configuration/property[@name='MVC_remoteWebContent'])"/>
  99. <out:variable name="mvc-domain" select="string(/root/mvcSettings/configuration/property[@name='MVC_domain'])"/>
  100. <out:variable name="mvc-disable-autologon" select="string(/root/mvcSettings/configuration/property[@name='MVC_disableAutoLogOn']) = 'true'"/>
  101. <out:variable name="mvc-N-enabled" select="/root/session/param[@name='mvcsys'] = 'n'"/>
  102. </xsl:template>
  103. <xsl:template match="pf:campassportcookie" name="campassportcookie">
  104. <out:variable name="CAMPassportCookie">
  105. <out:choose>
  106. <out:when test="/root/setCookies/cookie[@name='cam_passport' and string(@maxAge) != '-1']">
  107. <out:value-of select="string(/root/setCookies/cookie[@name='cam_passport'])"/>
  108. </out:when>
  109. <out:otherwise>
  110. <out:value-of select="string(/root/cookies/cookie[@name='cam_passport'])"/>
  111. </out:otherwise>
  112. </out:choose>
  113. </out:variable>
  114. </xsl:template>
  115. <xsl:template match="pf:sessionpassport" name="sessionpassport">
  116. <xsl:call-template name="campassportcookie"/>
  117. <out:variable name="passport">
  118. <out:choose>
  119. <!-- pull the passport out of the bus header -->
  120. <out:when test="/root/credential/param[@name='CAM']/*[local-name() ='CAM']/*[local-name() = 'CAMPassport']/*[local-name() = 'id']">
  121. <out:value-of select="/root/credential/param[@name='CAM']/*[local-name() ='CAM']/*[local-name() = 'CAMPassport']/*[local-name() = 'id']"/>
  122. </out:when>
  123. <!-- For those blocks that specify node list and execlude <credential> node -->
  124. <out:when test="/root/header/*[local-name() = 'biBusHeader']/*[local-name()= 'CAM']/CAMPassport/id">
  125. <out:value-of select="/root/header/*[local-name() = 'biBusHeader']/*[local-name()= 'CAM']/CAMPassport/id"/>
  126. </out:when>
  127. <!-- For those super rare cases where both <credential> and <header> elements are not available - or - the passport is being cleared -->
  128. <out:otherwise>
  129. <out:value-of select="xtsext:camcookie_action('getPassportID', $CAMPassportCookie)"/>
  130. </out:otherwise>
  131. </out:choose>
  132. </out:variable>
  133. </xsl:template>
  134. <!--
  135. Template - pf:variable:
  136. This template defines global variables used to guide the construction of the CC Web pages. These
  137. variables are based on information from various system, user and root information.
  138. Operation:
  139. Generate global variables.
  140. -->
  141. <xsl:template match="pf:variables">
  142. <out:key name="system-param" match="/root/system/param" use="@name"/>
  143. <out:key name="env-param" match="/root/env/param" use="@name"/>
  144. <out:key name="session-param" match="/root/session/param" use="@name"/>
  145. <out:key name="user-param" match="/root/user/param" use="@name"/>
  146. <out:key name="ui-object" match="/root/system/param[@name='ui_objects']/object" use="@class"/>
  147. <out:key name="ui-object-actions" match="/root/system/param[@name='base-object-actions']/actions/object | /root/actions/object" use="@class"/>
  148. <out:key name="ui-object-properties" match="/root/tabs/object" use="@class"/>
  149. <xsl:call-template name="mvc-variables"/>
  150. <!-- Application variables -->
  151. <out:variable name="user_skin">
  152. <out:choose>
  153. <out:when test="key('env-param', 'skin') != ''">
  154. <out:value-of select="key('env-param', 'skin')"/>
  155. </out:when>
  156. <out:when test="key('user-param', 'skin') != ''">
  157. <out:value-of select="key('user-param', 'skin')"/>
  158. </out:when>
  159. <out:otherwise>
  160. <out:value-of select="key('system-param', 'defaultPortalPreferences')/pref[@name='skin']"/>
  161. </out:otherwise>
  162. </out:choose>
  163. </out:variable>
  164. <!-- bidi -->
  165. <out:variable name="isBidiEnabled">
  166. <out:choose>
  167. <out:when test="key('user-param', 'http://developer.cognos.com/ceba/constants/biDirectionalOptionEnum#biDirectionalFeaturesEnabled') != ''">
  168. <out:value-of select="key('user-param', 'http://developer.cognos.com/ceba/constants/biDirectionalOptionEnum#biDirectionalFeaturesEnabled')"/>
  169. </out:when>
  170. <out:otherwise>false</out:otherwise>
  171. </out:choose>
  172. </out:variable>
  173. <out:variable name="baseTextDirection">
  174. <out:variable name="ns_name">
  175. <out:value-of select="key('user-param', 'http://developer.cognos.com/ceba/constants/biDirectionalOptionEnum#baseTextDirection')"/>
  176. </out:variable>
  177. <out:choose>
  178. <out:when test="$ns_name != ''">
  179. <out:value-of select="translate(substring-after($ns_name,'#'),'LTRA','ltra')"/>
  180. </out:when>
  181. <out:otherwise>auto</out:otherwise>
  182. </out:choose>
  183. </out:variable>
  184. <out:variable name="defTextAlign">
  185. <out:choose>
  186. <out:when test="xtsext:isRTLLocale($productLocale) = 'true'">right</out:when>
  187. <out:otherwise>left</out:otherwise>
  188. </out:choose>
  189. </out:variable>
  190. <out:variable name="webRoot">
  191. <out:choose>
  192. <out:when test="/root/http/param[@name='WEB_CONTENT_ROOT']">
  193. <out:value-of select="string(/root/http/param[@name='WEB_CONTENT_ROOT'])"/>
  194. </out:when>
  195. <!-- No official config param is present. Make this relative. -->
  196. <out:otherwise>..</out:otherwise>
  197. </out:choose>
  198. </out:variable>
  199. <out:variable name="webcontent" select="concat($webRoot, '/ps')"/>
  200. <out:variable name="skincontent" select="concat($webRoot, '/skins')"/>
  201. <out:variable name="gateway" select="string(/root/http/param[@name='SCRIPT_NAME'])"/>
  202. <out:variable name="cookie_path">
  203. <out:value-of select="/root/configProps/param[@name='cc']/property[@name='cookiePath']"/>
  204. </out:variable>
  205. <out:variable name="cookie_domain">
  206. <out:value-of select="/root/configProps/param[@name='cc']/property[@name='cookieDomain']"/>
  207. </out:variable>
  208. <out:variable name="cookie_secure">
  209. <out:value-of select="/root/configProps/param[@name='cc']/property[@name='cookieSecure']"/>
  210. </out:variable>
  211. <out:variable name="app" select="key('system-param', 'app')"/>
  212. <out:variable name="image_root" select="concat($webcontent, '/', $app, '/images/')"/>
  213. <out:variable name="skin_root" select="concat($webRoot, '/skins', '/', $user_skin)"/>
  214. <out:variable name="skin_images" select="concat($skin_root, '/', $app, '/images/')"/>
  215. <out:variable name="skin_shared_images" select="concat($skin_root, '/shared/images/')"/>
  216. <out:variable name="skin_style" select="concat($skin_root, '/', $app, '/default.css')"/>
  217. <out:variable name="skin_banner" select="concat($skin_root, '/shared/banner.css')"/>
  218. <out:variable name="skin_fonts" select="concat($skin_root, '/fonts.css')"/>
  219. <out:variable name="skin_portlet" select="concat($skin_root, '/fragments/portlet.css')"/>
  220. <out:variable name="brand_images" select="concat($skin_root, '/branding/')"/>
  221. <out:variable name="product_name"><xts:string id="IDS_COGNOS_REPORTS"/></out:variable>
  222. <out:variable name="download_specialCharacters"><xts:string id="IDS_DOWNLOAD_SPECIALCHARACTERS"/></out:variable>
  223. <!-- Session variables -->
  224. <xsl:call-template name="sessionpassport"/>
  225. <!-- TODO: read these flags directly from the CAM header -->
  226. <out:variable name="is-secure" select="substring($passport,1,1)"/>
  227. <out:variable name="allow-anon" select="substring($passport,2,1)"/>
  228. <out:variable name="is-named" select="substring($passport,3,1)"/>
  229. <!-- Set this variable up, so that CAF will not error when doing logoff and attempting to set up the cafContextID<studio> variables below -->
  230. <out:variable name="passportForCafContext">
  231. <out:choose>
  232. <out:when test="/root/setCookies/cookie[@name='cam_passport' and string(@maxAge)='-1']"/>
  233. <out:otherwise><out:value-of select="$passport"/></out:otherwise>
  234. </out:choose>
  235. </out:variable>
  236. <!-- CAF Context IDs -->
  237. <!-- Report Studio -->
  238. <out:variable name="cafContextIDRS">
  239. <out:if test="$passportForCafContext != ''"><out:value-of select="xtsext:cafaction(concat('get_contextid_settemplatename_portalxsl_setcomponent_rs_setpassportid_', $passportForCafContext), '')"/></out:if>
  240. </out:variable>
  241. <!-- Query Studio -->
  242. <out:variable name="cafContextIDQS">
  243. <out:if test="$passportForCafContext != ''"><out:value-of select="xtsext:cafaction(concat('get_contextid_settemplatename_portalxsl_setcomponent_qs_setpassportid_', $passportForCafContext), '')"/></out:if>
  244. </out:variable>
  245. <!-- Analysis Studio -->
  246. <out:variable name="cafContextIDANS">
  247. <out:if test="$passportForCafContext != ''"><out:value-of select="xtsext:cafaction(concat('get_contextid_settemplatename_portalxsl_setcomponent_ans_setpassportid_', $passportForCafContext), '')"/></out:if>
  248. </out:variable>
  249. <!-- Event Studio -->
  250. <out:variable name="cafContextIDAGS">
  251. <out:if test="$passportForCafContext != ''"><out:value-of select="xtsext:cafaction(concat('get_contextid_settemplatename_portalxsl_setcomponent_es_setpassportid_', $passportForCafContext), '')"/></out:if>
  252. </out:variable>
  253. <!-- CMM -->
  254. <out:variable name="cafContextIDCMM">
  255. <out:if test="$passportForCafContext != ''"><out:value-of select="xtsext:cafaction(concat('get_contextid_settemplatename_portalxsl_setcomponent_cmm_setpassportid_', $passportForCafContext), '')"/></out:if>
  256. </out:variable>
  257. <!-- Request variables -->
  258. <out:variable name="user-agent" select="string(/root/http/param[@name='HTTP_USER_AGENT'])"/>
  259. <out:variable name="browser">
  260. <out:choose>
  261. <out:when test="contains($user-agent , 'MSIE')">ie</out:when> <!-- IE 4.xx and above -->
  262. <out:when test="contains($user-agent , 'Trident')">ie</out:when> <!-- ie 11 -->
  263. <out:when test="contains($user-agent , 'Safari/5') and not(contains($user-agent , 'Chrome'))">safari</out:when> <!-- Safari user-agent does not contain Chrome -->
  264. <out:when test="contains($user-agent , 'Chrome')">chrome</out:when> <!-- Chrome user-agent contains Safari also -->
  265. <out:when test="contains($user-agent , 'Mozilla/5.0')">moz</out:when> <!-- NS 6.xx and 7.xx -->
  266. <out:when test="contains($user-agent , 'Mozilla/4.')">ns4</out:when> <!-- NS 4.xx -->
  267. <out:when test="string-length($user-agent) = 0">undefined</out:when>
  268. <out:otherwise>other</out:otherwise>
  269. </out:choose>
  270. </out:variable>
  271. <!-- Browsers that work with QS -->
  272. <out:variable name="isQSFriendlyBrowser" select="contains(key('system-param', 'capabilities')/capability[@name='canUseQueryStudio']/@browser, $browser)"/>
  273. <!-- User Preferences -->
  274. <out:variable name="userPreferences" select="/root/user"/>
  275. <out:variable name="productLocale">
  276. <out:value-of select="$userPreferences/param[@name='productLocale']"/>
  277. </out:variable>
  278. <out:variable name="defaultOutputFormat">
  279. <out:value-of select="$userPreferences/param[@name='format']"/>
  280. </out:variable>
  281. <out:variable name="contentLocale">
  282. <out:value-of select="$userPreferences/param[@name='contentLocale']"/>
  283. </out:variable>
  284. <out:variable name="timeZone">
  285. <out:value-of select="$userPreferences/param[@name='timeZoneID']"/>
  286. </out:variable>
  287. <out:variable name="mappedProductLocale" select="xtsext:mapProductLocale(string(/root/user/param[@name='productLocale']))"/>
  288. <!-- Disabled for Titan -->
  289. <out:variable name="rsBIAProfile" select="false()"/>
  290. <out:variable name="rsPROProfile" select="false()"/>
  291. <!-- edition is set in cogstartup.xml -->
  292. <out:variable name="edition" select="string(/root/configProps/param[@name='cc']/property[@name='edition'])"/>
  293. <xsl:call-template name="gen-sessionCapabilitiesVars"/>
  294. <out:variable name="defaultContentRoot">
  295. <out:choose>
  296. <out:when test="key('session-param', 'e_root') and key('session-param', 'e_root') != ''">
  297. <out:value-of select="key('session-param', 'e_root')"/>
  298. </out:when>
  299. <out:otherwise>
  300. <out:value-of select="'/content'"/>
  301. </out:otherwise>
  302. </out:choose>
  303. </out:variable>
  304. <out:variable name="rsUIProfile">
  305. <out:choose>
  306. <out:when test="$rsPROProfile">
  307. <out:text>Professional</out:text>
  308. </out:when>
  309. <out:when test="$rsBIAProfile">
  310. <out:text>BUA_standalone</out:text>
  311. </out:when>
  312. </out:choose>
  313. </out:variable>
  314. <out:variable name="formatNameLookUp">
  315. <formats>
  316. <format id="CSV"><xts:string id="IDS_PROP_FORMAT_CSV"/></format>
  317. <format id="PDF"><xts:string id="IDS_PROP_FORMAT_PDF"/></format>
  318. <format id="HTML"><xts:string id="IDS_PROP_FORMAT_HTML"/></format>
  319. <format id="XML"><xts:string id="IDS_PROP_FORMAT_XML"/></format>
  320. <format id="XLWA"><xts:string id="IDS_PROP_FORMAT_XLS_2002"/></format>
  321. <format id="spreadsheetML"><xts:string id="IDS_PROP_FORMAT_XLS_2007"/></format>
  322. <format id="singleXLS"><xts:string id="IDS_PROP_FORMAT_SINGLE_XLS"/></format>
  323. <format id="XLS"><xts:string id="IDS_PROP_FORMAT_XLS"/></format>
  324. <format id="XHTML"><xts:string id="IDS_PROP_FORMAT_XHTML"/></format>
  325. <format id="HTMLFragment"><xts:string id="IDS_OTHERRUN_FORMAT_HTMLFRAGMENT"/></format>
  326. <format id="spreadsheetMLOfficeConnectionEnabled"><xts:string id="IDS_PROP_FORMAT_XLS_COC"/></format>
  327. <format id="xlsxData"><xts:string id="IDS_PROP_FORMAT_XLS_2007_DATA"/></format>
  328. <!--Restricting output formats -->
  329. <format id="CSV_RO"><xts:string id="IDS_PROP_FORMAT_CSV_RO"/></format>
  330. <format id="PDF_RO"><xts:string id="IDS_PROP_FORMAT_PDF_RO"/></format>
  331. <format id="XML_RO"><xts:string id="IDS_PROP_FORMAT_XML_RO"/></format>
  332. <format id="XLWA_RO"><xts:string id="IDS_PROP_FORMAT_XLS_2002_RO"/></format>
  333. <format id="spreadsheetML_RO"><xts:string id="IDS_PROP_FORMAT_XLS_2007_RO"/></format>
  334. <format id="singleXLS_RO"><xts:string id="IDS_PROP_FORMAT_SINGLE_XLS_RO"/></format>
  335. <format id="XLS_RO"><xts:string id="IDS_PROP_FORMAT_XLS_RO"/></format>
  336. <format id="spreadsheetMLOfficeConnectionEnabled_RO"><xts:string id="IDS_PROP_FORMAT_XLS_COC_RO"/></format>
  337. <format id="xlsxData_RO"><xts:string id="IDS_PROP_FORMAT_XLS_2007_DATA_RO"/></format>
  338. </formats>
  339. </out:variable>
  340. <out:variable name="supportedFormats">
  341. <out:for-each select="key('system-param','reportFormats')/format">
  342. <out:value-of select="concat(' ',@id, ' ')"/>
  343. </out:for-each>
  344. </out:variable>
  345. <out:variable name="documentFormats">
  346. <!-- 2003 -->
  347. <format name="application/vnd.coc-xl">
  348. <type><xts:string id="IDS_OBJ_COGNOS_OFFICE_DOCUMENT"/></type>
  349. <readableFormat><xts:string id="IDS_PROP_FORMAT_DOCUMENT_XLS"/></readableFormat>
  350. </format>
  351. <format name="application/vnd.coc-wd">
  352. <type><xts:string id="IDS_OBJ_COGNOS_OFFICE_DOCUMENT"/></type>
  353. <readableFormat><xts:string id="IDS_PROP_FORMAT_DOCUMENT_WORD"/></readableFormat>
  354. </format>
  355. <format name="application/vnd.coc-pp">
  356. <type><xts:string id="IDS_OBJ_COGNOS_OFFICE_DOCUMENT"/></type>
  357. <readableFormat><xts:string id="IDS_PROP_FORMAT_DOCUMENT_POWERPOINT"/></readableFormat>
  358. </format>
  359. <!-- 2007 -->
  360. <format name="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet">
  361. <type><xts:string id="IDS_OBJ_COGNOS_OFFICE_DOCUMENT"/></type>
  362. <readableFormat><xts:string id="IDS_PROP_FORMAT_DOCUMENT_XLSX"/></readableFormat>
  363. </format>
  364. <format name="application/vnd.openxmlformats-officedocument.wordprocessingml.document">
  365. <type><xts:string id="IDS_OBJ_COGNOS_OFFICE_DOCUMENT"/></type>
  366. <readableFormat><xts:string id="IDS_PROP_FORMAT_DOCUMENT_WORDX"/></readableFormat>
  367. </format>
  368. <format name="application/vnd.openxmlformats-officedocument.presentationml.presentation">
  369. <type><xts:string id="IDS_OBJ_COGNOS_OFFICE_DOCUMENT"/></type>
  370. <readableFormat><xts:string id="IDS_PROP_FORMAT_DOCUMENT_POWERPOINTX"/></readableFormat>
  371. </format>
  372. <!-- 2007 - macro-enabled -->
  373. <format name="application/vnd.coc-xl.2007.macroEnabled">
  374. <type><xts:string id="IDS_OBJ_COGNOS_OFFICE_DOCUMENT"/></type>
  375. <readableFormat><xts:string id="IDS_PROP_FORMAT_DOCUMENT_XLSX"/></readableFormat>
  376. </format>
  377. <format name="application/vnd.coc-wd.2007.macroEnabled">
  378. <type><xts:string id="IDS_OBJ_COGNOS_OFFICE_DOCUMENT"/></type>
  379. <readableFormat><xts:string id="IDS_PROP_FORMAT_DOCUMENT_WORDX"/></readableFormat>
  380. </format>
  381. <format name="application/vnd.coc-pp.2007.macroEnabled">
  382. <type><xts:string id="IDS_OBJ_COGNOS_OFFICE_DOCUMENT"/></type>
  383. <readableFormat><xts:string id="IDS_PROP_FORMAT_DOCUMENT_POWERPOINTX"/></readableFormat>
  384. </format>
  385. <!-- 2010 - macro-enabled both use excel 2007 icon, binary extenstion is xlsb the other is xlsm-->
  386. <format name="application/vnd.ms-excel.sheet.binary.macroEnabled.12">
  387. <type><xts:string id="IDS_OBJ_COGNOS_OFFICE_DOCUMENT"/></type>
  388. <readableFormat><xts:string id="IDS_PROP_FORMAT_DOCUMENT_XLSB"/></readableFormat>
  389. </format>
  390. <format name="application/vnd.ms-excel.sheet.macroEnabled.12">
  391. <type><xts:string id="IDS_OBJ_COGNOS_OFFICE_DOCUMENT"/></type>
  392. <readableFormat><xts:string id="IDS_PROP_FORMAT_DOCUMENT_XLSB"/></readableFormat>
  393. </format>
  394. </out:variable>
  395. <!-- ====================
  396. = RTC Task 4127 Avoid running a report when a view is possible but not in user's default format.
  397. = New variables used to generate a view url and a report icon when the default output format from content manager is non-consumable.
  398. ====================
  399. -->
  400. <out:variable name="consumableOutputFormatIcon" select="'report'"/>
  401. <out:variable name="is-ui-rtl" select="xtsext:isRTLLocale($productLocale)"/>
  402. <!-- Calculates effective user capability taking into account the browser information -->
  403. <!-- Note: consult ../ps/system.xml for the studio-browser restriction map -->
  404. <out:template name="calUserCapability">
  405. <out:param name="capability"/>
  406. <out:param name="value"/>
  407. <out:variable name="browserRestrictionEntry" select="key('system-param', 'capabilities')/capability[@name=$capability]"/>
  408. <out:value-of select="$value = 'true' and (not($browserRestrictionEntry) or contains($browserRestrictionEntry/@browser, $browser))"/>
  409. </out:template>
  410. <!-- Calculates effective user capabilities of an object (e.g.: package) taking into account the browser information -->
  411. <!-- Output is a flat list of user capabilities (e.g.: " userCanUseANS userCanUsePPS ... ") -->
  412. <out:template name="calEffectiveObjectCapabilities">
  413. <out:param name="capabilities"/>
  414. <out:param name="canRecurse" select="true()"/>
  415. <out:choose>
  416. <!-- If no capability node is available (case of missing package object) then default to global capabilities. -->
  417. <out:when test="not(boolean($capabilities)) and $canRecurse">
  418. <!-- Call this template again using global capabilities instead -->
  419. <out:call-template name="calEffectiveObjectCapabilities">
  420. <out:with-param name="capabilities" select="/root/session/param[@name='capabilities']"/>
  421. <out:with-param name="canRecurse" select="false()"/> <!-- prevent recursive calls -->
  422. </out:call-template>
  423. </out:when>
  424. <out:otherwise>
  425. <out:for-each select="$capabilities/*">
  426. <out:variable name="capability" select="name(.)"/>
  427. <out:choose>
  428. <out:when test="$capability = 'canUseAdaptiveAnalyticsAdministration'">
  429. <out:variable name="test-capability"><out:call-template name="calUserCapability"><out:with-param name="capability" select="$capability"/><out:with-param name="value" select="true()"/></out:call-template></out:variable>
  430. <out:if test="$test-capability = 'true'"><out:value-of select="' userCanUseAdaptiveAnalyticsAdministration'"/></out:if>
  431. </out:when>
  432. <out:when test="$capability = 'canUseAdaptiveAnalytics'">
  433. <out:variable name="test-capability"><out:call-template name="calUserCapability"><out:with-param name="capability" select="$capability"/><out:with-param name="value" select="true()"/></out:call-template></out:variable>
  434. <out:if test="$test-capability = 'true'"><out:value-of select="' userCanUseAdaptiveAnalytics '"/></out:if>
  435. </out:when>
  436. <out:when test="$capability = 'canUseAnalysisStudio'">
  437. <out:variable name="test-capability"><out:call-template name="calUserCapability"><out:with-param name="capability" select="$capability"/><out:with-param name="value" select="true()"/></out:call-template></out:variable>
  438. <out:if test="$test-capability = 'true'"><out:value-of select="' userCanUseANS '"/></out:if>
  439. </out:when>
  440. <!--
  441. <out:when test="$capability = 'canUseReportStudio'">
  442. <out:variable name="test-capability"><out:call-template name="calUserCapability"><out:with-param name="capability" select="$capability"/><out:with-param name="value" select="true()"/></out:call-template></out:variable>
  443. <out:if test="$test-capability = 'true'"><out:value-of select="' userCanUseRS '"/></out:if>
  444. </out:when>
  445. -->
  446. <out:when test="$capability = 'canUseQueryStudio'">
  447. <out:variable name="test-capability"><out:call-template name="calUserCapability"><out:with-param name="capability" select="$capability"/><out:with-param name="value" select="true()"/></out:call-template></out:variable>
  448. <out:if test="$test-capability = 'true'"><out:value-of select="' userCanUseQS '"/></out:if>
  449. </out:when>
  450. <out:when test="$capability = 'canUsePowerPlay'">
  451. <out:variable name="test-capability"><out:call-template name="calUserCapability"><out:with-param name="capability" select="$capability"/><out:with-param name="value" select="true()"/></out:call-template></out:variable>
  452. <out:if test="$test-capability = 'true'"><out:value-of select="' userCanUsePPS '"/></out:if>
  453. </out:when>
  454. <out:when test="$capability = 'canOpenPowerPlayInAnalysisStudio'">
  455. <out:variable name="test-capability"><out:call-template name="calUserCapability"><out:with-param name="capability" select="$capability"/><out:with-param name="value" select="true()"/></out:call-template></out:variable>
  456. <out:if test="$test-capability = 'true'"><out:value-of select="' userCanOpenPPInAnalysisStudio '"/></out:if>
  457. </out:when>
  458. <out:when test="$capability = 'canOpenPowerPlayInReportStudio'">
  459. <out:variable name="test-capability"><out:call-template name="calUserCapability"><out:with-param name="capability" select="$capability"/><out:with-param name="value" select="true()"/></out:call-template></out:variable>
  460. <out:if test="$test-capability = 'true'"><out:value-of select="' userCanOpenPPInReportStudio '"/></out:if>
  461. </out:when>
  462. <out:when test="$capability = 'canUsePlanningContributor'">
  463. <out:variable name="test-capability"><out:call-template name="calUserCapability"><out:with-param name="capability" select="$capability"/><out:with-param name="value" select="true()"/></out:call-template></out:variable>
  464. <out:if test="$test-capability = 'true'"><out:value-of select="' userCanUsePlanningContributor '"/></out:if>
  465. </out:when>
  466. <out:when test="$capability = 'canUseEV'">
  467. <out:variable name="test-capability"><out:call-template name="calUserCapability"><out:with-param name="capability" select="$capability"/><out:with-param name="value" select="true()"/></out:call-template></out:variable>
  468. <out:if test="$test-capability = 'true'"><out:value-of select="' userCanUseEV '"/></out:if>
  469. </out:when>
  470. <out:when test="$capability = 'canUseMetricStudio'">
  471. <out:variable name="canUseMetricStudio"><out:call-template name="calUserCapability"><out:with-param name="capability" select="$capability"/><out:with-param name="value" select="true()"/></out:call-template></out:variable>
  472. <out:variable name="canUseMetricsManagerAdministration"><out:call-template name="calUserCapability"><out:with-param name="capability" select="'canUseMetricsManagerAdministration'"/><out:with-param name="value" select="boolean($capabilities/canUseMetricsManagerAdministration)"/></out:call-template></out:variable>
  473. <out:if test="$canUseMetricStudio = 'true' or $canUseMetricsManagerAdministration = 'true'"><out:value-of select="' userCanUseMetricsManager '"/></out:if>
  474. </out:when>
  475. </out:choose>
  476. </out:for-each>
  477. </out:otherwise>
  478. </out:choose>
  479. </out:template>
  480. </xsl:template>
  481. <!-- Generic meta tags -->
  482. <xsl:template match="pf:meta">
  483. <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
  484. <meta name="copyright">
  485. <out:attribute name="content"><xts:string id="IDS_COPYRIGHT"/></out:attribute>
  486. </meta>
  487. <meta name="trademark">
  488. <out:attribute name="content"><xts:string id="IDS_TRADEMARK"/></out:attribute>
  489. </meta>
  490. <meta name="template">
  491. <out:attribute name="content"><out:value-of select="key('env-param', 'm')"/></out:attribute>
  492. </meta>
  493. </xsl:template>
  494. <!--
  495. Template - pf:idToSearchPathForURL:
  496. This tempalte concerts a guid to a form that is usable in a searchPath. The result is caf protected and urlencoded
  497. because such a seach path is not web safe
  498. -->
  499. <xsl:template match="pf:idToSearchPathForURL">
  500. <xsl:variable name="source"><xsl:value-of select="@source"/></xsl:variable>
  501. <out:value-of select="xtsext:protect(xtsext:urlencode(concat(concat('storeID(&quot;',string({$source})),'&quot;)')),'url','storeID','getdata')"/>
  502. </xsl:template>
  503. <!--
  504. creates a url based on the url passed with with various replacement prameters resolved
  505. custom url's can contain the replacement variables %LOCALE% and or %STYLE%
  506. this replaces those variables with appriopiate values
  507. -->
  508. <xsl:template match="pf:CustomWelcomeURL">
  509. <out:variable name="welcomeURLOverride" select="/root/system/param[@name='welcomeURLOverride']"/>
  510. <out:variable name="replacedLangCustomURL" select="xtsext:replace(string($welcomeURLOverride), string('%LOCALE%'), string($productLocale)) "/>
  511. <out:variable name="customWelcomeURL" select="xtsext:replace(string($replacedLangCustomURL), string('%STYLE%'), string(/root/user/param[@name='skin']))" />
  512. <out:variable name="hasCustomWelcomeURL" select="string-length(normalize-space($customWelcomeURL)) > 0"/>
  513. </xsl:template>
  514. <!--
  515. Template - pf:help:
  516. This template defines the javascript to execute CC help when web page help hyperlink pressed.
  517. Operation:
  518. Generate the function help() javascript.
  519. -->
  520. <xsl:template match="pf:help">
  521. <out:variable name="es">
  522. <xsl:choose>
  523. <xsl:when test="@eventStudio='true'">true</xsl:when>
  524. <xsl:otherwise>false</xsl:otherwise>
  525. </xsl:choose>
  526. </out:variable>
  527. <out:variable name="context">
  528. <xsl:choose>
  529. <xsl:when test="@context">
  530. <xsl:value-of select="@context"/>
  531. </xsl:when>
  532. <xsl:otherwise>
  533. <xsl:value-of select="''"/> <!-- Add default help context here -->
  534. </xsl:otherwise>
  535. </xsl:choose>
  536. </out:variable>
  537. <script language="javascript" src="{'{$webRoot}'}/ccl/helpDocs.js"></script>
  538. <script language="javascript">
  539. function help(sContext)
  540. {
  541. if (!sContext) {
  542. sContext = "<out:value-of select="$context"/>";
  543. }
  544. <out:variable name="helpBook">
  545. <out:text/>ug_<out:text/>
  546. <out:choose>
  547. <out:when test="$es='true'">cr_es</out:when>
  548. <out:when test="key('session-param','capabilities')/canUseAdministrationPortal">cra</out:when>
  549. <out:otherwise>cc</out:otherwise>
  550. </out:choose>
  551. <out:if test="$context!=''">_a</out:if>
  552. </out:variable>
  553. gotoHelp("<out:value-of select="xtsext:javascriptencode(string($mappedProductLocale))"/>", "<out:value-of select="$helpBook"/>", sContext,"<out:value-of select="xtsext:javascriptencode(string($webRoot))"/>");
  554. }
  555. </script>
  556. </xsl:template>
  557. <!-- Javascript Includes and Variables for the cognosLaunch function -->
  558. <xsl:template match="pf:launch">
  559. <script language="javascript">
  560. <out:attribute name="src"><out:value-of select="$webcontent"/><xsl:value-of select=" '/../cognoslaunch.js' "/></out:attribute>
  561. </script>
  562. <script language="javascript">
  563. var sGateway = &quot;<out:value-of select="xtsext:javascriptencode(string($gateway))"/>&quot;;
  564. var sBackURL = &quot;<out:value-of select="xtsext:javascriptencode(string($back-url))"/>&quot;;
  565. var sEncodedBackURL = &quot;<out:value-of select="xtsext:protect(xtsext:urlencode(string($back-url)),'url','url','getdata')"/>&quot;;
  566. </script>
  567. </xsl:template>
  568. <xsl:template match="pf:getDefaultMorphletForObject">
  569. <xsl:variable name="class"><xsl:value-of select="@objectClass"/></xsl:variable>
  570. <out:choose>
  571. <out:when test="$class='portletProducer' or $class='portletFolder'">tools_portaladmin.xts</out:when>
  572. <out:when test="$class='portalSkinFolder'">tools_skinadmin.xts</out:when>
  573. <out:when test="$class='adminFolder'">tools_cs_administration.xts</out:when>
  574. <out:when test="$class='configurationFolder'">tools_service_config.xts</out:when>
  575. <out:when test="$class='namespaceFolder'">tools_directory.xts</out:when>
  576. <out:when test="$class='dispatcher'">tools_service_config.xts</out:when>
  577. <out:when test="$class='package' and string(key('env-param','from_tool'))='true'">cc_drillthrough.xts</out:when>
  578. <out:when test="$class='namespace' or $class='account' or $class='dataSource' or $class='dataSourceConnection' or $class='role'">tools_directory.xts</out:when>
  579. <out:when test="$class='securedFunction'">tools_capabilities.xts</out:when>
  580. <out:when test="$class='subscriptionFolder'">subscriptions/subscriptions.xts</out:when>
  581. <out:otherwise>cc.xts</out:otherwise>
  582. </out:choose>
  583. </xsl:template>
  584. <xsl:template match="pf:gen-action-string">
  585. <out:template name="gen-action-string">
  586. <out:param name="action" select="''"/>
  587. <out:param name="class"/>
  588. <out:param name="userInterfaces" select="''"/>
  589. <out:param name="targetUserInterfaces" select="''"/>
  590. <out:param name="documentType" select="''"/>
  591. <out:param name="launchableType" select="''"/>
  592. <out:param name="effectiveUserCapabilities" select="''"/>
  593. <out:variable name="sessionRSUIProfile" select="key('session-param','rsuiprofile')"/>
  594. <out:variable name="studioName">
  595. <out:choose>
  596. <out:when test="$class = 'analysis'">
  597. <out:text/><xts:string id="IDS_TOOLS_ANALYSIS"/><out:text/>
  598. </out:when>
  599. <out:when test="$class = 'query'">
  600. <out:text/><xts:string id="IDS_TOOLS_QUERY"/><out:text/>
  601. </out:when>
  602. <out:when test="$class = 'report' or $class = 'interactiveReport'">
  603. <out:choose>
  604. <out:when test="$sessionRSUIProfile='pro' or $sessionRSUIProfile='all'">
  605. <xts:string id="IDS_TOOLS_REPORT" />
  606. </out:when>
  607. <out:when test="$class = 'report' and $sessionRSUIProfile='bua'"> <!-- only Reports can be opened in Business Insight Advanced -->
  608. <xts:string id="IDS_TOOLS_ICE" />
  609. </out:when>
  610. </out:choose>
  611. </out:when>
  612. <out:otherwise>
  613. <out:text/><xts:string id="IDS_TOOLS_REPORT"/><out:text/>
  614. </out:otherwise>
  615. </out:choose>
  616. </out:variable>
  617. <out:choose>
  618. <out:when test="contains(' analysis report query interactiveReport reportView ', concat(' ', $class, ' ' ))">
  619. <out:choose>
  620. <out:when test="string($action) = 'run'">
  621. <out:text/><xts:string id="IDS_PROP_RUN_DEFAULT_ACTION_RUN_REPORT"/><out:text/>
  622. </out:when>
  623. <out:when test="string($action) = 'view'">
  624. <out:text/><xts:string id="IDS_PROP_RUN_DEFAULT_ACTION_VIEW_RECENT_REPORT"/><out:text/>
  625. </out:when>
  626. <out:when test="$action = 'edit' and $studioName != ''">
  627. <out:text/><xts:string id="IDS_PROP_RUN_DEFAULT_ACTION_OPEN_WITH_STUDIO"><xts:param name="studio"><out:value-of select="$studioName"/></xts:param></xts:string><out:text/>
  628. </out:when>
  629. </out:choose>
  630. </out:when>
  631. <out:when test="$class = 'package'">
  632. <out:choose>
  633. <out:when test="string(key('env-param','from_tool'))='true'">
  634. <out:text/><xts:string id="IDS_ACT_VIEW_PACKAGE_DRILL_THRU"/><out:text/>
  635. </out:when>
  636. <out:when test="($userInterfaces='metricStudio' or $targetUserInterfaces='metricStudio') and $action='view'">
  637. <out:text/><xts:string id="IDS_ACT_VIEW_METRICSPACKAGE_CONTENT"/><out:text/>
  638. </out:when>
  639. <out:when test="($userInterfaces='metricStudio' or $targetUserInterfaces='metricStudio') and $action='run'">
  640. <out:text/><xts:string id="IDS_ACT_OPEN_METRICS_MANAGER"/><out:text/>
  641. </out:when>
  642. <out:when test="($userInterfaces='planningContributor' or $targetUserInterfaces='planningContributor') and $action='view'">
  643. <out:text/><xts:string id="IDS_ACT_VIEW_PLANNINGPACKAGE_CONTENT"/><out:text/>
  644. </out:when>
  645. <out:when test="($userInterfaces='planningContributor' or $targetUserInterfaces='planningContributor') and $action='run'">
  646. <out:text/><xts:string id="IDS_ACT_OPEN_CONTRIBUTOR"/><out:text/>
  647. </out:when>
  648. <out:when test="($userInterfaces='adaptiveAnalytics' or $targetUserInterfaces='adaptiveAnalytics') and $action='view'">
  649. <out:text/><xts:string id="IDS_ACT_VIEW_ANALYTICS"/><out:text/>
  650. </out:when>
  651. <out:when test="($userInterfaces='adaptiveAnalytics' or $targetUserInterfaces='adaptiveAnalytics') and $action='run'">
  652. <out:text/><xts:string id="IDS_ACT_OPEN_ANALYTICS"/><out:text/>
  653. </out:when>
  654. <out:otherwise>
  655. <out:text/><xts:string id="IDS_ACT_VIEW_PACKAGE_CONTENT"/><out:text/>
  656. </out:otherwise>
  657. </out:choose>
  658. </out:when>
  659. <out:when test="$class = 'folder' or $class = 'adminFolder' or $class='configurationFolder' or $class='namespaceFolder' or $class = 'content' or $class = 'portletFolder' or $class = 'portalSkinFolder'">
  660. <out:text/><xts:string id="IDS_ACT_VIEW_FOLDER_CONTENT"/><out:text/>
  661. </out:when>
  662. <out:when test="$class = 'URL'">
  663. <out:text/><xts:string id="IDS_ACT_OPEN_URL"/><out:text/>
  664. </out:when>
  665. <out:when test="starts-with(string($class),'powerPlay8')">
  666. <out:choose>
  667. <out:when test="$action='edit'">
  668. <out:text/><xts:string id="IDS_ACT_EDIT_WPPWX8"/><out:text/>
  669. </out:when>
  670. <out:otherwise>
  671. <out:text/><xts:string id="IDS_ACT_RUN_PDF_EX"/><out:text/>
  672. </out:otherwise>
  673. </out:choose>
  674. </out:when>
  675. <out:when test="starts-with(string($class),'powerPlay')">
  676. <out:choose>
  677. <out:when test="$action='edit'">
  678. <out:text/><xts:string id="IDS_ACT_EDIT_WPPWX_DESIGN"/><out:text/>
  679. </out:when>
  680. <out:otherwise>
  681. <out:text/><xts:string id="IDS_ACT_EDIT_WPPWX"/><out:text/>
  682. </out:otherwise>
  683. </out:choose>
  684. </out:when>
  685. <out:when test="$class='portletProducer'">
  686. <out:text/><xts:string id="IDS_ACT_VIEW_PORTLETS"/><out:text/>
  687. </out:when>
  688. <out:when test="$class='portlet'">
  689. <out:text/><xts:string id="IDS_ACT_PREVIEW_PORTLET"/><out:text/>
  690. </out:when>
  691. <out:when test="$class='dispatcher'">
  692. <out:text/><xts:string id="IDS_VIEW_SERVICES"/><out:text/>
  693. </out:when>
  694. <out:when test="$class='namespace'">
  695. <out:text/><xts:string id="IDS_ACT_VIEW_NAMESPACE_CONTENT"/><out:text/>
  696. </out:when>
  697. <out:when test="$class='account'">
  698. <out:text/><xts:string id="IDS_ACT_VIEW_ACCOUNT"/><out:text/>
  699. </out:when>
  700. <out:when test="$class='dashboard'">
  701. <out:text/><xts:string id="IDS_ACT_OPEN_DASHBOARD"/><out:text/>
  702. </out:when>
  703. <out:when test="$class='dataSource'">
  704. <out:text/><xts:string id="IDS_ACT_VIEW_CONNECTIONS"/><out:text/>
  705. </out:when>
  706. <out:when test="$class='dataSourceConnection'">
  707. <out:text/><xts:string id="IDS_ACT_VIEW_SIGNONS"/><out:text/>
  708. </out:when>
  709. <out:when test="$class='agentDefinition'">
  710. <out:choose>
  711. <out:when test="$action='edit'">
  712. <out:text/><xts:string id="IDS_ACT_EDIT_WAG"/><out:text/>
  713. </out:when>
  714. <out:when test="$action='view'">
  715. <out:text/><xts:string id="IDS_ACT_HOTLIST_AGS"/><out:text/>
  716. </out:when>
  717. <out:when test="$action='run'">
  718. <out:text/><xts:string id="IDS_ACT_RUN_AGENT"/><out:text/>
  719. </out:when>
  720. </out:choose>
  721. </out:when>
  722. <out:when test="contains(' metricsFileImportTask metricsDataSourceETLTask metricsMaintenanceTask metricsExportTask ', concat(' ', $class, ' ' ))">
  723. <out:text/><xts:string id="IDS_ACT_RUN_METRICS_TASK"/><out:text/>
  724. </out:when>
  725. <out:when test="$class='reportTemplate'">
  726. <out:choose>
  727. <out:when test="$sessionRSUIProfile='pro' or $sessionRSUIProfile='all'">
  728. <xts:string id="IDS_ACT_EDIT_WRS" />
  729. </out:when>
  730. <out:when test="key('session-param','rsuiprofile')='bua'">
  731. <xts:string id="IDS_ACT_EDIT_WBUA" />
  732. </out:when>
  733. </out:choose>
  734. </out:when>
  735. <out:when test="$class = 'output' ">
  736. <out:text/><xts:string id="IDS_PROP_RUN_DEFAULT_ACTION_VIEW_RECENT_REPORT"/><out:text/>
  737. </out:when>
  738. <out:when test="$class='pagelet' ">
  739. <out:text/><xts:string id="IDS_ACT_PREVIEW_PAGE"/><out:text/>
  740. </out:when>
  741. <out:when test="$class='role' ">
  742. <out:text/><xts:string id="IDS_ACT_VIEW_ROLE"/><out:text/>
  743. </out:when>
  744. <out:when test="$class='group' ">
  745. <out:text/><xts:string id="IDS_ACT_VIEW_GROUP"/><out:text/>
  746. </out:when>
  747. <out:when test="$class='launchable'">
  748. <out:choose>
  749. <out:when test="$launchableType = 'application/vnd.ibm.cognos.ev' or $launchableType = 'application/vnd.ibm.cognos.ev.canvas'">
  750. <out:text/><xts:string id="IDS_ACT_EDIT_ADVISOR"/><out:text/>
  751. </out:when>
  752. <out:when test="$launchableType = 'application/vnd.ibm.cognos.cd'">
  753. <out:text />
  754. <xts:string id="IDS_ACT_OPEN_CD" />
  755. <out:text />
  756. </out:when>
  757. </out:choose>
  758. </out:when>
  759. <out:when test="$class='document' ">
  760. <out:variable name="readableFormat">
  761. <out:value-of select="$documentFormats/format[@name = $documentType]/readableFormat"/>
  762. </out:variable>
  763. <out:choose>
  764. <out:when test="$readableFormat != ''">
  765. <xts:string id="IDS_ACT_DOCUMENT_VIEW"><xts:param name="format"><out:value-of select="$readableFormat"/></xts:param></xts:string>
  766. </out:when>
  767. <out:otherwise><xts:string id="IDS_ACT_DEFAULT_DOCUMENT_VIEW"/></out:otherwise>
  768. </out:choose>
  769. </out:when>
  770. <out:when test="$class='securedFunction'">
  771. <out:text/><xts:string id="IDS_ACT_VIEW_CAPABILITY"/><out:text/>
  772. </out:when>
  773. </out:choose>
  774. </out:template>
  775. </xsl:template>
  776. <!--
  777. Template - pf:gen-action:
  778. This template generates another template gen-action which generates the action used by gen-url and gen-icon,
  779. -->
  780. <xsl:template match="pf:gen-action">
  781. <out:template name="gen-action">
  782. <out:param name="class"/>
  783. <out:param name="object"/>
  784. <out:param name="canExecute" select="false()"/>
  785. <out:param name="canRead" select="false()"/>
  786. <out:param name="canTraverse" select="false()"/>
  787. <out:param name="output_format" select="''"/>
  788. <out:param name="userInterfaces" select="''"/>
  789. <out:param name="targetUserInterfaces" select="''"/>
  790. <out:param name="effectiveUserCapabilities" select="''"/>
  791. <out:param name="launchableType" select="''"/>
  792. <!-- Perhaps in the future the preferredAction variable should be moved out of this template. That would remove the need for gen-action to interact directly with the cm object. -->
  793. <!--WO767 default action as selected by the use -->
  794. <out:variable name="preferredAction">
  795. <out:choose>
  796. <out:when test="( $object/cm:target/*/cm:defaultPortalAction and not($object/cm:target/*/cm:defaultPortalAction/@nil ) )">
  797. <out:value-of select="$object/cm:target/*/cm:defaultPortalAction"/>
  798. </out:when>
  799. <out:when test="($object/cm:defaultPortalAction and not( $object/cm:defaultPortalAction/@nil ) )">
  800. <out:value-of select="$object/cm:defaultPortalAction"/>
  801. </out:when>
  802. </out:choose>
  803. </out:variable>
  804. <out:variable name="sessionRSUIProfile" select="key('session-param','rsuiprofile')"/>
  805. <!-- WO767 if object has a preferredAction (defaultPortalAction property), then calculate final action -->
  806. <!-- based on class, defaultPortalAction property, permissions, output format, and capabilities/browser support -->
  807. <out:choose>
  808. <out:when test="$class = 'launchable' and ($launchableType='application/vnd.ibm.cognos.ev' or $launchableType='application/vnd.ibm.cognos.ev.canvas' or $launchableType='application/vnd.ibm.cognos.cd')">
  809. <out:text>edit</out:text>
  810. </out:when>
  811. <out:when test="contains(' analysis report interactiveReport query reportView ', concat(' ', $class, ' ' ))">
  812. <out:choose>
  813. <out:when test="$preferredAction='viewOutput'">
  814. <out:choose>
  815. <out:when test="$output_format != '' and $canRead and $canTraverse">view</out:when>
  816. <out:when test="$class='query' and $canRead and $canExecute and contains($effectiveUserCapabilities, ' userCanUseQS ')">edit</out:when>
  817. <out:when test="$class='analysis' and $canRead and $canExecute and contains($effectiveUserCapabilities, ' userCanUseANS ')">edit</out:when>
  818. <out:when test="$canExecute">run</out:when>
  819. <out:when test="(($class='report' and key('session-param','rsuiprofile')!='') or ($class='interactiveReport' and ($sessionRSUIProfile='pro' or $sessionRSUIProfile='all'))) and $canRead and contains($effectiveUserCapabilities, ' userCanUseRS ')">edit</out:when>
  820. </out:choose>
  821. </out:when>
  822. <out:when test="$preferredAction='run'">
  823. <out:choose>
  824. <out:when test="$canExecute">run</out:when>
  825. <out:when test="$output_format !='' and $canRead and $canTraverse">view</out:when>
  826. <out:when test="$class='query' and $canRead and $canExecute and contains($effectiveUserCapabilities, ' userCanUseQS ')">edit</out:when>
  827. <out:when test="$class='analysis' and $canRead and $canExecute and contains($effectiveUserCapabilities, ' userCanUseANS ')">edit</out:when>
  828. <out:when test="(($class='report' and key('session-param','rsuiprofile')!='') or ($class='interactiveReport' and ($sessionRSUIProfile='pro' or $sessionRSUIProfile='all'))) and $canRead and contains($effectiveUserCapabilities, ' userCanUseRS ')">edit</out:when>
  829. </out:choose>
  830. </out:when>
  831. <out:when test="$preferredAction='edit'">
  832. <out:choose>
  833. <out:when test="$class='query' and $canRead and $canExecute and contains($effectiveUserCapabilities, ' userCanUseQS ')">edit</out:when>
  834. <out:when test="(($class='report' and key('session-param','rsuiprofile')!='') or ($class='interactiveReport' and ($sessionRSUIProfile='pro' or $sessionRSUIProfile='all'))) and $canRead and contains($effectiveUserCapabilities, ' userCanUseRS ')">edit</out:when>
  835. <out:when test="$class='analysis' and $canRead and $canExecute and contains($effectiveUserCapabilities, ' userCanUseANS ')">edit</out:when>
  836. <out:when test="$output_format != '' and $canRead and $canTraverse">view</out:when>
  837. <out:when test="$canExecute">run</out:when>
  838. </out:choose>
  839. </out:when>
  840. <!-- this is the fall back if action was not set. For report, interactiveReport and report view it's: view, run, edit -->
  841. <!-- but for query and analysis it's: view, edit and run -->
  842. <out:when test="$output_format != '' and $canRead and $canTraverse">view</out:when>
  843. <out:when test="$class='query' and $canRead and $canExecute and contains($effectiveUserCapabilities, ' userCanUseQS ')">edit</out:when>
  844. <out:when test="$class='analysis' and $canRead and $canExecute and contains($effectiveUserCapabilities, ' userCanUseANS ')">edit</out:when>
  845. <out:when test="$canExecute">run</out:when>
  846. <out:when test="(($class='report' and key('session-param','rsuiprofile')!='') or ($class='interactiveReport' and ($sessionRSUIProfile='pro' or $sessionRSUIProfile='all'))) and $canRead and contains($effectiveUserCapabilities, ' userCanUseRS ')">edit</out:when>
  847. </out:choose>
  848. </out:when>
  849. <out:when test="contains(' package ', concat(' ', $class, ' ' ))">
  850. <out:if test="$userInterfaces='metricStudio' or $targetUserInterfaces='metricStudio'">
  851. <out:choose>
  852. <out:when test="($preferredAction='view') and $canTraverse">view</out:when>
  853. <out:when test="($preferredAction='run' or $preferredAction='') and ($canRead and $canExecute) and contains($effectiveUserCapabilities, ' userCanUseMetricsManager ')">run</out:when>
  854. <!-- default to View when user has Traverse access -->
  855. <out:when test="$canTraverse">view</out:when>
  856. </out:choose>
  857. </out:if>
  858. <out:if test="$userInterfaces='planningContributor' or $targetUserInterfaces='planningContributor'">
  859. <out:choose>
  860. <out:when test="($preferredAction='view') and $canTraverse">view</out:when>
  861. <out:when test="($preferredAction='run' or $preferredAction='') and ($canRead and $canExecute) and contains($effectiveUserCapabilities, ' userCanUsePlanningContributor ')">run</out:when>
  862. <!-- default to View when user has Traverse access -->
  863. <out:when test="$canTraverse">view</out:when>
  864. </out:choose>
  865. </out:if>
  866. <out:if test="$userInterfaces='adaptiveAnalytics' or $targetUserInterfaces='adaptiveAnalytics'">
  867. <out:choose>
  868. <out:when test="($preferredAction='view') and $canTraverse">view</out:when>
  869. <out:when test="($preferredAction='run' or $preferredAction='') and ($canRead and $canExecute) and contains($effectiveUserCapabilities, ' userCanUseAdaptiveAnalytics ')">run</out:when>
  870. <!-- default to View when user has Traverse access -->
  871. <out:when test="$canTraverse">view</out:when>
  872. </out:choose>
  873. </out:if>
  874. </out:when>
  875. <out:when test="$class='powerPlayReport'">
  876. <out:variable name="ppOutputFormat">
  877. <out:choose>
  878. <out:when test="cm:objectClass = 'shortcut'">
  879. <out:value-of select="cm:target/cm:powerPlayReport/cm:options/cm:powerPlayOptionOutputFormat[cm:name='outputFormat']/cm:value"/>
  880. </out:when>
  881. <out:otherwise>
  882. <out:value-of select="cm:options/cm:powerPlayOptionOutputFormat[cm:name='outputFormat']/cm:value"/>
  883. </out:otherwise>
  884. </out:choose>
  885. </out:variable>
  886. <out:choose>
  887. <out:when test="$ppOutputFormat = 'HTML' and ($canRead and $canExecute)"><xsl:text/>edit<xsl:text/></out:when>
  888. <out:when test="$preferredAction='run' and ($canRead and $canExecute)">run</out:when>
  889. <out:when test="$preferredAction='edit' and ($canRead and $canExecute)">edit</out:when>
  890. </out:choose>
  891. </out:when>
  892. <out:when test="$class='powerPlay8Report' or $class='powerPlay8ReportView'">
  893. <out:choose>
  894. <out:when test="$preferredAction = 'viewOutput'">
  895. <out:choose>
  896. <out:when test="$output_format != '' and $canRead">view</out:when>
  897. <out:when test="$canRead and $canExecute and $class != 'powerPlay8ReportView' and contains($effectiveUserCapabilities, ' userCanUsePPS ')">edit</out:when>
  898. <out:when test="$canRead and $canExecute">run</out:when>
  899. </out:choose>
  900. </out:when>
  901. <out:when test="$preferredAction = 'edit'">
  902. <out:choose>
  903. <out:when test="$canRead and $canExecute and (contains($effectiveUserCapabilities, ' userCanUsePPS ') or (contains($effectiveUserCapabilities, ' userCanUseRS ') and contains($effectiveUserCapabilities, 'userCanOpenPPInReportStudio')))">edit</out:when>
  904. <out:when test="$output_format != '' and $canRead">view</out:when>
  905. <out:when test="$canRead and $canExecute">run</out:when>
  906. </out:choose>
  907. </out:when>
  908. <out:when test="$preferredAction = 'run'">
  909. <out:choose>
  910. <out:when test="$canRead and $canExecute">run</out:when>
  911. <out:when test="$output_format != '' and $canRead">view</out:when>
  912. <out:when test="$canRead and $canExecute and $class !='powerPlay8ReportView' and contains($effectiveUserCapabilities, ' userCanUsePPS ')">edit</out:when>
  913. </out:choose>
  914. </out:when>
  915. </out:choose>
  916. </out:when>
  917. <out:when test="$class='agentDefinition' or $class='agentDefinitionView'">
  918. <out:variable name="hasEventList">
  919. <out:choose>
  920. <out:when test="( $object/cm:target/*/cm:mostRecentEventList and not($object/cm:target/*/cm:mostRecentEventList/@nil ) )">true</out:when>
  921. <out:when test="($object/cm:mostRecentEventList and not( $object/cm:mostRecentEventList/@nil ) )">true</out:when>
  922. <out:otherwise>false</out:otherwise>
  923. </out:choose>
  924. </out:variable>
  925. <out:choose>
  926. <out:when test="$preferredAction='viewEventList'">
  927. <out:choose>
  928. <out:when test="$hasEventList='true' and $canRead and $canTraverse">view</out:when>
  929. <out:when test="$canExecute and $canRead and $canTraverse">run</out:when>
  930. <out:when test="$class != 'agentDefinitionView' and $canRead and $canTraverse and $userCanUseAGS">edit</out:when>
  931. </out:choose>
  932. </out:when>
  933. <out:when test="$preferredAction='run'">
  934. <out:choose>
  935. <out:when test="$canExecute and $canRead and $canTraverse">run</out:when>
  936. <out:when test="$hasEventList='true' and $canRead and $canTraverse">view</out:when>
  937. <out:when test="$class != 'agentDefinitionView' and $canRead and $canTraverse and $userCanUseAGS">edit</out:when>
  938. </out:choose>
  939. </out:when>
  940. <out:when test="$preferredAction='edit'">
  941. <out:choose>
  942. <out:when test="$canRead and $canTraverse and $userCanUseAGS">edit</out:when>
  943. <out:when test="$hasEventList='true' and $canRead and $canTraverse">view</out:when>
  944. <out:when test="$canExecute and $canRead and $canTraverse">run</out:when>
  945. </out:choose>
  946. </out:when>
  947. </out:choose>
  948. </out:when>
  949. </out:choose>
  950. </out:template>
  951. </xsl:template>
  952. <!--
  953. Template - pf:gen-url:
  954. This template generates another template gen-url that builds a url. The url is dropped in the href attribute of a hyperlink to an entry.
  955. Operation:
  956. Outputs a gen-url template.
  957. -->
  958. <xsl:template match="pf:gen-url">
  959. <out:template name="gen-url">
  960. <out:param name="canExecute" select="true()"/>
  961. <out:param name="canRead" select="true()"/>
  962. <out:param name="canTraverse" select="true()"/>
  963. <out:param name="output_format" select="''"/>
  964. <out:param name="target" select="'false'"/>
  965. <out:param name="class"/>
  966. <out:param name="userInterfaces" select="''"/>
  967. <out:param name="targetUserInterfaces" select="''"/>
  968. <out:param name="morphlet"/>
  969. <out:param name="action" select="''"/>
  970. <out:param name="isDangling" select="false()"/>
  971. <out:param name="isContainer" select="false()"/>
  972. <out:param name="isIgnoreBackURL" select="false()"/>
  973. <out:param name="isDrillthruMode" select="false()"/>
  974. <out:param name="canWrite" select="true()"/>
  975. <out:param name="url-encoded-id"/>
  976. <out:param name="specifyRunOutputFormat" select="false()"/> <!-- if true: pass the output format for run actions -->
  977. <out:param name="canReadParent" select="true()"/>
  978. <out:param name="hasChildren" select="true()"/>
  979. <out:param name="bookmark"/>
  980. <out:param name="genURLForBookmark" select="false()"/>
  981. <out:param name="bShortcut" select="false()"/>
  982. <out:param name="id" select="''"/>
  983. <out:param name="executionPrompt" select="''"/>
  984. <out:param name="navigateUsingID" select="'false'"/>
  985. <out:param name="effectiveUserCapabilities" select="''"/>
  986. <out:param name="isSearch" select="false()"/>
  987. <!-- Restricting output formats variables-->
  988. <out:variable name="adjustedExecutionFormat">
  989. <out:choose>
  990. <out:when test="(string(cm:executionFormat) = 'PDF' and not($userCanGeneratePDFOutput))
  991. or (string(cm:executionFormat) = 'CSV' and not($userCanGenerateCSVOutput))
  992. or (string(cm:executionFormat) = 'XML' and not($userCanGenerateXMLOutput))
  993. or (not($userCanGenerateXLSOutput) and (string(cm:executionFormat) = 'XLS' or
  994. string(cm:executionFormat) = 'XLWA' or
  995. string(cm:executionFormat) = 'singleXLS' or
  996. string(cm:executionFormat) = 'spreadsheetML' or
  997. string(cm:executionFormat) = 'xlsxData' or
  998. string(cm:executionFormat) = 'spreadsheetMLOfficeConnectionEnabled'))">
  999. <out:choose>
  1000. <out:when test="($defaultOutputFormat = 'PDF' and not($userCanGeneratePDFOutput))
  1001. or ($defaultOutputFormat = 'CSV' and not($userCanGenerateCSVOutput))
  1002. or ($defaultOutputFormat = 'XML' and not($userCanGenerateXMLOutput))
  1003. or (not($userCanGenerateXLSOutput) and ($defaultOutputFormat = 'XLS' or
  1004. $defaultOutputFormat = 'XLWA' or
  1005. $defaultOutputFormat = 'singleXLS' or
  1006. $defaultOutputFormat = 'spreadsheetML' or
  1007. $defaultOutputFormat = 'xlsxData' or
  1008. $defaultOutputFormat = 'spreadsheetMLOfficeConnectionEnabled'))">
  1009. <out:text>HTML</out:text>
  1010. </out:when>
  1011. <out:otherwise>
  1012. <out:text/><out:value-of select="$defaultOutputFormat"/>
  1013. </out:otherwise>
  1014. </out:choose>
  1015. </out:when>
  1016. <out:otherwise>
  1017. <out:text/><out:value-of select="cm:executionFormat"/>
  1018. </out:otherwise>
  1019. </out:choose>
  1020. </out:variable>
  1021. <out:variable name="adjustedShortcutExecutionFormat">
  1022. <out:choose>
  1023. <out:when test="(string(cm:target/*/cm:executionFormat) = 'PDF' and not($userCanGeneratePDFOutput))
  1024. or (string(cm:target/*/cm:executionFormat) = 'CSV' and not($userCanGenerateCSVOutput))
  1025. or (string(cm:target/*/cm:executionFormat) = 'XML' and not($userCanGenerateXMLOutput))
  1026. or (not($userCanGenerateXLSOutput) and (string(cm:target/*/cm:executionFormat) = 'XLS' or
  1027. string(cm:target/*/cm:executionFormat) = 'XLWA' or
  1028. string(cm:target/*/cm:executionFormat) = 'singleXLS' or
  1029. string(cm:target/*/cm:executionFormat) = 'spreadsheetML' or
  1030. string(cm:target/*/cm:executionFormat) = 'xlsxData' or
  1031. string(cm:target/*/cm:executionFormat) = 'spreadsheetMLOfficeConnectionEnabled'))">
  1032. <out:choose>
  1033. <out:when test="($defaultOutputFormat = 'PDF' and not($userCanGeneratePDFOutput))
  1034. or ($defaultOutputFormat = 'CSV' and not($userCanGenerateCSVOutput))
  1035. or ($defaultOutputFormat = 'XML' and not($userCanGenerateXMLOutput))
  1036. or (not($userCanGenerateXLSOutput) and ($defaultOutputFormat = 'XLS' or
  1037. $defaultOutputFormat = 'XLWA' or
  1038. $defaultOutputFormat = 'singleXLS' or
  1039. $defaultOutputFormat = 'spreadsheetML' or
  1040. $defaultOutputFormat = 'xlsxData' or
  1041. $defaultOutputFormat = 'spreadsheetMLOfficeConnectionEnabled'))">
  1042. <out:text>HTML</out:text>
  1043. </out:when>
  1044. <out:otherwise>
  1045. <out:text/><out:value-of select="$defaultOutputFormat"/>
  1046. </out:otherwise>
  1047. </out:choose>
  1048. </out:when>
  1049. <out:otherwise>
  1050. <out:text/><out:value-of select="cm:target/*/cm:executionFormat"/>
  1051. </out:otherwise>
  1052. </out:choose>
  1053. </out:variable>
  1054. <out:variable name="adjustedOutputFormat">
  1055. <out:choose>
  1056. <out:when test="($output_format = 'PDF' and not($userCanGeneratePDFOutput))
  1057. or ($output_format = 'CSV' and not($userCanGenerateCSVOutput))
  1058. or ($output_format = 'XML' and not($userCanGenerateXMLOutput))
  1059. or (not($userCanGenerateXLSOutput) and ($output_format = 'XLS' or
  1060. $output_format = 'XLWA' or
  1061. $output_format = 'singleXLS' or
  1062. $output_format = 'spreadsheetML' or
  1063. $output_format = 'xlsxData' or
  1064. $output_format = 'spreadsheetMLOfficeConnectionEnabled'))">
  1065. <out:choose>
  1066. <out:when test="($defaultOutputFormat = 'PDF' and not($userCanGeneratePDFOutput))
  1067. or ($defaultOutputFormat = 'CSV' and not($userCanGenerateCSVOutput))
  1068. or ($defaultOutputFormat = 'XML' and not($userCanGenerateXMLOutput))
  1069. or (not($userCanGenerateXLSOutput) and ($defaultOutputFormat = 'XLS' or
  1070. $defaultOutputFormat = 'XLWA' or
  1071. $defaultOutputFormat = 'singleXLS' or
  1072. $defaultOutputFormat = 'spreadsheetML' or
  1073. $defaultOutputFormat = 'xlsxData' or
  1074. $defaultOutputFormat = 'spreadsheetMLOfficeConnectionEnabled'))">
  1075. <out:text>HTML</out:text>
  1076. </out:when>
  1077. <out:otherwise>
  1078. <out:text/><out:value-of select="$defaultOutputFormat"/>
  1079. </out:otherwise>
  1080. </out:choose>
  1081. </out:when>
  1082. <out:otherwise>
  1083. <out:text/><out:value-of select="$output_format"/>
  1084. </out:otherwise>
  1085. </out:choose>
  1086. </out:variable>
  1087. <out:variable name="isShortcut" select="$bShortcut or cm:target"/>
  1088. <!-- ===============================
  1089. = Added for RTC Task 4127.
  1090. = This variable constructs the consumable format list to add to the cognosViewer defaultOutput call.
  1091. ===============================
  1092. -->
  1093. <out:variable name="viewer-output-formats-list">
  1094. <out:if test="$output_format != '' and not(contains($supportedFormats,concat(' ',$output_format,' ')))">
  1095. <out:text>,&apos;&apos;,&apos;&apos;,&apos;</out:text>
  1096. <out:value-of select="normalize-space($supportedFormats)"/>
  1097. <out:text>&apos;</out:text>
  1098. </out:if>
  1099. </out:variable>
  1100. <!-- ===============================
  1101. = Added for RTC Task 4127.
  1102. = This variable is required so that the generated url does not show the non-consumable format in the ui.format parameter.
  1103. ===============================
  1104. -->
  1105. <out:variable name="ui-output-format">
  1106. <out:if test="$viewer-output-formats-list=''">
  1107. <out:value-of select="$output_format"/>
  1108. </out:if>
  1109. </out:variable>
  1110. <!-- path -->
  1111. <out:variable name="target-path">
  1112. <out:choose>
  1113. <!-- Shortcut -->
  1114. <out:when test=" cm:target/*/cm:searchPath ">
  1115. <out:value-of select="cm:target/*/cm:searchPath"/>
  1116. </out:when>
  1117. <!-- Base object -->
  1118. <out:otherwise>
  1119. <out:value-of select="cm:searchPath"/>
  1120. </out:otherwise>
  1121. </out:choose>
  1122. </out:variable>
  1123. <!-- id -->
  1124. <out:variable name="target-id">
  1125. <out:choose>
  1126. <!-- id explicitly passed in -->
  1127. <out:when test="$id != ''">
  1128. <out:value-of select="$id"/>
  1129. </out:when>
  1130. <!-- Shortcut -->
  1131. <out:when test=" cm:target/*/cm:storeID ">
  1132. <out:value-of select="cm:target/*/cm:storeID"/>
  1133. </out:when>
  1134. <!-- Base object -->
  1135. <out:otherwise>
  1136. <out:value-of select="cm:storeID"/>
  1137. </out:otherwise>
  1138. </out:choose>
  1139. </out:variable>
  1140. <!-- RV execution prompt -->
  1141. <out:variable name="rv-executionprompt-launch">
  1142. <out:choose>
  1143. <out:when test="$executionPrompt = 'none'"></out:when> <!-- By design: do not pass any run.prompt value when executionPrompt is set to none - WO 2426 -->
  1144. <out:when test="$executionPrompt != ''">, 'run.prompt', '<out:value-of select="$executionPrompt"/>'</out:when>
  1145. <out:when test="cm:target/*/cm:executionPrompt">, 'run.prompt', '<out:value-of select="cm:target/*/cm:executionPrompt"/>'</out:when>
  1146. <out:when test="cm:executionPrompt">, 'run.prompt', '<out:value-of select="cm:executionPrompt"/>'</out:when>
  1147. </out:choose>
  1148. </out:variable>
  1149. <!-- RV language context option (asks RV to render in one locale)-->
  1150. <out:variable name="rv-run-language">
  1151. <out:choose>
  1152. <out:when test=" cm:target/*/cm:executionLocale ">
  1153. <out:value-of select="cm:target/*/cm:executionLocale"/>
  1154. </out:when>
  1155. <out:when test="cm:executionLocale">
  1156. <out:value-of select="cm:executionLocale"/>
  1157. </out:when>
  1158. <out:otherwise>
  1159. <out:value-of select="$contentLocale"/>
  1160. </out:otherwise>
  1161. </out:choose>
  1162. </out:variable>
  1163. <out:variable name="rv-lang-execution">
  1164. <out:if test="key('system-param', 'useReportLocaleInRVUI') = 'true'">
  1165. <out:text/>&amp;lang=<out:value-of select="$rv-run-language"/>
  1166. </out:if>
  1167. </out:variable>
  1168. <out:variable name="rv-lang-cl">
  1169. <out:if test="key('system-param', 'useReportLocaleInRVUI') = 'true'">
  1170. <out:text/>&amp;lang=<out:value-of select="$contentLocale"/>
  1171. </out:if>
  1172. </out:variable>
  1173. <out:variable name="launch-rv-lang-execution">
  1174. <out:if test="key('system-param', 'useReportLocaleInRVUI') = 'true'">
  1175. <out:text/>, 'ui.language', '<out:value-of select="xtsext:javascriptencode($rv-run-language)"/>'
  1176. </out:if>
  1177. </out:variable>
  1178. <out:variable name="launch-rv-lang-cl">
  1179. <out:if test="key('system-param', 'useReportLocaleInRVUI') = 'true'">
  1180. <out:text/>, 'ui.language', '<out:value-of select="xtsext:javascriptencode($contentLocale)"/>'
  1181. </out:if>
  1182. </out:variable>
  1183. <out:variable name="ui-bookmark">
  1184. <out:if test="string($bookmark) != ''">
  1185. <out:text/>&amp;ui.bookmark=<out:value-of select="xtsext:urlencode(string($bookmark))"/>
  1186. </out:if>
  1187. </out:variable>
  1188. <out:variable name="ui-bookmark-launch">
  1189. <out:if test="string($bookmark) != ''">
  1190. <out:text/>, 'ui.bookmark', '<out:value-of select="xtsext:javascriptencode($bookmark)"/>'
  1191. </out:if>
  1192. </out:variable>
  1193. <out:variable name="rv-execution-params">
  1194. <out:choose>
  1195. <!-- Shortcut -->
  1196. <out:when test="cm:target/*/cm:searchPath and string(cm:target/*/cm:executionPrompt) != ''">
  1197. <out:text/>&amp;run.outputFormat=<out:value-of select="$adjustedShortcutExecutionFormat"/>&amp;run.prompt=<out:value-of select="cm:target/*/cm:executionPrompt"/>
  1198. </out:when>
  1199. <out:when test="cm:target/*/cm:searchPath and string(cm:target/*/cm:executionPrompt) = ''">
  1200. <out:text/>&amp;run.outputFormat=<out:value-of select="$adjustedShortcutExecutionFormat"/>
  1201. </out:when>
  1202. <!-- Base object -->
  1203. <out:when test="string(cm:executionPrompt) = ''">
  1204. <out:text/>&amp;run.outputFormat=<out:value-of select="$adjustedExecutionFormat"/>
  1205. </out:when>
  1206. <out:otherwise>
  1207. <out:text/>&amp;run.outputFormat=<out:value-of select="$adjustedExecutionFormat"/>&amp;run.prompt=<out:value-of select="cm:executionPrompt"/>
  1208. </out:otherwise>
  1209. </out:choose>
  1210. </out:variable>
  1211. <out:variable name="rv-execution-params-launch">
  1212. <out:choose>
  1213. <!-- Shortcut -->
  1214. <out:when test=" cm:target/*/cm:searchPath">
  1215. <!-- Restricting output formats -->
  1216. <out:text/>, 'run.outputFormat', '<out:value-of select="$adjustedShortcutExecutionFormat"/>'<out:value-of select="$rv-executionprompt-launch"/><out:text/>
  1217. </out:when>
  1218. <!-- Base object -->
  1219. <out:otherwise>
  1220. <out:text/>, 'run.outputFormat', '<out:value-of select="$adjustedExecutionFormat"/>'<out:value-of select="$rv-executionprompt-launch"/><out:text/>
  1221. </out:otherwise>
  1222. </out:choose>
  1223. </out:variable>
  1224. <out:variable name="drillThroughTargetParameterValues">
  1225. <out:if test="drillThroughTargetParameterValues and drillThroughTargetParameterValues != ''">
  1226. <out:value-of select="drillThroughTargetParameterValues"/>
  1227. </out:if>
  1228. </out:variable>
  1229. <out:variable name="launchableType">
  1230. <out:choose>
  1231. <!-- Shortcut -->
  1232. <out:when test="cm:target/*/cm:searchPath"><out:value-of select="cm:target/*/cm:launchableType"/></out:when>
  1233. <!-- Base object -->
  1234. <out:otherwise><out:value-of select="cm:launchableType"/></out:otherwise>
  1235. </out:choose>
  1236. </out:variable>
  1237. <out:variable name="general-url-prefix">
  1238. <out:choose>
  1239. <out:when test="$genURLForBookmark"> <!-- When generating a bookmark, use the gateway configuration setting. -->
  1240. <out:value-of select="string(/root/configProps/param[@name='cps']/property[@name='gateway'])"/>
  1241. </out:when>
  1242. <out:otherwise>
  1243. <out:value-of select="string($gateway)"/>
  1244. </out:otherwise>
  1245. </out:choose>
  1246. </out:variable>
  1247. <!-- For bookmarks that are not redirected to a new window need to use abosolute url from general-url-prefix variable and the inner url (ui.gateway) should be relative-->
  1248. <out:variable name="launch-url-prefix">
  1249. <out:value-of select="$general-url-prefix"/>?b_action=xts.run&amp;m=<out:text/>
  1250. <out:value-of select="concat($app, '/', 'launch.xts')"/>
  1251. <out:text/>&amp;ui.gateway=<out:value-of select="xtsext:protect(xtsext:urlencode(string($gateway)),'url','userData','getdata')"/>
  1252. </out:variable>
  1253. <!-- For Bookmarks that open in a new window it is better to use relative urls within the outer absolute URL (redirect-bookmarkURL) -->
  1254. <out:variable name="launch-rel-url-prefix">
  1255. <out:value-of select="$gateway"/>?b_action=xts.run&amp;m=<out:text/>
  1256. <out:value-of select="concat($app, '/', 'launch.xts')"/>
  1257. <out:text/>&amp;ui.gateway=<out:value-of select="xtsext:protect(xtsext:urlencode(string($gateway)),'url','userData','getdata')"/>
  1258. </out:variable>
  1259. <out:variable name="redirect-bookmarkURL">
  1260. <out:value-of select="concat($general-url-prefix,'?b_action=xts.run&amp;m=portal/main.xts&amp;m_redirect_windowmode=2&amp;m_redirect=')"/>
  1261. </out:variable>
  1262. <out:variable name="encoding" select="/root/env/param[@name='encoding']"/>
  1263. <out:choose>
  1264. <!-- isDangling if true no hyperlink -->
  1265. <out:when test="$isDangling"></out:when>
  1266. <!-- isContainer but no traverse permission -->
  1267. <out:when test="$isContainer and $canTraverse=false()"></out:when>
  1268. <!-- folder -->
  1269. <out:when test="$class='folder'">
  1270. <xsl:call-template name="gen-url-other" />
  1271. </out:when>
  1272. <!-- content -->
  1273. <out:when test="$class='content'">
  1274. <xsl:call-template name="gen-url-other"/>
  1275. </out:when>
  1276. <!-- Handle "launchable" objects -->
  1277. <out:when test="$class='launchable'">
  1278. <out:choose>
  1279. <!-- MVC - Content Reference -->
  1280. <out:when test="$launchableType = 'application/vnd.ibm.cognos.instance'">
  1281. <out:if test="$mvc-N-enabled">
  1282. <out:if test="$canTraverse and $canRead">
  1283. <xsl:call-template name="gen-url-other"/>
  1284. </out:if>
  1285. </out:if>
  1286. </out:when>
  1287. <!-- Cognos Insight objects -->
  1288. <out:when test="$launchableType = 'application/vnd.ibm.cognos.cd'">
  1289. <out:if test="$canRead and $canExecute and $userCanUseCI">
  1290. <out:text/>javascript:cognosLaunchInWindow('_blank', 'menubar=no,toolbar=no,status=yes,location=no,resizable=yes,width=650,height=480', 'ui.gateway', sGateway,'ui.action','edit' ,'ui.tool', 'cd', 'ui.backURL', sBackURL, 'ui.id', '<out:value-of select="$target-id"/>' );<out:text/>
  1291. </out:if>
  1292. </out:when>
  1293. <!-- EVStudio objects -->
  1294. <out:when test="$launchableType = 'application/vnd.ibm.cognos.ev'">
  1295. <out:if test="$canRead and $userCanUseEV ">
  1296. <out:choose>
  1297. <out:when test="not($genURLForBookmark)">
  1298. <out:text/>javascript:cognosLaunchInWindow('_blank', 'menubar=no,toolbar=no,status=yes,location=no,resizable=yes,width=650,height=480', 'ui.gateway', sGateway,'ui.action','edit' ,'ui.tool', 'EVStudio', 'ui.backURL', sBackURL, 'ui.object', '<out:value-of select="xtsext:javascriptencode( string( $target-path ) )"/>' );<out:text/>
  1299. </out:when>
  1300. <out:otherwise>
  1301. <out:value-of select="$launch-url-prefix"/>
  1302. <out:text/>&amp;ui.tool=EVStudio&amp;ui.action=edit&amp;launch.openJSStudioInFrame=true<out:text/>
  1303. <out:text/>&amp;ui.object=<out:value-of select="xtsext:protect(xtsext:urlencode( string($target-path) ),'url','searchPath','getdata')"/>
  1304. </out:otherwise>
  1305. </out:choose>
  1306. </out:if>
  1307. </out:when>
  1308. <out:when test="$launchableType = 'application/vnd.ibm.cognos.ev.canvas'">
  1309. <out:if test="$canRead and $userCanUseEV ">
  1310. <out:choose>
  1311. <out:when test="not($genURLForBookmark)">
  1312. <out:text/>javascript:cognosLaunchInWindow('_blank', 'menubar=no,toolbar=no,status=yes,location=no,resizable=yes,width=650,height=480', 'ui.gateway', sGateway,'ui.action','edit','ui.mode','canvas', 'ui.tool', 'EVStudio', 'ui.backURL', sBackURL, 'ui.object', '<out:value-of select="xtsext:javascriptencode( string( $target-path ) )"/>' );<out:text/>
  1313. </out:when>
  1314. <out:otherwise>
  1315. <out:value-of select="$launch-url-prefix"/>
  1316. <out:text/>&amp;ui.tool=EVStudio&amp;ui.action=edit&amp;launch.openJSStudioInFrame=true<out:text/>
  1317. <out:text/>&amp;ui.object=<out:value-of select="xtsext:protect(xtsext:urlencode( string($target-path) ),'url','searchPath','getdata')"/>
  1318. </out:otherwise>
  1319. </out:choose>
  1320. </out:if>
  1321. </out:when>
  1322. <!-- other launchables -->
  1323. </out:choose>
  1324. </out:when>
  1325. <!-- report or interactiveReport -->
  1326. <out:when test="$class='report' or $class='interactiveReport'">
  1327. <out:variable name="rsType">
  1328. <out:if test="$rsUIProfile != ''">
  1329. <out:text>, 'ui.profile', '</out:text><out:value-of select="$rsUIProfile"/><out:text>'</out:text>
  1330. </out:if>
  1331. </out:variable>
  1332. <!--Note: capabilites included in 'action' variable calc. done in pf:gen-action -->
  1333. <out:if test="$action != '' "> <!-- if empty user didn't have proper permissions -->
  1334. <out:choose>
  1335. <out:when test="$action='edit' and ($class='report' or ($class='interactiveReport' and $rsUIProfile = 'Professional'))">
  1336. <out:variable name="sq">&apos;</out:variable>
  1337. <out:variable name="apos">'</out:variable>
  1338. <out:variable name="mod-path">
  1339. <out:value-of select="xtsext:replace(string($target-path),$sq,$apos)"/>
  1340. </out:variable>
  1341. <out:choose>
  1342. <out:when test="not($genURLForBookmark)">
  1343. <out:text/>javascript:cognosLaunchInWindow('_blank', 'menubar=no,toolbar=no,status=yes,location=no,resizable=yes,width=650,height=480', 'ui.gateway', sGateway, 'ui.tool', 'ReportStudio', 'ui.backURL', sBackURL, 'ui.object', '<out:value-of select="xtsext:javascriptencode( string( $mod-path ) )"/>', 'ui.drillThroughTargetParameterValues', '<out:value-of select="xtsext:javascriptencode( string($drillThroughTargetParameterValues))"/>', 'ui.action', 'edit'<out:value-of select="$rv-executionprompt-launch"/><out:value-of select="$rsType"/>);<out:text/>
  1344. </out:when>
  1345. <out:otherwise>
  1346. <out:variable name="inFrame">
  1347. <out:choose>
  1348. <out:when test="$class='interactiveReport'">false</out:when>
  1349. <out:otherwise>true</out:otherwise>
  1350. </out:choose>
  1351. </out:variable>
  1352. <out:variable name="redirectURL">
  1353. <out:value-of select="$launch-rel-url-prefix"/>
  1354. <out:text/>&amp;ui.tool=ReportStudio&amp;ui.action=edit&amp;launch.openJSStudioInFrame=<out:text/><out:value-of select="$inFrame"/>
  1355. <out:text/>&amp;ui.object=<out:value-of select="xtsext:protect(xtsext:urlencode( string($target-path) ),'url','searchPath','getdata')"/>
  1356. <out:text/>&amp;ui.drillThroughTargetParameterValues=<out:value-of select="xtsext:protect(xtsext:urlencode( string($drillThroughTargetParameterValues)),'url','searchPath','getdata')"/>
  1357. <out:if test="$rsUIProfile != ''">&amp;ui.profile=<out:value-of select="$rsUIProfile"/></out:if>
  1358. </out:variable>
  1359. <out:value-of select="$redirect-bookmarkURL"/><out:value-of select="xtsext:protect(xtsext:urlencode($redirectURL),'url','searchPath','getdata')"/>
  1360. </out:otherwise>
  1361. </out:choose>
  1362. </out:when>
  1363. <out:when test="/root/system/param[@name = 'allowExpandedMHT'] = 'true' and $action='view' and $class='interactiveReport'">
  1364. <!-- COGCQ00867718 -->
  1365. <out:value-of select="$general-url-prefix"/>/repository/sid/cm/rid/<out:value-of select="$target-id"/>/oid/default/content/mht/content<out:text/>
  1366. </out:when>
  1367. <out:when test="$action='view' ">
  1368. <out:choose>
  1369. <out:when test="$isDrillthruMode">
  1370. <out:text/>javascript:cognosLaunch('ui.gateway', sGateway, 'ui.tool', 'CognosViewer', 'ui.backURL', '<out:if test="not($isIgnoreBackURL)"><out:value-of select="xtsext:javascriptencode(string($back-url))"/></out:if>', 'ui.object', '<out:value-of select="xtsext:javascriptencode( concat('defaultOutput(', $target-path, $viewer-output-formats-list, ')' ) )"/>', 'ui.drillThroughTargetParameterValues', '<out:value-of select="xtsext:javascriptencode( string($drillThroughTargetParameterValues))"/>' <out:value-of select="$launch-rv-lang-cl"/>,'ui.action', 'view','ui.name','<out:value-of select="xtsext:javascriptencode(string(cm:defaultName))"/>','ui.format','<out:value-of select="$ui-output-format"/>' <out:value-of select="$ui-bookmark-launch"/>);<out:text/>
  1371. </out:when>
  1372. <out:otherwise>
  1373. <out:value-of select="$general-url-prefix"/>?b_action=cognosViewer<out:text/>
  1374. <out:text/>&amp;ui.action=view<out:text/>
  1375. <out:text/>&amp;ui.object=<out:value-of select="xtsext:protect(xtsext:urlencode( concat('defaultOutput(', $target-path, $viewer-output-formats-list, ')' ) ),'url','searchPath','getdata')"/>
  1376. <out:text/>&amp;ui.name=<out:value-of select="xtsext:protect(xtsext:urlencode(string(cm:defaultName)),'url','userData','getdata')"/>
  1377. <out:text/>&amp;ui.format=<out:value-of select="$ui-output-format"/>
  1378. <out:value-of select="$rv-lang-cl"/>
  1379. <out:value-of select="$ui-bookmark"/><out:text/>
  1380. <out:if test="not($isIgnoreBackURL or $genURLForBookmark)">
  1381. <out:text/>&amp;ui.backURL=<out:value-of select="$encoded-back-url"/>
  1382. </out:if>
  1383. </out:otherwise>
  1384. </out:choose>
  1385. </out:when>
  1386. <out:when test="$action='run'">
  1387. <out:choose>
  1388. <out:when test="$isDrillthruMode">
  1389. <out:text/>javascript:cognosLaunch('ui.gateway', sGateway, 'ui.tool', 'CognosViewer', 'ui.backURL', '<out:if test="not($isIgnoreBackURL)"><out:value-of select="xtsext:javascriptencode(string($back-url))"/></out:if>', 'ui.object', '<out:value-of select="xtsext:javascriptencode( string( $target-path ) )"/>', 'ui.drillThroughTargetParameterValues', '<out:value-of select="xtsext:javascriptencode( string($drillThroughTargetParameterValues))"/>' <out:value-of select="$launch-rv-lang-execution"/>,'ui.action', 'run'<out:if test="$specifyRunOutputFormat">, 'run.outputFormat', '<out:value-of select="$adjustedOutputFormat"/>'</out:if>,'ui.name','<out:value-of select="xtsext:javascriptencode(cm:defaultName)"/>' <out:value-of select="$ui-bookmark-launch"/><out:value-of select="$rv-execution-params-launch"/>);<out:text/>
  1390. </out:when>
  1391. <out:otherwise>
  1392. <out:value-of select="$general-url-prefix"/>?b_action=cognosViewer<out:text/>
  1393. <out:text/>&amp;ui.action=run<out:text/>
  1394. <out:text/>&amp;ui.object=<out:value-of select="xtsext:protect(xtsext:urlencode( string( $target-path ) ),'url','searchPath','getdata')"/>
  1395. <out:text/>&amp;ui.name=<out:value-of select="xtsext:protect(xtsext:urlencode(string(cm:defaultName)),'url','userData','getdata')"/>
  1396. <out:value-of select="$rv-lang-execution"/>
  1397. <out:value-of select="$ui-bookmark"/>
  1398. <out:value-of select="$rv-execution-params"/>
  1399. <out:if test="not($isIgnoreBackURL or $genURLForBookmark)">
  1400. <out:text/>&amp;ui.backURL=<out:value-of select="$encoded-back-url"/>
  1401. </out:if>
  1402. </out:otherwise>
  1403. </out:choose>
  1404. </out:when>
  1405. </out:choose>
  1406. </out:if>
  1407. </out:when>
  1408. <!-- query -->
  1409. <out:when test="$class='query' ">
  1410. <out:choose>
  1411. <out:when test="not(cm:nid) and $action!=''"> <!-- if empty user didn't have proper permissions -->
  1412. <!--Note: capabilites included in 'action' variable calc. done in pf:gen-action -->
  1413. <out:choose>
  1414. <out:when test="$action='view' ">
  1415. <out:choose>
  1416. <out:when test="$isDrillthruMode">
  1417. <out:text/>javascript:cognosLaunch('ui.gateway', sGateway, 'ui.tool', 'CognosViewer', 'ui.backURL', '<out:if test="not($isIgnoreBackURL)"><out:value-of select="xtsext:javascriptencode(string($back-url))"/></out:if>', 'ui.object', '<out:value-of select="xtsext:javascriptencode( concat('defaultOutput(', $viewer-output-formats-list, $target-path, ')' ) )"/>', 'ui.drillThroughTargetParameterValues', '<out:value-of select="xtsext:javascriptencode( string($drillThroughTargetParameterValues))"/>' <out:value-of select="$launch-rv-lang-cl"/>,'ui.action', 'view','ui.name','<out:value-of select="xtsext:javascriptencode(string(cm:defaultName))"/>','ui.format','<out:value-of select="$ui-output-format"/>' <out:value-of select="$ui-bookmark-launch"/>);<out:text/>
  1418. </out:when>
  1419. <out:otherwise>
  1420. <out:value-of select="$general-url-prefix"/>?b_action=cognosViewer<out:text/>
  1421. <out:text/>&amp;ui.action=view<xsl:text/>
  1422. <out:text/>&amp;ui.object=<out:value-of select="xtsext:protect(xtsext:urlencode( concat('defaultOutput(', $target-path, $viewer-output-formats-list, ')' ) ),'url','searchPath','getdata')"/>
  1423. <out:text/>&amp;ui.name=<out:value-of select="xtsext:protect(xtsext:urlencode(string(cm:defaultName)),'url','userData','getdata')"/>
  1424. <out:text/>&amp;ui.format=<out:value-of select="$ui-output-format"/>
  1425. <out:value-of select="$rv-lang-cl"/>
  1426. <out:value-of select="$ui-bookmark"/>
  1427. <out:if test="not($isIgnoreBackURL or $genURLForBookmark)">
  1428. <out:text/>&amp;ui.backURL=<out:value-of select="$encoded-back-url"/>
  1429. </out:if>
  1430. </out:otherwise>
  1431. </out:choose>
  1432. </out:when>
  1433. <out:when test="$action='edit'">
  1434. <out:choose>
  1435. <out:when test="not($genURLForBookmark)">
  1436. <out:text/>javascript:cognosLaunch('ui.gateway', sGateway, 'ui.tool', 'QueryStudio', 'ui.backURL', '<out:if test="not($isIgnoreBackURL)"><out:value-of select="xtsext:javascriptencode(string($back-url))"/></out:if>', 'ui.object', '<out:value-of select="xtsext:javascriptencode( string( $target-path ) )"/>', 'ui.drillThroughTargetParameterValues', '<out:value-of select="xtsext:javascriptencode( string($drillThroughTargetParameterValues))"/>', 'ui.action', 'edit'<out:value-of select="$rv-executionprompt-launch"/>);<out:text/>
  1437. </out:when>
  1438. <out:otherwise>
  1439. <out:value-of select="$launch-url-prefix"/>
  1440. <out:text/>&amp;ui.tool=QueryStudio&amp;ui.action=edit<out:text/>
  1441. <out:text/>&amp;ui.object=<out:value-of select="xtsext:protect(xtsext:urlencode( string($target-path) ),'url','searchPath','getdata')"/>
  1442. <out:text/>&amp;ui.drillThroughTargetParameterValues=<out:value-of select="xtsext:protect(xtsext:urlencode( string($drillThroughTargetParameterValues)),'url','searchPath','getdata')"/>
  1443. </out:otherwise>
  1444. </out:choose>
  1445. </out:when>
  1446. <out:when test="$action='run'">
  1447. <out:choose>
  1448. <out:when test="$isDrillthruMode">
  1449. <out:text/>javascript:cognosLaunch('ui.gateway', sGateway, 'ui.tool', 'CognosViewer', 'ui.backURL', '<out:if test="not($isIgnoreBackURL)"><out:value-of select="xtsext:javascriptencode(string($back-url))"/></out:if>', 'ui.object', '<out:value-of select="xtsext:javascriptencode( string( $target-path ) )"/>', 'ui.drillThroughTargetParameterValues', '<out:value-of select="xtsext:javascriptencode( string($drillThroughTargetParameterValues))"/>' <out:value-of select="$launch-rv-lang-execution"/>,'ui.action', 'run'<out:if test="$specifyRunOutputFormat">, 'run.outputFormat', '<out:value-of select="$adjustedOutputFormat"/>'</out:if>,'ui.name','<out:value-of select="xtsext:javascriptencode(cm:defaultName)"/>' <out:value-of select="$ui-bookmark-launch"/><out:value-of select="$rv-execution-params-launch"/>);<out:text/>
  1450. </out:when>
  1451. <out:otherwise>
  1452. <out:value-of select="$general-url-prefix"/>?b_action=cognosViewer<out:text/>
  1453. <out:text/>&amp;ui.action=run<out:text/>
  1454. <out:text/>&amp;ui.object=<out:value-of select="xtsext:protect(xtsext:urlencode( string( $target-path ) ),'url','searchPath','getdata')"/>
  1455. <out:text/>&amp;ui.name=<out:value-of select="xtsext:protect(xtsext:urlencode(string(cm:defaultName)),'url','userData','getdata')"/>
  1456. <out:value-of select="$rv-lang-execution"/>
  1457. <out:value-of select="$ui-bookmark"/>
  1458. <out:value-of select="$rv-execution-params"/>
  1459. <out:if test="not($isIgnoreBackURL or $genURLForBookmark)">
  1460. <out:text/>&amp;ui.backURL=<out:value-of select="$encoded-back-url"/>
  1461. </out:if>
  1462. </out:otherwise>
  1463. </out:choose>
  1464. </out:when>
  1465. </out:choose>
  1466. </out:when>
  1467. <out:when test="cm:nid and $canRead">
  1468. <out:variable name="daurl">
  1469. <out:value-of select="cm:uri"/>
  1470. <!-- Add the back URL, LA and LO -->
  1471. <out:text/>&amp;LA=<out:value-of select="$productLocale"/>
  1472. <out:text/>&amp;LO=<out:value-of select="$contentLocale"/>
  1473. <out:if test="not($genURLForBookmark)">
  1474. <out:text/>&amp;back=<out:value-of select="$encoded-s7-back-url"/>
  1475. </out:if>
  1476. </out:variable>
  1477. <out:value-of select="xtsext:protect(string($daurl),'none','s7url','s7url')"/>
  1478. </out:when>
  1479. </out:choose>
  1480. </out:when>
  1481. <!-- reportView -->
  1482. <out:when test="$class='reportView' ">
  1483. <out:variable name="rsType">
  1484. <out:if test="$rsUIProfile != ''">
  1485. <out:text>, 'ui.profile','</out:text><out:value-of select="$rsUIProfile"/><out:text>'</out:text>
  1486. </out:if>
  1487. </out:variable>
  1488. <out:variable name="baseClass">
  1489. <out:choose>
  1490. <out:when test="*[local-name()='base'] and not(*[local-name()='base']/@nil )">
  1491. <out:value-of select="*[local-name()='base']/*/*[local-name()='objectClass']"/>
  1492. </out:when>
  1493. <out:when test="cm:objectClass = 'shortcut'">
  1494. <out:value-of select="*[local-name()='target']/*/*[local-name()='base']/*/*[local-name()='objectClass']"/>
  1495. </out:when>
  1496. </out:choose>
  1497. </out:variable>
  1498. <!--Note: capabilites included in 'action' variable calc. done in pf:gen-action -->
  1499. <out:if test="$action != '' "> <!-- if empty user didn't have proper permissions -->
  1500. <out:choose>
  1501. <out:when test="/root/system/param[@name = 'allowExpandedMHT'] = 'true' and $action='view' and $baseClass='interactiveReport'">
  1502. <out:value-of select="$general-url-prefix"/>/repository/sid/cm/rid/<out:value-of select="$target-id"/>/oid/default/content/mht/content<out:text/>
  1503. </out:when>
  1504. <out:when test="$action='view' ">
  1505. <out:choose>
  1506. <out:when test="$isDrillthruMode">
  1507. <out:text/>javascript:cognosLaunch('ui.gateway', sGateway, 'ui.tool', 'CognosViewer', 'ui.backURL', '<out:if test="not($isIgnoreBackURL)"><out:value-of select="xtsext:javascriptencode(string($back-url))"/></out:if>', 'ui.object', '<out:value-of select="xtsext:javascriptencode( concat('defaultOutput(', $viewer-output-formats-list, $target-path, ')' ) )"/>', 'ui.drillThroughTargetParameterValues', '<out:value-of select="xtsext:javascriptencode( string($drillThroughTargetParameterValues))"/>' <out:value-of select="$launch-rv-lang-cl"/>,'ui.action', 'view','ui.name','<out:value-of select="xtsext:javascriptencode(string(cm:defaultName))"/>','ui.format','<out:value-of select="$ui-output-format"/>' <out:value-of select="$ui-bookmark-launch"/>);<out:text/>
  1508. </out:when>
  1509. <out:otherwise>
  1510. <out:value-of select="$general-url-prefix"/>?b_action=cognosViewer<out:text/>
  1511. <out:text/>&amp;ui.action=view<out:text/>
  1512. <out:text/>&amp;ui.object=<out:value-of select="xtsext:protect(xtsext:urlencode( concat('defaultOutput(', $target-path, $viewer-output-formats-list, ')' ) ),'url','searchPath','getdata')"/>
  1513. <out:text/>&amp;ui.name=<out:value-of select="xtsext:protect(xtsext:urlencode(string(cm:defaultName)),'url','userData','getdata')"/>
  1514. <out:text/>&amp;ui.format=<out:value-of select="$ui-output-format"/>
  1515. <out:value-of select="$rv-lang-cl"/>
  1516. <out:value-of select="$ui-bookmark"/>
  1517. <out:if test="not($isIgnoreBackURL or $genURLForBookmark)">
  1518. <out:text/>&amp;ui.backURL=<out:value-of select="$encoded-back-url"/>
  1519. </out:if>
  1520. </out:otherwise>
  1521. </out:choose>
  1522. </out:when>
  1523. <out:when test="$action='run'">
  1524. <out:choose>
  1525. <out:when test="$isDrillthruMode">
  1526. <out:text/>javascript:cognosLaunch('ui.gateway', sGateway, 'ui.tool', 'CognosViewer', 'ui.backURL', '<out:if test="not($isIgnoreBackURL)"><out:value-of select="xtsext:javascriptencode(string($back-url))"/></out:if>', 'ui.object', '<out:value-of select="xtsext:javascriptencode( string( $target-path ) )"/>', 'ui.drillThroughTargetParameterValues', '<out:value-of select="xtsext:javascriptencode( string($drillThroughTargetParameterValues))"/>' <out:value-of select="$launch-rv-lang-execution"/>,'ui.action', 'run' <out:if test="$specifyRunOutputFormat">, 'run.outputFormat', '<out:value-of select="$adjustedOutputFormat"/>'</out:if>, 'ui.name','<out:value-of select="xtsext:javascriptencode(cm:defaultName)"/>' <out:value-of select="$ui-bookmark-launch"/><out:value-of select="$rv-execution-params-launch"/>);<out:text/>
  1527. </out:when>
  1528. <out:otherwise>
  1529. <out:value-of select="$general-url-prefix"/>?b_action=cognosViewer<out:text/>
  1530. <out:text/>&amp;ui.action=run<out:text/>
  1531. <out:text/>&amp;ui.object=<out:value-of select="xtsext:protect(xtsext:urlencode( string( $target-path ) ),'url','searchPath','getdata')"/>
  1532. <out:text/>&amp;ui.name=<out:value-of select="xtsext:protect(xtsext:urlencode(string(cm:defaultName)),'url','userData','getdata')"/>
  1533. <out:value-of select="$rv-lang-execution"/>
  1534. <out:value-of select="$ui-bookmark"/>
  1535. <out:value-of select="$rv-execution-params"/>
  1536. <out:if test="not($isIgnoreBackURL or $genURLForBookmark)">
  1537. <out:text/>&amp;ui.backURL=<out:value-of select="$encoded-back-url"/>
  1538. </out:if>
  1539. </out:otherwise>
  1540. </out:choose>
  1541. </out:when>
  1542. </out:choose>
  1543. </out:if>
  1544. </out:when>
  1545. <!-- Analysis -->
  1546. <out:when test="$class='analysis'">
  1547. <!--Note: capabilites included in 'action' variable calc. done in pf:gen-action -->
  1548. <out:if test="$action != '' "> <!-- if empty user didn't have proper permissions -->
  1549. <out:choose>
  1550. <out:when test="$action='view' ">
  1551. <out:choose>
  1552. <out:when test="$isDrillthruMode">
  1553. <out:text/>javascript:cognosLaunch('ui.format','<out:value-of select="xtsext:javascriptencode($ui-output-format)"/>' <out:value-of select="$launch-rv-lang-cl"/>,'ui.name','<out:value-of select="xtsext:javascriptencode(cm:defaultName)"/>', 'ui.gateway', sGateway, 'ui.tool', 'CognosViewer', <out:if test="not($isIgnoreBackURL)">'ui.backURL', '<out:value-of select="xtsext:javascriptencode(string($back-url))"/>', </out:if>'ui.object', '<out:value-of select="xtsext:javascriptencode( concat('defaultOutput(', $viewer-output-formats-list, $target-path, ')' ) )"/>', 'ui.action', 'view'<out:if test="$drillThroughTargetParameterValues != ''">, 'ui.drillThroughTargetParameterValues', '<out:value-of select="xtsext:javascriptencode( string($drillThroughTargetParameterValues))"/>'</out:if> <out:value-of select="$ui-bookmark-launch"/>);<out:text/>
  1554. </out:when>
  1555. <out:otherwise>
  1556. <out:value-of select="$general-url-prefix"/>?b_action=cognosViewer<out:text/>
  1557. <out:text/>&amp;ui.action=view&amp;ui.object=<out:value-of select="xtsext:protect(xtsext:urlencode( concat('defaultOutput(', $target-path, $viewer-output-formats-list, ')' ) ),'url','searchPath','getdata')"/>
  1558. <out:text/>&amp;ui.name=<out:value-of select="xtsext:protect(xtsext:urlencode(string(cm:defaultName)),'url','userData','getdata')"/>
  1559. <out:text/>&amp;ui.format=<out:value-of select="$ui-output-format"/>
  1560. <out:value-of select="$rv-lang-cl"/><out:text/>
  1561. <out:value-of select="$ui-bookmark"/><out:text/>
  1562. <out:if test="not($isIgnoreBackURL or $genURLForBookmark)">
  1563. <out:text/>&amp;ui.backURL=<out:value-of select="$encoded-back-url"/>
  1564. </out:if>
  1565. </out:otherwise>
  1566. </out:choose>
  1567. </out:when>
  1568. <out:when test="$action='edit' ">
  1569. <out:variable name="sq">&apos;</out:variable>
  1570. <out:variable name="apos">'</out:variable>
  1571. <out:variable name="mod-path">
  1572. <out:value-of select="xtsext:replace(string($target-path),$sq,$apos)"/>
  1573. </out:variable>
  1574. <out:choose>
  1575. <out:when test="not($genURLForBookmark)">
  1576. <out:text/>javascript:cognosLaunchInWindow('_blank', 'menubar=no,toolbar=no,status=yes,location=no,resizable=yes,width=650,height=480', 'ui.gateway', sGateway, 'ui.tool', 'AnalysisStudio', 'ui.backURL', sBackURL, 'ui.object', '<out:value-of select="xtsext:javascriptencode( string( $mod-path ) )"/>', 'ui.drillThroughTargetParameterValues', '<out:value-of select="xtsext:javascriptencode( string($drillThroughTargetParameterValues))"/>', 'ui.action', 'edit'<out:value-of select="$rv-executionprompt-launch"/>);<out:text/>
  1577. </out:when>
  1578. <out:otherwise>
  1579. <out:variable name="redirectURL">
  1580. <out:value-of select="$launch-rel-url-prefix"/>
  1581. <out:text/>&amp;ui.tool=AnalysisStudio&amp;ui.action=edit&amp;launch.openJSStudioInFrame=true<out:text/>
  1582. <out:text/>&amp;ui.object=<out:value-of select="xtsext:protect(xtsext:urlencode( string($target-path) ),'url','searchPath','getdata')"/>
  1583. <out:text/>&amp;ui.drillThroughTargetParameterValues=<out:value-of select="xtsext:protect(xtsext:urlencode( string($drillThroughTargetParameterValues)),'url','searchPath','getdata')"/>
  1584. </out:variable>
  1585. <out:value-of select="$redirect-bookmarkURL"/><out:value-of select="xtsext:protect(xtsext:urlencode( string($redirectURL)),'url','searchPath','getdata')"/>
  1586. </out:otherwise>
  1587. </out:choose>
  1588. </out:when>
  1589. <out:when test="$action='run'">
  1590. <out:choose>
  1591. <out:when test="$isDrillthruMode">
  1592. <out:text/>javascript:cognosLaunch('ui.gateway', sGateway, 'ui.tool', 'CognosViewer' <out:value-of select="$launch-rv-lang-execution"/>, <out:if test="not($isIgnoreBackURL)">'ui.backURL', '<out:value-of select="xtsext:javascriptencode(string($back-url))"/>', </out:if>'ui.object', '<out:value-of select="xtsext:javascriptencode( string( $target-path ) )"/>', 'ui.action', 'run'<out:if test="$drillThroughTargetParameterValues != ''">, 'ui.drillThroughTargetParameterValues', '<out:value-of select="xtsext:javascriptencode( string($drillThroughTargetParameterValues))"/>'</out:if><out:if test="$specifyRunOutputFormat">, 'run.outputFormat', '<out:value-of select="$adjustedOutputFormat"/>'</out:if>,'ui.name','<out:value-of select="xtsext:javascriptencode(cm:defaultName)"/>' <out:value-of select="$ui-bookmark-launch"/><out:value-of select="$rv-execution-params-launch"/>);<out:text/>
  1593. </out:when>
  1594. <out:otherwise>
  1595. <out:value-of select="$general-url-prefix"/>?b_action=cognosViewer<out:text/>
  1596. <out:text/>&amp;ui.action=run<out:text/>
  1597. <out:text/>&amp;ui.object=<out:value-of select="xtsext:protect(xtsext:urlencode(string($target-path)),'url','searchPath','getdata')"/>
  1598. <out:text/>&amp;ui.name=<out:value-of select="xtsext:protect(xtsext:urlencode(string(cm:defaultName)),'url','userData','getdata')"/>
  1599. <out:value-of select="$rv-lang-execution"/>
  1600. <out:value-of select="$ui-bookmark"/>
  1601. <out:value-of select="$rv-execution-params"/>
  1602. <out:if test="not($isIgnoreBackURL or $genURLForBookmark)">
  1603. <out:text/>&amp;ui.backURL=<out:value-of select="$encoded-back-url"/>
  1604. </out:if>
  1605. </out:otherwise>
  1606. </out:choose>
  1607. </out:when>
  1608. </out:choose>
  1609. </out:if>
  1610. </out:when>
  1611. <!-- Dashboard -->
  1612. <out:when test="$class='dashboard' ">
  1613. <!-- Page's requiredCapabilities check -->
  1614. <out:if test="$userCanUseDashboardViewer and $canRead and $canTraverse">
  1615. <out:choose>
  1616. <out:when test="not($genURLForBookmark)">
  1617. <out:choose>
  1618. <out:when test="string(/root/generalConfigSettings/configuration/property[@name='portal.launchBusinessInsightChromeless']) = 'true'">
  1619. <out:variable name="winProp"><out:text/>menubar=no,toolbar=no,status=no,location=no,resizable=yes,scrollbars=yes<out:text/></out:variable>
  1620. <out:text/>javascript:cognosLaunchInWindow('_blank', '<out:value-of select="$winProp"/>', 'ui.gateway', sGateway, 'ui.tool', 'DashboardConsole', 'ui.action', 'edit', 'ui.id', '<out:value-of select="$target-id"/>');<out:text/>
  1621. </out:when>
  1622. <out:otherwise>
  1623. <out:text/>javascript:directLaunch('ui.gateway', sGateway, 'ui.tool', 'DashboardConsole', 'ui.action', 'edit', 'ui.id', '<out:value-of select="xtsext:javascriptencode($target-id)"/>','ui.backURL', '<out:value-of select="xtsext:javascriptencode(string($back-url))"/>','ui.errURL','<out:value-of select="xtsext:javascriptencode(string($back-url))"/>', 'ui.encoding', '<out:value-of select="xtsext:javascriptencode($encoding)"/>');<out:text/>
  1624. </out:otherwise>
  1625. </out:choose>
  1626. </out:when>
  1627. <out:otherwise>
  1628. <!-- Build up the atom path - URL encoding each entry -->
  1629. <out:variable name="atom-path">
  1630. <out:call-template name="constructDashboardAtomPath">
  1631. <out:with-param name="atomPath" select="cm:ancestors"/>
  1632. </out:call-template>
  1633. <out:value-of select="xtsext:urlencode(cm:defaultName)"/>
  1634. </out:variable>
  1635. <out:variable name="redirectURL">
  1636. <out:value-of select="$launch-rel-url-prefix"/>
  1637. <out:text/>&amp;ui.tool=DashboardConsole&amp;ui.action=edit<out:text/>
  1638. <out:text/>&amp;ui.atompath=<out:value-of select="xtsext:protect(xtsext:urlencode(string($atom-path)),'url','searchPath','getdata')"/>
  1639. </out:variable>
  1640. <out:value-of select="$redirect-bookmarkURL"/><out:value-of select="xtsext:protect(xtsext:urlencode($redirectURL),'url','searchPath','getdata')"/>
  1641. <out:text/>&amp;m_redirect_uitool=DashboardConsole<out:text/>
  1642. </out:otherwise>
  1643. </out:choose>
  1644. </out:if>
  1645. </out:when>
  1646. <!-- pagelet -->
  1647. <out:when test="$class='pagelet' ">
  1648. <!-- Page's requiredCapabilities check -->
  1649. <out:if test="$canExecute">
  1650. <out:value-of select="$general-url-prefix"/>?b_action=dashboard&amp;pathinfo=/pagelet&amp;path=storeID(%22<out:value-of select="$target-id"/>%22)<out:text/>
  1651. <out:if test="not(/root/system/param[@name='ui_hide']/CRN_HEADER_TITLE)">
  1652. <out:text>&amp;frag-header=true</out:text>
  1653. </out:if>
  1654. <out:if test="not($genURLForBookmark)">
  1655. <out:text/>&amp;backURL=<out:value-of select="$encoded-back-url"/>
  1656. </out:if>
  1657. </out:if>
  1658. </out:when>
  1659. <!-- Wire off generating a URL for archiveLocation objects here (before looking at cm:uri below) since these objects happen to have a uri that we don't care to handle here. -->
  1660. <out:when test="$class='archiveLocation'"/>
  1661. <!-- URL or short-cut to URL-->
  1662. <out:when test="cm:uri or cm:target/*/cm:uri">
  1663. <out:if test="$canRead"> <!-- Do not display the URL hyperlink if no read permissions -->
  1664. <out:choose>
  1665. <out:when test="cm:uri and xtsext:cafaction('issafeurl_null', normalize-space(cm:uri)) = 'true'">
  1666. <out:value-of select="cm:uri"/>
  1667. </out:when>
  1668. <out:when test="cm:target/*/cm:uri and xtsext:cafaction('issafeurl_null', normalize-space(cm:target/*/cm:uri)) = 'true'">
  1669. <out:value-of select="cm:target/*/cm:uri"/>
  1670. </out:when>
  1671. </out:choose>
  1672. </out:if>
  1673. </out:when>
  1674. <!-- metrics tasks -->
  1675. <out:when test="contains(' metricsFileImportTask metricsDataSourceETLTask metricsMaintenanceTask metricsExportTask ', concat(' ', $class, ' ' ))">
  1676. <out:if test="$canExecute">
  1677. <!-- Bug 610731 need to redirect to get routing server group if there is one the cost to do it for all objects is too high -->
  1678. <out:value-of select="$general-url-prefix"/>?b_action=xts.run&amp;m=portal/getRoutingSG.xts<out:text/>
  1679. <out:text/>&amp;m_obj=<out:value-of select="xtsext:protect(xtsext:urlencode( string( $target-path ) ),'url','searchPath','getdata')"/>
  1680. <out:text/>&amp;bAction=dis.run<out:text/>
  1681. <out:if test="not($isIgnoreBackURL or $genURLForBookmark)">
  1682. <out:text/>&amp;backURL=<out:value-of select="$encoded-back-url"/>
  1683. </out:if>
  1684. </out:if>
  1685. </out:when>
  1686. <!-- reportTemplate -->
  1687. <out:when test="$class='reportTemplate'">
  1688. <out:variable name="rsType">
  1689. <out:if test="$rsUIProfile != ''">
  1690. <out:text>, 'ui.profile', '</out:text><out:value-of select="$rsUIProfile"/><out:text>'</out:text>
  1691. </out:if>
  1692. </out:variable>
  1693. <out:if test="$canRead and contains($effectiveUserCapabilities, ' userCanUseRS ')">
  1694. <out:variable name="sq">&apos;</out:variable>
  1695. <out:variable name="apos">'</out:variable>
  1696. <out:variable name="mod-path">
  1697. <out:value-of select="xtsext:replace(string($target-path),$sq,$apos)"/>
  1698. </out:variable>
  1699. <out:choose>
  1700. <out:when test="not($genURLForBookmark)">
  1701. <out:text/>javascript:cognosLaunchInWindow('_blank', 'menubar=no,toolbar=no,status=yes,location=no,resizable=yes,width=650,height=480', 'ui.gateway', sGateway, 'ui.tool', 'ReportStudio', 'ui.backURL', sBackURL, 'ui.object', '<out:value-of select="xtsext:javascriptencode( string( $mod-path ) )"/>', 'ui.action', 'edit'<out:value-of select="$rsType"/>);<out:text/>
  1702. </out:when>
  1703. <out:otherwise>
  1704. <out:variable name="redirectURL">
  1705. <out:value-of select="$launch-rel-url-prefix"/>
  1706. <out:text/>&amp;ui.tool=ReportStudio&amp;ui.action=edit&amp;launch.openJSStudioInFrame=true<out:text/>
  1707. <out:text/>&amp;ui.object=<out:value-of select="xtsext:protect(xtsext:urlencode( string($target-path) ),'url','searchPath','getdata')"/>
  1708. </out:variable>
  1709. <out:value-of select="$redirect-bookmarkURL"/><out:value-of select="xtsext:protect(xtsext:urlencode($redirectURL),'url','searchPath','getdata')"/>
  1710. </out:otherwise>
  1711. </out:choose>
  1712. </out:if>
  1713. </out:when>
  1714. <!-- PPW Series 8 -->
  1715. <out:when test="($class='powerPlay8Report' or $class='powerPlay8ReportView')">
  1716. <out:if test="$action!=''"><!-- if empty user doesn't have proper permission -->
  1717. <out:choose>
  1718. <out:when test="cm:objectClass != 'shortcut'">
  1719. <out:call-template name="buildpp8">
  1720. <out:with-param name="thisnode" select="."/>
  1721. <out:with-param name="encoded-back-url" select="$encoded-back-url"/>
  1722. <out:with-param name="target-path" select="$target-path"/>
  1723. <out:with-param name="target" select="$target"/>
  1724. <out:with-param name="action" select="$action"/>
  1725. <out:with-param name="genURLForBookmark" select="$genURLForBookmark"/>
  1726. <out:with-param name="launch-url-prefix" select="$launch-url-prefix"/>
  1727. <out:with-param name="launch-rel-url-prefix" select="$launch-rel-url-prefix"/>
  1728. <out:with-param name="class" select="$class"/>
  1729. <out:with-param name="general-url-prefix" select="$general-url-prefix"/>
  1730. <out:with-param name="ui-bookmark" select="$ui-bookmark"/>
  1731. <out:with-param name="output_format" select="$ui-output-format"/>
  1732. <out:with-param name="effectiveUserCapabilities" select="$effectiveUserCapabilities"/>
  1733. <out:with-param name="rv-executionprompt-launch" select="$rv-executionprompt-launch"/>
  1734. <out:with-param name="drillThroughTargetParameterValues" select="$drillThroughTargetParameterValues"/>
  1735. <out:with-param name="redirect-bookmarkURL" select="$redirect-bookmarkURL"/>
  1736. <out:with-param name="canExecute" select="$canExecute"/>
  1737. </out:call-template>
  1738. </out:when>
  1739. <out:otherwise>
  1740. <out:call-template name="buildpp8">
  1741. <out:with-param name="thisnode" select="cm:target/*[1]"/>
  1742. <out:with-param name="encoded-back-url" select="$encoded-back-url"/>
  1743. <out:with-param name="target-path" select="$target-path"/>
  1744. <out:with-param name="target" select="$target"/>
  1745. <out:with-param name="action" select="$action"/>
  1746. <out:with-param name="genURLForBookmark" select="$genURLForBookmark"/>
  1747. <out:with-param name="launch-url-prefix" select="$launch-url-prefix"/>
  1748. <out:with-param name="launch-rel-url-prefix" select="$launch-rel-url-prefix"/>
  1749. <out:with-param name="class" select="$class"/>
  1750. <out:with-param name="general-url-prefix" select="$general-url-prefix"/>
  1751. <out:with-param name="ui-bookmark" select="$ui-bookmark"/>
  1752. <out:with-param name="output_format" select="$ui-output-format"/>
  1753. <out:with-param name="effectiveUserCapabilities" select="$effectiveUserCapabilities"/>
  1754. <out:with-param name="rv-executionprompt-launch" select="$rv-executionprompt-launch"/>
  1755. <out:with-param name="drillThroughTargetParameterValues" select="$drillThroughTargetParameterValues"/>
  1756. <out:with-param name="redirect-bookmarkURL" select="$redirect-bookmarkURL"/>
  1757. <out:with-param name="canExecute" select="$canExecute"/>
  1758. </out:call-template>
  1759. </out:otherwise>
  1760. </out:choose>
  1761. </out:if>
  1762. </out:when>
  1763. <!-- PPW Series 7 -->
  1764. <out:when test="$class='powerPlayCube' or $class='powerPlayReport'">
  1765. <!-- if empty user doesn't have proper permission except if cube which has no action-->
  1766. <out:if test="($class='powerPlayReport' and $action!='') or $class='powerPlayCube'">
  1767. <out:choose>
  1768. <out:when test="cm:objectClass != 'shortcut'">
  1769. <out:call-template name="buildpp">
  1770. <out:with-param name="thisnode" select="."/>
  1771. <out:with-param name="encoded-back-url" select="$encoded-back-url"/>
  1772. <out:with-param name="target-path" select="$target-path"/>
  1773. <out:with-param name="target" select="$target"/>
  1774. <out:with-param name="action" select="$action"/>
  1775. <out:with-param name="genURLForBookmark" select="$genURLForBookmark"/>
  1776. </out:call-template>
  1777. </out:when>
  1778. <out:otherwise>
  1779. <out:call-template name="buildpp">
  1780. <out:with-param name="thisnode" select="cm:target/*[1]"/>
  1781. <out:with-param name="encoded-back-url" select="$encoded-back-url"/>
  1782. <out:with-param name="target-path" select="$target-path"/>
  1783. <out:with-param name="target" select="$target"/>
  1784. <out:with-param name="action" select="$action"/>
  1785. <out:with-param name="genURLForBookmark" select="$genURLForBookmark"/>
  1786. </out:call-template>
  1787. </out:otherwise>
  1788. </out:choose>
  1789. </out:if>
  1790. </out:when>
  1791. <!-- Output currently only a published news item (AGS) will create an output class-->
  1792. <out:when test="$class = 'output' and $canRead">
  1793. <out:value-of select="$general-url-prefix"/>?b_action=cognosViewer<out:text/>
  1794. <out:text/>&amp;ui.action=view<out:text/>
  1795. <out:text/>&amp;ui.object=<out:value-of select="xtsext:protect(xtsext:urlencode(string($target-path)),'url','searchPath','getdata')"/>
  1796. <out:text/>&amp;ui.name=<out:value-of select="xtsext:protect(xtsext:urlencode(string(cm:defaultName)),'url','userData','getdata')"/>
  1797. <out:text/>&amp;ui.format=<out:value-of select="cm:format"/>
  1798. <out:value-of select="$rv-lang-cl"/>
  1799. <out:value-of select="$ui-bookmark"/><out:text/>
  1800. <out:if test="not($isIgnoreBackURL or $genURLForBookmark)">
  1801. <out:text/>&amp;ui.backURL=<out:value-of select="$encoded-back-url"/>
  1802. </out:if>
  1803. </out:when>
  1804. <!-- Document -->
  1805. <out:when test="$class = 'document' ">
  1806. <out:if test="$canRead and $canTraverse">
  1807. <out:variable name="documentFormat">
  1808. <out:choose>
  1809. <out:when test="cm:target/*/cm:documentType">
  1810. <out:value-of select="cm:target/*/cm:documentType"/>
  1811. </out:when>
  1812. <out:otherwise>
  1813. <out:value-of select="cm:documentType"/>
  1814. </out:otherwise>
  1815. </out:choose>
  1816. </out:variable>
  1817. <out:variable name="defaultOutputPath">storeID(&quot;<out:value-of select="$target-id"/>&quot;)/documentVersion[last()]/documentContent[last()]</out:variable>
  1818. <out:variable name="documentDownloadURL">
  1819. <out:value-of select="$general-url-prefix"/>?b_action=xts.run&amp;m=portal/download.xts<out:text/>
  1820. <out:if test="count($documentFormats/format[@name = $documentFormat]) > 0">
  1821. <out:text/>&amp;format=<out:value-of select="xtsext:urlencode($documentFormat)"/>
  1822. </out:if>
  1823. <out:text/>&amp;m_download_obj=<out:value-of select="xtsext:protect(xtsext:urlencode(string($defaultOutputPath)),'url','searchPath','getdata')"/>
  1824. <out:text/>&amp;m_name=<out:value-of select="xtsext:protect(xtsext:urlencode(string(cm:defaultName)),'url','userData','getdata')"/>
  1825. </out:variable>
  1826. <out:choose>
  1827. <out:when test="$genURLForBookmark">
  1828. <out:value-of select="$documentDownloadURL"/>
  1829. </out:when>
  1830. <out:otherwise>
  1831. <out:text/>javascript:checkDocumentDownload('<out:value-of select="xtsext:javascriptencode(string(cm:defaultName))"/>','<out:value-of select="xtsext:javascriptencode($download_specialCharacters)"/>','<out:value-of select="$documentDownloadURL"/>');<out:text/>
  1832. </out:otherwise>
  1833. </out:choose>
  1834. </out:if>
  1835. </out:when>
  1836. <!-- documentContent -->
  1837. <out:when test="$class='documentContent' and $canRead">
  1838. <out:choose>
  1839. <!-- Is this a published news item from AGS -->
  1840. <out:when test="starts-with(string($target-path),'/transientStateFolder/periodical')">
  1841. <out:value-of select="$general-url-prefix"/>?b_action=cognosViewer<out:text/>
  1842. <out:text/>&amp;ui.action=view<out:text/>
  1843. <out:text/>&amp;ui.object=<out:value-of select="xtsext:protect(xtsext:urlencode(string($target-path)),'url','searchPath','getdata')"/>
  1844. <out:text/>&amp;ui.name=<out:value-of select="xtsext:protect(xtsext:urlencode(string(cm:defaultName)),'url','userData','getdata')"/>
  1845. <out:text/>&amp;ui.format=<out:value-of select="cm:format"/>
  1846. <out:value-of select="$rv-lang-cl"/>
  1847. <out:if test="not($isIgnoreBackURL or $genURLForBookmark)">
  1848. <out:text/>&amp;ui.backURL=<out:value-of select="$encoded-back-url"/>
  1849. </out:if>
  1850. </out:when>
  1851. <!-- possibly another use of documentContent, re:download ( COC ) currently there is no use case for this and CC is not asking for dataType -->
  1852. <out:otherwise>
  1853. <out:variable name="defaultOutputPath">storeID(&quot;<out:value-of select="$target-id"/>&quot;)/documentVersion[last()]/documentContent[last()]</out:variable>
  1854. <out:variable name="documentDownloadURL">
  1855. <out:value-of select="$general-url-prefix"/>?b_action=xts.run&amp;m=portal/download.xts<out:text/>
  1856. <out:text/>&amp;format=<out:value-of select="xtsext:urlencode(cm:dataType)"/>
  1857. <out:text/>&amp;m_download_obj=<out:value-of select="xtsext:protect(xtsext:urlencode(string($defaultOutputPath)),'url','searchPath','getdata')"/>
  1858. <out:text/>&amp;m_name=<out:value-of select="xtsext:protect(xtsext:urlencode(string(cm:defaultName)),'url','userData','getdata')"/>
  1859. </out:variable>
  1860. <out:text/>javascript:checkDocumentDownload('<out:value-of select="xtsext:javascriptencode(string(cm:defaultName))"/>','<out:value-of select="xtsext:javascriptencode($download_specialCharacters)"/>','<out:value-of select="$documentDownloadURL"/>');<out:text/>
  1861. </out:otherwise>
  1862. </out:choose>
  1863. </out:when>
  1864. <!-- agentDefinition & agentDefinitionView-->
  1865. <out:when test="$class='agentDefinition' or $class='agentDefinitionView'">
  1866. <out:if test="$action != '' "> <!-- if empty user didn't have proper permissions -->
  1867. <out:choose>
  1868. <out:when test="$action='edit'"> <!-- agentDefView will never be edit -->
  1869. <out:choose>
  1870. <out:when test="not($genURLForBookmark)">
  1871. <out:text/>javascript:cognosLaunchInWindow('_blank', 'menubar=no,toolbar=no,status=yes,location=no,resizable=yes,width=650,height=480', 'ui.gateway', sGateway, 'ui.tool', 'EventStudio', 'ui.backURL', sBackURL, 'ui.object', '<out:value-of select="xtsext:javascriptencode( string( $target-path ) )"/>', 'ui.action', 'edit'); <out:text/>
  1872. </out:when>
  1873. <out:otherwise>
  1874. <out:variable name="redirectURL">
  1875. <out:value-of select="$launch-rel-url-prefix"/>
  1876. <out:text/>&amp;ui.tool=EventStudio&amp;ui.action=edit<out:text/>
  1877. <out:text/>&amp;ui.object=<out:value-of select="xtsext:protect(xtsext:urlencode( string($target-path) ),'url','searchPath','getdata')"/>
  1878. </out:variable>
  1879. <out:value-of select="$redirect-bookmarkURL"/><out:value-of select="xtsext:protect(xtsext:urlencode($redirectURL),'url','searchPath','getdata')"/>
  1880. </out:otherwise>
  1881. </out:choose>
  1882. </out:when>
  1883. <out:when test="$action='view'">
  1884. <out:variable name="event_list">
  1885. <out:choose>
  1886. <out:when test="cm:target/*">
  1887. <out:text/><out:value-of select="cm:target/*/cm:mostRecentEventList"/><out:text/>
  1888. </out:when>
  1889. <out:otherwise>
  1890. <out:text/><out:value-of select="cm:mostRecentEventList"/><out:text/>
  1891. </out:otherwise>
  1892. </out:choose>
  1893. </out:variable>
  1894. <out:value-of select="$general-url-prefix"/>?b_action=cognosViewer<out:text/>
  1895. <out:text/>&amp;ui.action=view&amp;ui.object=<out:value-of select="xtsext:javascriptencode(xtsext:protect(xtsext:urlencode($event_list), 'url','searchPath','getdata'))"/>
  1896. <out:text/>&amp;ui.name=<out:value-of select="xtsext:protect(xtsext:urlencode(string(cm:defaultName)),'url','userData','getdata')"/>
  1897. <out:text>&amp;cv.toolbar=false</out:text>
  1898. <out:value-of select="$rv-lang-cl"/>
  1899. <out:value-of select="$ui-bookmark"/><out:text/>
  1900. <out:if test="not($isIgnoreBackURL or $genURLForBookmark)">
  1901. <out:text/>&amp;ui.backURL=<out:value-of select="$encoded-back-url"/>
  1902. </out:if>
  1903. </out:when>
  1904. <out:when test="$action='run'">
  1905. <out:value-of select="$general-url-prefix"/>?b_action=xts.run&amp;m=portal/<out:value-of select="'runWithOptions/agentDefinition.xts'"/>&amp;<out:text/>
  1906. <out:text/>m_obj=<out:value-of select="xtsext:protect(xtsext:urlencode(string($target-path)),'url','searchPath','getdata')"/><out:text/>
  1907. <out:text/>&amp;m_name=<out:value-of select="xtsext:protect(xtsext:urlencode(string(cm:defaultName)),'url','userData','getdata')"/>
  1908. <out:text/>&amp;m_class=<out:value-of select="$class"/><out:text/>
  1909. <out:text/>&amp;m_path=storeID(<out:value-of select="$target-id"/>)<out:text/>
  1910. <out:if test="not($isIgnoreBackURL or $genURLForBookmark)">
  1911. <out:text/>&amp;backURL=<out:value-of select="$encoded-back-url"/>
  1912. </out:if>
  1913. </out:when>
  1914. </out:choose>
  1915. </out:if>
  1916. </out:when>
  1917. <!-- metrics package -->
  1918. <out:when test="$class='package' and ($userInterfaces='metricStudio' or $targetUserInterfaces='metricStudio')">
  1919. <out:choose>
  1920. <out:when test="$action='view'">
  1921. <xsl:call-template name="gen-url-other"/>
  1922. </out:when>
  1923. <out:when test="$action='run'">
  1924. <out:choose>
  1925. <out:when test="not($genURLForBookmark)">
  1926. <out:text/>javascript:cognosLaunch('ui.gateway', sGateway, 'ui.tool', 'MetricStudio', 'ui.backURL', '<out:value-of select="xtsext:javascriptencode(string($back-url))"/>', 'ui.object', '<out:value-of select="xtsext:javascriptencode( string( $target-path ) )"/>', 'ui.action', 'run','ui.folder','<out:value-of select="xtsext:javascriptencode( string($location) )"/>');<out:text/>
  1927. </out:when>
  1928. <out:otherwise>
  1929. <out:value-of select="$launch-url-prefix"/>
  1930. <out:text/>&amp;ui.tool=MetricStudio&amp;ui.action=run<out:text/>
  1931. <out:text/>&amp;ui.object=<out:value-of select="xtsext:protect(xtsext:urlencode( string($target-path) ),'url','searchPath','getdata')"/>
  1932. </out:otherwise>
  1933. </out:choose>
  1934. </out:when>
  1935. </out:choose>
  1936. </out:when>
  1937. <!-- planning package -->
  1938. <out:when test="$class='package' and ($userInterfaces='planningContributor' or $targetUserInterfaces='planningContributor')">
  1939. <out:choose>
  1940. <out:when test="$action='view'">
  1941. <xsl:call-template name="gen-url-other"/>
  1942. </out:when>
  1943. <out:when test="$action='run'">
  1944. <out:choose>
  1945. <out:when test="not($genURLForBookmark)">
  1946. <out:text/>javascript:cognosLaunch('ui.gateway', sGateway, 'ui.tool', 'Contributor', 'ui.backURL', '<out:value-of select="xtsext:javascriptencode(string($back-url))"/>', 'ui.object', '<out:value-of select="xtsext:javascriptencode( string( $target-path ) )"/>', 'ui.action', 'new','ui.folder','<out:value-of select="xtsext:javascriptencode( string($location) )"/>','ui.appname','');<out:text/>
  1947. </out:when>
  1948. <out:otherwise>
  1949. <out:value-of select="$launch-url-prefix"/>
  1950. <out:text/>&amp;ui.tool=Contributor&amp;ui.action=new&amp;ui.appname=<out:text/>
  1951. <out:text/>&amp;ui.object=<out:value-of select="xtsext:protect(xtsext:urlencode( string($target-path) ),'url','searchPath','getdata')"/>
  1952. </out:otherwise>
  1953. </out:choose>
  1954. </out:when>
  1955. </out:choose>
  1956. </out:when>
  1957. <!-- adaptive analytics package -->
  1958. <out:when test="$class='package' and ($userInterfaces='adaptiveAnalytics' or $targetUserInterfaces='adaptiveAnalytics')">
  1959. <out:choose>
  1960. <out:when test="$action='view'">
  1961. <xsl:call-template name="gen-url-other"/>
  1962. </out:when>
  1963. <out:when test="$action='run'">
  1964. <out:choose>
  1965. <out:when test="not($genURLForBookmark)">
  1966. <out:text/>javascript:cognosLaunchInWindow('_blank', 'menubar=no,toolbar=no,status=yes,location=no,resizable=yes,width=650,height=480', 'ui.gateway', sGateway, 'ui.tool', 'AnalyticsTOC', 'ui.backURL', '<out:value-of select="xtsext:javascriptencode(string($back-url))"/>', 'ui.object', '<out:value-of select="xtsext:javascriptencode( string( $target-path ) )"/>', 'ui.action', 'run','ui.folder','<out:value-of select="xtsext:javascriptencode( string($location) )"/>');<out:text/>
  1967. </out:when>
  1968. <out:otherwise>
  1969. <out:variable name="redirectURL">
  1970. <out:value-of select="$launch-rel-url-prefix"/>
  1971. <out:text/>&amp;ui.tool=AnalyticsTOC&amp;ui.action=run<out:text/>
  1972. <out:text/>&amp;ui.object=<out:value-of select="xtsext:protect(xtsext:urlencode( string($target-path) ),'url','searchPath','getdata')"/>
  1973. </out:variable>
  1974. <out:value-of select="$redirect-bookmarkURL"/><out:value-of select="xtsext:protect(xtsext:urlencode($redirectURL),'url','searchPath','getdata')"/>
  1975. </out:otherwise>
  1976. </out:choose>
  1977. </out:when>
  1978. </out:choose>
  1979. </out:when>
  1980. <!-- portlet -->
  1981. <out:when test="$class='portlet'">
  1982. <out:if test="$canRead and $canExecute and $canReadParent">
  1983. <out:variable name="portletPreviewURL">
  1984. <out:value-of select="$general-url-prefix"/>?rui=hh&amp;b_action=xts.run&amp;m=<out:value-of select="$app"/>/cc.xts&amp;m_portlet=/connection/portlet:path:<out:value-of select="$url-encoded-id"/>
  1985. </out:variable>
  1986. <out:choose>
  1987. <out:when test="$genURLForBookmark">
  1988. <out:value-of select="$portletPreviewURL"/>
  1989. </out:when>
  1990. <out:otherwise>
  1991. <out:text/>javascript:window.open('<out:value-of select="xtsext:javascriptencode(string($portletPreviewURL))"/>');<xsl:text/>
  1992. </out:otherwise>
  1993. </out:choose>
  1994. </out:if>
  1995. </out:when>
  1996. <!-- planningMacroTask -->
  1997. <out:when test="contains(' planningMacroTask ', concat(' ', $class, ' ' ))"/>
  1998. <!-- planningTask -->
  1999. <out:when test="contains(' planningTask ', concat(' ', $class, ' ' ))">
  2000. <!-- details/info on this object not yet available - TBD! -->
  2001. </out:when>
  2002. <!-- job -->
  2003. <out:when test="contains(' jobDefinition ', concat(' ', $class, ' ' ))"></out:when>
  2004. <!-- indexUpdateTask -->
  2005. <out:when test="$class='indexUpdateTask' "/>
  2006. <!-- migrationTask -->
  2007. <out:when test="$class='migrationTask' "/>
  2008. <!-- skin -->
  2009. <out:when test="$class='portalSkin'"/>
  2010. <!-- packageConfiguration -->
  2011. <out:when test="$class='packageConfiguration'"/>
  2012. <!-- user profile (RS) -->
  2013. <out:when test="$class='uiProfile'"/>
  2014. <!-- Misc. Admin objects that we don't hyperlink. -->
  2015. <out:when test="contains($class, 'Deployment') or contains($class, 'Service') or $class = 'drillPath' or $class = 'printer' or $class = 'dataSourceSignon' or $class='contact' or $class='distributionList' or $class='securedFeature' or $class='contentTask' or $class='dataMovementTask' or $class='dataMovementTaskAlias' or $class='reportDataServiceAgentDefinition' or $class = 'tenant'"/>
  2016. <!-- Roles and groups can generate URLs if they have children. If hasChildren is not sent, it is assumed to be true.(Used in Series 7 Namespaces) -->
  2017. <out:when test="($class = 'role' or $class = 'group' or $class='securedFunction') and not($hasChildren)"/>
  2018. <!-- Other Container / Shortcut -->
  2019. <out:otherwise>
  2020. <out:choose>
  2021. <out:when test="$genURLForBookmark">
  2022. <out:if test="$class = 'package' or $class = 'folder' or $class = 'subscriptionFolder' "><xsl:call-template name="gen-url-other"/></out:if>
  2023. </out:when>
  2024. <out:otherwise>
  2025. <xsl:call-template name="gen-url-other"/>
  2026. </out:otherwise>
  2027. </out:choose>
  2028. </out:otherwise>
  2029. </out:choose>
  2030. </out:template>
  2031. <!-- Build the atom path required for dashboard bookmarks -->
  2032. <out:template name="constructDashboardAtomPath">
  2033. <out:param name="atomPath" select="''"/>
  2034. <out:choose>
  2035. <out:when test="$atomPath/*/*[local-name()='storeID']=/root/session/param[@name='mrootid'] ">
  2036. <out:value-of select="xtsext:urlencode('~')"/><out:text>/</out:text>
  2037. </out:when>
  2038. <out:when test="$atomPath/*/*[local-name()='storeID']=/root/session/param[@name='prootid'] ">
  2039. <out:value-of select="xtsext:urlencode($atomPath/*/*[local-name()='storeID' and string(.)=/root/session/param[@name='prootid']]/../*[local-name()='title'])"/><out:text>/</out:text>
  2040. </out:when>
  2041. </out:choose>
  2042. <out:for-each select="$atomPath/*">
  2043. <out:if test="preceding-sibling::*/*[local-name()='storeID']=/root/session/param[@name='mrootid'] or preceding-sibling::*/*[local-name()='storeID']=/root/session/param[@name='prootid']">
  2044. <out:value-of select="concat(xtsext:urlencode(string(./*[local-name()='title'])),'/')"/>
  2045. </out:if>
  2046. </out:for-each>
  2047. </out:template>
  2048. <!-- Build PPW url -->
  2049. <out:template name="buildpp">
  2050. <out:param name="thisnode"/>
  2051. <out:param name="encode-back-url"/>
  2052. <out:param name="target-path"/>
  2053. <out:param name="target"/>
  2054. <out:param name="action"/>
  2055. <out:param name="genURLForBookmark" select="false()"/>
  2056. <!-- note:for WO767 two default actions were added run and edit but the functionality has not changed as yet so no changes required-->
  2057. <!-- Build the link to support powerPlay object link, WO 770. -->
  2058. <out:variable name="ppURL">
  2059. <out:value-of select="$thisnode/cm:gateway"/>
  2060. <out:text/>?crnobj=<out:value-of select="xtsext:urlencode( string( $target-path ) )"/>
  2061. <out:text/>&amp;crnccn=<out:value-of select="xtsext:urlencode(string($thisnode/cm:cubeContentName))"/>
  2062. <out:variable name="ppprompt">
  2063. <out:choose>
  2064. <out:when test="$thisnode/cm:options/cm:powerPlayOptionBoolean[cm:name='prompt']/cm:value">
  2065. <out:value-of select="$thisnode/cm:options/cm:powerPlayOptionBoolean[cm:name='prompt']/cm:value"/>
  2066. </out:when>
  2067. <out:when test="$thisnode/cm:hasPrompts">
  2068. <out:value-of select="$thisnode/cm:hasPrompts"/>
  2069. </out:when>
  2070. <out:otherwise>false</out:otherwise>
  2071. </out:choose>
  2072. </out:variable>
  2073. <out:variable name="ppdesignmode" select="$thisnode/cm:options/cm:powerPlayOptionData[cm:name='data']/cm:value"/>
  2074. <out:if test="$thisnode/cm:objectClass='powerPlayReport'">
  2075. <out:choose>
  2076. <out:when test="$action='run'"> <!-- Note: powerplay only has two actions run and edit -->
  2077. <out:text/>&amp;crnfrm=PDF<out:text/>
  2078. <out:if test="string($thisnode/cm:hasPrompts)='true'"><out:text/>&amp;crnp=<out:value-of select="$ppprompt"/><out:text/></out:if>
  2079. </out:when>
  2080. <out:otherwise>
  2081. <out:text/>&amp;crnfrm=HTML<out:text/>
  2082. <out:choose>
  2083. <out:when test="string($ppdesignmode)='previewWithNoData'"> <!-- open in design mode is checked -->
  2084. <out:text/>&amp;crngnd=true<out:text/>
  2085. </out:when>
  2086. <out:otherwise><out:text/>&amp;crngnd=false<out:text/></out:otherwise>
  2087. </out:choose>
  2088. </out:otherwise>
  2089. </out:choose>
  2090. </out:if>
  2091. <out:text/>&amp;LA=<out:value-of select="$productLocale"/><out:text/>
  2092. <out:text/>&amp;LO=<out:value-of select="$contentLocale"/><out:text/>
  2093. <out:choose>
  2094. <out:when test="(string($target)='_blank') or ($genURLForBookmark)"><out:text/>&amp;BACK=&amp;NOBACK=1<out:text/></out:when>
  2095. <out:otherwise><out:text/>&amp;BACK=<out:value-of select="$encodedPPBack"/><out:text/></out:otherwise>
  2096. </out:choose>
  2097. </out:variable>
  2098. <out:value-of select="xtsext:protect(string($ppURL),'none','s7url','s7url')"/>
  2099. </out:template>
  2100. <!-- build PP8 url -->
  2101. <out:template name="buildpp8">
  2102. <out:param name="thisnode"/>
  2103. <out:param name="encode-back-url"/>
  2104. <out:param name="target-path"/>
  2105. <out:param name="target"/>
  2106. <out:param name="action"/>
  2107. <out:param name="genURLForBookmark" select="false()"/>
  2108. <out:param name="launch-url-prefix"/>
  2109. <out:param name="launch-rel-url-prefix"/>
  2110. <out:param name="class"/>
  2111. <out:param name="general-url-prefix"/>
  2112. <out:param name="ui-bookmark"/>
  2113. <out:param name="output_format"/>
  2114. <out:param name="effectiveUserCapabilities" select="''"/>
  2115. <out:param name="rv-executionprompt-launch" select="''"/>
  2116. <out:param name="drillThroughTargetParameterValues" select="''"/>
  2117. <out:param name="redirect-bookmarkURL" select="''"/>
  2118. <out:param name="canExecute" select="false()"/>
  2119. <out:variable name="designmode" select="$thisnode/cm:options/cm:powerPlay8OptionData[cm:name='data']/cm:value"/>
  2120. <out:variable name="openInDesignMode">
  2121. <out:choose>
  2122. <out:when test="string($designmode)='previewWithNoData'">true</out:when>
  2123. <out:otherwise>false</out:otherwise>
  2124. </out:choose>
  2125. </out:variable>
  2126. <out:variable name="prompt">
  2127. <out:choose>
  2128. <out:when test="$thisnode/cm:options/cm:powerPlay8OptionBoolean[cm:name='prompt']">
  2129. <out:value-of select="$thisnode/cm:options/cm:powerPlay8OptionBoolean[cm:name='prompt']/cm:value"/>
  2130. </out:when>
  2131. <out:otherwise>false</out:otherwise>
  2132. </out:choose>
  2133. </out:variable>
  2134. <out:variable name="openStudio">
  2135. <out:choose>
  2136. <out:when test="$action='edit' and $effectiveUserCapabilities!='' and contains($effectiveUserCapabilities, ' userCanUseRS ') and contains($effectiveUserCapabilities, ' userCanOpenPPInReportStudio ') and not(contains($effectiveUserCapabilities,' userCanUsePPS '))">ReportStudioPPReport</out:when>
  2137. <out:otherwise>PowerplayStudio</out:otherwise>
  2138. </out:choose>
  2139. </out:variable>
  2140. <out:variable name="runPermission">
  2141. <out:choose>
  2142. <out:when test="$canExecute">execute</out:when>
  2143. <out:otherwise>noexec</out:otherwise>
  2144. </out:choose>
  2145. </out:variable>
  2146. <out:choose>
  2147. <out:when test="$action='view' ">
  2148. <out:value-of select="$general-url-prefix"/>?b_action=cognosViewer<out:text/>
  2149. <out:text/>&amp;ui.action=view<out:text/>
  2150. <out:text/>&amp;ui.object=<out:value-of select="xtsext:protect(xtsext:urlencode( concat('defaultOutput(', $target-path, ')' ) ),'url','searchPath','getdata')"/>
  2151. <out:text/>&amp;ui.name=<out:value-of select="xtsext:protect(xtsext:urlencode(string(cm:defaultName)),'url','userData','getdata')"/>
  2152. <out:text/>&amp;ui.format=<out:value-of select="$output_format"/><out:text/>
  2153. <out:text/>&amp;lang=<out:value-of select="$contentLocale"/>
  2154. <out:text/><out:value-of select="$ui-bookmark"/>
  2155. <out:if test="not($genURLForBookmark)">
  2156. <out:text/>&amp;ui.backURL=<out:value-of select="$encodedPP8Back"/>
  2157. </out:if>
  2158. </out:when>
  2159. <!-- For edit and run -->
  2160. <out:when test="not($genURLForBookmark)">
  2161. <out:choose>
  2162. <out:when test="$openStudio = 'PowerplayStudio'">
  2163. <out:text/>javascript:cognosLaunch('ui.gateway', sGateway, 'ui.tool', '<out:value-of select="$openStudio"/>','ui.object', '<out:value-of select="xtsext:javascriptencode( string( $target-path ) )"/>', 'ui.backURL', '<out:value-of select="$javascript-encodedPP8Back"/>', 'ui.la', '<out:value-of select="xtsext:javascriptencode($productLocale)"/>', 'ui.lo', '<out:value-of select="xtsext:javascriptencode($contentLocale)"/>'<out:text/>
  2164. <out:choose>
  2165. <out:when test="$action = 'edit' and $class != 'powerPlay8ReportView'">
  2166. <out:text/>, 'ui.crnp', '<out:value-of select="$prompt"/>', 'ui.crnfrm', 'HTML', 'ui.action', 'edit', 'ui.crngnd', '<out:value-of select="$openInDesignMode"/>')<out:text/>
  2167. </out:when>
  2168. <out:when test="$action = 'run'">
  2169. <out:text/>, 'ui.crnp', '<out:value-of select="$prompt"/>', 'ui.crnfrm', 'PDF', 'ui.action', 'run'<out:text/>
  2170. <out:text/>,'ui.access','<out:value-of select="xtsext:cafaction( concat('sign_wrap_setpassportid_', $passport), xtsext:web64encode(string($runPermission), true()))"/>')<out:text/>
  2171. </out:when>
  2172. </out:choose>
  2173. </out:when>
  2174. <out:otherwise>
  2175. <out:variable name="rsType">
  2176. <out:if test="$rsUIProfile != ''">
  2177. <out:text>, 'ui.profile', '</out:text><out:value-of select="$rsUIProfile"/><out:text>'</out:text>
  2178. </out:if>
  2179. </out:variable>
  2180. <out:text/>javascript:cognosLaunchInWindow('_blank', 'menubar=no,toolbar=no,status=yes,location=no,resizable=yes,width=650,height=480', 'ui.gateway', sGateway, 'ui.tool', '<out:value-of select="$openStudio"/>', 'ui.backURL', sBackURL, 'ui.object', '<out:value-of select="xtsext:javascriptencode( string( $target-path ) )"/>', 'ui.drillThroughTargetParameterValues', '<out:value-of select="xtsext:javascriptencode( string($drillThroughTargetParameterValues))"/>', 'ui.action', 'edit'<out:value-of select="$rv-executionprompt-launch"/><out:value-of select="$rsType"/>,'ui.access','<out:value-of select="xtsext:cafaction( concat('sign_wrap_setpassportid_', $passport), xtsext:web64encode(string($runPermission), true()))"/>');<out:text/>
  2181. </out:otherwise>
  2182. </out:choose>
  2183. </out:when>
  2184. <out:otherwise>
  2185. <out:choose>
  2186. <out:when test="$openStudio = 'PowerplayStudio'">
  2187. <out:value-of select="$launch-url-prefix"/>
  2188. <out:text/>&amp;ui.tool=PowerplayStudio&amp;ui.object=<out:value-of select="xtsext:protect(xtsext:urlencode( string($target-path) ),'url','searchPath','getdata')"/>
  2189. <out:text/>&amp;ui.la=<out:value-of select="$productLocale"/>&amp;ui.lo=<out:value-of select="$contentLocale"/><out:text/>
  2190. <out:choose>
  2191. <out:when test="$action = 'edit' and $class != 'powerPlay8ReportView'">
  2192. <out:text/>&amp;ui.crnp=false&amp;ui.crnfrm=HTML&amp;ui.action=edit&amp;ui.crngnd=<out:value-of select="$openInDesignMode"/><out:text/>
  2193. </out:when>
  2194. <out:when test="$action = 'run'">
  2195. <out:text/>&amp;ui.crnp=<out:value-of select="$prompt"/>&amp;ui.crnfrm=PDF&amp;ui.action=run<out:text/>
  2196. </out:when>
  2197. </out:choose>
  2198. </out:when>
  2199. <out:otherwise>
  2200. <out:variable name="redirectURL">
  2201. <out:value-of select="$launch-rel-url-prefix"/>
  2202. <out:text/>&amp;ui.tool=<out:value-of select="$openStudio"/>&amp;ui.action=edit&amp;launch.openJSStudioInFrame=true<out:text/>
  2203. <out:text/>&amp;ui.object=<out:value-of select="xtsext:protect(xtsext:urlencode( string($target-path) ),'url','searchPath','getdata')"/>
  2204. <out:text/>&amp;ui.drillThroughTargetParameterValues=<out:value-of select="xtsext:protect(xtsext:urlencode( string($drillThroughTargetParameterValues)),'url','searchPath','getdata')"/>
  2205. <out:if test="$rsUIProfile != ''">&amp;ui.profile=<out:value-of select="$rsUIProfile"/></out:if>
  2206. </out:variable>
  2207. <out:value-of select="$redirect-bookmarkURL"/><out:value-of select="xtsext:protect(xtsext:urlencode($redirectURL),'url','searchPath','getdata')"/>
  2208. </out:otherwise>
  2209. </out:choose>
  2210. </out:otherwise>
  2211. </out:choose>
  2212. </out:template>
  2213. </xsl:template>
  2214. <!-- Code expanded in gen-url template to handle Container and Shorcut objects -->
  2215. <xsl:template name="gen-url-other">
  2216. <out:value-of select="$general-url-prefix"/>?b_action=xts.run&amp;m=<out:value-of select="$app"/>/<out:text/>
  2217. <!-- morphlet -->
  2218. <out:choose>
  2219. <out:when test="$morphlet = ''">
  2220. <out:value-of select="$mname"/>
  2221. </out:when>
  2222. <out:otherwise>
  2223. <out:value-of select="$morphlet"/>
  2224. </out:otherwise>
  2225. </out:choose>
  2226. <out:choose>
  2227. <!-- Consumer portal navigation -->
  2228. <out:when test=" $mname = 'cc.xts'">
  2229. <!-- Set the navigation target ids -->
  2230. <out:choose>
  2231. <out:when test="cm:nbid">&amp;m_nbid=<out:value-of select="cm:nbid"/></out:when>
  2232. <out:otherwise>&amp;m_folder=<out:value-of select="$target-id"/></out:otherwise>
  2233. </out:choose>
  2234. <!-- Remember the current navigation context if we are switching navigation context (i.e. PF to MF or MF to PF) -->
  2235. <!-- What is the current nav context? -->
  2236. <out:variable name="isPFContext" select="(starts-with(cm:nbid, 'p-') and not(cm:upfShortCut = 'true')) or starts-with( string(key('env-param', 'm_nbid')), 'p-') or starts-with(cm:searchPath, '/content')"/>
  2237. <out:variable name="isMFContext" select="not($isPFContext)"/>
  2238. <!-- What is the target nav context? (Don't trust UPF shortcuts!!)-->
  2239. <out:variable name="isPFNavTarget" select="starts-with(cm:nbid, 'p-') or starts-with($target-path, '/content')"/>
  2240. <out:variable name="isMFNavTarget" select="not($isPFNavTarget)"/>
  2241. <!-- Save the current nav state -->
  2242. <out:choose>
  2243. <!-- PF to MF navigation -->
  2244. <out:when test="$isPFContext and $isMFNavTarget">
  2245. <out:if test="string(key('env-param', 'm_folder')) != '' ">
  2246. <out:text/>&amp;m_folder2=<out:value-of select="concat('p-',string(key('env-param', 'm_folder')))"/>
  2247. </out:if>
  2248. <out:if test="string(key('env-param', 'm_nbid')) != '' ">
  2249. <out:text/>&amp;m_nbid2=<out:value-of select="string(key('env-param', 'm_nbid'))"/>
  2250. </out:if>
  2251. </out:when>
  2252. <!-- MF to PF navigation -->
  2253. <out:when test="$isMFContext and $isPFNavTarget">
  2254. <out:if test="string(key('env-param', 'm_folder')) != '' ">
  2255. <out:text/>&amp;m_folder2=<out:value-of select="concat('m-',string(key('env-param', 'm_folder')))"/>
  2256. </out:if>
  2257. <out:if test="string(key('env-param', 'm_nbid')) != '' ">
  2258. <out:text/>&amp;m_nbid2=<out:value-of select="string(key('env-param', 'm_nbid'))"/>
  2259. </out:if>
  2260. </out:when>
  2261. <!-- Navigation witin PF/MF -->
  2262. <out:otherwise>
  2263. <out:if test="key('env-param', 'm_folder2')!=''">&amp;m_folder2=<out:value-of select="string(key('env-param', 'm_folder2'))"/></out:if>
  2264. <out:if test="key('env-param', 'm_nbid2')!=''">&amp;m_nbid2=<out:value-of select="key('env-param', 'm_nbid2')"/></out:if>
  2265. </out:otherwise>
  2266. </out:choose>
  2267. <out:value-of select="$request-url-params"/>
  2268. </out:when>
  2269. <out:when test="$mname = 'subscriptions/subscriptions.xts' or $morphlet = 'subscriptions/subscriptions.xts'">
  2270. <xsl:text/>&amp;m_subfldr=<out:value-of select="$target-id"/>&amp;m_isRule<xsl:text/>
  2271. </out:when>
  2272. <!-- all other navigation types -->
  2273. <out:otherwise>
  2274. <out:choose>
  2275. <out:when test="$navigateUsingID='true'">
  2276. <out:text/>&amp;m_path=storeID(%22<out:value-of select="$target-id"/>%22)<out:text/>
  2277. </out:when>
  2278. <out:otherwise>
  2279. <out:text/>&amp;m_path=<out:value-of select="xtsext:protect(xtsext:urlencode(string($target-path)),'url','searchPath','getdata')"/><out:text/>
  2280. </out:otherwise>
  2281. </out:choose>
  2282. </out:otherwise>
  2283. </out:choose>
  2284. <!-- These are required by tools -->
  2285. <out:if test="key('env-param', 'tool_tab')">&amp;tool_tab=<out:value-of select="key('env-param', 'tool_tab')"/></out:if>
  2286. <!-- if we get in here then we are navigating something....that means if we are in a search context we do not want to keep the back url because once we being
  2287. navigating in a search conext we need to go back to cc -->
  2288. <out:if test="not($isIgnoreBackURL or $genURLForBookmark or $isSearch)">
  2289. <out:if test="key('env-param', 'backURL')">&amp;backURL=<out:value-of select="xtsext:protect(xtsext:urlencode( string( key('env-param', 'backURL') ) ),'url','url','getdata')"/></out:if>
  2290. </out:if>
  2291. <out:if test="key('env-param','skin')!=''">
  2292. <out:text>&amp;skin=</out:text><out:value-of select="key('env-param','skin')"/>
  2293. </out:if>
  2294. </xsl:template>
  2295. <!--
  2296. Template - pf:gen-icon:
  2297. This template generates another template gen-icon that builds icon names including the path to the icon.
  2298. Operation:
  2299. Outputs the gen-icon template.
  2300. -->
  2301. <xsl:template match="pf:gen-icon">
  2302. <out:template name="gen-icon">
  2303. <out:param name="showAction" select="true()"/>
  2304. <out:param name="class" select="''"/> <!-- this is the effective class. i.e. it is the class of the target object in case of a shortcut. Only usefull for morphlets that care about shortcuts. -->
  2305. <out:param name="userInterfaces" select="''"/>
  2306. <out:param name="targetUserInterfaces" select="''"/>
  2307. <out:param name="canRead" select="true()"/>
  2308. <out:param name="canWrite" select="true()"/>
  2309. <out:param name="canExecute" select="true()"/>
  2310. <out:param name="canTraverse" select="true()"/>
  2311. <out:param name="output_format" select="''"/> <!-- Set this to blank by default -->
  2312. <out:param name="isDangling" select="false()"/>
  2313. <out:param name="tooltipOverride" select="''"/> <!-- instead of displaying the deaultName, display this -->
  2314. <out:param name="iconURIOverride" select="''"/> <!-- instead of displaying the defaultIcon, display this -->
  2315. <out:param name="action" select="''"/>
  2316. <out:param name="executionFormat" select="''"/>
  2317. <out:param name="baseClass" select="''"/>
  2318. <out:param name="hiddenObject" select="'false'"/>
  2319. <out:param name="effectiveUserCapabilities" select="''"/>
  2320. <out:variable name="objectClass">
  2321. <out:choose>
  2322. <out:when test="$class != ''"><out:value-of select="$class"/></out:when>
  2323. <out:otherwise><out:value-of select="cm:objectClass"/></out:otherwise>
  2324. </out:choose>
  2325. </out:variable>
  2326. <out:variable name="tooltip">
  2327. <out:choose>
  2328. <out:when test="$tooltipOverride!=''">
  2329. <out:value-of select="xtsext:enforceBTD($tooltipOverride, $baseTextDirection, $productLocale, boolean($isBidiEnabled='true'))"/>
  2330. </out:when>
  2331. <out:when test="/root/objectClass/class[@name=$objectClass] != ''">
  2332. <out:value-of select="xtsext:enforceBTD(/root/objectClass/class[@name=$objectClass], $baseTextDirection, $productLocale, boolean($isBidiEnabled='true'))"/>
  2333. </out:when>
  2334. <out:otherwise>
  2335. <out:value-of select="xtsext:enforceBTD(cm:defaultName, $baseTextDirection, $productLocale, boolean($isBidiEnabled='true'))"/>
  2336. </out:otherwise>
  2337. </out:choose>
  2338. <out:if test="cm:defaultScreenTip != ''">
  2339. <out:choose>
  2340. <out:when test="$is-ui-rtl">
  2341. <out:text/>&#8207; - <out:value-of select="xtsext:enforceBTD(cm:defaultScreenTip, $baseTextDirection, $productLocale, boolean($isBidiEnabled='true'))"/>
  2342. </out:when>
  2343. <out:otherwise>
  2344. <out:text/>&#8206; - <out:value-of select="xtsext:enforceBTD(cm:defaultScreenTip, $baseTextDirection, $productLocale, boolean($isBidiEnabled='true'))"/>
  2345. </out:otherwise>
  2346. </out:choose>
  2347. </out:if>
  2348. <out:if test="cm:hidden = 'true'">
  2349. <out:variable name="hiddenLabel"><xts:string id="IDS_HIDDEN_OBJECT"/></out:variable>
  2350. <out:choose>
  2351. <out:when test="$is-ui-rtl">
  2352. <out:text/>&#8207; - <out:value-of select="xtsext:enforceBTD($hiddenLabel, $baseTextDirection, $productLocale, boolean($isBidiEnabled='true'))"/>
  2353. </out:when>
  2354. <out:otherwise>
  2355. <out:text/>&#8206; - <out:value-of select="xtsext:enforceBTD($hiddenLabel, $baseTextDirection, $productLocale, boolean($isBidiEnabled='true'))"/>
  2356. </out:otherwise>
  2357. </out:choose>
  2358. </out:if>
  2359. </out:variable>
  2360. <out:variable name="sessionRSUIProfile" select="key('session-param','rsuiprofile')"/>
  2361. <out:variable name="cmIconURI">
  2362. <out:choose>
  2363. <out:when test="$iconURIOverride!=''">
  2364. <out:value-of select="$iconURIOverride"/>
  2365. </out:when>
  2366. <out:otherwise>
  2367. <out:value-of select="string(cm:iconURI)"/>
  2368. </out:otherwise>
  2369. </out:choose>
  2370. </out:variable>
  2371. <img height="16" width="16">
  2372. <out:if test="$hiddenObject='true'">
  2373. <out:attribute name="class">hiddenEntryIcon</out:attribute>
  2374. <!-- <out:attribute name="style">filter:alpha(opacity=40);opacity:0.4;-moz-opacity:0.4;</out:attribute> -->
  2375. </out:if>
  2376. <out:attribute name="alt">
  2377. <out:value-of select="$tooltip"/>
  2378. </out:attribute>
  2379. <out:attribute name="title">
  2380. <out:value-of select="$tooltip"/>
  2381. </out:attribute>
  2382. <out:choose>
  2383. <out:when test="$cmIconURI != ''">
  2384. <out:variable name="customIcon">
  2385. <out:choose>
  2386. <!-- Ignore external URLs -->
  2387. <out:when test="contains($cmIconURI,':/') or contains($cmIconURI,'\\') or contains($cmIconURI,'//')">
  2388. <!-- blank -->
  2389. </out:when>
  2390. <!-- Relative / Absolute URLs - Checking for \ is probably useless in this case -->
  2391. <out:when test="contains($cmIconURI, '/') or contains($cmIconURI, '\')">
  2392. <out:choose>
  2393. <!-- Doesn't start with / -->
  2394. <out:when test="not(starts-with($cmIconURI, '/'))">
  2395. <out:value-of select="$webRoot"/>/<out:value-of select="$cmIconURI"/>
  2396. </out:when>
  2397. <!-- Starts with / -->
  2398. <out:otherwise>
  2399. <out:value-of select="$webRoot"/><out:value-of select="$cmIconURI"/>
  2400. </out:otherwise>
  2401. </out:choose>
  2402. </out:when>
  2403. <!-- image file -->
  2404. <out:otherwise>
  2405. <out:value-of select="$image_root"/><out:value-of select="$cmIconURI"/>
  2406. </out:otherwise>
  2407. </out:choose>
  2408. </out:variable>
  2409. <out:attribute name="src"><out:value-of select="$customIcon"/></out:attribute>
  2410. </out:when>
  2411. <out:otherwise>
  2412. <out:variable name="effectiveBaseClass">
  2413. <out:choose>
  2414. <out:when test="$baseClass != ''"><out:value-of select="$baseClass"/></out:when>
  2415. <out:when test="*[local-name()='base'] and not(*[local-name()='base']/@nil )">
  2416. <out:value-of select="*[local-name()='base']/*/*[local-name()='objectClass']"/>
  2417. </out:when>
  2418. <out:when test="cm:objectClass ='shortcut' and ($class='reportView' or $class='powerPlay8ReportView')">
  2419. <out:value-of select="*[local-name()='target']/*/*[local-name()='base']/*/*[local-name()='objectClass']"/>
  2420. </out:when>
  2421. <out:otherwise>reportView</out:otherwise> <!--use generic icon -->
  2422. </out:choose>
  2423. </out:variable>
  2424. <out:variable name="documentFormat">
  2425. <out:choose>
  2426. <out:when test="cm:objectClass = 'shortcut' and cm:target/*/cm:objectClass = 'document'">
  2427. <out:value-of select="cm:target/*/cm:documentType"/>
  2428. </out:when>
  2429. <out:when test="cm:objectClass = 'document'">
  2430. <out:value-of select="./cm:documentType"/>
  2431. </out:when>
  2432. </out:choose>
  2433. </out:variable>
  2434. <out:variable name="system_icon">
  2435. <out:choose>
  2436. <out:when test="cm:objectClass = 'shortcut'">
  2437. <out:choose>
  2438. <out:when test="$class = 'reportView'">
  2439. <out:value-of select="key('ui-object',$effectiveBaseClass)/@icon"/><out:text/><out:value-of select="/root/system/param[@name='ui_graphics']/param[@name='reportview_suffix']"/>
  2440. </out:when>
  2441. <out:when test="$class = 'powerPlay8ReportView'">
  2442. <out:value-of select="key('ui-object',$effectiveBaseClass)/@icon"/><out:text/><out:value-of select="/root/system/param[@name='ui_graphics']/param[@name='powerPlay8ReportView_suffix']"/>
  2443. </out:when>
  2444. <out:when test="$class = 'document' or cm:target/*/cm:objectClass = 'document'">
  2445. <out:variable name="documentType" select="$documentFormat"/>
  2446. <xsl:call-template name="pf:getDocumentIconName"/>
  2447. </out:when>
  2448. <out:when test="$class = 'output'"><!-- currently only output exists from AGS when new item is published -->
  2449. <out:if test="starts-with(string(cm:target/*/cm:searchPath),'/transientStateFolder')">
  2450. <out:value-of select="/root/system/param[@name='ui_graphics']/param[@name='agentHotlist_format']/format[@name='agentOutputHotlist']/@icon"/>
  2451. </out:if>
  2452. </out:when>
  2453. <out:when test="$class = 'documentContent'">
  2454. <out:if test="starts-with(string(cm:target/*/cm:searchPath),'/transientStateFolder')">
  2455. <out:variable name="docFormat" select="cm:target/*/cm:format"/>
  2456. <out:value-of select="/root/system/param[@name='ui_graphics']/param[@name='output_format']/format[@name=$docFormat]/@icon"/>
  2457. </out:if>
  2458. </out:when>
  2459. <out:otherwise>
  2460. <out:variable name="targetClass" select="cm:target/*/cm:objectClass"/>
  2461. <out:choose>
  2462. <out:when test="$targetClass='package' and key('ui-object',$targetClass)/userInterface[@name=$targetUserInterfaces]">
  2463. <out:variable name="uifs">
  2464. <out:choose>
  2465. <out:when test="$class != ''"><out:value-of select="$class"/></out:when>
  2466. <out:otherwise><out:value-of select="$targetClass"/></out:otherwise>
  2467. </out:choose>
  2468. </out:variable>
  2469. <out:choose>
  2470. <out:when test="$targetUserInterfaces != ''">
  2471. <out:value-of select="key('ui-object',$uifs)/userInterface[@name=$targetUserInterfaces]/@icon"/>
  2472. </out:when>
  2473. <out:otherwise>
  2474. <out:value-of select="key( 'ui-object', $uifs )/@icon"/>
  2475. </out:otherwise>
  2476. </out:choose>
  2477. </out:when>
  2478. <out:when test="$targetClass = 'launchable'">
  2479. <out:variable name="launchableType" select="cm:target/*/cm:launchableType"/>
  2480. <out:value-of select="key( 'ui-object', $targetClass )/launchableType[@name = string($launchableType)]/@icon"/>
  2481. </out:when>
  2482. <out:when test="$targetClass = 'report' or $targetClass = 'interactiveReport' ">
  2483. <out:choose>
  2484. <out:when test="string($sessionRSUIProfile)='pro' or string($sessionRSUIProfile)='all'">
  2485. <out:value-of select="key( 'ui-object', $targetClass )/uiprofile[@name='professional']/@icon"/>
  2486. </out:when>
  2487. <out:when test="$targetClass = 'report' and string($sessionRSUIProfile)='bua'">
  2488. <out:value-of select="key( 'ui-object', $targetClass )/uiprofile[@name='bua']/@icon"/>
  2489. </out:when>
  2490. <out:otherwise>
  2491. <out:value-of select="key( 'ui-object', $targetClass )/@icon"/>
  2492. </out:otherwise>
  2493. </out:choose>
  2494. </out:when>
  2495. <out:otherwise>
  2496. <out:value-of select="key( 'ui-object', $targetClass )/@icon"/>
  2497. </out:otherwise>
  2498. </out:choose>
  2499. </out:otherwise>
  2500. </out:choose>
  2501. </out:when>
  2502. <out:when test="($class='package' and key('ui-object',$class)/userInterface[@name=$userInterfaces]) or ($class='' and cm:objectClass = 'package' and key('ui-object',cm:objectClass)/userInterface[@name=$userInterfaces])">
  2503. <out:variable name="uifs">
  2504. <out:choose>
  2505. <out:when test="$class != ''"><out:value-of select="$class"/></out:when>
  2506. <out:otherwise><out:value-of select="cm:objectClass"/></out:otherwise>
  2507. </out:choose>
  2508. </out:variable>
  2509. <out:choose>
  2510. <out:when test="$userInterfaces != ''">
  2511. <out:value-of select="key('ui-object',$uifs)/userInterface[@name=$userInterfaces]/@icon"/>
  2512. </out:when>
  2513. <out:otherwise>
  2514. <out:value-of select="key( 'ui-object', $uifs )/@icon"/>
  2515. </out:otherwise>
  2516. </out:choose>
  2517. </out:when>
  2518. <out:when test="$class='reportView' or cm:objectClass='reportView'">
  2519. <out:variable name="reportViewSuffix" select="/root/system/param[@name='ui_graphics']/param[@name='reportview_suffix']"/>
  2520. <out:choose>
  2521. <out:when test="$effectiveBaseClass = 'reportView'">
  2522. <out:value-of select="key('ui-object',$effectiveBaseClass)/@icon"/>
  2523. </out:when>
  2524. <out:otherwise>
  2525. <out:choose>
  2526. <out:when test="$effectiveBaseClass = 'report' or $effectiveBaseClass = 'interactiveReport'">
  2527. <out:choose>
  2528. <out:when test="string($sessionRSUIProfile)='pro' or string($sessionRSUIProfile)='all'">
  2529. <out:value-of select="key( 'ui-object', $effectiveBaseClass )/uiprofile[@name='professional']/@icon"/><out:text/><out:value-of select="$reportViewSuffix"/>
  2530. </out:when>
  2531. <out:when test="$effectiveBaseClass = 'report' and string($sessionRSUIProfile)='bua'">
  2532. <out:value-of select="key( 'ui-object', $effectiveBaseClass )/uiprofile[@name='bua']/@icon"/><out:text/><out:value-of select="$reportViewSuffix"/>
  2533. </out:when>
  2534. <out:otherwise>
  2535. <out:value-of select="key('ui-object',$effectiveBaseClass)/@icon"/><out:text/><out:value-of select="$reportViewSuffix"/>
  2536. </out:otherwise>
  2537. </out:choose>
  2538. </out:when>
  2539. <out:otherwise>
  2540. <out:value-of select="key('ui-object',$effectiveBaseClass)/@icon"/><out:text/><out:value-of select="$reportViewSuffix"/>
  2541. </out:otherwise>
  2542. </out:choose>
  2543. </out:otherwise>
  2544. </out:choose>
  2545. </out:when>
  2546. <out:when test="$class='powerPlay8ReportView' or cm:objectClass='powerPlay8ReportView'">
  2547. <out:choose>
  2548. <out:when test="$effectiveBaseClass = 'powerPlay8ReportView'">
  2549. <out:value-of select="key('ui-object',$effectiveBaseClass)/@icon"/>
  2550. </out:when>
  2551. <out:otherwise>
  2552. <out:value-of select="key('ui-object',$effectiveBaseClass)/@icon"/><out:text/><out:value-of select="/root/system/param[@name='ui_graphics']/param[@name='powerPlay8ReportView_suffix']"/>
  2553. </out:otherwise>
  2554. </out:choose>
  2555. </out:when>
  2556. <out:when test="$class='document' or cm:objectClass='document'">
  2557. <out:variable name="documentType" select="$documentFormat"/>
  2558. <xsl:call-template name="pf:getDocumentIconName"/>
  2559. </out:when>
  2560. <out:when test="cm:objectClass='launchable'">
  2561. <out:variable name="launchableType" select="cm:launchableType"/>
  2562. <out:value-of select="key( 'ui-object', cm:objectClass )/launchableType[@name = string($launchableType)]/@icon"/>
  2563. </out:when>
  2564. <out:when test="$class = 'report' or $class = 'interactiveReport' or ($class='' and (cm:objectClass = 'report' or cm:objectClass='interactiveReport'))">
  2565. <out:variable name="currentClass">
  2566. <out:choose>
  2567. <out:when test="$class = ''"><out:value-of select="cm:objectClass"/></out:when>
  2568. <out:otherwise><out:value-of select="$class"/></out:otherwise>
  2569. </out:choose>
  2570. </out:variable>
  2571. <out:choose>
  2572. <out:when test="string($sessionRSUIProfile)='pro' or string($sessionRSUIProfile)='all'">
  2573. <out:value-of select="key( 'ui-object', $currentClass )/uiprofile[@name='professional']/@icon"/>
  2574. </out:when>
  2575. <out:when test="$currentClass = 'report' and string($sessionRSUIProfile)='bua'">
  2576. <out:value-of select="key( 'ui-object', $currentClass )/uiprofile[@name='bua']/@icon"/>
  2577. </out:when>
  2578. <out:otherwise>
  2579. <out:value-of select="key( 'ui-object', $currentClass )/@icon"/>
  2580. </out:otherwise>
  2581. </out:choose>
  2582. </out:when>
  2583. <out:when test="$class != ''">
  2584. <out:value-of select="key( 'ui-object', $class )/@icon"/>
  2585. </out:when>
  2586. <out:otherwise>
  2587. <out:value-of select="key( 'ui-object', cm:objectClass )/@icon"/>
  2588. </out:otherwise>
  2589. </out:choose>
  2590. </out:variable>
  2591. <out:variable name="iconsrc">
  2592. <out:choose>
  2593. <out:when test="cm:objectClass='contentManagerService'">
  2594. <out:value-of select="concat($webcontent, '/cogadmin/images/')"/>
  2595. </out:when>
  2596. <out:otherwise>
  2597. <out:value-of select="$image_root"/>
  2598. </out:otherwise>
  2599. </out:choose>
  2600. <out:choose>
  2601. <out:when test="cm:nid and cm:icon != ''">series7/</out:when>
  2602. <out:otherwise>icon_</out:otherwise>
  2603. </out:choose>
  2604. <out:choose>
  2605. <!-- If this object has an explicit icon then use it. -->
  2606. <out:when test="cm:icon != ''">
  2607. <out:choose>
  2608. <out:when test="contains(cm:icon, '.gif')">
  2609. <out:value-of select="substring-before(cm:icon, '.gif')"/>
  2610. </out:when>
  2611. <out:otherwise>
  2612. <out:value-of select="cm:icon"/>
  2613. </out:otherwise>
  2614. </out:choose>
  2615. </out:when>
  2616. <out:when test="$isDangling">
  2617. <out:value-of select="/root/system/param[@name='ui_graphics']/param[@name='dang_ref']"/>
  2618. <out:if test="$class = 'reportView'">
  2619. <out:value-of select="/root/system/param[@name='ui_graphics']/param[@name='reportview_suffix']"/>
  2620. </out:if>
  2621. <out:if test="$class = 'agentDefinitionView'">
  2622. <out:value-of select="/root/system/param[@name='ui_graphics']/param[@name='agentview_suffix']"/>
  2623. </out:if>
  2624. <out:if test="$class = 'dataMovementTaskAlias'">
  2625. <out:value-of select="/root/system/param[@name='ui_graphics']/param[@name='datamovementtaskalias_suffix']"/>
  2626. </out:if>
  2627. </out:when>
  2628. <!-- agentDef for edit and run & agentDefView for run are regular sys icon -->
  2629. <out:when test="($class='agentDefinition' or ($class='agentDefinitionView' and not(*[local-name()='base']/@nil ))) and $action='view' ">
  2630. <out:value-of select="/root/system/param[@name='ui_graphics']/param[@name='agentHotlist_format']/format[@name='agentOutputHotlist']/@icon"/>
  2631. <out:if test="$class = 'agentDefinitionView'">
  2632. <out:value-of select="/root/system/param[@name='ui_graphics']/param[@name='agentview_suffix']"/>
  2633. </out:if>
  2634. </out:when>
  2635. <!-- PPW output format -->
  2636. <out:when test="(starts-with(string($class),'powerPlayReport') or starts-with(string($class),'powerPlay8Report')) and $action ='run'">
  2637. <out:value-of select="/root/system/param[@name='ui_graphics']/param[@name='output_format']/format[@name='PDF']/@icon"/>
  2638. <out:if test="$class = 'powerPlay8ReportView'">
  2639. <out:value-of select="/root/system/param[@name='ui_graphics']/param[@name='powerPlay8ReportView_suffix']"/>
  2640. </out:if>
  2641. </out:when>
  2642. <!-- Added for RTC Task 4127 - Avoid running a report when a view is possible but not in user's default format. -->
  2643. <!-- Generate a non-format icon when the output format passed in contains the list of consumable output formats -->
  2644. <!-- The '++ ' indicates that the output_format is a list of consumable output formats -->
  2645. <out:when test="$output_format !='' and not(contains($supportedFormats,concat(' ',$output_format,' '))) and (contains(' report interactiveReport query analysis ', concat(' ', $class, ' ' )) or (($class='reportView') and not(*[local-name()='base']/@nil ))) and $action='view' ">
  2646. <out:value-of select="$consumableOutputFormatIcon"/>
  2647. <out:if test="$class = 'reportView'">
  2648. <out:value-of select="/root/system/param[@name='ui_graphics']/param[@name='reportview_suffix']"/>
  2649. </out:if>
  2650. </out:when>
  2651. <!-- output-specific icon here if there is an output (if action is view) -->
  2652. <out:when test="(contains(' report interactiveReport query analysis powerPlay8Report ', concat(' ', $class, ' ' )) or (($class='reportView' or $class = 'powerPlay8ReportView') and not(*[local-name()='base']/@nil ))) and $action='view' ">
  2653. <out:variable name="useOutputFormat">
  2654. <out:choose>
  2655. <out:when test="$class='interactiveReport' or $effectiveBaseClass='interactiveReport'">HTML</out:when>
  2656. <out:otherwise><out:value-of select="$output_format"/></out:otherwise>
  2657. </out:choose>
  2658. </out:variable>
  2659. <out:value-of select="/root/system/param[@name='ui_graphics']/param[@name='output_format']/format[@name=$useOutputFormat]/@icon"/>
  2660. <out:if test="$class = 'reportView'">
  2661. <out:value-of select="/root/system/param[@name='ui_graphics']/param[@name='reportview_suffix']"/>
  2662. </out:if>
  2663. <out:if test="$class = 'powerPlay8ReportView'">
  2664. <out:value-of select="/root/system/param[@name='ui_graphics']/param[@name='powerPlay8ReportView_suffix']"/>
  2665. </out:if>
  2666. </out:when>
  2667. <!-- if no output exists, show the format that will be produced -->
  2668. <out:when test="(contains(' report interactiveReport query analysis ', concat(' ', $class, ' ' )) or ($class='reportView' and not(*[local-name()='base']/@nil ))) and $action='run' ">
  2669. <out:variable name="outputFormat">
  2670. <!-- if format empty use default of HTML -->
  2671. <out:choose>
  2672. <out:when test="$class = 'interactiveReport' or $effectiveBaseClass = 'interactiveReport' ">HTML</out:when>
  2673. <out:when test="($executionFormat = 'PDF' and not($userCanGeneratePDFOutput))
  2674. or ($executionFormat = 'CSV' and not($userCanGenerateCSVOutput))
  2675. or ($executionFormat = 'XML' and not($userCanGenerateXMLOutput))
  2676. or (not($userCanGenerateXLSOutput) and ($executionFormat = 'XLS' or
  2677. $executionFormat = 'XLWA' or
  2678. $executionFormat = 'singleXLS' or
  2679. $executionFormat = 'spreadsheetML' or
  2680. $executionFormat = 'xlsxData' or
  2681. $executionFormat = 'spreadsheetMLOfficeConnectionEnabled'))
  2682. or ($executionFormat = '')">
  2683. <out:choose>
  2684. <out:when test="((/root/user/param[@name='format'] = 'PDF' and not($userCanGeneratePDFOutput))
  2685. or (/root/user/param[@name='format'] = 'CSV' and not($userCanGenerateCSVOutput))
  2686. or (/root/user/param[@name='format'] = 'XML' and not($userCanGenerateXMLOutput))
  2687. or (not($userCanGenerateXLSOutput) and (/root/user/param[@name='format'] = 'XLS' or
  2688. /root/user/param[@name='format'] = 'XLWA' or
  2689. /root/user/param[@name='format'] = 'singleXLS' or
  2690. /root/user/param[@name='format'] = 'spreadsheetML' or
  2691. /root/user/param[@name='format'] = 'xlsxData' or
  2692. /root/user/param[@name='format'] = 'spreadsheetMLOfficeConnectionEnabled')))
  2693. or (/root/user/param[@name='format'] = '')">
  2694. <out:text>HTML</out:text>
  2695. </out:when>
  2696. <out:otherwise>
  2697. <out:text/><out:value-of select="/root/user/param[@name='format']"/>
  2698. </out:otherwise>
  2699. </out:choose>
  2700. </out:when>
  2701. <out:otherwise>
  2702. <out:text/><out:value-of select="$executionFormat"/>
  2703. </out:otherwise>
  2704. </out:choose>
  2705. </out:variable>
  2706. <out:value-of select="/root/system/param[@name='ui_graphics']/param[@name='output_format']/format[@name=$outputFormat]/@icon"/>
  2707. <out:if test="$class = 'reportView'">
  2708. <out:value-of select="/root/system/param[@name='ui_graphics']/param[@name='reportview_suffix']"/>
  2709. </out:if>
  2710. </out:when>
  2711. <!-- when action is edit will fall here -->
  2712. <out:when test="$system_icon != ''">
  2713. <out:value-of select="$system_icon"/>
  2714. </out:when>
  2715. <out:otherwise>
  2716. <out:value-of select="/root/system/param[@name='ui_graphics']/param[@name='default_icon']"/>
  2717. </out:otherwise>
  2718. </out:choose>
  2719. <!-- Add _ref if it is a shortcut.. -->
  2720. <out:if test="cm:objectClass = 'shortcut' or cm:upfShortCut = 'true'">
  2721. <out:value-of select="/root/system/param[@name='ui_graphics']/param[@name='shortcut_suffix']"/>
  2722. </out:if>
  2723. <!-- For CM Service, append state to derive applicable icon -->
  2724. <out:if test="cm:objectClass='contentManagerService'">
  2725. <out:value-of select="concat('_default-',cm:startAsActive,'_runningState-',cm:runningState)"/>
  2726. </out:if>
  2727. <!-- Add the extension.. -->
  2728. <xsl:text/>.gif<xsl:text/>
  2729. </out:variable>
  2730. <out:attribute name="src"><out:value-of select="$iconsrc"/></out:attribute>
  2731. </out:otherwise>
  2732. </out:choose>
  2733. </img>
  2734. <!-- Show the action icon if:
  2735. - We are asked to.
  2736. - We are rendering the icon for a report, query, reportVersion or a shortcut to any of these.
  2737. - The object is **not** a dangling reference.
  2738. - The action is run.
  2739. -->
  2740. <out:if test="$showAction and not($isDangling) and $action = 'run' and ((contains(' analysis report query interactiveReport reportView package agentDefinition agentDefinitionView ', concat(' ', $class, ' ' )) and not(cm:icon)) or (starts-with(string($class),'powerPlayReport') or starts-with(string($class),'powerPlay8Report')))">
  2741. <img height="16" width="12">
  2742. <out:if test="$hiddenObject='true'">
  2743. <out:attribute name="style">filter:alpha(opacity=40);opacity:0.4;-moz-opacity:0.4;</out:attribute>
  2744. </out:if>
  2745. <out:attribute name="src">
  2746. <out:choose>
  2747. <out:when test="$class!='package'"><out:value-of select="$image_root"/>action_run.gif</out:when>
  2748. <out:when test="$class='package' and $userInterfaces='metricStudio' and ($canRead and $canExecute and $canTraverse) and contains($effectiveUserCapabilities, ' userCanUseMetricsManager ')"><out:value-of select="$image_root"/>action_cmm_10.gif</out:when>
  2749. <out:when test="$class='package' and $userInterfaces='planningContributor' and ($canRead and $canExecute) and contains($effectiveUserCapabilities, ' userCanUseMetricsManager ')"><out:value-of select="$image_root"/>action_contributor.gif</out:when>
  2750. <out:when test="$class='package' and $userInterfaces='adaptiveAnalytics' and ($canRead and $canExecute and $canTraverse) and contains($effectiveUserCapabilities, ' userCanUseAdaptiveAnalytics')"><out:value-of select="$image_root"/>action_analytic.gif</out:when>
  2751. <!-- the user does not have the appropriate permissions to run or edit this entry -->
  2752. <out:otherwise><out:value-of select="$webcontent"/>/images/space.gif</out:otherwise>
  2753. </out:choose>
  2754. </out:attribute>
  2755. </img>
  2756. </out:if>
  2757. </out:template>
  2758. </xsl:template>
  2759. <!--
  2760. Template - pf:gen-class-name: IS BEING DEPRECATED. USE THE UIOBJECTS_NAMES.XSLT LOGICSHEET INSTEAD
  2761. -->
  2762. <xsl:template match="pf:gen-class-name">
  2763. <out:template name="gen-class-name">
  2764. <out:param name="cm-class" select="''"/>
  2765. *** The pf:gen-class-name template has been deprecated. ***
  2766. </out:template>
  2767. </xsl:template>
  2768. <xsl:template match="pf:ccinav-gen-icon">
  2769. <out:template name="ccinav-gen-icon">
  2770. <out:param name="imgURL" select="''"/>
  2771. <out:param name="screenTip" select="''"/>
  2772. <out:param name="defaultAction" select="''"/>
  2773. <out:param name="hiddenObject" select="''"/>
  2774. <img height="16" width="16">
  2775. <out:attribute name="title">
  2776. <out:value-of select="$screenTip"/>
  2777. </out:attribute>
  2778. <out:attribute name="alt"/>
  2779. <out:attribute name="src"><out:value-of select="$imgURL"/></out:attribute>
  2780. <out:if test="$hiddenObject = 'true'"><out:attribute name="class">hiddenEntryIcon</out:attribute></out:if>
  2781. </img>
  2782. <out:if test="$defaultAction != ''">
  2783. <img height="16" width="12">
  2784. <out:attribute name="src">
  2785. <out:value-of select="$defaultAction"/>
  2786. </out:attribute>
  2787. <out:if test="$hiddenObject = 'true'"><out:attribute name="class">hiddenEntryIcon</out:attribute></out:if>
  2788. </img>
  2789. </out:if>
  2790. </out:template>
  2791. </xsl:template>
  2792. <xsl:template match="pf:ccinav-gen-url">
  2793. <out:template name="ccinav-gen-url">
  2794. <out:variable name="href">
  2795. <out:call-template name="ccinav-generate-link">
  2796. <out:with-param name="item" select="nav:defaultAction"/>
  2797. <out:with-param name="item-type" select="nav:type"/>
  2798. </out:call-template>
  2799. </out:variable>
  2800. <out:choose>
  2801. <out:when test="$href !=''">
  2802. <a>
  2803. <out:choose>
  2804. <out:when test="starts-with($href,'javascript:')">
  2805. <out:attribute name="href"><out:value-of select="'#'"/></out:attribute>
  2806. <out:attribute name="onclick"><out:value-of select="$href"/></out:attribute>
  2807. </out:when>
  2808. <out:otherwise>
  2809. <out:attribute name="href"><out:value-of select="$href"/></out:attribute>
  2810. </out:otherwise>
  2811. </out:choose>
  2812. <out:value-of select="nav:name"/>
  2813. </a>
  2814. </out:when>
  2815. <out:otherwise>
  2816. <out:value-of select="nav:name"/>
  2817. </out:otherwise>
  2818. </out:choose>
  2819. <!-- Render the disabled icon if this entry is disabled -->
  2820. <out:if test="nav:icon/nav:name = 'disabled'">
  2821. <img height="16" width="16" hspace="4" align="absmiddle">
  2822. <out:attribute name="src"><out:value-of select="nav:icon[nav:name='disabled']/nav:imgURL"/></out:attribute>
  2823. <out:attribute name="alt"><out:value-of select="nav:icon[nav:name='disabled']/nav:alt"/></out:attribute>
  2824. </img>
  2825. </out:if>
  2826. </out:template>
  2827. <out:template name="ccinav-generate-link">
  2828. <out:param name="item"/>
  2829. <out:param name="item-type"/>
  2830. <out:if test="$item">
  2831. <out:variable name="isCognosLaunch" select="$item/nav:windowProperties or $item/nav:urlParts/nav:param[@name='m'] = 'portal/launch.xts'"/>
  2832. <out:variable name="isCognosViewer" select="$item/nav:urlParts/nav:param[@name='b_action'] = 'cognosViewer'"/>
  2833. <out:variable name="isTraversingContainer" select="$item/nav:name = 'traverse'"/>
  2834. <out:variable name="isDefaultAction" select="local-name($item) = 'defaultAction'"/>
  2835. <out:choose>
  2836. <out:when test="$item/nav:url and $item/nav:url[@type='external']">
  2837. <out:value-of select="$item/nav:url[@type='external']"/>
  2838. </out:when>
  2839. <out:when test="$isCognosLaunch">
  2840. <out:choose>
  2841. <out:when test="$item/nav:windowProperties">
  2842. <out:text/>javascript:cognosLaunchInWindow('_blank', '<out:value-of select="$item/nav:windowProperties"/>',<out:text/>
  2843. </out:when>
  2844. <out:otherwise>
  2845. <out:text/>javascript:cognosLaunch(<out:text/>
  2846. </out:otherwise>
  2847. </out:choose>
  2848. <out:text/>'<out:value-of select="'ui.backURL'"/>','<out:value-of select="xtsext:javascriptencode(string($back-url))"/>'
  2849. <out:for-each select="$item/nav:urlParts/nav:param[@name != 'm']">
  2850. <out:text/>,'<out:value-of select="xtsext:javascriptencode(string(@name))"/>','<out:value-of select="xtsext:javascriptencode(string(.))"/>'<out:text/>
  2851. </out:for-each>
  2852. <out:text/>)<out:text/>
  2853. </out:when>
  2854. <out:when test="$isTraversingContainer or $isDefaultAction or not($item/nav:urlParts/nav:param[@name='m_class'])">
  2855. <out:value-of select="$item/nav:urlParts/nav:gateway"/>?<out:text/>
  2856. <out:for-each select="$item/nav:urlParts/nav:param">
  2857. <out:text/>&amp;<out:value-of select="@name"/>=<out:text/>
  2858. <out:choose>
  2859. <out:when test="@name='m_path' or @name='m_obj'">
  2860. <out:value-of select="xtsext:protect(xtsext:urlencode(string(.)),'url','searchPath','getdata')"/>
  2861. </out:when>
  2862. <out:when test="@name='m_name'">
  2863. <out:value-of select="xtsext:protect(xtsext:urlencode(string(.)),'url','userData','getdata')"/>
  2864. </out:when>
  2865. <out:otherwise>
  2866. <out:value-of select="xtsext:urlencode(string(.))"/>
  2867. </out:otherwise>
  2868. </out:choose>
  2869. </out:for-each>
  2870. <out:if test="not($isTraversingContainer)">
  2871. <out:choose>
  2872. <out:when test="$item-type='powerPlayCube' or $item-type='powerPlayReport' or $item-type='powerPlay8Report'">
  2873. <out:text/>&amp;BACK=<out:value-of select="xtsext:urlencode(string($back-url))"/>
  2874. </out:when>
  2875. <out:when test="$isCognosViewer">
  2876. <out:text/>&amp;ui.backURL=<out:value-of select="xtsext:urlencode(string($back-url))"/>
  2877. </out:when>
  2878. <out:otherwise>
  2879. <out:text/>&amp;backURL=<out:value-of select="xtsext:urlencode(string($back-url))"/>
  2880. </out:otherwise>
  2881. </out:choose>
  2882. </out:if>
  2883. </out:when>
  2884. <out:otherwise>
  2885. <out:choose>
  2886. <!-- We handle portal page "add" rather differently. Detect if we are doing so on a pagelet object or a shortcut to one. -->
  2887. <out:when test="($item-type='pagelet' or $item/../nav:item/nav:type = 'pagelet') and $item/nav:name='add'">
  2888. <out:text/>javascript:pageCmd('addToMyPages','<out:value-of select="xtsext:javascriptencode($item/nav:urlParts/nav:param[@name='m_selectedPage'])"/>')<out:text/>
  2889. </out:when>
  2890. <out:otherwise>
  2891. <out:text/>javascript:actions(<out:text/>
  2892. <out:text/>'<out:value-of select="xtsext:javascriptencode(string($item/nav:urlParts/nav:param[@name='m_name']))"/>',<out:text/>
  2893. <out:text/>'<out:value-of select="xtsext:javascriptencode(string($item/nav:urlParts/nav:param[@name='m_class']))"/>',<out:text/>
  2894. <out:text/>'<out:value-of select="xtsext:javascriptencode(string($item/nav:urlParts/nav:param[@name='m_obj']))"/>',<out:text/>
  2895. <out:choose>
  2896. <out:when test="starts-with($item/nav:urlParts/nav:param[@name='m'], concat($app, '/'))">
  2897. <out:text/>'<out:value-of select="xtsext:javascriptencode(substring-after($item/nav:urlParts/nav:param[@name='m'], concat($app, '/')))"/>',<out:text/>
  2898. </out:when>
  2899. <out:otherwise>
  2900. <out:text/>'<out:value-of select="xtsext:javascriptencode(string($item/nav:urlParts/nav:param[@name='m']))"/>',<out:text/>
  2901. </out:otherwise>
  2902. </out:choose>
  2903. <out:text/>'<out:value-of select="xtsext:javascriptencode(string($item/nav:urlParts/nav:param[@name='m_new_class']))"/>',<out:text/>
  2904. <out:text/>'<out:value-of select="xtsext:javascriptencode(string($item/nav:urlParts/nav:param[@name='m_location']))"/>'<out:text/>
  2905. <out:text/>)<out:text/>
  2906. </out:otherwise>
  2907. </out:choose>
  2908. </out:otherwise>
  2909. </out:choose>
  2910. </out:if>
  2911. </out:template>
  2912. </xsl:template>
  2913. <xsl:template match="pf:ccinav-gen-action-properties">
  2914. <out:template name="ccinav-gen-action-properties">
  2915. <table border="0" cellpadding="2" cellspacing="0">
  2916. <tr>
  2917. <out:for-each select="nav:action">
  2918. <out:variable name="href">
  2919. <out:call-template name="ccinav-generate-link">
  2920. <out:with-param name="item" select="."/>
  2921. <out:with-param name="item-type" select="../nav:type"/>
  2922. </out:call-template>
  2923. </out:variable>
  2924. <out:choose>
  2925. <out:when test="nav:name != 'actions_url'">
  2926. <td>
  2927. <a>
  2928. <out:choose>
  2929. <out:when test="starts-with($href,'javascript:')">
  2930. <out:attribute name="href"><out:value-of select="'#'"/></out:attribute>
  2931. <out:attribute name="onclick"><out:value-of select="$href"/></out:attribute>
  2932. </out:when>
  2933. <out:otherwise>
  2934. <out:attribute name="href"><out:value-of select="$href"/></out:attribute>
  2935. </out:otherwise>
  2936. </out:choose>
  2937. <img height="16" width="16" border="0">
  2938. <out:attribute name="src"><out:value-of select="nav:imgURL"/></out:attribute>
  2939. <out:attribute name="alt"><out:value-of select="nav:alt"/></out:attribute>
  2940. </img>
  2941. </a>
  2942. </td>
  2943. </out:when>
  2944. <out:otherwise>
  2945. <td class="objectOptions" nowrap="nowrap">
  2946. <a>
  2947. <out:choose>
  2948. <out:when test="starts-with($href,'javascript:')">
  2949. <out:attribute name="href"><out:value-of select="'#'"/></out:attribute>
  2950. <out:attribute name="onclick"><out:value-of select="$href"/></out:attribute>
  2951. </out:when>
  2952. <out:otherwise>
  2953. <out:attribute name="href"><out:value-of select="$href"/></out:attribute>
  2954. </out:otherwise>
  2955. </out:choose>
  2956. <xts:string id="IDS_ACT_MORE"/>
  2957. </a>
  2958. </td>
  2959. </out:otherwise>
  2960. </out:choose>
  2961. </out:for-each>
  2962. </tr>
  2963. </table>
  2964. </out:template>
  2965. </xsl:template>
  2966. <xsl:template name="pf:getDocumentIconName">
  2967. <out:choose>
  2968. <out:when test="not($documentFormats/format[@name = $documentType])">
  2969. <out:value-of select="key('ui-object','document')/@icon"/>
  2970. </out:when>
  2971. <out:otherwise>
  2972. <out:value-of select="key('ui-object','document')/@icon"/>
  2973. <out:text/>
  2974. <out:value-of select="/root/system/param[@name='ui_graphics']/param[@name='document_format']/format[@name = $documentType]/@icon"/>
  2975. </out:otherwise>
  2976. </out:choose>
  2977. </xsl:template>
  2978. <xsl:template match="pf:documentFormats">
  2979. <out:template name="getDocumentIconName">
  2980. <out:param name="documentType" select="''"/>
  2981. <xsl:call-template name="pf:getDocumentIconName"/>
  2982. </out:template>
  2983. <out:template name="getDocumentObjectType">
  2984. <out:param name="theObject"/>
  2985. <out:choose>
  2986. <out:when test="$documentFormats/format[@name=$theObject/cm:documentType]"><out:value-of select="$documentFormats/format[@name=$theObject/cm:documentType]/type"/></out:when>
  2987. <out:otherwise><out:value-of select="$theObject/cm:documentType"/></out:otherwise>
  2988. </out:choose>
  2989. </out:template>
  2990. </xsl:template>
  2991. <!--
  2992. Template - pf:serialize-xml:
  2993. This template generates a template used to convert a chuck of xml into an xml-encoded string.
  2994. Operation:
  2995. Outputs the serialize-xml template.
  2996. -->
  2997. <xsl:template match="pf:serialize-xml">
  2998. <out:template name="serialize-xml">
  2999. <out:param name="node-set"/>
  3000. <out:apply-templates mode="markup" select="$node-set"/>
  3001. </out:template>
  3002. <!-- generate text for simple element -->
  3003. <out:template match="*" mode="markup">
  3004. <out:text>&lt;</out:text>
  3005. <out:value-of select="name()"/>
  3006. <out:apply-templates select="@*" mode="markup"/>
  3007. <out:if test="( namespace-uri() != '' ) and ( name() = local-name() ) and ( namespace-uri() != namespace-uri(..) )">
  3008. <out:text>&#32;xmlns=&quot;</out:text>
  3009. <out:value-of select="namespace-uri()"/>
  3010. <out:text>&quot;</out:text>
  3011. </out:if>
  3012. <out:if test="( contains( name(), ':' ) ) and ( namespace-uri() != namespace-uri(..) )">
  3013. <out:text>&#32;xmlns:</out:text>
  3014. <out:value-of select="substring-before( name(), ':' )"/>
  3015. <out:text>=&quot;</out:text>
  3016. <out:value-of select="namespace-uri()"/>
  3017. <out:text>&quot;</out:text>
  3018. </out:if>
  3019. <out:text>/&gt;</out:text>
  3020. </out:template>
  3021. <!-- generate text for an element with children or text -->
  3022. <out:template match="*[* | text()]" mode="markup">
  3023. <out:text>&lt;</out:text>
  3024. <out:value-of select="name()"/>
  3025. <out:apply-templates select="@*" mode="markup"/>
  3026. <out:if test="( namespace-uri() != '' ) and ( name() = local-name() ) and ( namespace-uri() != namespace-uri(..) )">
  3027. <out:text>&#32;xmlns=&quot;</out:text>
  3028. <out:value-of select="namespace-uri()"/>
  3029. <out:text>&quot;</out:text>
  3030. </out:if>
  3031. <out:if test="( contains( name(), ':' ) ) and ( namespace-uri() != namespace-uri(..) )">
  3032. <out:text>&#32;xmlns:</out:text>
  3033. <out:value-of select="substring-before( name(), ':' )"/>
  3034. <out:text>=&quot;</out:text>
  3035. <out:value-of select="namespace-uri()"/>
  3036. <out:text>&quot;</out:text>
  3037. </out:if>
  3038. <out:text>&gt;</out:text>
  3039. <out:apply-templates select="* | text()" mode="markup"/>
  3040. <out:text>&lt;/</out:text>
  3041. <out:value-of select="name()"/>
  3042. <out:text>&gt;</out:text>
  3043. </out:template>
  3044. <!-- generate text for an attribute -->
  3045. <out:template match="@*" mode="markup">
  3046. <out:value-of select="concat('&#32;', name(), '=&quot;', xtsext:xmlencode(string(.)), '&quot;')"/>
  3047. <out:if test="( namespace-uri() != '' ) and ( name() = local-name() ) and ( namespace-uri() != namespace-uri(..) )">
  3048. <out:variable name="currentNamespace" select="namespace-uri()"/>
  3049. <out:if test="generate-id(.) = generate-id(../@*[namespace-uri() = $currentNamespace][1])">
  3050. <out:text>&#32;xmlns=&quot;</out:text>
  3051. <out:value-of select="namespace-uri()"/>
  3052. <out:text>&quot;</out:text>
  3053. </out:if>
  3054. </out:if>
  3055. <out:if test="( contains( name(), ':' ) ) and ( namespace-uri() != namespace-uri(..) )">
  3056. <out:variable name="currentNamespace" select="namespace-uri()"/>
  3057. <out:if test="generate-id(.) = generate-id(../@*[namespace-uri() = $currentNamespace][1])">
  3058. <out:text>&#32;xmlns:</out:text>
  3059. <out:value-of select="substring-before( name(), ':' )"/>
  3060. <out:text>=&quot;</out:text>
  3061. <out:value-of select="namespace-uri()"/>
  3062. <out:text>&quot;</out:text>
  3063. </out:if>
  3064. </out:if>
  3065. </out:template>
  3066. <!-- generate text -->
  3067. <out:template match="text()" mode="markup">
  3068. <out:value-of select="xtsext:xmlencode( string( . ) )"/>
  3069. </out:template>
  3070. </xsl:template>
  3071. <xsl:template name="gen-sessionCapabilitiesVars">
  3072. <!--
  3073. CAPABILITIES calculations
  3074. -->
  3075. <!-- Admin capability -->
  3076. <out:variable name="hasAdminCapability" select="boolean(key('session-param','capabilities')/canUseAdministrationPortal)"/>
  3077. <!-- Launch Collaboration Tools capability -->
  3078. <out:variable name="hasLCTCapability" select="boolean(key('session-param','capabilities')/canLaunchCollaborationTools)"/>
  3079. <!-- Launch Collaboration - Lotus Connections Activities -->
  3080. <out:variable name="hasLCActivities" select="boolean(key('session-param','lca')='t')"/>
  3081. <!-- Launch Collaboration - Lotus Connections Homepage -->
  3082. <out:variable name="hasLCHomepage" select="boolean(key('session-param','lch')='t')"/>
  3083. <!-- Desk top capability -->
  3084. <!--
  3085. Note: "isCIInstalled" is only temporary until "canUseCognosInsight" calculation can take into
  3086. account whether CognosInsight is installed or not. When that happens, "isCIInstalled" should
  3087. be removed!
  3088. -->
  3089. <out:variable name="isCIInstalled" select="boolean(key('session-param','ci')='t')"/>
  3090. <out:variable name="hasCICapability" select="$isCIInstalled and boolean(key('session-param','capabilities')/canUseCognosInsight)"/>
  3091. <!-- QueryStudio capability -->
  3092. <out:variable name="hasQSCapability" select="boolean(key('session-param','capabilities')/canUseQueryStudio)"/>
  3093. <!-- Full QueryStudio capability, which allows the user to create/delete reports -->
  3094. <out:variable name="hasFullQSCapability" select="boolean(key('session-param','capabilities')/canUseQueryStudio) and boolean(key('session-param','capabilities')/canUseQueryStudioFileManagement)"/>
  3095. <!-- ReportStudio capability (disabled for Titan))-->
  3096. <out:variable name="hasRSCapability" select="false()"/>
  3097. <!-- Full ReportStudio capability, which allows the user to create/delete reports (disabled for Titan) -->
  3098. <out:variable name="hasFullRSCapability" select="false()"/>
  3099. <!-- External Data capability -->
  3100. <out:variable name="hasExternalDataCapability" select="boolean(key('session-param','capabilities')/canUseExternalData)"/>
  3101. <!-- This var is set for MetricsManager Full Access -->
  3102. <out:variable name="hasMetricsManagerCapability" select="boolean(key('session-param','capabilities')/canUseMetricStudio)"/>
  3103. <out:variable name="hasMetricsManagerAdministrationCapability" select="boolean(key('session-param','capabilities')/canUseMetricsManagerAdministration)"/>
  3104. <!-- Capabilities Tool Access capability-->
  3105. <out:variable name="hasCTCapability" select="boolean(key('session-param','capabilities')/canUseCapabilitiesTool)"/>
  3106. <!-- Object Capabilities Access capability-->
  3107. <out:variable name="hasOCCapability" select="boolean(key('session-param','capabilities')/canUseObjectCapabilities)"/>
  3108. <!-- Users Groups and Roles Tool Access capability-->
  3109. <out:variable name="hasUGRTCapability" select="boolean(key('session-param','capabilities')/canUseUsersGroupsAndRolesTool)"/>
  3110. <!-- Query Service Tool Access capability-->
  3111. <out:variable name="hasQSTCapability" select="boolean(key('session-param','capabilities')/canUseQueryServiceTool)"/>
  3112. <!-- Data Sources Tool Access capability-->
  3113. <out:variable name="hasDSTCapability" select="boolean(key('session-param','capabilities')/canUseDataSourcesTool)"/>
  3114. <!-- Content Store Tool Access capability-->
  3115. <out:variable name="hasCSTCapability" select="boolean(key('session-param','capabilities')/canUseContentStoreTool)"/>
  3116. <!-- Server Administration Tool Access capability-->
  3117. <out:variable name="hasSATCapability" select="boolean(key('session-param','capabilities')/canUseServerAdministrationTool)"/>
  3118. <!-- Portal Administration Tool Access capability-->
  3119. <out:variable name="hasPATCapability" select="boolean(key('session-param','capabilities')/canUsePortalAdministrationTool)"/>
  3120. <!-- Adaptive Analytics Administration Access capability-->
  3121. <out:variable name="hasAAACapability" select="boolean(key('session-param', 'capabilities')/canUseAdaptiveAnalyticsAdministration)"/>
  3122. <!-- Adaptive Analytics (TOC) Access capability-->
  3123. <out:variable name="hasAATOCCapability" select="boolean(key('session-param', 'capabilities')/canUseAdaptiveAnalytics)"/>
  3124. <!-- Analysis Studio Access capability-->
  3125. <out:variable name="hasANSCapability" select="boolean(key('session-param', 'capabilities')/canUseAnalysisStudio)"/>
  3126. <!-- Powerplay Studio Access capability-->
  3127. <out:variable name="hasPPSCapability" select="boolean(key('session-param', 'capabilities')/canUsePowerPlay)"/>
  3128. <!-- Event Studio Access capability-->
  3129. <out:variable name="hasAGSCapability" select="boolean(key('session-param', 'capabilities')/canUseEventStudio)"/>
  3130. <!-- Scheduling Access capability-->
  3131. <out:variable name="hasSchedCapability" select="boolean(key('session-param', 'capabilities')/canUseScheduling)"/>
  3132. <!-- Granularity of Scheduling Access capability-->
  3133. <out:variable name="hasSchedCapabilityByDay" select="boolean(key('session-param', 'capabilities')/canUseSchedulingByDay)"/>
  3134. <out:variable name="hasSchedCapabilityByHour" select="boolean(key('session-param', 'capabilities')/canUseSchedulingByHour)"/>
  3135. <out:variable name="hasSchedCapabilityByMinute" select="boolean(key('session-param', 'capabilities')/canUseSchedulingByMinute)"/>
  3136. <out:variable name="hasSchedCapabilityByWeek" select="boolean(key('session-param', 'capabilities')/canUseSchedulingByWeek)"/>
  3137. <out:variable name="hasSchedCapabilityByMonth" select="boolean(key('session-param', 'capabilities')/canUseSchedulingByMonth)"/>
  3138. <out:variable name="hasSchedCapabilityByYear" select="boolean(key('session-param', 'capabilities')/canUseSchedulingByYear)"/>
  3139. <out:variable name="hasSchedCapabilityByTrigger" select="boolean(key('session-param', 'capabilities')/canUseSchedulingByTrigger)"/>
  3140. <!-- Scheduling Priority capability-->
  3141. <out:variable name="hasSchedPriorityCapability" select="boolean(key('session-param', 'capabilities')/canUseSchedulingPriority)"/>
  3142. <!-- Monitor Activity tool -->
  3143. <out:variable name="hasMonitorActivityToolCapability" select="boolean(key('session-param', 'capabilities')/canUseMonitorActivityTool)"/>
  3144. <!-- Run with Options capability-->
  3145. <out:variable name="hasRWOCapability" select="boolean(key('session-param', 'capabilities')/canUseCognosViewerRunWithOptions)"/>
  3146. <!-- Full Planning Administration capability -->
  3147. <out:variable name="hasPlanningAdministrationCapability" select="boolean(key('session-param', 'capabilities')/canUsePlanningAdministration)"/>
  3148. <!-- Run Planning Contributor capability -->
  3149. <out:variable name="hasPlanningContributorCapability" select="boolean(key('session-param', 'capabilities')/canUsePlanningContributor)"/>
  3150. <!-- Cognos Viewer capability -->
  3151. <out:variable name="hasCVCapability" select="boolean(key('session-param', 'capabilities')/canUseCognosViewer)"/>
  3152. <!-- Controller Studio capability -->
  3153. <out:variable name="hasControllerCapability" select="boolean(key('session-param', 'capabilities')/canUseControllerStudio)"/>
  3154. <!-- EV capability -->
  3155. <out:variable name="hasEVCapability" select="boolean(key('session-param', 'capabilities')/canUseEV)"/>
  3156. <!-- Cognos Viewer security features -->
  3157. <out:variable name="hasCVSelectionCapability" select="boolean(key('session-param', 'capabilities')/canUseCognosViewerSelection)"/>
  3158. <out:variable name="hasCVToolbarCapability" select="boolean(key('session-param', 'capabilities')/canUseCognosViewerToolbar)"/>
  3159. <out:variable name="hasCVContextMenuCapability" select="boolean(key('session-param', 'capabilities')/canUseCognosViewerContextMenu)"/>
  3160. <!-- index search (disabled for titan)-->
  3161. <out:variable name="hasIndexSearchCapability" select="false()"/>
  3162. <out:variable name="hasSpecificationCapability" select="boolean(key('session-param', 'capabilities')/canUseSpecifications)"/>
  3163. <out:variable name="hasDrillMetadataCapability" select="$hasRSCapability or
  3164. $hasQSCapability or $hasAGSCapability or $hasANSCapability or
  3165. $hasControllerCapability or $hasPlanningContributorCapability or
  3166. $hasMetricsManagerCapability or $hasMetricsManagerAdministrationCapability or
  3167. $hasSpecificationCapability"/>
  3168. <!-- can user subscribe to reports -->
  3169. <out:variable name="hasCondSubscriptionsCapability" select="boolean(key('session-param', 'capabilities')/canUseConditionalSubscriptions)"/>
  3170. <out:variable name="hasDrillThroughAssistantCapability" select="boolean(key('session-param', 'capabilities')/canUseDrillThroughAssistant)"/>
  3171. <out:variable name="hasCanUseMobileServiceCapability" select="boolean(key('session-param', 'capabilities')/canUseMobileService)"/>
  3172. <!-- can user generate output in selected formats -->
  3173. <out:variable name="hasCanGenerateCSVOutputCapability" select="boolean(key('session-param', 'capabilities')/canGenerateCSVOutput)"/>
  3174. <out:variable name="hasCanGeneratePDFOutputCapability" select="boolean(key('session-param', 'capabilities')/canGeneratePDFOutput)"/>
  3175. <out:variable name="hasCanGenerateXMLOutputCapability" select="boolean(key('session-param', 'capabilities')/canGenerateXMLOutput)"/>
  3176. <out:variable name="hasCanGenerateXLSOutputCapability" select="boolean(key('session-param', 'capabilities')/canGenerateXLSOutput)"/>
  3177. <!-- can user open pp7 and pp8 reports in Analysis/Report studios -->
  3178. <out:variable name="hasOpenPowerPlayInAnalysisStudioCapability" select="boolean(key('session-param', 'capabilities')/canOpenPowerPlayInAnalysisStudio)"/>
  3179. <out:variable name="hasOpenPowerPlayInReportStudioCapability" select="boolean(key('session-param', 'capabilities')/canOpenPowerPlayInReportStudio)"/>
  3180. <!-- can user set hide entries in preferences tab -->
  3181. <out:variable name="hasCanUseShowHiddenObjectsPreferenceCapability" select="boolean(key('session-param', 'capabilities')/canUseShowHiddenObjectsPreference)"/>
  3182. <!-- can user open dashboard objects -->
  3183. <out:variable name="hasCanUseDashboardViewer" select="boolean(key('session-param', 'capabilities')/canUseDashboardViewer)"/>
  3184. <!-- related to dashboard object, can use advanced features -->
  3185. <out:variable name="hasCanUseAdvancedDashboardFeatures" select="boolean(key('session-param', 'capabilities')/canUseAdvancedDashboardFeatures)"/>
  3186. <!-- can user open self-serve wizard to create package objects -->
  3187. <out:variable name="hasCanUseSelfServicePackageWizard" select="boolean(key('session-param', 'capabilities')/canUseSelfServicePackageWizard)"/>
  3188. <!-- can user access Repository -->
  3189. <out:variable name="hasCanUseRepositoryCapability" select="boolean(key('session-param','capabilities')/canUseRepository)"/>
  3190. <!-- can user view Repository content -->
  3191. <out:variable name="hasCanViewContentInRepositoryCapability" select="boolean(key('session-param','capabilities')/canViewContentInRepository)"/>
  3192. <!-- can user view Repository content -->
  3193. <out:variable name="hasCanUpdateRepositoryRulesCapability" select="boolean(key('session-param','capabilities')/canUpdateRepositoryRules)"/>
  3194. <!-- can user use My Data Sets feature -->
  3195. <out:variable name="hasCanUseMyDataSetsCapability" select="boolean(key('session-param','capabilities')/canUseMyDataSets)"/>
  3196. <!--This var is set for EV users-->
  3197. <out:variable name="userCanUseEVValue"><out:call-template name="calUserCapability"><out:with-param name="capability" select="'canUseEV'"/><out:with-param name="value" select="$hasEVCapability"/></out:call-template></out:variable>
  3198. <out:variable name="userCanUseEV" select="$userCanUseEVValue = 'true'"/>
  3199. <!-- This var is set for administrators -->
  3200. <out:variable name="isAdminUser" select="$hasAdminCapability"/>
  3201. <!-- This var is set for QueryStudio Access -->
  3202. <out:variable name="userCanUseQSValue"><out:call-template name="calUserCapability"><out:with-param name="capability" select="'canUseQueryStudio'"/><out:with-param name="value" select="$hasQSCapability"/></out:call-template></out:variable>
  3203. <out:variable name="userCanUseQS" select="$userCanUseQSValue = 'true'"/>
  3204. <!-- This var is set for QueryStudio Full Access, which allows the user to create/delete reports -->
  3205. <out:variable name="userCanUseFullQS" select="$userCanUseQS and $hasFullQSCapability"/>
  3206. <!-- This var is set for ReportStudio Access -->
  3207. <out:variable name="userCanUseRSValue"><out:call-template name="calUserCapability"><out:with-param name="capability" select="'canUseReportStudio'"/><out:with-param name="value" select="$hasRSCapability"/></out:call-template></out:variable>
  3208. <out:variable name="userCanUseRS" select="$userCanUseRSValue = 'true'"/>
  3209. <!-- This var is set for ReportStudio Full Access, which allows the user to create/delete reports -->
  3210. <out:variable name="userCanUseFullRS" select="$userCanUseRS and $hasFullRSCapability"/>
  3211. <!-- This var is set for ExternalData Access -->
  3212. <out:variable name="userCanUseExternalDataValue"><out:call-template name="calUserCapability"><out:with-param name="capability" select="'canUseExternalData'"/><out:with-param name="value" select="$hasExternalDataCapability"/></out:call-template></out:variable>
  3213. <out:variable name="userCanUseExternalData" select="$userCanUseExternalDataValue = 'true'"/>
  3214. <!-- This var is set for MetricsManager Full Access -->
  3215. <out:variable name="userCanUseMetricsManagerAdministrationValue"><out:call-template name="calUserCapability"><out:with-param name="capability" select="'canUseMetricsManagerAdministration'"/><out:with-param name="value" select="$hasMetricsManagerAdministrationCapability"/></out:call-template></out:variable>
  3216. <out:variable name="userCanUseMetricsManagerAdministration" select="$userCanUseMetricsManagerAdministrationValue = 'true'"/>
  3217. <out:variable name="userCanUseMetricsManagerValue">
  3218. <out:variable name="canUseMetricStudio"><out:call-template name="calUserCapability"><out:with-param name="capability" select="'canUseMetricStudio'"/><out:with-param name="value" select="$hasMetricsManagerCapability"/></out:call-template></out:variable>
  3219. <out:value-of select="$canUseMetricStudio = 'true' or $userCanUseMetricsManagerAdministration"/>
  3220. </out:variable>
  3221. <out:variable name="userCanUseMetricsManager" select="$userCanUseMetricsManagerValue = 'true'"/>
  3222. <!-- This var is set for Capabilities Tool Access -->
  3223. <out:variable name="userCanUseCTValue"><out:call-template name="calUserCapability"><out:with-param name="capability" select="'canUseCapabilitiesTool'"/><out:with-param name="value" select="$hasCTCapability"/></out:call-template></out:variable>
  3224. <out:variable name="userCanUseCT" select="$userCanUseCTValue = 'true'"/>
  3225. <!-- This var is set for Object Capabilities Access -->
  3226. <out:variable name="userCanUseOCValue"><out:call-template name="calUserCapability"><out:with-param name="capability" select="'canUseObjectCapabilities'"/><out:with-param name="value" select="$hasOCCapability"/></out:call-template></out:variable>
  3227. <out:variable name="userCanUseOC" select="$userCanUseOCValue = 'true'"/>
  3228. <!-- This var is set for Users Groups and Roles Tool Access -->
  3229. <out:variable name="userCanUseUGRTValue"><out:call-template name="calUserCapability"><out:with-param name="capability" select="'canUseUsersGroupsAndRolesTool'"/><out:with-param name="value" select="$hasUGRTCapability"/></out:call-template></out:variable>
  3230. <out:variable name="userCanUseUGRT" select="$userCanUseUGRTValue = 'true'"/>
  3231. <!-- This var is set for Query Service Tool Access -->
  3232. <out:variable name="userCanUseQSTValue"><out:call-template name="calUserCapability"><out:with-param name="capability" select="'canUseQueryServiceTool'"/><out:with-param name="value" select="$hasQSTCapability"/></out:call-template></out:variable>
  3233. <out:variable name="userCanUseQST" select="$userCanUseQSTValue = 'true'"/>
  3234. <!-- This var is set for Data Sources Tool Access -->
  3235. <out:variable name="userCanUseDSTValue"><out:call-template name="calUserCapability"><out:with-param name="capability" select="'canUseDataSourcesTool'"/><out:with-param name="value" select="$hasDSTCapability"/></out:call-template></out:variable>
  3236. <out:variable name="userCanUseDST" select="$userCanUseDSTValue = 'true'"/>
  3237. <!-- This var is set for Content Store Tool Access -->
  3238. <out:variable name="userCanUseCSTValue"><out:call-template name="calUserCapability"><out:with-param name="capability" select="'canUseContentStoreTool'"/><out:with-param name="value" select="$hasCSTCapability"/></out:call-template></out:variable>
  3239. <out:variable name="userCanUseCST" select="$userCanUseCSTValue = 'true'"/>
  3240. <!-- This var is set for Server Administration Tool Access -->
  3241. <out:variable name="userCanUseSATValue"><out:call-template name="calUserCapability"><out:with-param name="capability" select="'canUseServerAdministrationTool'"/><out:with-param name="value" select="$hasSATCapability"/></out:call-template></out:variable>
  3242. <out:variable name="userCanUseSAT" select="$userCanUseSATValue = 'true'"/>
  3243. <!-- This var is set for Portal Administration Tool Access -->
  3244. <out:variable name="userCanUsePATValue"><out:call-template name="calUserCapability"><out:with-param name="capability" select="'canUsePortalAdministrationTool'"/><out:with-param name="value" select="$hasPATCapability"/></out:call-template></out:variable>
  3245. <out:variable name="userCanUsePAT" select="$userCanUsePATValue = 'true'"/>
  3246. <!-- This var is set for Adaptive Analytics Administration Access -->
  3247. <out:variable name="userCanUseAdaptiveAnalyticsAdministrationValue"><out:call-template name="calUserCapability"><out:with-param name="capability" select="'canUseAdaptiveAnalyticsAdministration'"/><out:with-param name="value" select="$hasAAACapability"/></out:call-template></out:variable>
  3248. <out:variable name="userCanUseAdaptiveAnalyticsAdministration" select="$userCanUseAdaptiveAnalyticsAdministrationValue = 'true'"/>
  3249. <!-- This var is set for Adaptive Analytics TOC Access -->
  3250. <out:variable name="userCanUseAdaptiveAnalyticsValue"><out:call-template name="calUserCapability"><out:with-param name="capability" select="'canUseAdaptiveAnalytics'"/><out:with-param name="value" select="$hasAATOCCapability"/></out:call-template></out:variable>
  3251. <out:variable name="userCanUseAdaptiveAnalytics" select="$userCanUseAdaptiveAnalyticsValue = 'true'"/>
  3252. <!-- This var is set for Analysis Studio Access -->
  3253. <out:variable name="userCanUseANSValue"><out:call-template name="calUserCapability"><out:with-param name="capability" select="'canUseAnalysisStudio'"/><out:with-param name="value" select="$hasANSCapability"/></out:call-template></out:variable>
  3254. <out:variable name="userCanUseANS" select="$userCanUseANSValue = 'true'"/>
  3255. <!-- This var is set for Powerplay Studio Access -->
  3256. <out:variable name="userCanUsePPSValue"><out:call-template name="calUserCapability"><out:with-param name="capability" select="'canUsePowerPlay'"/><out:with-param name="value" select="$hasPPSCapability"/></out:call-template></out:variable>
  3257. <out:variable name="userCanUsePPS" select="$userCanUsePPSValue = 'true'"/>
  3258. <!-- This var is set for Event Studio Access -->
  3259. <out:variable name="userCanUseAGSValue"><out:call-template name="calUserCapability"><out:with-param name="capability" select="'canUseEventStudio'"/><out:with-param name="value" select="$hasAGSCapability"/></out:call-template></out:variable>
  3260. <out:variable name="userCanUseAGS" select="$userCanUseAGSValue = 'true'"/>
  3261. <!-- This var is set for Scheduling Access -->
  3262. <out:variable name="userCanUseSchedValue"><out:call-template name="calUserCapability"><out:with-param name="capability" select="'canUseScheduling'"/><out:with-param name="value" select="$hasSchedCapability"/></out:call-template></out:variable>
  3263. <out:variable name="userCanUseSched" select="$userCanUseSchedValue = 'true'"/>
  3264. <out:variable name="userCanUseMonitorActivityValue"><out:call-template name="calUserCapability"><out:with-param name="capability" select="'canUseMonitorActivityTool'"/><out:with-param name="value" select="$hasMonitorActivityToolCapability"/></out:call-template></out:variable>
  3265. <out:variable name="userCanUseMonitorActivity" select="$userCanUseMonitorActivityValue = 'true'"/>
  3266. <!-- This var is set for Run With Options Access -->
  3267. <out:variable name="userCanUseRWOValue"><out:call-template name="calUserCapability"><out:with-param name="capability" select="'canUseCognosViewerRunWithOptions'"/><out:with-param name="value" select="$hasRWOCapability"/></out:call-template></out:variable>
  3268. <out:variable name="userCanUseRWO" select="$userCanUseRWOValue = 'true'"/>
  3269. <!-- This var is set for Contributor Administration Access -->
  3270. <out:variable name="userCanUsePlanningAdministrationValue"><out:call-template name="calUserCapability"><out:with-param name="capability" select="'canUsePlanningAdministration'"/><out:with-param name="value" select="$hasPlanningAdministrationCapability"/></out:call-template></out:variable>
  3271. <out:variable name="userCanUsePlanningAdministration" select="$userCanUsePlanningAdministrationValue = 'true'"/>
  3272. <!-- This var is set for Contributor Access -->
  3273. <out:variable name="userCanUsePlanningContributorValue"><out:call-template name="calUserCapability"><out:with-param name="capability" select="'canUsePlanningContributor'"/><out:with-param name="value" select="$hasPlanningContributorCapability"/></out:call-template></out:variable>
  3274. <out:variable name="userCanUsePlanningContributor" select="$userCanUsePlanningContributorValue = 'true'"/>
  3275. <!-- This var is set for Cognos Viewer Access -->
  3276. <out:variable name="userCanUseCVValue"><out:call-template name="calUserCapability"><out:with-param name="capability" select="'canUseCognosViewer'"/><out:with-param name="value" select="$hasCVCapability"/></out:call-template></out:variable>
  3277. <out:variable name="userCanUseCV" select="$userCanUseCVValue = 'true'"/>
  3278. <!-- This var is set for Controller Administration Access - based on BOAM, but is not required at this time. -->
  3279. <!-- <out:variable name="userCanUseControllerAdministration" select="$hasFullControllerCapability"/> -->
  3280. <!-- This var is set for Controller Studio -->
  3281. <out:variable name="userCanUseControllerStudioValue"><out:call-template name="calUserCapability"><out:with-param name="capability" select="'canUseControllerStudio'"/><out:with-param name="value" select="$hasControllerCapability"/></out:call-template></out:variable>
  3282. <out:variable name="userCanUseControllerStudio" select="$userCanUseControllerStudioValue = 'true'"/>
  3283. <!-- Cognos Viewer security features -->
  3284. <out:variable name="userCanUseCVSelectionValue"><out:call-template name="calUserCapability"><out:with-param name="capability" select="'canUseCognosViewerSelection'"/><out:with-param name="value" select="$hasCVSelectionCapability"/></out:call-template></out:variable>
  3285. <out:variable name="userCanUseCVSelection" select="$userCanUseCVSelectionValue = 'true'"/>
  3286. <out:variable name="userCanUseCVToolbarValue"><out:call-template name="calUserCapability"><out:with-param name="capability" select="'canUseCognosViewerToolbar'"/><out:with-param name="value" select="$hasCVToolbarCapability"/></out:call-template></out:variable>
  3287. <out:variable name="userCanUseCVToolbar" select="$userCanUseCVToolbarValue = 'true'"/>
  3288. <out:variable name="userCanUseCVContextMenuValue"><out:call-template name="calUserCapability"><out:with-param name="capability" select="'canUseCognosViewerContextMenu'"/><out:with-param name="value" select="$hasCVContextMenuCapability"/></out:call-template></out:variable>
  3289. <out:variable name="userCanUseCVContextMenu" select="$userCanUseCVContextMenuValue = 'true'"/>
  3290. <!-- index search - use advanced settings -->
  3291. <out:variable name="userCanUseIndexSearch" select="false()"/>
  3292. <out:variable name="userCanSelectMetadata" select="$hasDrillMetadataCapability and $isQSFriendlyBrowser"/>
  3293. <!-- allow pp7/pp8 rpts to open in analysis/report studios -->
  3294. <out:variable name="userCanOpenPPInAnalysisStudioValue"><out:call-template name="calUserCapability"><out:with-param name="capability" select="'canOpenPowerPlayInAnalysisStudio'"/><out:with-param name="value" select="$hasOpenPowerPlayInAnalysisStudioCapability"/></out:call-template></out:variable>
  3295. <out:variable name="userCanOpenPPInAnalysisStudio" select="$userCanOpenPPInAnalysisStudioValue = 'true'"/>
  3296. <out:variable name="userCanOpenPPInReportStudioValue"><out:call-template name="calUserCapability"><out:with-param name="capability" select="'canOpenPowerPlayInReportStudio'"/><out:with-param name="value" select="$hasOpenPowerPlayInReportStudioCapability"/></out:call-template></out:variable>
  3297. <out:variable name="userCanOpenPPInReportStudio" select="$userCanOpenPPInReportStudioValue = 'true'"/>
  3298. <!-- The var is set for a user that can set the hide entries field on the preferences page -->
  3299. <out:variable name="userCanUseShowHiddenObjectsPreferenceCapability"><out:call-template name="calUserCapability"><out:with-param name="capability" select="'canUseShowHiddenObjectsPreference'"/><out:with-param name="value" select="$hasCanUseShowHiddenObjectsPreferenceCapability"/></out:call-template></out:variable>
  3300. <out:variable name="userCanUseDashboardViewerValue"><out:call-template name="calUserCapability"><out:with-param name="capability" select="'canUseDashboardViewer'"/><out:with-param name="value" select="$hasCanUseDashboardViewer"/></out:call-template></out:variable>
  3301. <out:variable name="userCanUseDashboardViewer" select="$userCanUseDashboardViewerValue='true'"/>
  3302. <out:variable name="userCanUseAdvancedDashboardFeaturesValue"><out:call-template name="calUserCapability"><out:with-param name="capability" select="'canUseAdvancedDashboardFeatures'"/><out:with-param name="value" select="$hasCanUseAdvancedDashboardFeatures"/></out:call-template></out:variable>
  3303. <out:variable name="userCanUseAdvancedDashboardFeatures" select="$userCanUseAdvancedDashboardFeaturesValue='true'"/>
  3304. <out:variable name="userCanUseSelfServicePackageWizardValue"><out:call-template name="calUserCapability"><out:with-param name="capability" select="'canUseSelfServicePackageWizard'"/><out:with-param name="value" select="$hasCanUseSelfServicePackageWizard"/></out:call-template></out:variable>
  3305. <out:variable name="userCanUseSelfServicePackageWizard" select="$userCanUseSelfServicePackageWizardValue='true'"/>
  3306. <out:variable name="userCanUseDrillThroughAssistantValue"><out:call-template name="calUserCapability"><out:with-param name="capability" select="'canUseDrillThroughAssistant'"/><out:with-param name="value" select="$hasDrillThroughAssistantCapability"/></out:call-template></out:variable>
  3307. <out:variable name="userCanUseDrillThroughAssistant" select="$userCanUseDrillThroughAssistantValue='true'"/>
  3308. <out:variable name="userCanUseMobileServiceValue"><out:call-template name="calUserCapability"><out:with-param name="capability" select="'canUseMobileService'"/><out:with-param name="value" select="$hasCanUseMobileServiceCapability"/></out:call-template></out:variable>
  3309. <out:variable name="userCanUseMobileService" select="$userCanUseMobileServiceValue='true'"/>
  3310. <out:variable name="userCanLaunchCollaborationToolsValue"><out:call-template name="calUserCapability"><out:with-param name="capability" select="'canLaunchCollaborationTools'"/><out:with-param name="value" select="$hasLCTCapability"/></out:call-template></out:variable>
  3311. <out:variable name="userCanLaunchCollaborationTools" select="$userCanLaunchCollaborationToolsValue='true'"/>
  3312. <!-- User can generate report outputs -->
  3313. <out:variable name="userCanGenerateCSVOutputValue"><out:call-template name="calUserCapability"><out:with-param name="capability" select="'canGenerateCSVOutput'"/><out:with-param name="value" select="$hasCanGenerateCSVOutputCapability"/></out:call-template></out:variable>
  3314. <out:variable name="userCanGenerateCSVOutput" select="$userCanGenerateCSVOutputValue='true'"/>
  3315. <out:variable name="userCanGeneratePDFOutputValue"><out:call-template name="calUserCapability"><out:with-param name="capability" select="'canGeneratePDFOutput'"/><out:with-param name="value" select="$hasCanGeneratePDFOutputCapability"/></out:call-template></out:variable>
  3316. <out:variable name="userCanGeneratePDFOutput" select="$userCanGeneratePDFOutputValue='true'"/>
  3317. <out:variable name="userCanGenerateXMLOutputValue"><out:call-template name="calUserCapability"><out:with-param name="capability" select="'canGenerateXMLOutput'"/><out:with-param name="value" select="$hasCanGenerateXMLOutputCapability"/></out:call-template></out:variable>
  3318. <out:variable name="userCanGenerateXMLOutput" select="$userCanGenerateXMLOutputValue='true'"/>
  3319. <out:variable name="userCanGenerateXLSOutputValue"><out:call-template name="calUserCapability"><out:with-param name="capability" select="'canGenerateXLSOutput'"/><out:with-param name="value" select="$hasCanGenerateXLSOutputCapability"/></out:call-template></out:variable>
  3320. <out:variable name="userCanGenerateXLSOutput" select="$userCanGenerateXLSOutputValue='true'"/>
  3321. <!-- User can access Repository and view content -->
  3322. <out:variable name="userCanUseRepository"><out:call-template name="calUserCapability"><out:with-param name="capability" select="'canUseRepository'"/><out:with-param name="value" select="$hasCanUseRepositoryCapability"/></out:call-template></out:variable>
  3323. <out:variable name="userCanViewContentInRepository"><out:call-template name="calUserCapability"><out:with-param name="capability" select="'canViewContentInRepository'"/><out:with-param name="value" select="$hasCanViewContentInRepositoryCapability"/></out:call-template></out:variable>
  3324. <out:variable name="userCanUpdateRepositoryRules"><out:call-template name="calUserCapability"><out:with-param name="capability" select="'canUseRepository'"/><out:with-param name="value" select="$hasCanUpdateRepositoryRulesCapability"/></out:call-template></out:variable>
  3325. <!-- This var is set for Cognos Insight access -->
  3326. <out:variable name="userCanUseCIValue"><out:call-template name="calUserCapability">
  3327. <out:with-param name="capability" select="'canUseCognosInsight'"/>
  3328. <out:with-param name="value" select="$hasCICapability"/>
  3329. </out:call-template></out:variable>
  3330. <out:variable name="userCanUseCI" select="$userCanUseCIValue='true'"/>
  3331. <out:variable name="userCanUseAdminConsoleValue"><out:call-template name="calUserCapability"><out:with-param name="capability" select="'canUseAdministrationPortal'"/><out:with-param name="value" select="$hasAdminCapability"/></out:call-template></out:variable>
  3332. <out:variable name="userCanUseAdminConsole" select="$userCanUseAdminConsoleValue='true'"/>
  3333. <out:variable name="userCanUseMyActivitiesAndScheduleValue"><out:call-template name="calUserCapability"><out:with-param name="capability" select="'canUseMyActivitiesAndSchedule'"/><out:with-param name="value" select="($userCanUseSched or $userCanUseMonitorActivity)"/></out:call-template></out:variable>
  3334. <out:variable name="userCanUseMyActivitiesAndSchedule" select="$userCanUseMyActivitiesAndScheduleValue='true'"/>
  3335. <out:variable name="userCanUseMyInboxValue"><out:call-template name="calUserCapability"><out:with-param name="capability" select="'canUseMyInbox'"/><out:with-param name="value" select="true()"/></out:call-template></out:variable>
  3336. <out:variable name="userCanUseMyInbox" select="$userCanUseMyInboxValue='true' and $edition!='mid-market'"/>
  3337. <!-- My Data Sets -->
  3338. <out:variable name="userCanUseMyDataSetsValue"><out:call-template name="calUserCapability"><out:with-param name="capability" select="'canUseMyDataSets'"/><out:with-param name="value" select="$hasCanUseMyDataSetsCapability"/></out:call-template></out:variable>
  3339. <out:variable name="userCanUseMyDataSets" select="$userCanUseMyDataSetsValue='true'"/>
  3340. </xsl:template>
  3341. <xsl:template match="pf:utilities">
  3342. <out:template name="parseDocumentDomain">
  3343. <out:param name="url"/>
  3344. <!--
  3345. * Parse and return the value to be used to set the document domain
  3346. * For example, the domain value of "ibm.com" is returned for the "http://myserver1.ibm.com:1234/.." url
  3347. -->
  3348. <out:variable name="server" select="substring-before(substring-after($url, '://'), '/')"/>
  3349. <out:if test="contains($server, '.')">
  3350. <out:variable name="second-part" select="xtsext:substringAfterLast(xtsext:substringBeforeLast($server, '.'), '.')"/>
  3351. <out:if test="$second-part != ''"><out:value-of select="$second-part"/>.</out:if>
  3352. <out:choose>
  3353. <out:when test="contains($server, ':')"><out:value-of select="xtsext:substringAfterLast(substring-before($server,':'), '.')"/></out:when>
  3354. <out:otherwise><out:value-of select="xtsext:substringAfterLast($server, '.')"/></out:otherwise>
  3355. </out:choose>
  3356. </out:if>
  3357. </out:template>
  3358. </xsl:template>
  3359. <!--
  3360. Call this template to assist with inclusion of the dojo library along with any other required libraries
  3361. eg: <pf:dojo>
  3362. <require>com.ibm.cognos.ps.pdfOptions</require>
  3363. </pf:dojo>
  3364. where com.ibm.cognos.ps.pdfOptions is pdfOptions.js within the com.ibm.cognos.ps namespace
  3365. -->
  3366. <xsl:template match="pf:dojo">
  3367. <script language="javascript" src="{'{$webRoot}'}/dojo16/dojo/dojo.js">
  3368. <xsl:if test="@djConfig">
  3369. <xsl:attribute name="djConfig"><xsl:value-of select="@djConfig"/></xsl:attribute>
  3370. </xsl:if>
  3371. </script>
  3372. <script language="javascript" src="{'{$webcontent}'}/{'{$app}'}/js/com/ibm/cognos/ps/dojo/dojoInit.js"/>
  3373. <script language="javascript">
  3374. <xsl:for-each select="require">
  3375. dojo.require("<xsl:value-of select="xtsext:javascriptencode(text())"/>");
  3376. </xsl:for-each>
  3377. </script>
  3378. </xsl:template>
  3379. <xsl:template match="*">
  3380. <xsl:copy>
  3381. <xsl:copy-of select="@*"/>
  3382. <xsl:apply-templates/>
  3383. </xsl:copy>
  3384. </xsl:template>
  3385. <xsl:template match="pf:common-bidi-templates">
  3386. <out:template name="get-bidi-ready-value">
  3387. <out:param name="value" select="''"/>
  3388. <out:choose>
  3389. <out:when test="$isBidiEnabled = 'true'">
  3390. <out:value-of select="xtsext:enforceBTD($value, $baseTextDirection, $productLocale)"/>
  3391. </out:when>
  3392. <out:otherwise>
  3393. <out:value-of select="$value"/>
  3394. </out:otherwise>
  3395. </out:choose>
  3396. </out:template>
  3397. <out:template name="add-bidi-onfocus-event">
  3398. <out:param name="value" select="''"/>
  3399. <out:if test="$isBidiEnabled = 'true'">
  3400. <out:variable name="textDirection">
  3401. <out:value-of select="xtsext:getBTD(string($value), $baseTextDirection, $productLocale)"/>
  3402. </out:variable>
  3403. <out:attribute name="dir">
  3404. <out:value-of select="$textDirection"/>
  3405. </out:attribute>
  3406. <out:if test="$baseTextDirection = 'auto'">
  3407. <out:attribute name="onfocus">
  3408. bidi.onfocus(this)
  3409. </out:attribute>
  3410. </out:if>
  3411. </out:if>
  3412. </out:template>
  3413. </xsl:template>
  3414. </xsl:stylesheet>