actions.xts 182 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. Licensed Materials - Property of IBM
  4. IBM Cognos Products: ps
  5. (C) Copyright IBM Corp. 2005, 2015
  6. US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  7. -->
  8. <!--
  9. Copyright (C) 2008 Cognos ULC, an IBM Company. All rights reserved.
  10. Cognos (R) is a trademark of Cognos ULC, (formerly Cognos Incorporated).
  11. -->
  12. <xts:morphlet xmlns:xts="http://developer.cognos.com/schemas/xts/" messageBase="messages/portal.xml, messages/portalRL.xml">
  13. <xts:block id="formlogic_init" type="exec" mode="interpret" processor="XSLT" path="/logicsheets/formlogic_init.xslt" nodelist="env,credential,system,http"/>
  14. <!-- Load predefined actions map ============================================================== -->
  15. <xts:block id="getActions" type="exec" mode="input" processor="XML" path="/portal/uiExtensions.xml">
  16. <xts:logicsheet path="/logicsheets/uiobjects/uiobjects_actions.xslt"/>
  17. </xts:block>
  18. <!-- CM content request ==================================================================== -->
  19. <xts:block id="getContent" processor="XSLT" type="exec" mode="interpret" dependency="formlogic_init">
  20. <xts:logicsheet path="logicsheets/cm-logic.xsl"/>
  21. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  22. <xsl:stylesheet version="1.0"
  23. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  24. xmlns:cml="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/cml/1/"
  25. xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/"
  26. xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
  27. exclude-result-prefixes="cml send cm">
  28. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  29. <xsl:key name="env-param" match="/root/env/param" use="@name"/>
  30. <xsl:template match="/">
  31. <xts:sequence>
  32. <xts:append>
  33. <xts:transform src="transforms/CM/post-process.xslt" processor="XSLT">
  34. <send:request provider="cm">
  35. <xts:transform src="transforms/CM/pre-process.xslt" processor="XSLT">
  36. <cm:query>
  37. <cm:search><xsl:value-of select="key('env-param','m_obj')"/></cm:search>
  38. <cm:properties>
  39. <!-- If custom actions exist for this object then retrieve the following additional properties in case they are required by the custom actions -->
  40. <xsl:if test="/root/system/param[@name='base-object-actions']/actions/object[@class=/root/env/param[@name='m_class']]/action[@type='custom']">
  41. <cm:property name="usage"/>
  42. <cm:property name="disabled"/>
  43. </xsl:if>
  44. <cm:property name="defaultName"/>
  45. <cm:property name="ancestors"/>
  46. <cm:property name="permissions"/>
  47. <cm:property name="metadataModelPackage"/>
  48. <cm:property name="effectiveUserCapabilities"/>
  49. <cm:property name="uri"/>
  50. <cm:property name="base"/>
  51. <cm:property name="searchPath"/>
  52. <cm:property name="parent"/>
  53. <cm:property name="hasChildren"/>
  54. <cm:property name="modificationTime"/>
  55. <cm:property name="target"/><!-- shortcut objects -->
  56. <cm:property name="defaultOutputFormat"/>
  57. <cm:property name="defaultPortalAction"/>
  58. <cm:property name="mostRecentEventList"/>
  59. <cm:property name="gateway"/>
  60. <cm:property name="options"/>
  61. <cm:property name="cubeContentName"/>
  62. <cm:property name="hasPrompts"/>
  63. <cm:property name="userInterfaces"/>
  64. <cm:property name="registration"/>
  65. <cm:property name="storeID"/>
  66. <cm:property name="allowNotification"/>
  67. <cm:property name="executionFormat"/>
  68. <cm:property name="executionPrompt"/>
  69. <xsl:if test="key('env-param','m_class')='contentManagerService'">
  70. <cm:property name="startAsActive"/>
  71. <cm:property name="runningState"/>
  72. </xsl:if>
  73. <xsl:if test="key('env-param','m_class')='portlet'">
  74. <cm:property name="canCustomize"/>
  75. </xsl:if>
  76. <cm:property name="documentType"/>
  77. <xsl:if test="key('env-param','m_class')='launchable'">
  78. <cm:property name="launchableType"/>
  79. </xsl:if>
  80. </cm:properties>
  81. <cm:options schemaInfo="true">
  82. <cm:refProps>
  83. <cm:refProp refPropName="parent">
  84. <cm:properties>
  85. <cm:property name="searchPath"/>
  86. <cm:property name="permissions"/>
  87. </cm:properties>
  88. </cm:refProp>
  89. <!-- Get target info for shortcut objects -->
  90. <cm:refProp refPropName="target">
  91. <cm:properties>
  92. <cml:prop-shortcut-target/>
  93. <cm:property name="gateway"/>
  94. <cm:property name="documentType"/>
  95. <cm:property name="permissions"/>
  96. <cm:property name="defaultPortalAction"/>
  97. <cm:property name="mostRecentEventList"/>
  98. <cm:property name="defaultOutputFormat"/>
  99. <cm:property name="executionFormat"/>
  100. <cm:property name="executionPrompt"/>
  101. <cm:property name="launchableType"/>
  102. <cm:property name="userInterfaces"/>
  103. <cm:property name="allowNotification"/>
  104. </cm:properties>
  105. </cm:refProp>
  106. <!-- Get base info for reportView objects -->
  107. <cm:refProp refPropName="base">
  108. <cm:properties>
  109. <cm:property name="searchPath"/>
  110. <cm:property name="permissions"/>
  111. <cm:property name="defaultPortalAction"/>
  112. <cm:property name="defaultOutputFormat"/>
  113. <cm:property name="mostRecentEventList"/>
  114. </cm:properties>
  115. </cm:refProp>
  116. <!-- package for report objects -->
  117. <cm:refProp refPropName="metadataModelPackage">
  118. <cm:properties>
  119. <cm:property name="effectiveUserCapabilities"/>
  120. </cm:properties>
  121. </cm:refProp>
  122. </cm:refProps>
  123. </cm:options>
  124. </cm:query>
  125. </xts:transform>
  126. </send:request>
  127. </xts:transform>
  128. </xts:append>
  129. <xsl:if test="key('env-param', 'm_class')='dataSource'">
  130. <!-- For CMM: get the datasource connectionstring to verify some conditions.-->
  131. <xts:append>
  132. <theDataSourceConnection>
  133. <xts:transform src="transforms/CM/post-process.xslt" processor="XSLT">
  134. <send:request provider="cm">
  135. <xts:transform src="transforms/CM/pre-process.xslt" processor="XSLT">
  136. <cm:query>
  137. <cm:requests>
  138. <cm:query>
  139. <cm:search><xsl:value-of select="key('env-param','m_obj')"/>/*</cm:search>
  140. <cm:properties>
  141. <!-- include the cml variables -->
  142. <cm:property name="connectionString"/>
  143. <!-- If we are doing search then request ancestors too -->
  144. <xsl:if test="/root/search/expression">
  145. <cm:property name="ancestors"/>
  146. </xsl:if>
  147. </cm:properties>
  148. </cm:query>
  149. </cm:requests>
  150. </cm:query>
  151. </xts:transform>
  152. </send:request>
  153. </xts:transform>
  154. </theDataSourceConnection>
  155. </xts:append>
  156. <!-- check the LWM packages -->
  157. <xts:append>
  158. <xts:transform src="transforms/fm/fm-params.xslt" processor="XSLT">
  159. <send:request provider="metadataService" faultBlock="ignoreFault">
  160. <md1:updateMetadata xmlns:md1="http://developer.cognos.com/schemas/metadataService/1">
  161. <request>
  162. <xts:transform name="XMLEncode">
  163. <mdprovider type="transientAction" action="execute" seq="1">
  164. <transaction saved="false" seq="1">
  165. <action seq="1" type="IsLWM">
  166. <inputparams>
  167. <param seq="1" type="i18nstring">
  168. <value><xsl:value-of select="key('env-param','m_name')"/></value>
  169. </param>
  170. </inputparams>
  171. <domchanges/>
  172. <result success="t">
  173. <outputparams/>
  174. </result>
  175. </action>
  176. </transaction>
  177. </mdprovider>
  178. </xts:transform>
  179. </request>
  180. </md1:updateMetadata>
  181. </send:request>
  182. </xts:transform>
  183. </xts:append>
  184. </xsl:if>
  185. <!-- for account object we need to get the permissions on the namespace -->
  186. <xsl:if test="key('env-param','m_class')='account'">
  187. <xts:append>
  188. <namespacePermissions>
  189. <xts:transform src="transforms/CM/post-process.xslt" processor="XSLT">
  190. <send:request provider="cm">
  191. <xts:transform src="transforms/CM/pre-process.xslt" processor="XSLT">
  192. <cm:query>
  193. <cm:search>
  194. <xts:queryNode select="/root/*[local-name()='queryResponse']/*/*[local-name()='ancestors']/*[local-name()='ancestorInfo' and ./*[local-name()='objectClass']='namespace']/*[local-name()='searchPath']/node()"/>
  195. </cm:search>
  196. <cm:properties>
  197. <cm:property name="permissions"/>
  198. </cm:properties>
  199. </cm:query>
  200. </xts:transform>
  201. </send:request>
  202. </xts:transform>
  203. </namespacePermissions>
  204. </xts:append>
  205. </xsl:if>
  206. <!-- for dispatcher object we need to see if a report service or batch report service is installed -->
  207. <xsl:if test="key('env-param', 'm_class')='dispatcher'">
  208. <xts:append>
  209. <theDispatcher>
  210. <xts:transform src="transforms/CM/post-process.xslt" processor="XSLT">
  211. <send:request provider="cm">
  212. <xts:transform src="transforms/CM/pre-process.xslt" processor="XSLT">
  213. <cm:query>
  214. <cm:requests>
  215. <cm:query>
  216. <cm:search><xsl:value-of select="key('env-param','m_obj')"/>/installedComponent[@componentID='reportService' or @componentID='batchReportService']</cm:search>
  217. <cm:properties>
  218. <cm:property name="componentID"/>
  219. </cm:properties>
  220. </cm:query>
  221. </cm:requests>
  222. </cm:query>
  223. </xts:transform>
  224. </send:request>
  225. </xts:transform>
  226. </theDispatcher>
  227. </xts:append>
  228. </xsl:if>
  229. <xsl:if test="/root/env/param[@name='m_class']='package' or /root/env/param[@name='m_class']='metricsPackage'">
  230. <xts:append>
  231. <packageConfiguration>
  232. <xts:transform src="transforms/CM/post-process.xslt" processor="XSLT">
  233. <send:request provider="cm">
  234. <xts:transform src="transforms/CM/pre-process.xslt" processor="XSLT">
  235. <cm:query>
  236. <cm:search><xsl:value-of select="key('env-param','m_obj')"/>/packageConfiguration</cm:search>
  237. <cm:properties>
  238. <cm:property name="searchPath"/>
  239. </cm:properties>
  240. </cm:query>
  241. </xts:transform>
  242. </send:request>
  243. </xts:transform>
  244. </packageConfiguration>
  245. </xts:append>
  246. </xsl:if>
  247. <xsl:if test="/root/env/param[@name='m_class']='package'">
  248. <xts:append>
  249. <modelInfo>
  250. <xts:transform src="transforms/CM/post-process.xslt" processor="XSLT">
  251. <send:request provider="cm">
  252. <xts:transform src="transforms/CM/pre-process.xslt" processor="XSLT">
  253. <cm:query>
  254. <cm:search><xsl:value-of select="key('env-param','m_obj')"/>/model[last()]</cm:search>
  255. <cm:properties>
  256. <cm:property name="permissions"/>
  257. </cm:properties>
  258. </cm:query>
  259. </xts:transform>
  260. </send:request>
  261. </xts:transform>
  262. </modelInfo>
  263. <xts:transform src="transforms/fm/fm-params.xslt" processor="XSLT">
  264. <send:request provider="metadataService" testBlock="testCanEditPackageResponse" faultBlock="ignoreFault">
  265. <md1:updateMetadata xmlns:md1="http://developer.cognos.com/schemas/metadataService/1">
  266. <request>
  267. <xts:transform name="XMLEncode">
  268. <mdprovider type="transientAction" action="execute">
  269. <transaction saved="false" seq="1">
  270. <action seq="1" type="CanEditPackageFromPortal">
  271. <inputparams>
  272. <param seq="1" type="i18nstring">
  273. <value><xsl:value-of select="key('env-param','m_obj')"/></value>
  274. </param>
  275. </inputparams>
  276. <domchanges/>
  277. <result success="t">
  278. <outputparams>
  279. <param seq="0" type="i18nstring">
  280. <value/>
  281. </param>
  282. </outputparams>
  283. </result>
  284. </action>
  285. </transaction>
  286. </mdprovider>
  287. </xts:transform>
  288. </request>
  289. </md1:updateMetadata>
  290. </send:request>
  291. </xts:transform>
  292. </xts:append>
  293. </xsl:if>
  294. <xts:append>
  295. <generalConfigSettings>
  296. <xts:function name="getConfiguration">
  297. <xts:param name="portal.launchBusinessInsightChromeless"/>
  298. </xts:function>
  299. </generalConfigSettings>
  300. </xts:append>
  301. </xts:sequence>
  302. </xsl:template>
  303. </xsl:stylesheet>
  304. </xts:block>
  305. <xts:block id="testCanEditPackageResponse" type="test">
  306. <md1:updateMetadataResponse xmlns:md1="http://developer.cognos.com/schemas/metadataService/1">
  307. <metadata>&lt;response&gt;&lt;status mode=&quot;ro&quot; primary=&quot;true&quot; success=&quot;true&quot;/&gt;&lt;outputparams&gt;&lt;param seq=&quot;1&quot; type=&quot;i18nstring&quot;&gt;/metadataUIService?pid=importWizard&amp;amp;packageLocation=/content/package[@name=&amp;apos;MyNewPackage&amp;apos;]&lt;/param&gt;&lt;/outputparams&gt;&lt;/response&gt;</metadata>
  308. </md1:updateMetadataResponse>
  309. </xts:block>
  310. <xts:block id="ignoreFault" type="fault">
  311. <error>safe to ignore</error>
  312. </xts:block>
  313. <!--
  314. Update the m_path variable if it is not defined or is blank or if we are dealing with a portlet.
  315. -->
  316. <xts:block id="getPath" type="exec" mode="interpret" processor="XSLT" condition=".[not(/root/env/param[@name='m_path']) or /root/env/param[@name='m_path']='' or /root/env/param[@name='m_class']='portlet']" mandatory="false" dependency="getContent">
  317. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
  318. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  319. <xsl:template match="/">
  320. <xts:sequence>
  321. <xts:update select="/root/env/param[@name='m_path']">
  322. <xsl:element name="param">
  323. <xsl:attribute name="name"><xsl:value-of select="'m_path'"/></xsl:attribute>
  324. <xsl:value-of select="/root/cm:queryResponse/*/cm:ancestors/*[position()=last()]/cm:searchPath"/>
  325. </xsl:element>
  326. </xts:update>
  327. </xts:sequence>
  328. </xsl:template>
  329. </xsl:stylesheet>
  330. </xts:block>
  331. <!--
  332. Get Content2 retrieves the output any output or schedule for the object or shortcut.
  333. -->
  334. <xts:block id="getContent2" dependency="getPath" processor="XSLT" type="exec" mode="interpret">
  335. <xts:logicsheet path="logicsheets/cm-logic.xsl"/>
  336. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  337. <xsl:stylesheet version="1.0"
  338. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  339. xmlns:cml="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/cml/1/"
  340. xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/"
  341. xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
  342. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  343. <xsl:key name="runnables" match="/root/system/param[@name='ui_objects']/object[@runnable='T']" use="@class"/>
  344. <xsl:template match="/">
  345. <xts:sequence>
  346. <xsl:variable name="passedClass">
  347. <xsl:choose>
  348. <xsl:when test="/root/env/param[@name='m_class'] and /root/env/param[@name='m_class']!='shortcut'"><xsl:value-of select="/root/env/param[@name='m_class']"/></xsl:when>
  349. <xsl:otherwise><xsl:value-of select="/root/cm:queryResponse/*/cm:target/*/cm:objectClass"/></xsl:otherwise>
  350. </xsl:choose>
  351. </xsl:variable>
  352. <xsl:variable name="target-obj">
  353. <xsl:choose>
  354. <xsl:when test="/root/env/param[@name='m_obj'] and /root/env/param[@name='m_class'] != 'shortcut'"><xsl:value-of select="/root/env/param[@name='m_obj']"/></xsl:when>
  355. <xsl:otherwise><xsl:value-of select="/root/cm:queryResponse/*/cm:target/*/cm:searchPath"/></xsl:otherwise>
  356. </xsl:choose>
  357. </xsl:variable>
  358. <!-- This request is intended to determine if a schedule currently exists for a report, query or job -->
  359. <xsl:if test="key('runnables', $passedClass)">
  360. <xts:append>
  361. <childObjects>
  362. <xts:transform src="transforms/CM/post-process.xslt" processor="XSLT">
  363. <send:request provider="cm">
  364. <xts:transform src="transforms/CM/pre-process.xslt" processor="XSLT">
  365. <cm:query xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
  366. <cm:requests>
  367. <cm:query>
  368. <cm:search><xsl:value-of select="$target-obj"/>/schedule</cm:search>
  369. <cm:properties>
  370. <cm:property name="taskID"/>
  371. <cm:property name="active"/>
  372. </cm:properties>
  373. </cm:query>
  374. <cm:query>
  375. <cm:search><xsl:value-of select="$target-obj"/>/*[@objectClass='history']</cm:search>
  376. <cm:properties>
  377. <cm:property name="defaultName"/>
  378. </cm:properties>
  379. </cm:query>
  380. <cm:query>
  381. <cm:search><xsl:value-of select="$target-obj"/>/*[@objectClass='reportCache']</cm:search>
  382. <cm:properties>
  383. <cm:property name="defaultName"/>
  384. </cm:properties>
  385. </cm:query>
  386. </cm:requests>
  387. </cm:query>
  388. </xts:transform>
  389. </send:request>
  390. </xts:transform>
  391. </childObjects>
  392. </xts:append>
  393. </xsl:if>
  394. <xsl:if test="($passedClass='agentDefinition' or $passedClass='agentDefinitionView' or $passedClass='report' or $passedClass='reportView' or $passedClass='query' or $passedClass='analysis' or $passedClass='analysisView')">
  395. <xts:append>
  396. <send:request provider="deliveryService" faultBlock="ignoreFault" >
  397. <dls:queryNotification xmlns:dls="http://developer.cognos.com/schemas/deliveryService/1"
  398. xmlns:bus="http://developer.cognos.com/schemas/bibus/3/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  399. <objectPath xsi:type="bus:searchPathSingleObject">
  400. <xsl:value-of select="$target-obj"/>
  401. </objectPath>
  402. </dls:queryNotification>
  403. </send:request>
  404. <userEmail>
  405. <xts:transform src="transforms/CM/post-process.xslt" processor="XSLT">
  406. <send:request provider="cm">
  407. <xts:transform src="transforms/CM/pre-process.xslt" processor="XSLT">
  408. <cm:query xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
  409. <cm:requests>
  410. <cm:query>
  411. <cm:search>~</cm:search>
  412. <cm:properties>
  413. <cm:property name="email"/>
  414. <cm:property name="notificationEMail"/>
  415. </cm:properties>
  416. </cm:query>
  417. </cm:requests>
  418. </cm:query>
  419. </xts:transform>
  420. </send:request>
  421. </xts:transform>
  422. </userEmail>
  423. </xts:append>
  424. </xsl:if>
  425. </xts:sequence>
  426. </xsl:template>
  427. </xsl:stylesheet>
  428. </xts:block>
  429. <xts:block id="missingObject" mode="output" processor="XSLT" type="exec" dependency="getContent getPath getContent2 formlogic_init getActions" mimeType="text/html" condition=".[not(/root/*[local-name()='queryResponse']/*)]" mandatory="false" path="/portal/missing_object.xml">
  430. <xts:logicsheet path="logicsheets/portal.xsl"/>
  431. <xts:logicsheet path="logicsheets/presentation/dialog/framework.xsl"/>
  432. <xts:logicsheet path="logicsheets/presentation/dialog/presentation.xsl"/>
  433. <xts:logicsheet path="logicsheets/presentation/layout.xsl"/>
  434. <xts:logicsheet path="logicsheets/presentation/touch_up.xslt"/>
  435. </xts:block>
  436. <xts:block id="format" mode="output" processor="XSLT" type="exec" dependency="getContent getPath getContent2 formlogic_init getActions" mimeType="text/html" condition=".[/root/*[local-name()='queryResponse']/*]" mandatory="false">
  437. <xts:logicsheet path="logicsheets/portal.xsl"/>
  438. <xts:logicsheet path="logicsheets/permissions.xsl"/>
  439. <xts:logicsheet path="logicsheets/presentation/dialog/framework.xsl"/>
  440. <xts:logicsheet path="logicsheets/presentation/layout.xsl"/>
  441. <xts:logicsheet path="logicsheets/presentation/dialog/presentation.xsl"/>
  442. <xts:logicsheet path="logicsheets/presentation/controls/framework.xsl"/>
  443. <xts:logicsheet path="logicsheets/presentation/controls/presentation.xsl"/>
  444. <xts:logicsheet path="logicsheets/formlogic.xslt"/>
  445. <xts:logicsheet path="logicsheets/validation.xslt"/>
  446. <xts:logicsheet path="logicsheets/presentation/touch_up.xslt"/>
  447. <xsl:stylesheet version="1.0"
  448. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  449. xmlns:bus="http://developer.cognos.com/schemas/bibus/3/"
  450. xmlns:dls="http://developer.cognos.com/schemas/deliveryService/1"
  451. xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
  452. xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
  453. xmlns:pm="http://developer.cognos.com/schemas/xts/pm"
  454. xmlns:lyt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/layout/"
  455. xmlns:dp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/presentation/"
  456. xmlns:df="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/framework/"
  457. xmlns:cf="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/framework/"
  458. xmlns:cp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/presentation/"
  459. xmlns:xts="http://developer.cognos.com/schemas/xts/"
  460. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  461. xmlns:utml="http://developer.cognos.com/schemas/xts/logicsheet/xslt/formlogic/"
  462. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  463. exclude-result-prefixes="xsl cm pf pm lyt dp df cf cp utml xts xtsext">
  464. <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no" omit-xml-declaration="yes" />
  465. <!-- Global variables ======================== -->
  466. <pf:variables/>
  467. <pf:documentFormats/>
  468. <xsl:variable name="mname" select="'actions.xts'"/>
  469. <!-- These vars are required by global templates that generate an icon and a url for a CM entry -->
  470. <xsl:variable name="back-url" select="string(key('env-param', 'backURL'))"/>
  471. <xsl:variable name="cmd-form" select="'pform'"/>
  472. <xsl:variable name="edit-form" select="'pform'"/>
  473. <pm:permissions origin="/root/cm:queryResponse/*/"/>
  474. <!-- Object reference -->
  475. <xsl:variable name="hasChildren"><xsl:value-of select="/root/cm:queryResponse/*/cm:hasChildren"/></xsl:variable>
  476. <xsl:variable name="obj-ref" select="/root/cm:queryResponse/*"/>
  477. <xsl:variable name="obj-class"><xsl:value-of select="/root/cm:queryResponse/*/cm:objectClass"/></xsl:variable>
  478. <xsl:variable name="effectiveUserCapabilities">
  479. <xsl:call-template name="calEffectiveObjectCapabilities">
  480. <xsl:with-param name="capabilities" select="/root/cm:queryResponse/*/cm:effectiveUserCapabilities | /root/cm:queryResponse/*/*/*/cm:effectiveUserCapabilities"/>
  481. </xsl:call-template>
  482. </xsl:variable>
  483. <xsl:variable name="hasRegistration" select="/root/cm:queryResponse/*/cm:registration != ''"/>
  484. <xsl:variable name="obj-path"><xsl:value-of select="/root/cm:queryResponse/*/cm:ancestors/*[position()=last()]/cm:searchPath"/></xsl:variable>
  485. <xsl:variable name="obj-id"><xsl:value-of select="/root/cm:queryResponse/*/cm:storeID"/></xsl:variable>
  486. <xsl:variable name="sys-ui-obj" select="key('ui-object', /root/cm:queryResponse/*/cm:objectClass)"/>
  487. <xsl:variable name="sys-ui-tobj" select="key('ui-object', /root/cm:queryResponse/*/cm:target/*/cm:objectClass)"/>
  488. <xsl:variable name="target-obj-ref" select="/root/cm:queryResponse/*/cm:target/*"/>
  489. <xsl:variable name="target-obj-class"><xsl:value-of select="/root/cm:queryResponse/*/cm:target/*/cm:objectClass"/></xsl:variable>
  490. <xsl:variable name="target-name" select="/root/cm:queryResponse/*/cm:target/*/cm:defaultName"/>
  491. <xsl:variable name="obj-name" select="/root/cm:queryResponse/*/cm:defaultName"/>
  492. <xsl:variable name="ui-obj-act" select="key('ui-object-actions', /root/cm:queryResponse/*/cm:objectClass)"/>
  493. <xsl:variable name="ui-tobj-act" select="key('ui-object-actions', /root/cm:queryResponse/*/cm:target/*/cm:objectClass)"/>
  494. <xsl:variable name="parent-obj-class" select="/root/cm:queryResponse/*/cm:parent/*/cm:objectClass"/>
  495. <xsl:variable name="parent-searchPath" select="/root/cm:queryResponse/*/cm:parent/*/cm:searchPath"/>
  496. <xsl:variable name="userInterfaces" select="/root/cm:queryResponse/*/cm:userInterfaces/cm:uiComponentEnum"/>
  497. <xsl:variable name="targetUserInterfaces" select="$target-obj-ref/cm:userInterfaces/cm:uiComponentEnum"/>
  498. <!-- permissions for the object -->
  499. <!--
  500. The following variables (currentCanRead / currentCanWrite) contain the permissions for shortcuts, when necessary.
  501. Otherwise, they can be seen as duplicates to the canRead and canWrite variables; this makes condition coding simpler.
  502. -->
  503. <xsl:variable name="currentCanRead" select="$canReadShort='true'"/>
  504. <xsl:variable name="currentCanWrite" select="$canWriteShort='true'"/>
  505. <xsl:variable name="canWriteOnParent" select="contains(/root/cm:queryResponse/*/cm:parent/*/cm:permissions,'write')"/>
  506. <xsl:variable name="canReadOnParent" select="contains(/root/cm:queryResponse/*/cm:parent/*/cm:permissions,'read')"/>
  507. <xsl:variable name="is3rdPartyNSEntry" select="starts-with(/root/cm:queryResponse/*/cm:searchPath,'CAMID(') and not(starts-with(/root/cm:queryResponse/*/cm:searchPath,'CAMID(&quot;:')) and not(starts-with(/root/cm:queryResponse/*/cm:searchPath, concat(/root/session/param[@name='e_hp'],'/folder')))"/>
  508. <xsl:variable name="history">
  509. <xsl:value-of select="/root/childObjects/cm:queryResponse/cm:queryReply[2]/cm:history/*"/>
  510. </xsl:variable>
  511. <!-- An entry is considered "dangling" if it is:
  512. - a shortcut to a none existent object
  513. - a custom view of a none existent report or query
  514. - a shortcut to a custom view of a none existent report or query
  515. -->
  516. <xsl:variable name="isDangling" select="($obj-ref/cm:objectClass = 'shortcut' and ($obj-ref/cm:target/*/cm:objectClass = 'nil' or $obj-ref/cm:target/*/cm:base/*/cm:objectClass = 'nil' or ($obj-ref/cm:target/*/cm:base and not($obj-ref/cm:target/*/cm:base/*/cm:objectClass)))) or (($obj-ref/cm:objectClass = 'reportView' or $obj-ref/cm:objectClass = 'agentDefinitionView' or $obj-ref/cm:objectClass='powerPlay8ReportView') and ($obj-ref/cm:base/*/cm:objectClass = 'nil' or not($obj-ref/cm:base/*/cm:objectClass)))"/>
  517. <xsl:variable name="sys-ui-target-icon">
  518. <xsl:choose>
  519. <xsl:when test="not($sys-ui-tobj)"><xsl:value-of select="$sys-ui-obj/@icon"/>
  520. </xsl:when>
  521. <xsl:otherwise><xsl:value-of select="$sys-ui-tobj/@icon"/>
  522. </xsl:otherwise>
  523. </xsl:choose>
  524. </xsl:variable>
  525. <xsl:variable name="ui-target-obj-act">
  526. <xsl:choose>
  527. <xsl:when test="not($ui-tobj-act) or $obj-class = 'drillPath'">
  528. <xsl:for-each select="$ui-obj-act/action">
  529. <xsl:value-of select="concat(@name,' ')"/>
  530. </xsl:for-each>
  531. </xsl:when>
  532. <xsl:otherwise>
  533. <xsl:for-each select="$ui-tobj-act/action">
  534. <xsl:value-of select="concat(@name,' ')"/>
  535. </xsl:for-each>
  536. </xsl:otherwise>
  537. </xsl:choose>
  538. </xsl:variable>
  539. <xsl:variable name="ui-obj-act-exclude">
  540. <xsl:choose>
  541. <xsl:when test="$ui-tobj-act">
  542. <xsl:value-of select="concat(' ', $ui-tobj-act/@exclude, ' ')"/>
  543. </xsl:when>
  544. <xsl:otherwise>
  545. <xsl:value-of select="concat(' ', $ui-obj-act/@exclude, ' ')"/>
  546. </xsl:otherwise>
  547. </xsl:choose>
  548. </xsl:variable>
  549. <xsl:variable name="target-search-path">
  550. <xsl:choose>
  551. <xsl:when test="$obj-class='shortcut' and not($isDangling)"><xsl:value-of select="$target-obj-ref/cm:searchPath"/>
  552. </xsl:when>
  553. <xsl:otherwise><xsl:value-of select="$obj-ref/cm:searchPath"/>
  554. </xsl:otherwise>
  555. </xsl:choose>
  556. </xsl:variable>
  557. <xsl:variable name="target-store-id">
  558. <xsl:choose>
  559. <xsl:when test="$obj-class='shortcut' and not($isDangling)"><xsl:value-of select="$target-obj-ref/cm:storeID"/>
  560. </xsl:when>
  561. <xsl:otherwise><xsl:value-of select="$obj-ref/cm:storeID"/>
  562. </xsl:otherwise>
  563. </xsl:choose>
  564. </xsl:variable>
  565. <xsl:variable name="tClass">
  566. <xsl:choose>
  567. <xsl:when test="$obj-class='shortcut' and not($isDangling)"><xsl:value-of select="$target-obj-class"/>
  568. </xsl:when>
  569. <xsl:otherwise><xsl:value-of select="$obj-class"/>
  570. </xsl:otherwise>
  571. </xsl:choose>
  572. </xsl:variable>
  573. <xsl:variable name="launchableType">
  574. <xsl:choose>
  575. <xsl:when test="$obj-class = 'shortcut' "><xsl:value-of select="$target-obj-ref/cm:launchableType"/></xsl:when>
  576. <xsl:otherwise><xsl:value-of select="$obj-ref/cm:launchableType"/></xsl:otherwise>
  577. </xsl:choose>
  578. </xsl:variable>
  579. <xsl:variable name="defaultName">
  580. <xsl:choose>
  581. <xsl:when test="$obj-class='shortcut' and not($isDangling)"><xsl:value-of select="$target-name"/></xsl:when>
  582. <xsl:otherwise><xsl:value-of select="$obj-name"/></xsl:otherwise>
  583. </xsl:choose>
  584. </xsl:variable>
  585. <xsl:variable name="url-encoded-path" select="xtsext:protect(xtsext:urlencode(string($target-search-path)),'url','searchPath','getdata')"/>
  586. <xsl:variable name="pp-url-encoded-path" select="xtsext:urlencode(string($target-search-path))"/>
  587. <xsl:variable name="browserTitle">
  588. <xts:string id="IDS_ACTIONS_TITLE">
  589. <xts:param name="objectName">
  590. <span lang="{$contentLocale}"><xsl:value-of select="xtsext:enforceBTD(key('env-param', 'm_name'), $baseTextDirection, $productLocale, boolean($isBidiEnabled='true'))"/></span>
  591. </xts:param>
  592. </xts:string>
  593. </xsl:variable>
  594. <xsl:variable name="uri">
  595. <xsl:if test="$tClass='URL'">
  596. <xsl:choose>
  597. <xsl:when test="$obj-class='shortcut' and not($isDangling)"><xsl:value-of select="$target-obj-ref/cm:uri"/>
  598. </xsl:when>
  599. <xsl:otherwise><xsl:value-of select="$obj-ref/cm:uri"/>
  600. </xsl:otherwise>
  601. </xsl:choose>
  602. </xsl:if>
  603. </xsl:variable>
  604. <!-- This format should be used for document objects only -->
  605. <xsl:variable name="formatDoc">
  606. <xsl:choose>
  607. <xsl:when test="$obj-class='shortcut' and not($isDangling)"><xsl:value-of select="$documentFormats/format[@name = $target-obj-ref/cm:documentType]/@name"/></xsl:when>
  608. <xsl:otherwise><xsl:value-of select="$documentFormats/format[@name = $obj-ref/cm:documentType]/@name"/></xsl:otherwise>
  609. </xsl:choose>
  610. </xsl:variable>
  611. <!-- re:WO 1918 don't display bad formats, for previous versions even if the current format is bad there could be other versions that are valid so we need to display the link-->
  612. <xsl:variable name="hasPrevVersion">
  613. <xsl:choose>
  614. <xsl:when test="$obj-class='shortcut' and not($isDangling)">
  615. <xsl:choose>
  616. <xsl:when test="$target-obj-class='powerPlay8Report' or $target-obj-class='powerPlay8ReportView'">
  617. <xsl:value-of select="$target-obj-ref/cm:defaultOutputFormat/cm:powerPlay8OutputFormatEnum"/>
  618. </xsl:when>
  619. <xsl:otherwise>
  620. <xsl:value-of select="$target-obj-ref/cm:defaultOutputFormat/cm:string"/>
  621. </xsl:otherwise>
  622. </xsl:choose>
  623. </xsl:when>
  624. <xsl:otherwise>
  625. <xsl:choose>
  626. <xsl:when test="$obj-class='powerPlay8Report' or $obj-class='powerPlay8ReportView'">
  627. <xsl:value-of select="$obj-ref/cm:defaultOutputFormat/cm:powerPlay8OutputFormatEnum"/>
  628. </xsl:when>
  629. <xsl:otherwise>
  630. <xsl:value-of select="$obj-ref/cm:defaultOutputFormat/cm:string"/>
  631. </xsl:otherwise>
  632. </xsl:choose>
  633. </xsl:otherwise>
  634. </xsl:choose>
  635. </xsl:variable>
  636. <xsl:variable name="documentType">
  637. <xsl:choose>
  638. <xsl:when test="$obj-class = 'shortcut' "><xsl:value-of select="$target-obj-ref/cm:documentType"/></xsl:when>
  639. <xsl:otherwise><xsl:value-of select="$obj-ref/cm:documentType"/></xsl:otherwise>
  640. </xsl:choose>
  641. </xsl:variable>
  642. <xsl:variable name="ppreportgateway">
  643. <xsl:if test="starts-with(string($obj-class),'powerPlay') or ($obj-class='shortcut' and starts-with(string($target-obj-class),'powerPlay'))">
  644. <xsl:choose>
  645. <xsl:when test="$obj-class='shortcut' and not($isDangling)"><xsl:value-of select="$target-obj-ref/cm:gateway"/>
  646. </xsl:when>
  647. <xsl:otherwise><xsl:value-of select="$obj-ref/cm:gateway"/>
  648. </xsl:otherwise>
  649. </xsl:choose>
  650. </xsl:if>
  651. </xsl:variable>
  652. <xsl:variable name="ppcubecontentname">
  653. <xsl:if test="starts-with(string($obj-class),'powerPlay') or ($obj-class='shortcut' and starts-with(string($target-obj-class),'powerPlay'))">
  654. <xsl:choose>
  655. <xsl:when test="$obj-class='shortcut' and not($isDangling)"><xsl:value-of select="$target-obj-ref/cm:cubeContentName"/>
  656. </xsl:when>
  657. <xsl:otherwise><xsl:value-of select="$obj-ref/cm:cubeContentName"/>
  658. </xsl:otherwise>
  659. </xsl:choose>
  660. </xsl:if>
  661. </xsl:variable>
  662. <xsl:variable name="ppreportprompt">
  663. <xsl:if test="starts-with(string($obj-class),'powerPlay') or ($obj-class='shortcut' and starts-with(string($target-obj-class),'powerPlay'))">
  664. <xsl:choose>
  665. <xsl:when test="$obj-class='shortcut' and not($isDangling) and string($target-obj-ref/cm:hasPrompts) = 'true'">
  666. <xsl:value-of select="$target-obj-ref/cm:hasPrompts"/>
  667. </xsl:when>
  668. <xsl:otherwise><xsl:if test="$obj-ref/cm:hasPrompts = 'true'">
  669. <xsl:value-of select="$obj-ref/cm:hasPrompts"/></xsl:if>
  670. </xsl:otherwise>
  671. </xsl:choose>
  672. </xsl:if>
  673. </xsl:variable>
  674. <xsl:variable name="pp8reportprompt">
  675. <xsl:if test="starts-with(string($obj-class),'powerPlay8') or ($obj-class='shortcut' and starts-with(string($target-obj-class),'powerPlay8'))">
  676. <xsl:choose>
  677. <xsl:when test="$obj-class='shortcut' and not($isDangling) and /root/*[local-name()='queryResponse']/*/*[local-name()='target']/*/*[local-name()='options']/*/*[name='prompt']">
  678. <xsl:value-of select="/root/*[local-name()='queryResponse']/*/*[local-name()='target']/*/*[local-name()='options']/*/*[name='prompt']/value"/>
  679. </xsl:when>
  680. <xsl:when test="/root/*[local-name()='queryResponse']/*[local-name()='powerPlay8Report']/*[local-name()='options']/*/*[name='prompt']">
  681. <xsl:value-of select="/root/*[local-name()='queryResponse']/*[local-name()='powerPlay8Report']/*[local-name()='options']/*/*[name='prompt']/value"/>
  682. </xsl:when>
  683. <xsl:otherwise>false</xsl:otherwise>
  684. </xsl:choose>
  685. </xsl:if>
  686. </xsl:variable>
  687. <xsl:variable name="ppBACK">
  688. <xsl:choose>
  689. <xsl:when test="key('env-param','ppBACK')">
  690. <xsl:value-of select="key('env-param','ppBACK')"/>
  691. </xsl:when>
  692. <xsl:otherwise>
  693. <xsl:value-of select="key('env-param','backURL')"/>
  694. </xsl:otherwise>
  695. </xsl:choose>
  696. </xsl:variable>
  697. <xsl:variable name="notifyStatus" select="/root/queryNotificationResponse /result/details/*[substring-after(@xsi:type,':')='asynchDetailAgentNotificationStatus']"/>
  698. <xsl:variable name="userHasEmail" select="/root/userEmail/cm:queryResponse/cm:queryReply/cm:account/cm:email!='' or /root/userEmail/cm:queryResponse/cm:queryReply/cm:account/cm:notificationEMail!=''"/>
  699. <xsl:variable name="url-encoded-id"><pf:idToSearchPathForURL source="/root/cm:queryResponse/*/cm:storeID"/></xsl:variable>
  700. <xsl:variable name="class">
  701. <xsl:choose>
  702. <xsl:when test=" /root/cm:queryResponse/*/cm:objectClass = 'shortcut' "><xsl:value-of select="/root/cm:queryResponse/*/cm:target/*/cm:objectClass[1]"/></xsl:when>
  703. <xsl:otherwise><xsl:value-of select="/root/cm:queryResponse/*/cm:objectClass"/></xsl:otherwise>
  704. </xsl:choose>
  705. </xsl:variable>
  706. <xsl:variable name="action">
  707. <xsl:call-template name="gen-action">
  708. <xsl:with-param name="class" select="$class"/>
  709. <xsl:with-param name="object" select="/root/cm:queryResponse/*"/>
  710. <xsl:with-param name="canExecute" select="$canExecute"/>
  711. <xsl:with-param name="canRead" select="$canRead"/>
  712. <xsl:with-param name="canTraverse" select="$canTraverse"/>
  713. <xsl:with-param name="output_format" select="$output_format"/>
  714. <xsl:with-param name="userInterfaces" select="$userInterfaces"/>
  715. <xsl:with-param name="targetUserInterfaces" select="$targetUserInterfaces"/>
  716. <xsl:with-param name="effectiveUserCapabilities" select="$effectiveUserCapabilities"/>
  717. </xsl:call-template>
  718. </xsl:variable>
  719. <xsl:variable name="actionString">
  720. <xsl:call-template name="gen-action-string">
  721. <xsl:with-param name="action" select="$action"/>
  722. <xsl:with-param name="class" select="$class"/>
  723. <xsl:with-param name="userInterfaces" select="$userInterfaces"/>
  724. <xsl:with-param name="targetUserInterfaces" select="$targetUserInterfaces"/>
  725. <xsl:with-param name="documentType" select="$documentType"/>
  726. <xsl:with-param name="launchableType" select="$launchableType"/>
  727. <xsl:with-param name="effectiveUserCapabilities" select="$effectiveUserCapabilities"/>
  728. </xsl:call-template>
  729. </xsl:variable>
  730. <xsl:variable name="defaultMorphlet"><pf:getDefaultMorphletForObject objectClass="$class"/></xsl:variable>
  731. <xsl:variable name="fromSchedulingTool" select="key('env-param','from_schedule_tool') = 'true'"/>
  732. <!-- start the output -->
  733. <xsl:template match="/root">
  734. <xsl:text disable-output-escaping='yes'>&lt;!DOCTYPE html></xsl:text>
  735. <dp:page longTitle="$browserTitle">
  736. <dp:meta>
  737. <pf:meta/><!-- Standard meta tags -->
  738. </dp:meta>
  739. <dp:script>
  740. <script language="javascript">
  741. function doUnregister()
  742. {
  743. if (confirm("<xts:string id="IDS_CONF_UNREGISTER" encode="javascript"/>"))
  744. action("dialog_action_result.xts", "unregister");
  745. }
  746. function doDelete()
  747. {
  748. if ( confirm("<xts:string id="IDS_CONF_DELETE_SINGLE" encode="javascript"/>") )
  749. action("submit.xts", "delete");
  750. }
  751. function doClearCache()
  752. {
  753. if ( confirm("<xts:string id="IDS_ACT_CONF_CLEAR_CACHE" encode="javascript"/>") )
  754. {
  755. <xsl:if test="$target-search-path!=''">
  756. document.pform.m_obj.value = '<xsl:value-of select="xtsext:javascriptencode(string($target-search-path))"/>';
  757. document.pform.m_obj.value=document.pform.m_obj.value+'/reportCache';
  758. </xsl:if>
  759. action("submit.xts", "delete");
  760. }
  761. }
  762. function doRemoveSchedule()
  763. {
  764. if ( confirm("<xts:string id="IDS_CONF_SCHED_REMOVE" encode="javascript"/>") )
  765. {
  766. <xsl:if test="$obj-class='shortcut' and $target-search-path!=''">
  767. document.pform.m_obj.value = '<xsl:value-of select="xtsext:javascriptencode(string($target-search-path))"/>';
  768. </xsl:if>
  769. action("submit.xts", "remove");
  770. }
  771. }
  772. function enableRDSADschedule()
  773. {
  774. if ( confirm("<xts:string id="IDS_ACT_CONF_ENABLE_SCHED_RDSAD" encode="javascript"/>") )
  775. {
  776. <xsl:if test="$obj-class='shortcut' and $target-search-path!=''">
  777. document.pform.m_obj.value = '<xsl:value-of select="xtsext:javascriptencode(string($target-search-path))"/>';
  778. </xsl:if>
  779. action("submit.xts","enable");
  780. }
  781. }
  782. function disableRDSADschedule()
  783. {
  784. if ( confirm("<xts:string id="IDS_ACT_CONF_DISABLE_SCHED_RDSAD" encode="javascript"/>") )
  785. {
  786. <xsl:if test="$obj-class='shortcut' and $target-search-path!=''">
  787. document.pform.m_obj.value = '<xsl:value-of select="xtsext:javascriptencode(string($target-search-path))"/>';
  788. </xsl:if>
  789. action("submit.xts","disable");
  790. }
  791. }
  792. function doModifyPackageConfiguration()
  793. {
  794. document.pform.m_obj.value = "<xsl:value-of select="xtsext:javascriptencode(string(/root/packageConfiguration/*/*/cm:searchPath))"/>";
  795. document.pform.m_class.value = "<xsl:value-of select="xtsext:javascriptencode(string(/root/packageConfiguration/*/*/cm:objectClass))"/>";
  796. document.pform.ps_nav_op.value = "maintain";
  797. document.pform.m.value = "<xsl:value-of select="$app"/>/" + "properties_packageconfiguration.xts";
  798. document.pform.submit();
  799. }
  800. function doRemovePackageConfiguration()
  801. {
  802. if ( confirm("<xts:string id="IDS_ACT_CONF_DELETE_PACKAGECONFIGURATION" encode="javascript"/>") )
  803. {
  804. <xsl:if test="string(/root/packageConfiguration/*/*/cm:searchPath)!=''">
  805. document.pform.m_obj.value = '<xsl:value-of select="xtsext:javascriptencode(string(/root/packageConfiguration/*/*/cm:searchPath))"/>';
  806. </xsl:if>
  807. action('submit.xts', 'delete');
  808. }
  809. }
  810. function doResetAccount()
  811. {
  812. if ( confirm("<xts:string id="IDS_ACT_CONF_RESET_ACCOUNT" encode="javascript"/>") )
  813. {
  814. action('submit.xts', 'deleteAccount');
  815. }
  816. }
  817. function doActivate()
  818. {
  819. if ( confirm("<xts:string id="IDS_ACTION_CONFIRM_ACTIVATE" encode="javascript"/>"))
  820. {
  821. action("dialog_action_result.xts", "activate");
  822. }
  823. }
  824. function doAddNotification(rpt)
  825. {
  826. if (rpt)
  827. {
  828. var msg;
  829. if ("<xsl:value-of select="xtsext:javascriptencode(/root/userEmail/cm:queryResponse/cm:queryReply/cm:account/cm:notificationEMail)"/>" != "")
  830. msg = "<xts:string id="IDS_ACT_CONF_ADD_ALERT" encode="javascript"><xts:param name="email"><xsl:value-of select="xtsext:javascriptencode(/root/userEmail/cm:queryResponse/cm:queryReply/cm:account/cm:notificationEMail)"/></xts:param></xts:string>";
  831. else
  832. msg = "<xts:string id="IDS_ACT_CONF_ADD_ALERT" encode="javascript"><xts:param name="email"><xsl:value-of select="xtsext:javascriptencode(/root/userEmail/cm:queryResponse/cm:queryReply/cm:account/cm:email)"/></xts:param></xts:string>";
  833. if ( confirm(msg) )
  834. {
  835. <xsl:if test="$obj-class='shortcut' and $target-search-path!=''">
  836. document.pform.m_obj.value = '<xsl:value-of select="xtsext:javascriptencode(string($target-search-path))"/>';
  837. </xsl:if>
  838. action("submit.xts", "addNotification");
  839. }
  840. }
  841. else
  842. {
  843. if ( confirm("<xts:string id="IDS_ACT_CONF_ADD_NOTIFICATION" encode="javascript"/>") )
  844. {
  845. <xsl:if test="$obj-class='shortcut' and $target-search-path!=''">
  846. document.pform.m_obj.value = '<xsl:value-of select="xtsext:javascriptencode(string($target-search-path))"/>';
  847. </xsl:if>
  848. action("submit.xts", "addNotification");
  849. }
  850. }
  851. }
  852. function doRemoveNotification(rpt)
  853. {
  854. if (rpt)
  855. {
  856. if ( confirm("<xts:string id="IDS_ACT_CONF_REMOVE_ALERT" encode="javascript"/>") )
  857. {
  858. <xsl:if test="$obj-class='shortcut' and $target-search-path!=''">
  859. document.pform.m_obj.value = '<xsl:value-of select="xtsext:javascriptencode(string($target-search-path))"/>';
  860. </xsl:if>
  861. action("submit.xts", "removeNotification");
  862. }
  863. }
  864. else
  865. {
  866. if ( confirm("<xts:string id="IDS_ACT_CONF_REMOVE_NOTIFICATION" encode="javascript"/>") )
  867. {
  868. <xsl:if test="$obj-class='shortcut' and $target-search-path!=''">
  869. document.pform.m_obj.value = '<xsl:value-of select="xtsext:javascriptencode(string($target-search-path))"/>';
  870. </xsl:if>
  871. action("submit.xts", "removeNotification");
  872. }
  873. }
  874. }
  875. function doRemoveAllNotifications(rpt)
  876. {
  877. if (rpt)
  878. {
  879. if ( confirm("<xts:string id="IDS_ACT_CONF_REMOVE_ALL_ALERT" encode="javascript"/>") )
  880. {
  881. <xsl:if test="$obj-class='shortcut' and $target-search-path!=''">
  882. document.pform.m_obj.value = '<xsl:value-of select="xtsext:javascriptencode(string($target-search-path))"/>';
  883. </xsl:if>
  884. action("submit.xts", "removeAllNotifications");
  885. }
  886. }
  887. else
  888. {
  889. <xsl:variable name="notifyBox"><xts:string id="IDS_ACT_REMOVE_ALL_NOTIFICATIONS"/></xsl:variable>
  890. if ( confirm("<xts:string id="IDS_ACT_CONF_REMOVE_ALL_NOTIFICATION" encode="javascript"><xts:param name="removeNotifiyBox"><xsl:value-of select="$notifyBox"/></xts:param></xts:string>") )
  891. {
  892. <xsl:if test="$obj-class='shortcut' and $target-search-path!=''">
  893. document.pform.m_obj.value = '<xsl:value-of select="xtsext:javascriptencode(string($target-search-path))"/>';
  894. </xsl:if>
  895. action("submit.xts", "removeAllNotifications");
  896. }
  897. }
  898. }
  899. function addPageToPortalView()
  900. {
  901. document.pform.m_obj.value = "~";
  902. document.pform.m_class.value = "account";
  903. document.pform.sharedPagesChanged.value = "add";
  904. document.pform.m_selectedPage.value = "<xsl:value-of select="xtsext:javascriptencode(string($target-store-id))"/>";
  905. action("submit.xts", "save");
  906. }
  907. function actionMove()
  908. {
  909. <xsl:variable name="useObj">
  910. <xsl:choose>
  911. <xsl:when test="$obj-class!='contact' and ($obj-class='configuration' or $obj-class='content' or $obj-class='package' or $obj-class='namespace' or contains($obj-class,'older'))"><xsl:value-of select="key('env-param','m_obj')"/></xsl:when>
  912. <xsl:otherwise><xsl:value-of select="$obj-path"/></xsl:otherwise>
  913. </xsl:choose>
  914. </xsl:variable>
  915. <xsl:variable name="usePth">
  916. <xsl:choose>
  917. <xsl:when test="string(key('env-param','m_path'))=''">
  918. <xsl:value-of select="$obj-path"/>
  919. </xsl:when>
  920. <xsl:otherwise>
  921. <xsl:value-of select="key('env-param','m_path')"/>
  922. </xsl:otherwise>
  923. </xsl:choose>
  924. </xsl:variable>
  925. <!-- Dynamically create the form elements that select.xts use before doing the move. -->
  926. setFormInputElement('so.select','<xsl:value-of select="xtsext:javascriptencode($obj-class)"/>.container<xsl:if test="$fromSchedulingTool and $obj-class = 'jobDefinition'">.admin</xsl:if>');
  927. setFormInputElement('so.editOp','move');
  928. setFormInputElement('so.defaultEditOpObject','<xsl:value-of select="xtsext:javascriptencode($useObj)"/>');
  929. <xsl:if test="string($parent-searchPath)!=''">
  930. setFormInputElement('so.defaultObject','<xsl:value-of select="xtsext:javascriptencode($parent-searchPath)"/>');
  931. </xsl:if>
  932. setFormInputElement('so.defaultLocation','<xsl:value-of select="xtsext:javascriptencode($usePth)"/>');
  933. setFormInputElement('so.return.m','<xsl:value-of select="xtsext:javascriptencode($app)"/>/<xsl:value-of select="xtsext:javascriptencode($mname)"/>');
  934. <!-- The following three items are required so that pressing OK on select a dialogue causes the move to execute -->
  935. document.pform.ifrmcmd.value = "move";
  936. document.pform.ps_nav_op.value = "maintain";
  937. <!-- -->
  938. document.pform.m.value = "<xsl:value-of select="xtsext:javascriptencode($app)"/>/select/select.xts";
  939. document.pform.submit();
  940. }
  941. function action(sTarget, sAction, sNewClass)
  942. {
  943. if (sAction != null &amp;&amp; sAction != "" )
  944. document.pform.ifrmcmd.value = sAction;
  945. if ( sNewClass != null &amp;&amp; sNewClass != "" )
  946. document.pform.m_new_class.value = sNewClass;
  947. submitAction(sTarget);
  948. }
  949. function submitAction(sTemplate)
  950. {
  951. document.pform.ps_nav_op.value = "push";
  952. document.pform.m.value = "<xsl:value-of select="$app"/>/" + sTemplate;
  953. document.pform.submit();
  954. }
  955. function init()
  956. {
  957. // We modify these before launcing certain actions so we must make sure they are empty on load
  958. document.pform.ifrmcmd.value = "";
  959. document.pform.m_smt_imm.value = "";
  960. if (document.pform.m_deploymentWizardPage)
  961. document.pform.m_deploymentWizardPage.value = "";
  962. if (document.pform.m_new_class)
  963. document.pform.m_new_class.value = "";
  964. }
  965. <xsl:if test="$obj-class='shortcut'">
  966. function targObj()
  967. {
  968. document.pform.sc_target_obj.value = "<xsl:value-of select="xtsext:javascriptencode(string($target-search-path))"/>";
  969. document.pform.sc_target_name.value = "<xsl:value-of select="xtsext:javascriptencode(string($target-name))"/>";
  970. document.pform.sc_target_class.value = "<xsl:value-of select="xtsext:javascriptencode(string($target-obj-class))"/>";
  971. }
  972. </xsl:if>
  973. function closeActions()
  974. {
  975. <!--
  976. // Return to source.
  977. // Append an extra flag sf (suppress focus) to prevent the portal window from poping in fornt of the RS window.
  978. // This happens when the portal is in search view b/c we give the search field focus on page load.
  979. -->
  980. var sReturnURL = "<xsl:value-of select="xtsext:javascriptencode(string($back-url))"/>";
  981. document.location.href = (sReturnURL.indexOf('javascript:') == 0 || sReturnURL.indexOf('?') == -1) ? sReturnURL : (sReturnURL + "&amp;sf=");
  982. }
  983. </script>
  984. <script language="javascript" src="{$webcontent}/{$app}/js/utilities.js"></script>
  985. <pf:help context=""/> <!-- Help system -->
  986. <pf:launch/> <!-- adds functions to launch Studios.... -->
  987. </dp:script>
  988. <utml:form name="pform" method="post" action="{$gateway}">
  989. <div id="maincontent" role="main" tabindex="-1" style="position:absolute; margin-left: -9999px; margin-top:-9999px" >
  990. <xsl:attribute name="aria-label"><xts:string id="IDS_SECTION508_CONTENT" encode="html" /></xsl:attribute>
  991. </div>
  992. <xsl:if test="$obj-class = 'importDeployment' or $obj-class = 'exportDeployment'">
  993. <utml:input name="m_deploymentWizardPage" type="hidden"/>
  994. </xsl:if>
  995. <xsl:if test="$obj-class = 'agentDefinition' and ($obj-ref/cm:allowNotification = 'true' or $obj-ref/cm:target/*/cm:allowNotification = 'true')">
  996. <utml:input name="m_agent_allowNotification" type="hidden" value="true"/>
  997. </xsl:if>
  998. <!-- target class type when creating new objects... -->
  999. <utml:input name="m_new_class" type="hidden" value=""/>
  1000. <utml:input name="ifrmcmd" type="hidden" value="" utml:update="false"/>
  1001. <xsl:if test="key('env-param','m_path')=''">
  1002. <input name="m_path" type="hidden">
  1003. <xsl:attribute name="value"><xsl:value-of select="string($obj-path)"/></xsl:attribute>
  1004. </input>
  1005. </xsl:if>
  1006. <utml:input name="m_smt_imm" type="hidden" value=""/> <!-- the variable for stop/stop now actions -->
  1007. <xsl:if test="$obj-class='shortcut' and not($isDangling)">
  1008. <utml:input name="sc_target_obj" type="hidden" value=""/> <!-- the variable contains the target object -->
  1009. <utml:input name="sc_target_name" type="hidden" value=""/> <!-- the variable contains the target object -->
  1010. <utml:input name="sc_target_class" type="hidden" value=""/> <!-- the variable contains the target object -->
  1011. </xsl:if>
  1012. <input name="m_obj_search_path" type="hidden">
  1013. <xsl:attribute name="value"><xsl:value-of select="$obj-ref/cm:searchPath"/></xsl:attribute>
  1014. </input>
  1015. <xsl:if test="$tClass='pagelet' and $canExecute and key('session-param', 'write') = 'true'">
  1016. <utml:input name="sharedPagesChanged" type="hidden" value=""/>
  1017. <utml:input name="m_selectedPage" type="hidden" value=""/>
  1018. </xsl:if>
  1019. <!-- dialog header -->
  1020. <dp:header>
  1021. <!-- header titles-->
  1022. <dp:title showName="false"><xsl:copy-of select="$browserTitle"/></dp:title>
  1023. </dp:header>
  1024. <!-- body contents - list of actions for an object -->
  1025. <lyt:layout style="1" title="IDS_ACT_AVAILABLE">
  1026. <!--
  1027. ##################################################################################
  1028. S E C T I O N 1 - Properties
  1029. ##################################################################################
  1030. -->
  1031. <lyt:section>
  1032. <!--
  1033. ============================================================================
  1034. Action: Properties
  1035. Requires: read or write or execute access.
  1036. ============================================================================
  1037. -->
  1038. <xsl:variable name="targetMorphlet">
  1039. <xsl:choose>
  1040. <xsl:when test="$obj-class='modelView'">properties_privileges.xts</xsl:when>
  1041. <xsl:otherwise>properties_general.xts</xsl:otherwise>
  1042. </xsl:choose>
  1043. </xsl:variable>
  1044. <xsl:call-template name="render-action">
  1045. <xsl:with-param name="icon-name" select="'action_properties.gif'"/>
  1046. <xsl:with-param name="icon-alt"><xts:string id="IDS_ACT_PROPERTIES_ALT"/></xsl:with-param>
  1047. <xsl:with-param name="link-anchor"><a href="javascript:action('{$targetMorphlet}')"><xts:string id="IDS_PROPERTIES"/></a></xsl:with-param>
  1048. </xsl:call-template>
  1049. <!--
  1050. ============================================================================
  1051. Action: Set as active by default
  1052. Requires: setDefaultActive, admin capability, write access and not already the default active.
  1053. ============================================================================
  1054. -->
  1055. <xsl:if test="$isAdminUser and $canWrite and contains($ui-target-obj-act,'set_default_active')and /root/cm:queryResponse/*/cm:startAsActive!='true'">
  1056. <xsl:call-template name="render-action">
  1057. <xsl:with-param name="icon-name" select="'action_set_default_service.gif'"/>
  1058. <xsl:with-param name="icon-alt"><xts:string id="IDS_ACT_SET_DEFAULT_ACTIVE_ALT"/></xsl:with-param>
  1059. <xsl:with-param name="link-anchor">
  1060. <utml:a utml:op="stack-up" utml:formName="pform">
  1061. <utml:href>
  1062. <xsl:text/>javascript:document.pform.ifrmcmd.value='set_default_active';<xsl:text/>
  1063. </utml:href>
  1064. <utml:target>
  1065. <xsl:value-of select="$app"/>/dialog_action_result.xts<xsl:text/>
  1066. </utml:target>
  1067. <xts:string id="IDS_ACT_SET_DEFAULT_ACTIVE"/>
  1068. </utml:a>
  1069. </xsl:with-param>
  1070. </xsl:call-template>
  1071. </xsl:if>
  1072. <!--
  1073. ============================================================================
  1074. Action: portlet customization lock/unlock
  1075. ============================================================================
  1076. -->
  1077. <xsl:if test="$canWrite and $canRead and contains($ui-target-obj-act,'portletControl')">
  1078. <xsl:variable name="iconName">
  1079. <xsl:choose>
  1080. <xsl:when test="/root/cm:queryResponse/*/*[local-name()='canCustomize']='false'"><xsl:value-of select="'locked.gif'"/></xsl:when>
  1081. <xsl:otherwise><xsl:value-of select="'unlocked.gif'"/></xsl:otherwise>
  1082. </xsl:choose>
  1083. </xsl:variable>
  1084. <xsl:variable name="propertyValue">
  1085. <xsl:choose>
  1086. <xsl:when test="/root/cm:queryResponse/*/*[local-name()='canCustomize']='false'"><xsl:value-of select="'true'"/></xsl:when>
  1087. <xsl:otherwise><xsl:value-of select="'false'"/></xsl:otherwise>
  1088. </xsl:choose>
  1089. </xsl:variable>
  1090. <xsl:variable name="actionTitle">
  1091. <xsl:choose>
  1092. <xsl:when test="/root/cm:queryResponse/*/*[local-name()='canCustomize']='false'"><xts:string id="IDS_ACT_PORTLET_CONTROL_CUSTOMIZATION_UNLOCK"/></xsl:when>
  1093. <xsl:otherwise><xts:string id="IDS_ACT_PORTLET_CONTROL_CUSTOMIZATION_LOCK"/></xsl:otherwise>
  1094. </xsl:choose>
  1095. </xsl:variable>
  1096. <xsl:call-template name="render-action">
  1097. <xsl:with-param name="icon-name" select="$iconName"/>
  1098. <xsl:with-param name="icon-alt"><xsl:value-of select="$actionTitle"/></xsl:with-param>
  1099. <xsl:with-param name="link-anchor">
  1100. <utml:a utml:op="submit" utml:formName="pform">
  1101. <utml:href>
  1102. <xsl:text/>javascript:document.pform.ifrmcmd.value='save';<xsl:text/>
  1103. <xsl:text/>document.pform.ps_nav_op.value = 'submit';<xsl:text/>
  1104. <xsl:text/>document.pform.m_p_canCustomize.value = '<xsl:value-of select="$propertyValue"/>';<xsl:text/>
  1105. <xsl:text/>document.pform.m.value = 'portal/submit.xts';<xsl:text/>
  1106. </utml:href>
  1107. <xsl:value-of select="$actionTitle"/>
  1108. </utml:a>
  1109. </xsl:with-param>
  1110. </xsl:call-template>
  1111. </xsl:if>
  1112. </lyt:section>
  1113. <!--
  1114. ##################################################################################
  1115. S E C T I O N 2 - Object-specific Actions
  1116. ##################################################################################
  1117. -->
  1118. <lyt:section title="IDS_ACT_AVAILABLE_OBJ_SPEC">
  1119. <!-- Store objects actions in a variable -->
  1120. <xsl:variable name="actions">
  1121. <!--
  1122. ============================================================================
  1123. Action: View contents
  1124. Requires: 'read' access.
  1125. ============================================================================
  1126. -->
  1127. <xsl:if test="$canTraverse">
  1128. <!-- Abstract the value of previous backURL from current backURL.
  1129. It is used when nevigate back to config tab UI. -->
  1130. <xsl:variable name="pre-back-url">
  1131. <xsl:choose>
  1132. <xsl:when test="contains($back-url, '&amp;backURL=')">
  1133. <xsl:choose>
  1134. <xsl:when test="contains(substring-after($back-url, '&amp;backURL='), '&amp;')">
  1135. <xsl:value-of select="substring-before(substring-after($back-url, '&amp;backURL='), '&amp;')"/>
  1136. </xsl:when>
  1137. <xsl:otherwise>
  1138. <xsl:value-of select="substring-after($back-url, '&amp;backURL=')"/>
  1139. </xsl:otherwise>
  1140. </xsl:choose>
  1141. </xsl:when>
  1142. <xsl:otherwise>
  1143. <xsl:value-of select="''"/>
  1144. </xsl:otherwise>
  1145. </xsl:choose>
  1146. </xsl:variable>
  1147. <xsl:variable name="pre-tool-tab">
  1148. <xsl:choose>
  1149. <xsl:when test="contains($back-url, '&amp;tool_tab=')">
  1150. <xsl:choose>
  1151. <xsl:when test="contains(substring-after($back-url,'&amp;tool_tab='), '&amp;')">
  1152. <xsl:value-of select="substring-before(substring-after($back-url, '&amp;tool_tab='), '&amp;')"/>
  1153. </xsl:when>
  1154. <xsl:otherwise>
  1155. <xsl:value-of select="substring-after($back-url, '&amp;tool_tab=')"/>
  1156. </xsl:otherwise>
  1157. </xsl:choose>
  1158. </xsl:when>
  1159. <xsl:otherwise>
  1160. <xsl:value-of select="''"/>
  1161. </xsl:otherwise>
  1162. </xsl:choose>
  1163. </xsl:variable>
  1164. <!-- Content folders -->
  1165. <xsl:choose>
  1166. <!-- Disabled for Titan
  1167. <xsl:when test="$tClass='folder'">
  1168. <xsl:call-template name="render-action">
  1169. <xsl:with-param name="icon-alt">
  1170. <xts:string id="IDS_ACT_VIEW_FOLDER"/>
  1171. </xsl:with-param>
  1172. <xsl:with-param name="link-anchor">
  1173. <a>
  1174. <xsl:attribute name="href"><xsl:value-of select="$gateway"/>?b_action=xts.run&amp;m=<xsl:value-of select="$app"/>/cc.xts&amp;m_folder=<xsl:value-of select="$target-store-id"/></xsl:attribute>
  1175. <xts:string id="IDS_ACT_VIEW_FOLDER_CONTENT"/>
  1176. </a>
  1177. </xsl:with-param>
  1178. </xsl:call-template>
  1179. </xsl:when>
  1180. -->
  1181. <!-- Configuration folders folders -->
  1182. <xsl:when test="$tClass='configurationFolder'">
  1183. <xsl:call-template name="render-action">
  1184. <xsl:with-param name="icon-alt">
  1185. <xts:string id="IDS_ACT_VIEW_FOLDER"/>
  1186. </xsl:with-param>
  1187. <xsl:with-param name="link-anchor">
  1188. <a>
  1189. <xsl:attribute name="href"><xsl:value-of select="$gateway"/>?b_action=xts.run&amp;m=<xsl:value-of select="$app"/>/legacy_tools/tools_service_config.xts&amp;m_path=<xsl:value-of select="$url-encoded-path"/>&amp;backURL=<xsl:value-of select="$pre-back-url"/></xsl:attribute>
  1190. <xts:string id="IDS_ACT_VIEW_FOLDER_CONTENT"/>
  1191. </a>
  1192. </xsl:with-param>
  1193. </xsl:call-template>
  1194. </xsl:when>
  1195. <!-- Namespace folders -->
  1196. <xsl:when test="$tClass='namespaceFolder'">
  1197. <xsl:call-template name="render-action">
  1198. <xsl:with-param name="icon-alt">
  1199. <xts:string id="IDS_ACT_VIEW_FOLDER"/>
  1200. </xsl:with-param>
  1201. <xsl:with-param name="link-anchor">
  1202. <a>
  1203. <xsl:attribute name="href"><xsl:value-of select="$gateway"/>?b_action=xts.run&amp;m=<xsl:value-of select="$app"/>/legacy_tools/tools_directory.xts&amp;m_path=<xsl:value-of select="$url-encoded-path"/>&amp;backURL=<xsl:value-of select="$pre-back-url"/>&amp;tool_tab=<xsl:value-of select="$pre-tool-tab"/></xsl:attribute>
  1204. <xts:string id="IDS_ACT_VIEW_FOLDER_CONTENT"/>
  1205. </a>
  1206. </xsl:with-param>
  1207. </xsl:call-template>
  1208. </xsl:when>
  1209. <!-- Deployment folders -->
  1210. <xsl:when test="$tClass='adminFolder'">
  1211. <xsl:call-template name="render-action">
  1212. <xsl:with-param name="icon-alt">
  1213. <xts:string id="IDS_ACT_VIEW_FOLDER"/>
  1214. </xsl:with-param>
  1215. <xsl:with-param name="link-anchor">
  1216. <a>
  1217. <xsl:attribute name="href"><xsl:value-of select="$gateway"/>?b_action=xts.run&amp;m=<xsl:value-of select="$app"/>/legacy_tools/tools_cs_administration.xts&amp;m_path=<xsl:value-of select="$url-encoded-path"/>&amp;backURL=<xsl:value-of select="$pre-back-url"/></xsl:attribute>
  1218. <xts:string id="IDS_ACT_VIEW_FOLDER_CONTENT"/>
  1219. </a>
  1220. </xsl:with-param>
  1221. </xsl:call-template>
  1222. </xsl:when>
  1223. <xsl:when test="$tClass='subscriptionFolder'">
  1224. <xsl:call-template name="render-action">
  1225. <xsl:with-param name="icon-alt">
  1226. <xts:string id="IDS_ACT_VIEW_FOLDER"/>
  1227. </xsl:with-param>
  1228. <xsl:with-param name="link-anchor">
  1229. <a>
  1230. <xsl:attribute name="href"><xsl:value-of select="$gateway"/>?b_action=xts.run&amp;m=<xsl:value-of select="$app"/>/subscriptions/subscriptions.xts&amp;m_subfldr=<xsl:value-of select="$target-store-id"/></xsl:attribute>
  1231. <xts:string id="IDS_ACT_VIEW_FOLDER_CONTENT"/>
  1232. </a>
  1233. </xsl:with-param>
  1234. </xsl:call-template>
  1235. </xsl:when>
  1236. <!-- Packages -->
  1237. <xsl:when test="$tClass='package'">
  1238. <xsl:choose>
  1239. <xsl:when test="($userInterfaces = 'metricStudio' or $userInterfaces = '') and string(key('env-param','from_tool'))!='true'">
  1240. <!-- view content -->
  1241. <!-- Disabled for Titan
  1242. <xsl:if test="$canTraverse and ($ui-obj-act/userInterface[@name='metricStudio']/action[@name = 'traverse'] or $ui-tobj-act/userInterface[@name='metricStudio']/action[@name = 'traverse'])">
  1243. <xsl:call-template name="render-action">
  1244. <xsl:with-param name="icon-alt">
  1245. <xts:string id="IDS_ACT_VIEW_METRICSPACKAGE_CONTENT"/>
  1246. </xsl:with-param>
  1247. <xsl:with-param name="link-anchor">
  1248. <a>
  1249. <xsl:attribute name="href"><xsl:value-of select="$gateway"/>?b_action=xts.run&amp;m=<xsl:value-of select="$app"/>/cc.xts&amp;m_folder=<xsl:value-of select="$target-store-id"/></xsl:attribute>
  1250. <xts:string id="IDS_ACT_VIEW_METRICSPACKAGE_CONTENT"/>
  1251. </a>
  1252. </xsl:with-param>
  1253. <xsl:with-param name="icon-name" select="'action_view_metrics_package.gif'"/>
  1254. </xsl:call-template>
  1255. </xsl:if>
  1256. -->
  1257. <!-- open with Metric Studio -->
  1258. <xsl:if test="contains($effectiveUserCapabilities, ' userCanUseMetricsManager ') and $canExecute and $canRead and ($ui-obj-act/userInterface[@name='metricStudio']/action[@name = 'launchcmm'] or $ui-tobj-act/userInterface[@name='metricStudio']/action[@name = 'launchcmm'])">
  1259. <xsl:variable name="folder-location">
  1260. <xsl:value-of select="key('env-param','m_location')"/>
  1261. </xsl:variable>
  1262. <xsl:call-template name="render-action">
  1263. <xsl:with-param name="icon-alt">
  1264. <xts:string id="IDS_ACT_OPEN_METRICS_MANAGER"/>
  1265. </xsl:with-param>
  1266. <xsl:with-param name="link-anchor">
  1267. <a href="#">
  1268. <xsl:attribute name="onclick">cognosLaunch('ui.gateway', '<xsl:value-of select="xtsext:javascriptencode($gateway)"/>', 'ui.tool', 'MetricStudio', 'ui.backURL', '<xsl:value-of select="xtsext:javascriptencode($back-url)"/>', 'ui.object', '<xsl:value-of select="xtsext:javascriptencode(string($target-search-path))"/>', 'ui.folder', '<xsl:value-of select="xtsext:javascriptencode(string($folder-location))"/>', 'ui.action', 'edit');</xsl:attribute>
  1269. <xts:string id="IDS_ACT_OPEN_METRICS_MANAGER"/>
  1270. </a>
  1271. </xsl:with-param>
  1272. <xsl:with-param name="icon-name" select="'action_edit_with_cmm.gif'"/>
  1273. </xsl:call-template>
  1274. </xsl:if>
  1275. </xsl:when>
  1276. <xsl:when test="($userInterfaces = 'planningContributor') and string(key('env-param','from_tool'))!='true'">
  1277. <!-- view planning package content -->
  1278. <!-- Disabled for titan
  1279. <xsl:if test="$canTraverse and ($ui-obj-act/userInterface[@name='planningContributor']/action[@name = 'traverse'] or $ui-tobj-act/userInterface[@name='planningContributor']/action[@name = 'traverse'])">
  1280. <xsl:call-template name="render-action">
  1281. <xsl:with-param name="icon-alt">
  1282. <xts:string id="IDS_ACT_VIEW_PLANNINGPACKAGE_CONTENT"/>
  1283. </xsl:with-param>
  1284. <xsl:with-param name="link-anchor">
  1285. <a>
  1286. <xsl:attribute name="href"><xsl:value-of select="$gateway"/>?b_action=xts.run&amp;m=<xsl:value-of select="$app"/>/cc.xts&amp;m_folder=<xsl:value-of select="$target-store-id"/></xsl:attribute>
  1287. <xts:string id="IDS_ACT_VIEW_PLANNINGPACKAGE_CONTENT"/>
  1288. </a>
  1289. </xsl:with-param>
  1290. <xsl:with-param name="icon-name" select="'action_view_planning_package.gif'"/>
  1291. </xsl:call-template>
  1292. </xsl:if>
  1293. -->
  1294. <!-- open with Contributor -->
  1295. <xsl:if test="contains($effectiveUserCapabilities, ' userCanUsePlanningContributor ') and $canExecute and ($ui-obj-act/userInterface[@name='planningContributor']/action[@name = 'launchContributor'] or $ui-tobj-act/userInterface[@name='planningContributor']/action[@name = 'launchContributor'])">
  1296. <xsl:variable name="folder-location">
  1297. <xsl:value-of select="key('env-param','m_location')"/>
  1298. </xsl:variable>
  1299. <xsl:call-template name="render-action">
  1300. <xsl:with-param name="icon-alt">
  1301. <xts:string id="IDS_ACT_OPEN_CONTRIBUTOR"/>
  1302. </xsl:with-param>
  1303. <xsl:with-param name="link-anchor">
  1304. <a href="#">
  1305. <xsl:attribute name="onclick">cognosLaunch('ui.gateway', '<xsl:value-of select="xtsext:javascriptencode($gateway)"/>', 'ui.tool', 'Contributor', 'ui.backURL', '<xsl:value-of select="xtsext:javascriptencode($back-url)"/>', 'ui.object', '<xsl:value-of select="xtsext:javascriptencode(string($target-search-path))"/>', 'ui.folder', '<xsl:value-of select="xtsext:javascriptencode(string($folder-location))"/>', 'ui.appname', '', 'ui.action', 'new');</xsl:attribute>
  1306. <xts:string id="IDS_ACT_OPEN_CONTRIBUTOR"/>
  1307. </a>
  1308. </xsl:with-param>
  1309. <xsl:with-param name="icon-name" select="'action_edit_with_contributor.gif'"/>
  1310. </xsl:call-template>
  1311. </xsl:if>
  1312. </xsl:when>
  1313. <xsl:when test="($userInterfaces = 'adaptiveAnalytics') and string(key('env-param','from_tool'))!='true'">
  1314. <!-- view planning package content -->
  1315. <xsl:if test="$canTraverse and ($ui-obj-act/userInterface[@name='adaptiveAnalytics']/action[@name = 'traverse'] or $ui-tobj-act/userInterface[@name='adaptiveAnalytics']/action[@name = 'traverse'])">
  1316. <xsl:call-template name="render-action">
  1317. <xsl:with-param name="icon-alt">
  1318. <xts:string id="IDS_ACT_VIEW_ANALYTICS"/>
  1319. </xsl:with-param>
  1320. <xsl:with-param name="link-anchor">
  1321. <a>
  1322. <xsl:attribute name="href"><xsl:value-of select="$gateway"/>?b_action=xts.run&amp;m=<xsl:value-of select="$app"/>/cc.xts&amp;m_folder=<xsl:value-of select="$target-store-id"/></xsl:attribute>
  1323. <xts:string id="IDS_ACT_VIEW_ANALYTICS"/>
  1324. </a>
  1325. </xsl:with-param>
  1326. <xsl:with-param name="icon-name" select="'action_view_analytic_package.gif'"/>
  1327. </xsl:call-template>
  1328. </xsl:if>
  1329. <!-- open with analytic TOC -->
  1330. <xsl:if test="contains($effectiveUserCapabilities, ' userCanUseAdaptiveAnalytics ') and $canExecute and ($ui-obj-act/userInterface[@name='adaptiveAnalytics']/action[@name = 'launchAnalyticsTOC'] or $ui-tobj-act/userInterface[@name='adaptiveAnalytics']/action[@name = 'launchAnalyticsTOC'])">
  1331. <xsl:variable name="folder-location">
  1332. <xsl:value-of select="key('env-param','m_location')"/>
  1333. </xsl:variable>
  1334. <xsl:call-template name="render-action">
  1335. <xsl:with-param name="icon-alt">
  1336. <xts:string id="IDS_ACT_OPEN_ANALYTICS"/>
  1337. </xsl:with-param>
  1338. <xsl:with-param name="link-anchor">
  1339. <a href="#">
  1340. <xsl:attribute name="onclick">cognosLaunchInWindow('_blank', 'menubar=no,toolbar=no,status=yes,location=no,resizable=yes,width=650,height=480','ui.gateway', '<xsl:value-of select="xtsext:javascriptencode($gateway)"/>', 'ui.tool', 'AnalyticsTOC', 'ui.backURL', '<xsl:value-of select="xtsext:javascriptencode($back-url)"/>', 'ui.object', '<xsl:value-of select="xtsext:javascriptencode(string($target-search-path))"/>', 'ui.folder', '<xsl:value-of select="xtsext:javascriptencode(string($folder-location))"/>', 'ui.appname', '');</xsl:attribute>
  1341. <xts:string id="IDS_ACT_OPEN_ANALYTICS"/>
  1342. </a>
  1343. </xsl:with-param>
  1344. <xsl:with-param name="icon-name" select="'action_analytic.gif'"/>
  1345. </xsl:call-template>
  1346. </xsl:if>
  1347. </xsl:when>
  1348. <xsl:otherwise>
  1349. <xsl:if test="string(key('env-param','from_tool'))='true'">
  1350. <xsl:call-template name="render-action">
  1351. <xsl:with-param name="icon-name">
  1352. <xsl:value-of select="'icon_drill_through.gif'"/>
  1353. </xsl:with-param>
  1354. <xsl:with-param name="icon-alt">
  1355. <xts:string id="IDS_ACT_VIEW_PACKAGE"/>
  1356. </xsl:with-param>
  1357. <xsl:with-param name="link-anchor">
  1358. <a>
  1359. <xsl:attribute name="href"><xsl:value-of select="$gateway"/>?b_action=xts.run&amp;m=<xsl:value-of select="$app"/>/cc_drillthrough.xts&amp;m_path=<xsl:value-of select="$url-encoded-path"/>&amp;backURL=<xsl:value-of select="$pre-back-url"/></xsl:attribute>
  1360. <xts:string id="IDS_ACT_VIEW_PACKAGE_DRILL_THRU"/>
  1361. </a>
  1362. </xsl:with-param>
  1363. </xsl:call-template>
  1364. </xsl:if>
  1365. </xsl:otherwise>
  1366. </xsl:choose>
  1367. <xsl:if test="$tClass = 'package' and string(key('env-param','from_tool')) != 'true'">
  1368. <xsl:choose>
  1369. <xsl:when test="/root/packageConfiguration/*/*/cm:searchPath">
  1370. <xsl:if test="$currentCanWrite and $canTraverse and $isAdminUser">
  1371. <xsl:call-template name="render-action">
  1372. <xsl:with-param name="icon-name" select="'action_edit_package_configuration.gif'"/>
  1373. <xsl:with-param name="icon-alt"><xts:string id="IDS_ACT_MODIFY_PACKAGECONFIGURATION"/></xsl:with-param>
  1374. <xsl:with-param name="link-anchor">
  1375. <a href="javascript:doModifyPackageConfiguration()"><xts:string id="IDS_ACT_MODIFY_PACKAGECONFIGURATION"/></a>
  1376. </xsl:with-param>
  1377. </xsl:call-template>
  1378. <xsl:call-template name="render-action">
  1379. <xsl:with-param name="icon-name" select="'action_remove_package_configuration.gif'"/>
  1380. <xsl:with-param name="icon-alt"><xts:string id="IDS_ACT_DELETE_PACKAGECONFIGURATION"/></xsl:with-param>
  1381. <xsl:with-param name="link-anchor">
  1382. <a href="javascript:doRemovePackageConfiguration()"><xts:string id="IDS_ACT_DELETE_PACKAGECONFIGURATION"/></a>
  1383. </xsl:with-param>
  1384. </xsl:call-template>
  1385. </xsl:if>
  1386. </xsl:when>
  1387. <xsl:otherwise>
  1388. <xsl:if test="$isAdminUser">
  1389. <xsl:call-template name="render-action">
  1390. <xsl:with-param name="icon-name" select="'action_new_package_configuration.gif'"/>
  1391. <xsl:with-param name="icon-alt"><xts:string id="IDS_ACT_NEW_PACKAGECONFIGURATION"/></xsl:with-param>
  1392. <xsl:with-param name="link-anchor">
  1393. <a href="javascript:action('new_packageconfiguration.xts','','packageConfiguration')"><xts:string id="IDS_ACT_NEW_PACKAGECONFIGURATION"/></a>
  1394. </xsl:with-param>
  1395. </xsl:call-template>
  1396. </xsl:if>
  1397. </xsl:otherwise>
  1398. </xsl:choose>
  1399. </xsl:if>
  1400. </xsl:when>
  1401. <!-- Dispatchers -->
  1402. <xsl:when test="$tClass='dispatcher'">
  1403. <xsl:call-template name="render-action">
  1404. <xsl:with-param name="icon-alt">
  1405. <xts:string id="IDS_VIEW_SERVICES_TIP"/>
  1406. </xsl:with-param>
  1407. <xsl:with-param name="link-anchor">
  1408. <a>
  1409. <xsl:attribute name="href"><xsl:value-of select="$gateway"/>?b_action=xts.run&amp;m=<xsl:value-of select="$app"/>/legacy_tools/tools_service_config.xts&amp;m_path=<xsl:value-of select="$url-encoded-path"/>&amp;backURL=<xsl:value-of select="$pre-back-url"/></xsl:attribute>
  1410. <xts:string id="IDS_VIEW_SERVICES"/><xsl:text/>
  1411. </a>
  1412. </xsl:with-param>
  1413. </xsl:call-template>
  1414. </xsl:when>
  1415. <!-- Namespace -->
  1416. <xsl:when test="$tClass='namespace'">
  1417. <xsl:call-template name="render-action">
  1418. <xsl:with-param name="icon-alt">
  1419. <xts:string id="IDS_ACT_VIEW_NAMESPACE"/>
  1420. </xsl:with-param>
  1421. <xsl:with-param name="link-anchor">
  1422. <a>
  1423. <xsl:attribute name="href"><xsl:value-of select="$gateway"/>?b_action=xts.run&amp;m=<xsl:value-of select="$app"/>/legacy_tools/tools_directory.xts&amp;m_path=<xsl:value-of select="$url-encoded-path"/>&amp;backURL=<xsl:value-of select="$pre-back-url"/>&amp;tool_tab=<xsl:value-of select="$pre-tool-tab"/></xsl:attribute>
  1424. <xts:string id="IDS_ACT_VIEW_NAMESPACE_CONTENT"/>
  1425. </a>
  1426. </xsl:with-param>
  1427. </xsl:call-template>
  1428. </xsl:when>
  1429. <!-- Datasources -->
  1430. <xsl:when test="$tClass='dataSource'">
  1431. <xsl:variable name="dataConnectionString">
  1432. <xsl:value-of select="/root/*[local-name()='theDataSourceConnection']/*[local-name()='queryResponse']/*[local-name()='queryReply']/*[local-name()='dataSourceConnection']/*[local-name()='connectionString']"/>
  1433. </xsl:variable>
  1434. <xsl:variable name="connectionString" select="contains($dataConnectionString, ';LOCAL;OL;DBInfo_Type=MS;') or contains($dataConnectionString, ';LOCAL;D2;') or contains($dataConnectionString, ';LOCAL;OR;')"/>
  1435. <xsl:variable name="canCreateMetricPackage" select="$userCanUseMetricsManagerAdministration = 'true' and $connectionString"/>
  1436. <xsl:variable name="storeId">
  1437. <xsl:value-of select="/root/*[local-name()='queryResponse']/*[local-name()='dataSource']/*[local-name()='storeID']"/>
  1438. </xsl:variable>
  1439. <xsl:variable name="isLWM" select="/root/theFMDataSource/*[local-name()='response']/*[local-name() = 'outputparams']/*[local-name() = 'param']/."/>
  1440. <xsl:variable name="canCreateLWMPackage" select="$isLWM='1' and $userCanUseSelfServicePackageWizard"/>
  1441. <xsl:call-template name="render-action">
  1442. <xsl:with-param name="icon-name" select="'action_view_data_source_connection.gif'"/>
  1443. <xsl:with-param name="icon-alt">
  1444. <xts:string id="IDS_ACT_VIEW_CONNECTIONS_TIP"/>
  1445. </xsl:with-param>
  1446. <xsl:with-param name="link-anchor">
  1447. <a>
  1448. <xsl:attribute name="href"><xsl:value-of select="$gateway"/>?b_action=xts.run&amp;m=<xsl:value-of select="$app"/>/legacy_tools/tools_directory.xts&amp;m_path=<xsl:value-of select="$url-encoded-path"/>&amp;backURL=<xsl:value-of select="$pre-back-url"/>&amp;tool_tab=<xsl:value-of select="$pre-tool-tab"/></xsl:attribute>
  1449. <xts:string id="IDS_ACT_VIEW_CONNECTIONS"/>
  1450. </a>
  1451. </xsl:with-param>
  1452. </xsl:call-template>
  1453. <xsl:if test="$canCreateLWMPackage">
  1454. <xsl:call-template name="render-action">
  1455. <xsl:with-param name="icon-name" select="'action_new_package.gif'"/>
  1456. <xsl:with-param name="icon-alt">
  1457. <xts:string id="IDS_ACT_CREATE_PACKAGE_TIP"/>
  1458. </xsl:with-param>
  1459. <xsl:with-param name="link-anchor">
  1460. <a>
  1461. <xsl:attribute name="href"><xsl:value-of select="$gateway"/>?b_action=xts.run&amp;m=<xsl:value-of select="$app"/>/new_package.xts&amp;m_dataSourceName=<xsl:value-of select="xtsext:protect(xtsext:urlencode(string(key('env-param', 'm_name'))),'url','url','getdata')"/>&amp;m_path=<xsl:value-of select="$url-encoded-path"/>&amp;backURL=<xsl:value-of select="xtsext:protect(xtsext:urlencode($back-url),'url','url','getdata')"/></xsl:attribute>
  1462. <xts:string id="IDS_ACT_CREATE_PACKAGE"/>
  1463. </a>
  1464. </xsl:with-param>
  1465. </xsl:call-template>
  1466. </xsl:if>
  1467. <xsl:if test="$canCreateMetricPackage">
  1468. <xsl:call-template name="render-action">
  1469. <xsl:with-param name="icon-name" select="'action_new_metrics_package.gif'"/>
  1470. <xsl:with-param name="icon-alt">
  1471. <xts:string id="IDS_ACT_CREATE_METRIC_PACKAGE_TIP"/>
  1472. </xsl:with-param>
  1473. <xsl:with-param name="link-anchor">
  1474. <a>
  1475. <xsl:attribute name="href"><xsl:value-of select="$gateway"/>?b_action=mms.run&amp;pid=new_mpwizard_start&amp;ui.backURL=<xsl:value-of select="xtsext:protect(xtsext:urlencode($back-url),'url','url','getdata')"/>&amp;datasourceId=<xsl:value-of select="$storeId"/></xsl:attribute>
  1476. <xts:string id="IDS_ACT_CREATE_METRIC_PACKAGE"/>
  1477. </a>
  1478. </xsl:with-param>
  1479. </xsl:call-template>
  1480. </xsl:if>
  1481. </xsl:when>
  1482. <!-- DataSource Connections-->
  1483. <xsl:when test="$tClass='dataSourceConnection'">
  1484. <xsl:call-template name="render-action">
  1485. <xsl:with-param name="icon-name" select="'action_view_signon.gif'"/>
  1486. <xsl:with-param name="icon-alt">
  1487. <xts:string id="IDS_ACT_VIEW_SIGNONS_TIP"/>
  1488. </xsl:with-param>
  1489. <xsl:with-param name="link-anchor">
  1490. <a>
  1491. <xsl:attribute name="href"><xsl:value-of select="$gateway"/>?b_action=xts.run&amp;m=<xsl:value-of select="$app"/>/legacy_tools/tools_directory.xts&amp;m_path=<xsl:value-of select="$url-encoded-path"/>&amp;backURL=<xsl:value-of select="$pre-back-url"/>&amp;tool_tab=<xsl:value-of select="$pre-tool-tab"/></xsl:attribute>
  1492. <xts:string id="IDS_ACT_VIEW_SIGNONS"/>
  1493. </a>
  1494. </xsl:with-param>
  1495. </xsl:call-template>
  1496. </xsl:when>
  1497. <!-- portlets -->
  1498. <xsl:when test="$tClass='portletProducer'">
  1499. <xsl:call-template name="render-action">
  1500. <xsl:with-param name="icon-name" select="'action_view_portlets.gif'"/>
  1501. <xsl:with-param name="icon-alt">
  1502. <xts:string id="IDS_ACT_VIEW_PORTLETS_TIP"/>
  1503. </xsl:with-param>
  1504. <xsl:with-param name="link-anchor">
  1505. <a>
  1506. <xsl:attribute name="href"><xsl:value-of select="$gateway"/>?b_action=xts.run&amp;m=<xsl:value-of select="$app"/>/legacy_tools/tools_portaladmin.xts&amp;m_path=<xsl:value-of select="$url-encoded-path"/>&amp;backURL=<xsl:value-of select="$pre-back-url"/></xsl:attribute>
  1507. <xts:string id="IDS_ACT_VIEW_PORTLETS"/>
  1508. </a>
  1509. </xsl:with-param>
  1510. </xsl:call-template>
  1511. </xsl:when>
  1512. </xsl:choose>
  1513. </xsl:if>
  1514. <!-- URL -->
  1515. <xsl:if test="$tClass='URL' and $canRead">
  1516. <xsl:if test="xtsext:cafaction('issafeurl_null', normalize-space($uri)) = 'true'">
  1517. <xsl:call-template name="render-action">
  1518. <xsl:with-param name="icon-alt"><xts:string id="IDS_ACT_OPEN_URL"/></xsl:with-param>
  1519. <xsl:with-param name="link-anchor">
  1520. <a href="{$uri}"><xts:string id="IDS_ACT_OPEN_URL"/></a>
  1521. </xsl:with-param>
  1522. </xsl:call-template>
  1523. </xsl:if>
  1524. </xsl:if>
  1525. <!-- Dashboard -->
  1526. <xsl:if test="$tClass='dashboard' and $userCanUseDashboardViewer and $canRead and $canTraverse">
  1527. <xsl:call-template name="render-action">
  1528. <xsl:with-param name="icon-name" select="'icon_dashboard.gif'"/>
  1529. <xsl:with-param name="icon-alt">
  1530. <xts:string id="IDS_ACT_OPEN_DASHBOARD_ALT"/>
  1531. </xsl:with-param>
  1532. <xsl:with-param name="link-anchor">
  1533. <a href="#">
  1534. <xsl:attribute name="onclick">
  1535. <xsl:choose>
  1536. <xsl:when test="string(/root/generalConfigSettings/configuration/property[@name='portal.launchBusinessInsightChromeless']) = 'true'">
  1537. <xsl:variable name="winProp">menubar=no,toolbar=no,status=no,location=no,resizable=yes,scrollbars=yes</xsl:variable>
  1538. <xsl:text/>javascript:cognosLaunchInWindow('_blank', '<xsl:value-of select="$winProp"/>', 'ui.gateway', sGateway, 'ui.tool', 'DashboardConsole', 'ui.action', 'edit', 'ui.id', '<xsl:value-of select="$target-store-id"/>');closeActions();<xsl:text/>
  1539. </xsl:when>
  1540. <xsl:otherwise><xsl:text/>javascript:directLaunch('ui.gateway', sGateway, 'ui.tool', 'DashboardConsole', 'ui.action', 'edit', 'ui.id', '<xsl:value-of select="xtsext:javascriptencode($target-store-id)"/>','ui.backURL',sBackURL,'ui.errURL',sBackURL, 'ui.encoding', '<xsl:value-of select="xtsext:javascriptencode(string(/root/env/param[@name='encoding']))"/>');<xsl:text/>
  1541. </xsl:otherwise>
  1542. </xsl:choose>
  1543. </xsl:attribute>
  1544. <xts:string id="IDS_ACT_OPEN_DASHBOARD"/>
  1545. </a>
  1546. </xsl:with-param>
  1547. </xsl:call-template>
  1548. </xsl:if>
  1549. <!-- Launchable (MVC, midmarket, etc...) -->
  1550. <xsl:if test="$tClass = 'launchable'">
  1551. <xsl:choose>
  1552. <!-- MVC - Content Reference -->
  1553. <xsl:when test="$launchableType ='application/vnd.ibm.cognos.instance'">
  1554. <xsl:if test="$mvc-N-enabled">
  1555. <xsl:if test="($ui-obj-act/launchableType[@name=$launchableType]/action[@name = 'traverse'] or $ui-tobj-act/launchableType[@name=$launchableType]/action[@name = 'traverse']) and $canTraverse and $canRead">
  1556. <xsl:variable name="isPFContext" select="$obj-path = '/content' or starts-with($target-search-path, '/content')"/>
  1557. <xsl:call-template name="render-action">
  1558. <xsl:with-param name="icon-name" select="'icon_cognos_content.gif'"/>
  1559. <xsl:with-param name="icon-alt"><xts:string id="IDS_ACT_MVC_VIEW_REMOTE_CONTENTS"/></xsl:with-param>
  1560. <xsl:with-param name="link-anchor">
  1561. <a>
  1562. <xsl:attribute name="href">
  1563. <xsl:value-of select="$gateway"/>?b_action=xts.run&amp;m=<xsl:value-of select="$app"/>/cc.xts&amp;m_folder=<xsl:value-of select="$target-store-id"/>
  1564. <xsl:text/>&amp;m_tab=<xsl:text/>
  1565. <xsl:choose>
  1566. <xsl:when test="$isPFContext"><xsl:value-of select="key('session-param','prootid')"/></xsl:when>
  1567. <xsl:otherwise><xsl:value-of select="key('session-param','mrootid')"/></xsl:otherwise>
  1568. </xsl:choose>
  1569. </xsl:attribute>
  1570. <xts:string id="IDS_ACT_MVC_VIEW_REMOTE_CONTENTS"/>
  1571. </a>
  1572. </xsl:with-param>
  1573. </xsl:call-template>
  1574. </xsl:if>
  1575. </xsl:if>
  1576. </xsl:when>
  1577. <!-- other launchables -->
  1578. <xsl:when test="$launchableType ='application/vnd.ibm.cognos.ev' and $canRead and $userCanUseEV">
  1579. <xsl:variable name="java-encoded-path">
  1580. <xsl:value-of select="xtsext:javascriptencode(string($target-search-path))"/>
  1581. </xsl:variable>
  1582. <xsl:call-template name="render-action">
  1583. <xsl:with-param name="icon-name" select="'action_edit_with_analyzer.gif'"/>
  1584. <xsl:with-param name="icon-alt"><xts:string id="IDS_ACT_EDIT_ADVISOR"/></xsl:with-param>
  1585. <xsl:with-param name="link-anchor">
  1586. <a href="#" onclick="cognosLaunchInWindow('_blank', 'menubar=no,toolbar=no,status=yes,location=no,resizable=yes,width=650,height=480', 'ui.gateway', '{xtsext:javascriptencode($gateway)}', 'ui.tool','EVStudio','ui.backURL',sBackURL,'ui.object','{$java-encoded-path}','ui.action','edit');closeActions();">
  1587. <xts:string id="IDS_ACT_EDIT_ADVISOR"/>
  1588. </a>
  1589. </xsl:with-param>
  1590. </xsl:call-template>
  1591. </xsl:when>
  1592. <xsl:when test="$launchableType ='application/vnd.ibm.cognos.ev.canvas' and $canRead and $userCanUseEV">
  1593. <xsl:variable name="java-encoded-path">
  1594. <xsl:value-of select="xtsext:javascriptencode(string($target-search-path))"/>
  1595. </xsl:variable>
  1596. <xsl:call-template name="render-action">
  1597. <xsl:with-param name="icon-name" select="'action_edit_with_analyzer.gif'"/>
  1598. <xsl:with-param name="icon-alt"><xts:string id="IDS_ACT_EDIT_ADVISOR"/></xsl:with-param>
  1599. <xsl:with-param name="link-anchor">
  1600. <a href="#" onclick="cognosLaunchInWindow('_blank', 'menubar=no,toolbar=no,status=yes,location=no,resizable=yes,width=650,height=480', 'ui.mode', 'canvas','ui.gateway', '{xtsext:javascriptencode($gateway)}', 'ui.tool','EVStudio','ui.backURL',sBackURL,'ui.object','{$java-encoded-path}','ui.action','edit');closeActions();">
  1601. <xts:string id="IDS_ACT_EDIT_ADVISOR"/>
  1602. </a>
  1603. </xsl:with-param>
  1604. </xsl:call-template>
  1605. </xsl:when>
  1606. <xsl:when test="$launchableType ='application/vnd.ibm.cognos.cd' and $canRead and $canExecute and $userCanUseCI">
  1607. <xsl:call-template name="render-action">
  1608. <xsl:with-param name="icon-name" select="'action_edit_with_cd.gif'"/>
  1609. <xsl:with-param name="icon-alt"><xts:string id="IDS_ACT_OPEN_CD"/></xsl:with-param>
  1610. <xsl:with-param name="link-anchor">
  1611. <a href="#" onclick="cognosLaunchInWindow('_blank', 'menubar=no,toolbar=no,status=yes,location=no,resizable=yes,width=650,height=480', 'ui.id', '{$target-store-id}', 'ui.gateway', '{xtsext:javascriptencode($gateway)}', 'ui.tool','cd','ui.backURL',sBackURL,'ui.action','edit');closeActions();">
  1612. <xts:string id="IDS_ACT_OPEN_CD"/>
  1613. </a>
  1614. </xsl:with-param>
  1615. </xsl:call-template>
  1616. </xsl:when>
  1617. </xsl:choose>
  1618. </xsl:if>
  1619. <!-- Pagelet -->
  1620. <xsl:if test="$tClass='pagelet' and $canExecute">
  1621. <xsl:variable name="dashboardURI">
  1622. <xsl:value-of select="$gateway"/>?b_action=dashboard&amp;pathinfo=/cm&amp;path=storeID(%22<xsl:value-of select="xtsext:protect($target-store-id,'none','cmid','getdata')"/>%22)&amp;backURL=<xsl:value-of select="xtsext:protect(xtsext:urlencode($back-url),'url','url','getdata')"/>
  1623. <xsl:if test="not(/root/system/param[@name='ui_hide']/CRN_HEADER_TITLE)">
  1624. <xsl:text>&amp;frag-header=true</xsl:text>
  1625. </xsl:if>
  1626. </xsl:variable>
  1627. <xsl:call-template name="render-action">
  1628. <xsl:with-param name="icon-name" select="'icon_page.gif'"/>
  1629. <xsl:with-param name="icon-alt"><xts:string id="IDS_ACT_PREVIEW_PAGE"/></xsl:with-param>
  1630. <xsl:with-param name="link-anchor">
  1631. <a href="{$dashboardURI}" onclick="closeActions()">
  1632. <xts:string id="IDS_ACT_PREVIEW_PAGE"/>
  1633. </a>
  1634. </xsl:with-param>
  1635. </xsl:call-template>
  1636. <xsl:if test="key('session-param', 'write')= 'true'">
  1637. <xsl:call-template name="render-action">
  1638. <xsl:with-param name="icon-name" select="'action_add_page_to_portal.gif'"/>
  1639. <xsl:with-param name="icon-alt"><xts:string id="IDS_ACT_ADD_PAGE_TO_PORTAL_VIEW"/></xsl:with-param>
  1640. <xsl:with-param name="link-anchor">
  1641. <a>
  1642. <xsl:attribute name="href">javascript:addPageToPortalView()</xsl:attribute>
  1643. <xts:string id="IDS_ACT_ADD_PAGE_TO_PORTAL_VIEW"/>
  1644. </a>
  1645. </xsl:with-param>
  1646. </xsl:call-template>
  1647. </xsl:if>
  1648. </xsl:if>
  1649. <!-- PowerPlay Cube -->
  1650. <xsl:if test="$tClass='powerPlayCube' and $canExecute and $canRead">
  1651. <xsl:variable name="ppURL">
  1652. <xsl:value-of select="$ppreportgateway"/>
  1653. <xsl:text/>?crnobj=<xsl:value-of select="$pp-url-encoded-path"/>&amp;crnccn=<xsl:value-of select="xtsext:urlencode(string($ppcubecontentname))"/>
  1654. <xsl:text/>&amp;LA=<xsl:value-of select="$productLocale"/>
  1655. <xsl:text/>&amp;LO=<xsl:value-of select="$contentLocale"/>
  1656. <xsl:text/>&amp;BACK=<xsl:value-of select="xtsext:urlencode(string($ppBACK))"/>
  1657. </xsl:variable>
  1658. <xsl:call-template name="render-action">
  1659. <xsl:with-param name="icon-name" select="'action_edit_with_PP.gif'"/>
  1660. <xsl:with-param name="icon-alt"><xts:string id="IDS_ACT_EDIT_WPPWX"/></xsl:with-param>
  1661. <xsl:with-param name="link-anchor">
  1662. <a>
  1663. <xsl:attribute name="href"><xsl:value-of select="xtsext:protect(string($ppURL),'none','s7url','s7url')"/></xsl:attribute>
  1664. <xts:string id="IDS_ACT_EDIT_WPPWX"/>
  1665. </a>
  1666. </xsl:with-param>
  1667. </xsl:call-template>
  1668. </xsl:if>
  1669. <!--
  1670. ============================================================================
  1671. Action: View
  1672. Requires: Output to view, read permission.
  1673. ============================================================================
  1674. -->
  1675. <xsl:if test="string(key('env-param','from_tool')) != 'true' and ($output_format != '' or $tClass = 'document') and ($canRead and $canTraverse) ">
  1676. <!-- ===============================
  1677. = Added for RTC Task 4127.
  1678. = This variable constructs the consumable format list to add to the cognosViewer defaultOutput call.
  1679. ===============================
  1680. -->
  1681. <xsl:variable name="viewerOutputFormatsList">
  1682. <xsl:if test="$output_format != '' and not(contains($supportedFormats,concat(' ',$output_format,' ')))">
  1683. <xsl:text>,'','','</xsl:text><xsl:value-of select="normalize-space($supportedFormats)"/><xsl:text>'</xsl:text>
  1684. </xsl:if>
  1685. </xsl:variable>
  1686. <!-- ===============================
  1687. = Added for RTC Task 4127.
  1688. = This variable is required so that the generated url does not show the non-consumable format in the ui.format parameter.
  1689. ===============================
  1690. -->
  1691. <xsl:variable name="uiOutputFormat">
  1692. <xsl:if test="$viewerOutputFormatsList=''">
  1693. <xsl:value-of select="$output_format"/>
  1694. </xsl:if>
  1695. </xsl:variable>
  1696. <xsl:variable name="readableFormat">
  1697. <xsl:choose>
  1698. <xsl:when test="$tClass = 'document'">
  1699. <xsl:value-of select="$documentFormats/format[@name = $formatDoc]/readableFormat"/>
  1700. </xsl:when>
  1701. <xsl:otherwise><xsl:value-of select="$formatNameLookUp/formats/format[@id = $output_format]"/></xsl:otherwise>
  1702. </xsl:choose>
  1703. </xsl:variable>
  1704. <xsl:call-template name="render-action">
  1705. <xsl:with-param name="icon-name">
  1706. <xsl:value-of select="'icon_'"/>
  1707. <xsl:choose>
  1708. <xsl:when test="$viewerOutputFormatsList=''">
  1709. <xsl:value-of select="/root/system/param[@name='ui_graphics']/param[@name='output_format']/format[@name=$output_format]/@icon"/>
  1710. </xsl:when>
  1711. <xsl:otherwise>
  1712. <!-- ===============================
  1713. = Added for RTC Task 4127.
  1714. = Generate the report icon when there is a consumable output format list.
  1715. ===============================
  1716. -->
  1717. <xsl:value-of select="$consumableOutputFormatIcon"/>
  1718. </xsl:otherwise>
  1719. </xsl:choose>
  1720. <xsl:if test="$tClass = 'reportView'">
  1721. <xsl:value-of select="/root/system/param[@name='ui_graphics']/param[@name='reportview_suffix']"/>
  1722. </xsl:if>
  1723. <xsl:if test="$tClass = 'agentDefinitionView'">
  1724. <xsl:value-of select="/root/system/param[@name='ui_graphics']/param[@name='agentview_suffix']"/>
  1725. </xsl:if>
  1726. <xsl:if test="$tClass = 'document'">
  1727. <xsl:value-of select="/root/system/param[@name='ui_objects']/object[@class = 'document']/@icon"/><xsl:text/><xsl:value-of select="/root/system/param[@name='ui_graphics']/param[@name='document_format']/format[@name = $formatDoc]/@icon"/>
  1728. </xsl:if>
  1729. <xsl:value-of select="'.gif'"/>
  1730. </xsl:with-param>
  1731. <xsl:with-param name="icon-alt">
  1732. <xsl:choose>
  1733. <xsl:when test="$tClass = 'document'">
  1734. <xsl:choose>
  1735. <xsl:when test="$formatDoc != ''">
  1736. <xts:string id="IDS_ACT_DOCUMENT_VIEW"><xts:param name="format"><xsl:value-of select="$readableFormat"/></xts:param></xts:string>
  1737. </xsl:when>
  1738. <xsl:otherwise><xts:string id="IDS_ACT_DEFAULT_DOCUMENT_VIEW"/></xsl:otherwise>
  1739. </xsl:choose>
  1740. </xsl:when>
  1741. <xsl:otherwise><xts:string id="IDS_ACT_VIEW_REPORT"/></xsl:otherwise>
  1742. </xsl:choose>
  1743. </xsl:with-param>
  1744. <xsl:with-param name="link-anchor">
  1745. <!-- <xsl:variable name="storeid">storeID(&quot;<xsl:value-of select="$obj-ref/cm:storeID"/>&quot;)</xsl:variable> -->
  1746. <xsl:variable name="storeid">storeID(&quot;<xsl:value-of select="$target-store-id"/>&quot;)</xsl:variable>
  1747. <xsl:choose>
  1748. <xsl:when test="$tClass = 'document'">
  1749. <xsl:variable name="defaultOutputPath"><xsl:value-of select="$storeid"/>/documentVersion[last()]/documentContent[last()]</xsl:variable>
  1750. <a>
  1751. <xsl:attribute name="onclick">javascript:if ( checkB4Download('<xsl:value-of select="xtsext:javascriptencode(string($obj-name))"/>') ){alert('<xsl:value-of select="xtsext:javascriptencode($download_specialCharacters)"/>');}</xsl:attribute>
  1752. <xsl:attribute name="href">
  1753. <xsl:value-of select="$gateway"/>?b_action=xts.run&amp;m=portal/download.xts<xsl:text/>
  1754. <xsl:if test="$formatDoc != ''">
  1755. <xsl:text/>&amp;format=<xsl:value-of select="xtsext:urlencode($formatDoc)"/><xsl:text/>
  1756. </xsl:if>
  1757. <xsl:text/>&amp;m_download_obj=<xsl:text/>
  1758. <xsl:value-of select="xtsext:protect(xtsext:urlencode(string($defaultOutputPath)),'url','searchPath','getdata')"/>
  1759. <xsl:text/>&amp;m_name=<xsl:text/>
  1760. <xsl:value-of select="xtsext:protect(xtsext:urlencode(string($obj-name)),'url','userData','getdata')"/>
  1761. </xsl:attribute>
  1762. <xsl:choose>
  1763. <xsl:when test="$formatDoc != ''">
  1764. <xts:string id="IDS_ACT_DOCUMENT_VIEW"><xts:param name="format"><xsl:value-of select="$readableFormat"/></xts:param></xts:string>
  1765. </xsl:when>
  1766. <xsl:otherwise><xts:string id="IDS_ACT_DEFAULT_DOCUMENT_VIEW"/></xsl:otherwise>
  1767. </xsl:choose>
  1768. </a>
  1769. </xsl:when>
  1770. <xsl:otherwise>
  1771. <a>
  1772. <xsl:attribute name="href">
  1773. <xsl:value-of select="$gateway"/>?b_action=cognosViewer<xsl:text/>
  1774. <xsl:text/>&amp;ui.action=view<xsl:text/>
  1775. <xsl:text/>&amp;ui.object=<xsl:value-of select="xtsext:protect(xtsext:urlencode( concat( 'defaultOutput(' , $storeid, $viewerOutputFormatsList, ')' ) ),'url','searchPath','getdata')"/>
  1776. <xsl:text/>&amp;ui.name=<xsl:value-of select="xtsext:javascriptencode(xtsext:protect(xtsext:urlencode(string($defaultName)),'url','userData','getdata'))"/>
  1777. <xsl:text/>&amp;ui.backURL=<xsl:value-of select="xtsext:protect(xtsext:urlencode($back-url),'url','url','getdata')"/>
  1778. <xsl:text/>&amp;ui.format=<xsl:value-of select="xtsext:urlencode($uiOutputFormat)"/>
  1779. <xsl:if test="key('system-param', 'useReportLocaleInRVUI') = 'true'">
  1780. <xsl:text/>&amp;lang=<xsl:value-of select="$contentLocale"/>
  1781. </xsl:if>
  1782. </xsl:attribute>
  1783. <xsl:choose>
  1784. <xsl:when test="$viewerOutputFormatsList=''">
  1785. <xts:string id="IDS_ACT_VIEW"><xts:param name="format"><xsl:value-of select="$readableFormat"/></xts:param></xts:string>
  1786. </xsl:when>
  1787. <xsl:otherwise>
  1788. <xts:string id="IDS_ACT_VIEW_MOST_RECENT"/>
  1789. </xsl:otherwise>
  1790. </xsl:choose>
  1791. </a>
  1792. </xsl:otherwise>
  1793. </xsl:choose>
  1794. </xsl:with-param>
  1795. </xsl:call-template>
  1796. </xsl:if>
  1797. <!--
  1798. ============================================================================
  1799. Action: View Event Studio hotlist with cognos viewer (for agent objects)
  1800. Requires: read and traverse access.
  1801. ============================================================================
  1802. -->
  1803. <xsl:if test="($tClass='agentDefinition' or $tClass='agentDefinitionView') and ( ($target-obj-ref/cm:mostRecentEventList and not($target-obj-ref/cm:mostRecentEventList/@nil)) or ($obj-ref/cm:mostRecentEventList and not($obj-ref/cm:mostRecentEventList/@nil))) and $canRead and $canTraverse">
  1804. <xsl:variable name="encoded-back-url">
  1805. <xsl:value-of select="xtsext:javascriptencode(xtsext:protect(xtsext:urlencode(string($back-url)),'url','url','getdata'))"/>
  1806. </xsl:variable>
  1807. <xsl:variable name="rv-lang">
  1808. <xsl:if test="key('system-param', 'useReportLocaleInRVUI') = 'true'">
  1809. <xsl:text/>&amp;lang=<xsl:value-of select="$contentLocale"/>
  1810. </xsl:if>
  1811. </xsl:variable>
  1812. <xsl:variable name="eventList">
  1813. <xsl:choose>
  1814. <xsl:when test="$obj-ref/cm:mostRecentEventList and not($obj-ref/cm:mostRecentEventList/@nil)">
  1815. <xsl:value-of select="$obj-ref/cm:mostRecentEventList"/>
  1816. </xsl:when>
  1817. <xsl:otherwise><xsl:value-of select="$target-obj-ref/cm:mostRecentEventList"/></xsl:otherwise>
  1818. </xsl:choose>
  1819. </xsl:variable>
  1820. <xsl:call-template name="render-action">
  1821. <xsl:with-param name="icon-name" select="'action_view_AS_hotlist.gif'"/>
  1822. <xsl:with-param name="icon-alt"><xts:string id="IDS_ACT_HOTLIST_AGS_TT"/><xsl:value-of select="$defaultName"/></xsl:with-param>
  1823. <xsl:with-param name="link-anchor">
  1824. <a>
  1825. <xsl:attribute name="href">
  1826. <xsl:value-of select="$gateway"/>?b_action=cognosViewer<xsl:text/>
  1827. <xsl:text/>&amp;ui.action=view<xsl:text/>
  1828. <xsl:text/>&amp;ui.object=<xsl:value-of select="xtsext:javascriptencode( xtsext:protect( xtsext:urlencode($eventList), 'url','searchPath','getdata'))"/>
  1829. <xsl:text/>&amp;ui.name=<xsl:value-of select="xtsext:javascriptencode(xtsext:protect(xtsext:urlencode(string($defaultName)),'url','userData','getdata'))"/>
  1830. <xsl:text/>&amp;ui.backURL=<xsl:value-of select="xtsext:protect(xtsext:urlencode($back-url),'url','url','getdata')"/>
  1831. <xsl:text>&amp;cv.toolbar=false</xsl:text>
  1832. <xsl:value-of select="$rv-lang"/>
  1833. <xsl:text/>&amp;ui.cafcontextid=<xsl:value-of select="$cafContextIDAGS"/>
  1834. </xsl:attribute>
  1835. <xts:string id="IDS_ACT_HOTLIST_AGS"/>
  1836. </a>
  1837. </xsl:with-param>
  1838. </xsl:call-template>
  1839. </xsl:if>
  1840. <!--
  1841. ============================================================================
  1842. Action: Previous versions
  1843. Requires: read permissions, saved outputs always show if the user has the capability to view archived content
  1844. ============================================================================
  1845. -->
  1846. <xsl:if test="not(contains($ui-obj-act/@exclude, 'previous_versions')) and contains($ui-target-obj-act,'previous_versions') and ($hasPrevVersion != '' or $tClass = 'document' or $hasCanViewContentInRepositoryCapability) and ($canRead and $canTraverse) ">
  1847. <xsl:choose>
  1848. <xsl:when test="$tClass = 'document'">
  1849. <xsl:call-template name="render-action">
  1850. <xsl:with-param name="icon-name" select="'action_view_report_output.gif'"/>
  1851. <xsl:with-param name="icon-alt">
  1852. <xts:string id="IDS_IMG_VIEW_DOCUMENT_ALT"/>
  1853. </xsl:with-param>
  1854. <xsl:with-param name="link-anchor">
  1855. <utml:a utml:op="stack-up" utml:formName="pform">
  1856. <utml:target>
  1857. <xsl:value-of select="$app"/>/<xsl:text/>
  1858. <xsl:choose>
  1859. <xsl:when test="key('system-param', 'versions')/target">
  1860. <xsl:value-of select="key('system-param', 'versions')/target"/></xsl:when>
  1861. <xsl:otherwise>outputs.xts</xsl:otherwise>
  1862. </xsl:choose>
  1863. </utml:target>
  1864. <xsl:if test="$obj-class='shortcut' and not($isDangling)">
  1865. <xsl:attribute name="onclick">javascript:targObj()</xsl:attribute>
  1866. </xsl:if>
  1867. <xts:string id="IDS_ACT_VIEW_DOCUMENT_EX"/>
  1868. </utml:a>
  1869. </xsl:with-param>
  1870. </xsl:call-template>
  1871. </xsl:when>
  1872. <xsl:otherwise>
  1873. <xsl:call-template name="render-action">
  1874. <xsl:with-param name="icon-name" select="'action_view_report_output.gif'"/>
  1875. <xsl:with-param name="icon-alt">
  1876. <xts:string id="IDS_IMG_VIEW_RPT_ALT"/>
  1877. </xsl:with-param>
  1878. <xsl:with-param name="link-anchor">
  1879. <utml:a utml:op="stack-up" utml:formName="pform">
  1880. <utml:target>
  1881. <xsl:value-of select="$app"/>/<xsl:text/>
  1882. <xsl:choose>
  1883. <xsl:when test="key('system-param', 'versions')/target">
  1884. <xsl:value-of select="key('system-param', 'versions')/target"/></xsl:when>
  1885. <xsl:otherwise>outputs.xts</xsl:otherwise>
  1886. </xsl:choose>
  1887. </utml:target>
  1888. <xsl:if test="$obj-class='shortcut' and not($isDangling)">
  1889. <xsl:attribute name="onclick">javascript:targObj()</xsl:attribute>
  1890. </xsl:if>
  1891. <xts:string id="IDS_ACT_VIEW_EX"/>
  1892. </utml:a>
  1893. </xsl:with-param>
  1894. </xsl:call-template>
  1895. </xsl:otherwise>
  1896. </xsl:choose>
  1897. </xsl:if>
  1898. <xsl:call-template name="render-action">
  1899. <xsl:with-param name="icon-name" select="'view_my_permissions.gif'"/>
  1900. <xsl:with-param name="icon-alt"><xts:string id="IDS_ACT_VIEW_MY_PERMISSIONS_ALT"/></xsl:with-param>
  1901. <xsl:with-param name="link-anchor"><a href="javascript:action('view_permissions.xts')"><xts:string id="IDS_VIEW_MY_PERMISSIONS"/></a></xsl:with-param>
  1902. </xsl:call-template>
  1903. <xsl:if test="contains(' package content folder ', concat(' ', /root/env/param[@name='m_class'], ' '))">
  1904. <xsl:call-template name="render-action">
  1905. <xsl:with-param name="icon-name" select="'view_my_capabilities.gif'"/>
  1906. <xsl:with-param name="icon-alt"><xts:string id="IDS_ACT_VIEW_MY_CAPABILITIES_ALT"/></xsl:with-param>
  1907. <xsl:with-param name="link-anchor"><a href="javascript:action('view_capabilities.xts')"><xts:string id="IDS_VIEW_MY_CAPABILITIES"/></a></xsl:with-param>
  1908. </xsl:call-template>
  1909. </xsl:if>
  1910. <xsl:variable name="canReadModel" select="contains(/root/modelInfo/cm:queryResponse/*/cm:permissions, 'read')"/>
  1911. <xsl:variable name="isInMyFolders" select="count(/root/cm:queryResponse/*/cm:ancestors/cm:ancestorInfo[cm:objectClass='account'])=1"/>
  1912. <xsl:if test="$obj-class='package' and not($userInterfaces = 'adaptiveAnalytics') and $canSetPolicy and $canReadModel and not($isInMyFolders)">
  1913. <xsl:call-template name="render-action">
  1914. <xsl:with-param name="icon-name" select="'action_view_data_sources.gif'"/>
  1915. <xsl:with-param name="icon-alt"><xts:string id="IDS_ACT_VIEW_PACKAGE_DATA_SOURCES_ALT"/></xsl:with-param>
  1916. <xsl:with-param name="link-anchor"><a href="javascript:action('view_packagedatasources.xts')"><xts:string id="IDS_VIEW_PACKAGE_DATA_SOURCES"/></a></xsl:with-param>
  1917. </xsl:call-template>
  1918. </xsl:if>
  1919. <xsl:variable name="PackageEditURI" select="/root/theFMDataSource/response/outputparams/param[@seq='1']"/>
  1920. <xsl:if test="$obj-class='package' and $PackageEditURI != '' and $userCanUseSelfServicePackageWizard">
  1921. <xsl:call-template name="render-action">
  1922. <xsl:with-param name="icon-name" select="'action_edit_package.gif'"/>
  1923. <xsl:with-param name="icon-alt"><xts:string id="IDS_ACT_EDIT_PACKAGE_ALT"/></xsl:with-param>
  1924. <xsl:with-param name="link-anchor">
  1925. <a href="{concat($gateway, $PackageEditURI)}&amp;backURL={xtsext:protect(xtsext:urlencode($back-url),'url','url','getdata')}">
  1926. <xts:string id="IDS_ACT_EDIT_PACKAGE"/>
  1927. </a>
  1928. </xsl:with-param>
  1929. </xsl:call-template>
  1930. </xsl:if>
  1931. <xsl:variable name="userIsAllowedRunWithOptions" select="$userCanUseRWO or not(contains(' report query interactiveReport reportView analysis powerPlay8Report powerPlay8ReportView ', concat(' ', $tClass, ' ')))"/>
  1932. <!--
  1933. ============================================================================
  1934. Action: Run
  1935. Requires: run_once .
  1936. ============================================================================
  1937. -->
  1938. <xsl:if test="contains($ui-target-obj-act,'run_once') and not(contains($ui-obj-act/@exclude, 'run_once')) and $userIsAllowedRunWithOptions and $canExecute and not($isDangling) and ((not(contains(' jobDefinition agentDefinition agentDefinitionView ', concat(' ', $tClass, ' ')))) or ($canRead and $canTraverse)) and $fromSchedulingTool">
  1939. <xsl:call-template name="render-action">
  1940. <xsl:with-param name="icon-name" select="'action_run_once.gif'"/>
  1941. <xsl:with-param name="icon-alt">
  1942. <xts:string id="IDS_ACT_RUN_ONCE"/>
  1943. </xsl:with-param>
  1944. <xsl:with-param name="link-anchor">
  1945. <utml:a utml:op="stack-up" utml:formName="pform">
  1946. <utml:target>
  1947. <xsl:value-of select="$app"/>
  1948. <xsl:variable name="rwoFolder" select="'/runWithOptions/'"/>
  1949. <xsl:choose>
  1950. <xsl:when test="contains(' report query interactiveReport reportView analysis powerPlay8Report powerPlay8ReportView ', concat(' ', $tClass, ' '))">
  1951. <xsl:value-of select="concat($rwoFolder,'report_advanced.xts')"/>
  1952. </xsl:when>
  1953. <xsl:when test="$tClass = 'agentDefinitionView'">
  1954. <xsl:value-of select="concat($rwoFolder,'agentDefinition.xts')"/>
  1955. </xsl:when>
  1956. <xsl:when test=" $tClass = 'dataMovementTaskAlias' ">
  1957. <xsl:value-of select="concat($rwoFolder,'dataMovementTask.xts')"/>
  1958. </xsl:when>
  1959. <xsl:when test=" $tClass = 'importDeployment' or $tClass = 'exportDeployment' ">
  1960. <xsl:value-of select="concat($rwoFolder,'deployment.xts')"/>
  1961. </xsl:when>
  1962. <xsl:when test=" $tClass = 'queryServiceTask' ">
  1963. <xsl:value-of select="concat($rwoFolder,'generic.xts')"/>
  1964. </xsl:when>
  1965. <xsl:otherwise>
  1966. <xsl:value-of select="concat($rwoFolder,$tClass, '.xts')"/>
  1967. </xsl:otherwise>
  1968. </xsl:choose>
  1969. </utml:target>
  1970. <xsl:if test="$obj-class='shortcut' and not($isDangling)">
  1971. <xsl:attribute name="onclick">javascript:targObj()</xsl:attribute>
  1972. </xsl:if>
  1973. <xts:string id="IDS_ACT_SCHEDULE_RUN_ONCE"/>
  1974. </utml:a>
  1975. </xsl:with-param>
  1976. </xsl:call-template>
  1977. </xsl:if>
  1978. <!--
  1979. ============================================================================
  1980. Action: Run
  1981. Requires: run_options and 'execute' access.
  1982. ============================================================================
  1983. -->
  1984. <xsl:if test="contains($ui-target-obj-act,'run_options') and not(contains($ui-obj-act/@exclude, 'run_options')) and $userIsAllowedRunWithOptions and $canExecute and not($isDangling) and ((not(contains(' jobDefinition agentDefinition agentDefinitionView ', concat(' ', $tClass, ' ')))) or ($canRead and $canTraverse)) and not($fromSchedulingTool)">
  1985. <xsl:choose>
  1986. <xsl:when test="not(starts-with(string($tClass),'powerPlayReport'))">
  1987. <xsl:call-template name="render-action">
  1988. <xsl:with-param name="icon-name" select="'action_run_16.gif'"/>
  1989. <xsl:with-param name="icon-alt"><xts:string id="IDS_ACT_RUN"/></xsl:with-param>
  1990. <xsl:with-param name="link-anchor">
  1991. <utml:a utml:op="stack-up" utml:formName="pform">
  1992. <utml:target>
  1993. <xsl:value-of select="$app"/>
  1994. <xsl:variable name="rwoFolder" select="'/runWithOptions/'"/>
  1995. <xsl:choose>
  1996. <xsl:when test="contains(' report query interactiveReport reportView analysis powerPlay8Report powerPlay8ReportView ', concat(' ', $tClass, ' '))">
  1997. <xsl:value-of select="concat($rwoFolder,'report.xts')"/>
  1998. </xsl:when>
  1999. <xsl:when test="$tClass = 'agentDefinitionView'">
  2000. <xsl:value-of select="concat($rwoFolder,'agentDefinition.xts')"/>
  2001. </xsl:when>
  2002. <xsl:when test="$tClass = 'dataMovementTaskAlias'">
  2003. <xsl:value-of select="concat($rwoFolder,'dataMovementTask.xts')"/>
  2004. </xsl:when>
  2005. <xsl:when test=" $tClass = 'importDeployment' or $tClass = 'exportDeployment' ">
  2006. <xsl:value-of select="concat($rwoFolder,'deployment.xts')"/>
  2007. </xsl:when>
  2008. <xsl:when test="$tClass = 'queryServiceTask'">
  2009. <xsl:value-of select="concat($rwoFolder,'generic.xts')"/>
  2010. </xsl:when>
  2011. <xsl:otherwise>
  2012. <xsl:value-of select="concat($rwoFolder,$tClass,'.xts')"/>
  2013. </xsl:otherwise>
  2014. </xsl:choose>
  2015. </utml:target>
  2016. <xsl:if test="$obj-class='shortcut' and not($isDangling)">
  2017. <xsl:attribute name="onclick">javascript:targObj()</xsl:attribute>
  2018. </xsl:if>
  2019. <xts:string id="IDS_ACT_RUN_EX"/>
  2020. </utml:a>
  2021. </xsl:with-param>
  2022. </xsl:call-template>
  2023. </xsl:when>
  2024. <xsl:when test="string($tClass) = 'powerPlayReport'"> <!-- pp 7, not for powerPlayCube -->
  2025. <xsl:if test="$canRead">
  2026. <xsl:choose>
  2027. <xsl:when test="$ppreportprompt='true'">
  2028. <xsl:variable name="ppURLPdf">
  2029. <xsl:value-of select="$ppreportgateway"/>
  2030. <xsl:text/>?crnobj=<xsl:value-of select="$pp-url-encoded-path"/><xsl:text/>
  2031. <xsl:text/>&amp;crnccn=<xsl:value-of select="xtsext:urlencode(string($ppcubecontentname))"/>&amp;crnfrm=PDF&amp;crnp=false<xsl:text/>
  2032. <xsl:text/>&amp;LA=<xsl:value-of select="$productLocale"/><xsl:text/>
  2033. <xsl:text/>&amp;LO=<xsl:value-of select="$contentLocale"/><xsl:text/>
  2034. <xsl:text/>&amp;BACK=<xsl:value-of select="xtsext:urlencode(string($ppBACK))"/><xsl:text/>
  2035. </xsl:variable>
  2036. <xsl:variable name="ppURLPdfPrompt">
  2037. <xsl:value-of select="$ppreportgateway"/>
  2038. <xsl:text/>?crnobj=<xsl:value-of select="$pp-url-encoded-path"/><xsl:text/>
  2039. <xsl:text/>&amp;crnccn=<xsl:value-of select="xtsext:urlencode(string($ppcubecontentname))"/>&amp;crnfrm=PDF&amp;crnp=true<xsl:text/>
  2040. <xsl:text/>&amp;LA=<xsl:value-of select="$productLocale"/><xsl:text/>
  2041. <xsl:text/>&amp;LO=<xsl:value-of select="$contentLocale"/><xsl:text/>
  2042. <xsl:text/>&amp;BACK=<xsl:value-of select="xtsext:urlencode(string($ppBACK))"/><xsl:text/>
  2043. </xsl:variable>
  2044. <xsl:call-template name="render-action">
  2045. <xsl:with-param name="icon-name" select="'action_run_16.gif'"/>
  2046. <xsl:with-param name="icon-alt"><xts:string id="IDS_ACT_RUN_PDF"/></xsl:with-param>
  2047. <xsl:with-param name="link-anchor">
  2048. <a>
  2049. <xsl:attribute name="href"><xsl:value-of select="xtsext:protect(string($ppURLPdf),'none','s7url','s7url')"/></xsl:attribute>
  2050. <xts:string id="IDS_ACT_RUN_PDF_EX"/>
  2051. </a>
  2052. </xsl:with-param>
  2053. </xsl:call-template>
  2054. <xsl:call-template name="render-action">
  2055. <xsl:with-param name="icon-name" select="'action_run_prompt.gif'"/>
  2056. <xsl:with-param name="icon-alt"><xts:string id="IDS_ACT_RUN_PDF_PROMPT"/></xsl:with-param>
  2057. <xsl:with-param name="link-anchor">
  2058. <a>
  2059. <xsl:attribute name="href"><xsl:value-of select="xtsext:protect(string($ppURLPdfPrompt),'none','s7url','s7url')"/></xsl:attribute>
  2060. <xts:string id="IDS_ACT_RUN_PDF_PROMPT_EX"/>
  2061. </a>
  2062. </xsl:with-param>
  2063. </xsl:call-template>
  2064. </xsl:when>
  2065. <xsl:otherwise>
  2066. <xsl:variable name="ppURL">
  2067. <xsl:value-of select="$ppreportgateway"/>
  2068. <xsl:text/>?crnobj=<xsl:value-of select="$pp-url-encoded-path"/><xsl:text/>
  2069. <xsl:text/>&amp;crnccn=<xsl:value-of select="xtsext:urlencode(string($ppcubecontentname))"/>&amp;crnfrm=PDF<xsl:text/>
  2070. <xsl:text/>&amp;LA=<xsl:value-of select="$productLocale"/><xsl:text/>
  2071. <xsl:text/>&amp;LO=<xsl:value-of select="$contentLocale"/><xsl:text/>
  2072. <xsl:text/>&amp;BACK=<xsl:value-of select="xtsext:urlencode(string($ppBACK))"/><xsl:text/>
  2073. </xsl:variable>
  2074. <xsl:call-template name="render-action">
  2075. <xsl:with-param name="icon-name" select="'action_run_16.gif'"/>
  2076. <xsl:with-param name="icon-alt"><xts:string id="IDS_ACT_RUN_PDF"/></xsl:with-param>
  2077. <xsl:with-param name="link-anchor">
  2078. <a>
  2079. <xsl:attribute name="href"><xsl:value-of select="xtsext:protect(string($ppURL),'none','s7url','s7url')"/></xsl:attribute>
  2080. <xts:string id="IDS_ACT_RUN_PDF_EX"/>
  2081. </a>
  2082. </xsl:with-param>
  2083. </xsl:call-template>
  2084. </xsl:otherwise>
  2085. </xsl:choose>
  2086. <xsl:variable name="ppURLPPWX">
  2087. <xsl:value-of select="$ppreportgateway"/>
  2088. <xsl:text/>?crnobj=<xsl:value-of select="$pp-url-encoded-path"/><xsl:text/>
  2089. <xsl:text/>&amp;crnccn=<xsl:value-of select="xtsext:urlencode(string($ppcubecontentname))"/>&amp;crnfrm=HTML&amp;crngnd=false<xsl:text/>
  2090. <xsl:text/>&amp;LA=<xsl:value-of select="$productLocale"/><xsl:text/>
  2091. <xsl:text/>&amp;LO=<xsl:value-of select="$contentLocale"/><xsl:text/>
  2092. <xsl:text/>&amp;BACK=<xsl:value-of select="xtsext:urlencode(string($ppBACK))"/><xsl:text/>
  2093. </xsl:variable>
  2094. <xsl:call-template name="render-action">
  2095. <xsl:with-param name="icon-name" select="'action_edit_with_PP.gif'"/>
  2096. <xsl:with-param name="icon-alt"><xts:string id="IDS_ACT_EDIT_WPPWX"/></xsl:with-param>
  2097. <xsl:with-param name="link-anchor">
  2098. <a>
  2099. <xsl:attribute name="href"><xsl:value-of select="xtsext:protect(string($ppURLPPWX),'none','s7url','s7url')"/></xsl:attribute>
  2100. <xts:string id="IDS_ACT_EDIT_WPPWX"/>
  2101. </a>
  2102. </xsl:with-param>
  2103. </xsl:call-template>
  2104. <xsl:variable name="ppURLPPWXDsg">
  2105. <xsl:value-of select="$ppreportgateway"/>
  2106. <xsl:text/>?crnobj=<xsl:value-of select="$pp-url-encoded-path"/><xsl:text/>
  2107. <xsl:text/>&amp;crnccn=<xsl:value-of select="xtsext:urlencode(string($ppcubecontentname))"/>&amp;crnfrm=HTML&amp;crngnd=true<xsl:text/>
  2108. <xsl:text/>&amp;LA=<xsl:value-of select="$productLocale"/><xsl:text/>
  2109. <xsl:text/>&amp;LO=<xsl:value-of select="$contentLocale"/><xsl:text/>
  2110. <xsl:text/>&amp;BACK=<xsl:value-of select="xtsext:urlencode(string($ppBACK))"/><xsl:text/>
  2111. </xsl:variable>
  2112. <xsl:call-template name="render-action">
  2113. <xsl:with-param name="icon-name" select="'action_edit_with_PP_design.gif'"/>
  2114. <xsl:with-param name="icon-alt"><xts:string id="IDS_ACT_EDIT_WPPWX_DESIGN"/></xsl:with-param>
  2115. <xsl:with-param name="link-anchor">
  2116. <a>
  2117. <xsl:attribute name="href"><xsl:value-of select="xtsext:protect(string($ppURLPPWXDsg),'none','s7url','s7url')"/></xsl:attribute>
  2118. <xts:string id="IDS_ACT_EDIT_WPPWX_DESIGN"/>
  2119. </a>
  2120. </xsl:with-param>
  2121. </xsl:call-template>
  2122. </xsl:if>
  2123. </xsl:when>
  2124. </xsl:choose>
  2125. </xsl:if>
  2126. <!--
  2127. ============================================================================
  2128. Action: Edit with Query Studio (for query objects only)
  2129. Requires: edit, 'write' and execute access.
  2130. ============================================================================
  2131. -->
  2132. <xsl:if test="not(contains($ui-obj-act/@exclude, 'edit')) and contains($effectiveUserCapabilities, ' userCanUseQS ') and $tClass='query' and $canRead and $canExecute and contains($ui-target-obj-act,'edit')">
  2133. <xsl:call-template name="render-action">
  2134. <xsl:with-param name="icon-name" select="'action_edit_with_QS.gif'"/>
  2135. <xsl:with-param name="icon-alt"><xts:string id="IDS_ACT_EDIT_WQS"/></xsl:with-param>
  2136. <xsl:with-param name="link-anchor">
  2137. <a href="#">
  2138. <xsl:attribute name="onclick">cognosLaunch('ui.gateway', '<xsl:value-of select="xtsext:javascriptencode($gateway)"/>', 'ui.tool', 'QueryStudio', 'ui.backURL', '<xsl:value-of select="xtsext:javascriptencode($back-url)"/>', 'ui.object', '<xsl:value-of select="xtsext:javascriptencode(string($target-search-path))"/>', 'ui.action', 'edit');</xsl:attribute>
  2139. <xts:string id="IDS_ACT_EDIT_WQS"/>
  2140. </a>
  2141. </xsl:with-param>
  2142. </xsl:call-template>
  2143. </xsl:if>
  2144. <!--
  2145. ============================================================================
  2146. Action: Edit with Event Studio (for agent objects)
  2147. Requires: edit and 'write' access.
  2148. ============================================================================
  2149. -->
  2150. <xsl:if test="not(contains($ui-obj-act/@exclude, 'edit')) and $userCanUseAGS and $tClass='agentDefinition' and $canRead and $canTraverse and contains($ui-target-obj-act,'edit')">
  2151. <xsl:variable name="java-encoded-path">
  2152. <xsl:value-of select="xtsext:javascriptencode(string($target-search-path))"/>
  2153. </xsl:variable>
  2154. <xsl:call-template name="render-action">
  2155. <xsl:with-param name="icon-name" select="'action_edit_with_AS.gif'"/>
  2156. <xsl:with-param name="icon-alt"><xts:string id="IDS_ACT_EDIT_WAG"/></xsl:with-param>
  2157. <xsl:with-param name="link-anchor">
  2158. <a href="#">
  2159. <xsl:attribute name="onclick">cognosLaunchInWindow('_blank', 'menubar=no,toolbar=no,status=yes,location=no,resizable=yes,width=650,height=480', 'ui.gateway', '<xsl:value-of select="xtsext:javascriptencode($gateway)"/>', 'ui.tool', 'EventStudio', 'ui.backURL', sBackURL, 'ui.object', '<xsl:value-of select="$java-encoded-path"/>', 'ui.action', 'edit');closeActions();</xsl:attribute>
  2160. <xts:string id="IDS_ACT_EDIT_WAG"/>
  2161. </a>
  2162. </xsl:with-param>
  2163. </xsl:call-template>
  2164. </xsl:if>
  2165. <!--
  2166. ============================================================================
  2167. Action: Edit with Analysis Studio (for analysis objects and powerPlayReport objects)
  2168. Requires: edit and 'write' access.
  2169. ============================================================================
  2170. -->
  2171. <xsl:if test="not(contains($ui-obj-act/@exclude, 'edit')) and contains($effectiveUserCapabilities, ' userCanUseANS ') and $tClass='analysis' and $canRead and $canExecute and contains($ui-target-obj-act,'edit')">
  2172. <xsl:variable name="AS_launchTool">AnalysisStudio</xsl:variable>
  2173. <xsl:variable name="sq">&apos;</xsl:variable>
  2174. <xsl:variable name="apos">'</xsl:variable>
  2175. <xsl:variable name="mod-path">
  2176. <xsl:value-of select="xtsext:replace(string($target-search-path),$sq,$apos)"/>
  2177. </xsl:variable>
  2178. <xsl:call-template name="render-action">
  2179. <xsl:with-param name="icon-name" select="'action_edit_with_PS.gif'"/>
  2180. <xsl:with-param name="icon-alt"><xts:string id="IDS_ACT_EDIT_WPS"/></xsl:with-param>
  2181. <xsl:with-param name="link-anchor">
  2182. <a href="#">
  2183. <xsl:attribute name="onclick">cognosLaunchInWindow('_blank', 'menubar=no,toolbar=no,status=yes,location=no,resizable=yes,width=650,height=480', 'ui.gateway', sGateway, 'ui.tool', '<xsl:value-of select="$AS_launchTool"/>', 'ui.object', '<xsl:value-of select="xtsext:javascriptencode(string($mod-path))"/>', 'ui.action', 'edit');closeActions();</xsl:attribute>
  2184. <xts:string id="IDS_ACT_EDIT_WPS"/>
  2185. </a>
  2186. </xsl:with-param>
  2187. </xsl:call-template>
  2188. </xsl:if>
  2189. <!--
  2190. ============================================================================
  2191. Action: Edit with RS (for report type objects or powerPlayReport objects)
  2192. Requires: edit and 'write' access.
  2193. ============================================================================
  2194. -->
  2195. <xsl:if test="not(contains(ui-obj-act-exclude, 'edit ') and contains(ui-obj-act-exclude, 'edit_cbia ')) and contains($effectiveUserCapabilities, ' userCanUseRS ') and ( $tClass='report' or $tClass='interactiveReport' or $tClass='query' or $tClass='analysis' or $tClass='reportTemplate') and $canRead and contains($ui-target-obj-act,'edit')">
  2196. <xsl:variable name="RS_launchTool">ReportStudio</xsl:variable>
  2197. <xsl:if test="not(contains($ui-obj-act-exclude, 'edit ')) and contains($ui-target-obj-act,'edit ')">
  2198. <xsl:if test="$rsPROProfile">
  2199. <xsl:call-template name="render-action">
  2200. <xsl:with-param name="icon-name" select="'action_edit_with_RS.gif'"/>
  2201. <xsl:with-param name="icon-alt"><xts:string id="IDS_ACT_EDIT_WRS"/></xsl:with-param>
  2202. <xsl:with-param name="link-anchor">
  2203. <a href="#">
  2204. <xsl:attribute name="onclick">cognosLaunchInWindow('_blank', 'menubar=no,toolbar=no,status=no,location=no,resizable=yes,width=700,height=500', 'ui.gateway', sGateway, 'ui.tool', '<xsl:value-of select="$RS_launchTool"/>', 'ui.object', '<xsl:value-of select="xtsext:javascriptencode(string($target-search-path))"/>', 'ui.action', 'edit', 'ui.profile', 'Professional');closeActions();</xsl:attribute>
  2205. <xts:string id="IDS_ACT_EDIT_WRS"/>
  2206. </a>
  2207. </xsl:with-param>
  2208. </xsl:call-template>
  2209. </xsl:if>
  2210. </xsl:if>
  2211. <!-- RTC 124044 Cognos Connection - Disable the action that allows a user to open a PP8 report with BIA. but want code left so easily
  2212. available to test: Allow PowerPlay and PowerPlay 8 :<xsl:if test="$rsBIAProfile and ($tClass='report' or $tClass='reportTemplate' or $tClass='powerPlayReport' or $tClass='powerPlay8Report')"> -->
  2213. <xsl:if test="not(contains($ui-obj-act-exclude, 'edit_cbia')) and contains($ui-target-obj-act,'edit_cbia')">
  2214. <xsl:if test="$rsBIAProfile and ($tClass='report' or $tClass='reportTemplate')">
  2215. <xsl:call-template name="render-action">
  2216. <xsl:with-param name="icon-name" select="'action_edit_with_RS_BUA.gif'"/>
  2217. <xsl:with-param name="icon-alt"><xts:string id="IDS_ACT_EDIT_WBUA"/></xsl:with-param>
  2218. <xsl:with-param name="link-anchor">
  2219. <a href="#">
  2220. <xsl:attribute name="onclick">cognosLaunchInWindow('_blank', 'menubar=no,toolbar=no,status=no,location=no,resizable=yes,width=700,height=500', 'ui.gateway', sGateway, 'ui.tool', '<xsl:value-of select="$RS_launchTool"/>', 'ui.object', '<xsl:value-of select="xtsext:javascriptencode(string($target-search-path))"/>', 'ui.action', 'edit', 'ui.profile', 'BUA_standalone');closeActions();</xsl:attribute>
  2221. <xts:string id="IDS_ACT_EDIT_WBUA"/>
  2222. </a>
  2223. </xsl:with-param>
  2224. </xsl:call-template>
  2225. </xsl:if>
  2226. </xsl:if>
  2227. </xsl:if>
  2228. <!--
  2229. ============================================================================
  2230. Action: Edit with PowerPlayStudio pp8
  2231. Requires: edit and 'write' access.
  2232. ============================================================================
  2233. -->
  2234. <xsl:if test="not(contains($ui-obj-act/@exclude, 'edit')) and contains($effectiveUserCapabilities, ' userCanUsePPS ') and $tClass='powerPlay8Report' and $canRead and $canExecute and contains($ui-target-obj-act,'edit')">
  2235. <!-- open not in design mode-->
  2236. <xsl:call-template name="render-action">
  2237. <xsl:with-param name="icon-name" select="'action_edit_with_pp8.gif'"/>
  2238. <xsl:with-param name="icon-alt"><xts:string id="IDS_ACT_EDIT_WPPWX8"/></xsl:with-param>
  2239. <xsl:with-param name="link-anchor">
  2240. <a href="#">
  2241. <xsl:attribute name="onclick">cognosLaunch('ui.gateway', sGateway, 'ui.tool', 'PowerplayStudio', 'ui.backURL', '<xsl:value-of select="xtsext:javascriptencode(string($ppBACK))"/>', 'ui.object', '<xsl:value-of select="xtsext:javascriptencode( string( $target-search-path ) )"/>', 'ui.crnp', 'false', 'ui.crnfrm', 'HTML', 'ui.crngnd', 'false', 'ui.action', 'edit','ui.la', '<xsl:value-of select="xtsext:javascriptencode($productLocale)"/>', 'ui.lo', '<xsl:value-of select="xtsext:javascriptencode($contentLocale)"/>');</xsl:attribute>
  2242. <xts:string id="IDS_ACT_EDIT_WPPWX8"/>
  2243. </a>
  2244. </xsl:with-param>
  2245. </xsl:call-template>
  2246. <!-- open in design mode -->
  2247. <xsl:call-template name="render-action">
  2248. <xsl:with-param name="icon-name" select="'action_edit_with_pp8_design.gif'"/>
  2249. <xsl:with-param name="icon-alt"><xts:string id="IDS_ACT_EDIT_WPPWX8_DESIGN"/></xsl:with-param>
  2250. <xsl:with-param name="link-anchor">
  2251. <a href="#">
  2252. <xsl:attribute name="onclick">cognosLaunch('ui.gateway', sGateway, 'ui.tool', 'PowerplayStudio', 'ui.backURL', '<xsl:value-of select="xtsext:javascriptencode(string($ppBACK))"/>', 'ui.object', '<xsl:value-of select="xtsext:javascriptencode( string( $target-search-path ) )"/>', 'ui.crnp', 'false', 'ui.crnfrm', 'HTML', 'ui.crngnd', 'true', 'ui.action', 'edit','ui.la', '<xsl:value-of select="xtsext:javascriptencode($productLocale)"/>', 'ui.lo', '<xsl:value-of select="xtsext:javascriptencode($contentLocale)"/>');</xsl:attribute>
  2253. <xts:string id="IDS_ACT_EDIT_WPPWX8_DESIGN"/>
  2254. </a>
  2255. </xsl:with-param>
  2256. </xsl:call-template>
  2257. </xsl:if>
  2258. <!--
  2259. ============================================================================
  2260. Action: Schedule
  2261. Requires:
  2262. ============================================================================
  2263. -->
  2264. <xsl:if test="not(contains($ui-obj-act/@exclude, 'schedule')) and $userCanUseSched and (($canRead and $canTraverse and $canExecute) or ($canRead and /root/childObjects/cm:queryResponse/cm:queryReply[1]/cm:schedule != '')) and contains($ui-target-obj-act,'schedule')">
  2265. <xsl:if test="not($isDangling)">
  2266. <xsl:call-template name="render-action">
  2267. <xsl:with-param name="icon-name">
  2268. <xsl:choose>
  2269. <xsl:when test="not($canWrite)">
  2270. <xsl:value-of select=" 'action_schedule.gif' "/>
  2271. </xsl:when>
  2272. <xsl:when test="/root/childObjects/cm:queryResponse/cm:queryReply[1]/cm:schedule != ''">
  2273. <xsl:value-of select=" 'action_edit_schedule.gif' "/>
  2274. </xsl:when>
  2275. <xsl:otherwise>
  2276. <xsl:value-of select=" 'action_new_schedule.gif' "/>
  2277. </xsl:otherwise>
  2278. </xsl:choose>
  2279. </xsl:with-param>
  2280. <xsl:with-param name="icon-alt">
  2281. <xsl:choose>
  2282. <xsl:when test="not($canWrite) or not($canExecute)">
  2283. <xts:string id="IDS_ACT_VIEW_SCHEDULE"/>
  2284. </xsl:when>
  2285. <xsl:when test="/root/childObjects/cm:queryResponse/cm:queryReply[1]/cm:schedule != ''">
  2286. <xts:string id="IDS_ACT_MODIFY_SCHEDULE_ALT"/>
  2287. </xsl:when>
  2288. <xsl:otherwise>
  2289. <xts:string id="IDS_ACT_NEW_SCHEDULE_ALT"/>
  2290. </xsl:otherwise>
  2291. </xsl:choose>
  2292. </xsl:with-param>
  2293. <xsl:with-param name="link-anchor">
  2294. <utml:a utml:op="stack-up" utml:formName="pform">
  2295. <utml:target>
  2296. <xsl:value-of select="$app"/>
  2297. <xsl:choose>
  2298. <xsl:when test="contains('jobDefinition agentDefinition dataMovementTask indexUpdateTask migrationTask contentTask metricsDataSourceETLTask metricsExportTask metricsFileImportTask metricsMaintenanceTask dataMovmentTask planningMacroTask planningTask ', $obj-class)">
  2299. <xsl:value-of select="concat('/schedule/', $obj-class, '.xts')"/>
  2300. </xsl:when>
  2301. <xsl:when test="$obj-class = 'agentDefinitionView'">
  2302. <xsl:value-of select="'/schedule/agentDefinition.xts'"/>
  2303. </xsl:when>
  2304. <xsl:when test="$obj-class = 'dataMovementTaskAlias'">
  2305. <xsl:value-of select="'/schedule/dataMovementTask.xts'"/>
  2306. </xsl:when>
  2307. <xsl:when test="$obj-class = 'exportDeployment' or $obj-class = 'importDeployment'">
  2308. <xsl:value-of select="'/schedule/deployment.xts'"/>
  2309. </xsl:when>
  2310. <xsl:when test="$obj-class = 'queryServiceTask'">
  2311. <xsl:value-of select="'/schedule/generic.xts'"/>
  2312. </xsl:when>
  2313. <xsl:otherwise>
  2314. <xsl:value-of select="'/schedule/report.xts'"/>
  2315. </xsl:otherwise>
  2316. </xsl:choose>
  2317. </utml:target>
  2318. <xsl:if test="$obj-class='shortcut' and not($isDangling)">
  2319. <xsl:attribute name="onclick">javascript:targObj()</xsl:attribute>
  2320. </xsl:if>
  2321. <xsl:choose>
  2322. <xsl:when test="not($canWrite) or not($canExecute)">
  2323. <xts:string id="IDS_ACT_VIEW_SCHEDULE"/>
  2324. </xsl:when>
  2325. <xsl:when test="/root/childObjects/cm:queryResponse/cm:queryReply[1]/cm:schedule != ''">
  2326. <xts:string id="IDS_ACT_MODIFY_SCHEDULE"/>
  2327. </xsl:when>
  2328. <xsl:otherwise>
  2329. <xts:string id="IDS_ACT_NEW_SCHEDULE"/>
  2330. </xsl:otherwise>
  2331. </xsl:choose>
  2332. </utml:a>
  2333. </xsl:with-param>
  2334. </xsl:call-template>
  2335. </xsl:if>
  2336. <xsl:if test="$canWrite and /root/childObjects/cm:queryResponse/cm:queryReply[1]/cm:schedule != '' ">
  2337. <xsl:call-template name="render-action">
  2338. <xsl:with-param name="icon-name" select="'action_remove_schedule.gif'"/>
  2339. <xsl:with-param name="icon-alt"><xts:string id="IDS_ACT_REMOVE_SCHEDULE_ALT"/></xsl:with-param>
  2340. <xsl:with-param name="link-anchor"><a href="javascript:doRemoveSchedule()"><xts:string id="IDS_ACT_REMOVE_SCHEDULE"/></a></xsl:with-param>
  2341. </xsl:call-template>
  2342. </xsl:if>
  2343. </xsl:if>
  2344. <!--
  2345. =================================================================================
  2346. Action: Enable/Disable Schedule for reportDataServiceAgentDefinition (conditional subscription)
  2347. Requires: write, traverse, hasCondSubscriptionsCapability
  2348. =================================================================================
  2349. -->
  2350. <xsl:if test="$tClass='reportDataServiceAgentDefinition' and $hasCondSubscriptionsCapability and $canWrite and $canTraverse">
  2351. <xsl:choose>
  2352. <xsl:when test="string(/root/childObjects/cm:queryResponse/cm:queryReply[1]/cm:schedule/cm:active) = 'true'">
  2353. <xsl:call-template name="render-action">
  2354. <xsl:with-param name="icon-name" select="'action_disable_schedule.gif'"/>
  2355. <xsl:with-param name="icon-alt"><xts:string id="IDS_DISABLE_SCHEDULE_TIP"/></xsl:with-param>
  2356. <xsl:with-param name="link-anchor"><a href="javascript:disableRDSADschedule()"><xts:string id="IDS_ACT_DISABLE_SCHEDULE_RDSAD"/></a></xsl:with-param>
  2357. </xsl:call-template>
  2358. </xsl:when>
  2359. <xsl:otherwise>
  2360. <xsl:call-template name="render-action">
  2361. <xsl:with-param name="icon-name" select="'action_enable_schedule.gif'"/>
  2362. <xsl:with-param name="icon-alt"><xts:string id="IDS_ENABLE_SCHEDULE_TIP"/></xsl:with-param>
  2363. <xsl:with-param name="link-anchor"><a href="javascript:enableRDSADschedule()"><xts:string id="IDS_ACT_ENABLE_SCHEDULE_RDSAD"/></a></xsl:with-param>
  2364. </xsl:call-template>
  2365. </xsl:otherwise>
  2366. </xsl:choose>
  2367. </xsl:if>
  2368. <!--
  2369. ============================================================================
  2370. Action: Run History
  2371. Requires: read permissions, history
  2372. ============================================================================
  2373. -->
  2374. <xsl:if test="not(contains($ui-obj-act/@exclude, 'run_history')) and $canRead and contains($ui-target-obj-act,'run_history') and $history != ''">
  2375. <xsl:variable name="runHistoryPage" select="'/history/view.xts'"/>
  2376. <xsl:call-template name="render-action">
  2377. <xsl:with-param name="icon-name" select="'action_view_run_history.gif'"/>
  2378. <xsl:with-param name="icon-alt"><xts:string id="IDS_IMG_VIEW_HISTORY_ALT"/></xsl:with-param>
  2379. <xsl:with-param name="link-anchor">
  2380. <utml:a utml:op="stack-up" utml:formName="pform">
  2381. <utml:target>
  2382. <xsl:value-of select="$app"/><xsl:value-of select="$runHistoryPage"/><xsl:text/>
  2383. </utml:target>
  2384. <xsl:if test="$obj-class='shortcut' and not($isDangling)">
  2385. <xsl:attribute name="onclick">javascript:targObj()</xsl:attribute>
  2386. </xsl:if>
  2387. <xts:string id="IDS_ACT_VIEW_RUN_HISTORY"/>
  2388. </utml:a>
  2389. </xsl:with-param>
  2390. </xsl:call-template>
  2391. </xsl:if>
  2392. <!--
  2393. ============================================================================
  2394. Action: Clear the Cache
  2395. Requires: read permissions, available report cache
  2396. ============================================================================
  2397. -->
  2398. <xsl:variable name="reportCache">
  2399. <xsl:value-of select="/root/childObjects/cm:queryResponse/cm:queryReply[3]/cm:reportCache/*"/>
  2400. </xsl:variable>
  2401. <xsl:if test="$reportCache != ''">
  2402. <xsl:call-template name="render-action">
  2403. <xsl:with-param name="icon-name" select="'action_clear_cache.gif'"/>
  2404. <xsl:with-param name="icon-alt"><xts:string id="IDS_IMG_CLEAR_CACHE_ALT"/></xsl:with-param>
  2405. <xsl:with-param name="link-anchor">
  2406. <a href="javascript:doClearCache()">
  2407. <xts:string id="IDS_ACT_CLEAR_CACHE"/>
  2408. </a>
  2409. </xsl:with-param>
  2410. </xsl:call-template>
  2411. </xsl:if>
  2412. <!--
  2413. ============================================================================
  2414. Action: Add/Remove Notification for agentDefinition and agentDefinitionView
  2415. Requires: allowNotification set to true, user has email address
  2416. ============================================================================
  2417. -->
  2418. <xsl:if test="contains($ui-target-obj-act,'add_notification') and $userHasEmail">
  2419. <xsl:choose>
  2420. <xsl:when test="$notifyStatus='off' and ($obj-ref/cm:allowNotification = 'true' or $obj-ref/cm:target/*/cm:allowNotification = 'true')">
  2421. <xsl:call-template name="render-action">
  2422. <xsl:with-param name="icon-name" select="'action_add_to_list.gif'"/>
  2423. <xsl:with-param name="icon-alt"><xts:string id="IDS_IMG_ADD_NOTIFICATION_ALT"/></xsl:with-param>
  2424. <xsl:with-param name="link-anchor"><a href="javascript:doAddNotification()"><xts:string id="IDS_ACT_ADD_NOTIFICATION"/></a></xsl:with-param>
  2425. </xsl:call-template>
  2426. </xsl:when>
  2427. <xsl:when test="$notifyStatus='on'">
  2428. <xsl:call-template name="render-action">
  2429. <xsl:with-param name="icon-name" select="'action_remove_from_list.gif'"/>
  2430. <xsl:with-param name="icon-alt"><xts:string id="IDS_IMG_REMOVE_NOTIFICATION_ALT"/></xsl:with-param>
  2431. <xsl:with-param name="link-anchor"><a href="javascript:doRemoveNotification()"><xts:string id="IDS_ACT_REMOVE_NOTIFICATION"/></a></xsl:with-param>
  2432. </xsl:call-template>
  2433. </xsl:when>
  2434. </xsl:choose>
  2435. </xsl:if>
  2436. <!--
  2437. ============================================================================
  2438. Action: Remove All Notifications for agentDefinition and agentDefinitionView
  2439. Requires: allowNotification set to true, user has email address
  2440. ============================================================================
  2441. -->
  2442. <xsl:if test="contains($ui-target-obj-act,'remove_all_notifications') and $canSetPolicy and $userHasEmail">
  2443. <xsl:call-template name="render-action">
  2444. <xsl:with-param name="icon-name" select="'action_remove_all_from_list.gif'"/>
  2445. <xsl:with-param name="icon-alt"><xts:string id="IDS_ACT_REMOVE_ALL_NOTIFICATIONS"/></xsl:with-param>
  2446. <xsl:with-param name="link-anchor"><a href="javascript:doRemoveAllNotifications()"><xts:string id="IDS_ACT_REMOVE_ALL_NOTIFICATIONS"/></a></xsl:with-param>
  2447. </xsl:call-template>
  2448. </xsl:if>
  2449. <!--
  2450. ============================================================================
  2451. Action: Add/Remove Alert for report, query, analysis, and reportViews
  2452. Requires: allowNotification set to true, user has email address
  2453. ============================================================================
  2454. -->
  2455. <xsl:if test="contains($ui-target-obj-act,'add_alert') and $userHasEmail">
  2456. <xsl:choose>
  2457. <xsl:when test="$notifyStatus='off' and ($obj-ref/cm:allowNotification = 'true' or $obj-ref/cm:target/*/cm:allowNotification = 'true')">
  2458. <xsl:call-template name="render-action">
  2459. <xsl:with-param name="icon-name" select="'action_add_to_list.gif'"/>
  2460. <xsl:with-param name="icon-alt"><xts:string id="IDS_ACT_ADD_ALERT"/></xsl:with-param>
  2461. <xsl:with-param name="link-anchor"><a href="javascript:doAddNotification(true)"><xts:string id="IDS_ACT_ADD_ALERT"/></a></xsl:with-param>
  2462. </xsl:call-template>
  2463. </xsl:when>
  2464. <xsl:when test="$notifyStatus='on'">
  2465. <xsl:call-template name="render-action">
  2466. <xsl:with-param name="icon-name" select="'action_remove_from_list.gif'"/>
  2467. <xsl:with-param name="icon-alt"><xts:string id="IDS_ACT_REMOVE_ALERT"/></xsl:with-param>
  2468. <xsl:with-param name="link-anchor"><a href="javascript:doRemoveNotification(true)"><xts:string id="IDS_ACT_REMOVE_ALERT"/></a></xsl:with-param>
  2469. </xsl:call-template>
  2470. </xsl:when>
  2471. </xsl:choose>
  2472. </xsl:if>
  2473. <!--
  2474. ============================================================================
  2475. Action: Remove All Alerts to new versions for report, query, analysis, and reportViews
  2476. Requires: allowNotification set to true, user is authenticated
  2477. ============================================================================
  2478. -->
  2479. <xsl:if test="$notifyStatus !='' and contains($ui-target-obj-act,'remove_all_alerts') and $canSetPolicy and $userHasEmail">
  2480. <xsl:call-template name="render-action">
  2481. <xsl:with-param name="icon-name" select="'action_remove_all_from_list.gif'"/>
  2482. <xsl:with-param name="icon-alt"><xts:string id="IDS_ACT_REMOVE_ALL_ALERT"/></xsl:with-param>
  2483. <xsl:with-param name="link-anchor"><a href="javascript:doRemoveAllNotifications(true)"><xts:string id="IDS_ACT_REMOVE_ALL_ALERT"/></a></xsl:with-param>
  2484. </xsl:call-template>
  2485. </xsl:if>
  2486. <!--
  2487. ============================================================================
  2488. Action: Unregister
  2489. Requires: unregister and 'write' access.
  2490. ============================================================================
  2491. -->
  2492. <xsl:if test="$canWrite and contains($ui-target-obj-act,'unregister')">
  2493. <xsl:call-template name="render-action">
  2494. <xsl:with-param name="icon-name" select="'action_unregister.gif'"/>
  2495. <xsl:with-param name="icon-alt"><xts:string id="IDS_ACTION_UNREGISTER_TIP"/></xsl:with-param>
  2496. <xsl:with-param name="link-anchor"><a href="javascript:doUnregister()"><xts:string id="IDS_ACTION_UNREGISTER"/></a></xsl:with-param>
  2497. </xsl:call-template>
  2498. </xsl:if>
  2499. <!--
  2500. ============================================================================
  2501. Action: Activate
  2502. Requires: activate, admin capability, and a standby running state
  2503. ============================================================================
  2504. -->
  2505. <xsl:if test="$isAdminUser and contains($ui-target-obj-act,'activate') and /root/cm:queryResponse/*/cm:runningState='standby'">
  2506. <xsl:call-template name="render-action">
  2507. <xsl:with-param name="icon-name" select="'action_activate.gif'"/>
  2508. <xsl:with-param name="icon-alt"><xts:string id="IDS_ACTION_ACTIVATE_TIP"/></xsl:with-param>
  2509. <xsl:with-param name="link-anchor"><a href="javascript:doActivate()"><xts:string id="IDS_ACTION_ACTIVATE"/></a></xsl:with-param>
  2510. </xsl:call-template>
  2511. </xsl:if>
  2512. <xsl:variable name="stoppable" select="not(key('env-param', 'm_class')='monitorService')"/>
  2513. <!--
  2514. ============================================================================
  2515. Action: Start
  2516. Requires: start and 'write' access.
  2517. ============================================================================
  2518. -->
  2519. <xsl:if test="$stoppable and $canWrite and contains($ui-target-obj-act,'start')">
  2520. <xsl:call-template name="render-action">
  2521. <xsl:with-param name="icon-name" select="'action_start.gif'"/>
  2522. <xsl:with-param name="icon-alt"><xts:string id="IDS_ACTION_START_TIP"/></xsl:with-param>
  2523. <xsl:with-param name="link-anchor">
  2524. <utml:a utml:op="stack-up" utml:formName="pform">
  2525. <utml:href>
  2526. <xsl:text/>javascript:document.pform.ifrmcmd.value='start';<xsl:text/>
  2527. <xsl:text/>document.pform.m_smt_imm.value='false';<xsl:text/>
  2528. </utml:href>
  2529. <utml:target>
  2530. <xsl:value-of select="$app"/>/dialog_action_result.xts<xsl:text/>
  2531. </utml:target>
  2532. <xts:string id="IDS_ACTION_START"/>
  2533. </utml:a>
  2534. </xsl:with-param>
  2535. </xsl:call-template>
  2536. </xsl:if>
  2537. <!--
  2538. ============================================================================
  2539. Action: Stop Immediately
  2540. Requires: stop_imm and 'write' access.
  2541. ============================================================================
  2542. -->
  2543. <xsl:if test="$stoppable and $canWrite and contains($ui-target-obj-act,'stop_imm')">
  2544. <xsl:call-template name="render-action">
  2545. <xsl:with-param name="icon-name" select="'action_stop.gif'"/>
  2546. <xsl:with-param name="icon-alt"><xts:string id="IDS_ACTION_STOP_IMMEDIATELY_TIP"/></xsl:with-param>
  2547. <xsl:with-param name="link-anchor">
  2548. <utml:a utml:op="stack-up" utml:formName="pform">
  2549. <utml:href>
  2550. <xsl:text/>javascript:document.pform.ifrmcmd.value='stop';<xsl:text/>
  2551. <xsl:text/>document.pform.m_smt_imm.value='true';<xsl:text/>
  2552. </utml:href>
  2553. <utml:target>
  2554. <xsl:value-of select="$app"/>/dialog_action_result.xts<xsl:text/>
  2555. </utml:target>
  2556. <xts:string id="IDS_ACTION_STOP_IMMEDIATELY_ACTION"/>
  2557. </utml:a>
  2558. </xsl:with-param>
  2559. </xsl:call-template>
  2560. </xsl:if>
  2561. <!--
  2562. ============================================================================
  2563. Action: Stop after queue processed
  2564. Requires: stop_queue and 'write' access.
  2565. ============================================================================
  2566. -->
  2567. <xsl:if test="$stoppable and $canWrite and contains($ui-target-obj-act,'stop_queue')">
  2568. <xsl:call-template name="render-action">
  2569. <xsl:with-param name="icon-name" select="'action_stop_after_queue_processed.gif'"/>
  2570. <xsl:with-param name="icon-alt"><xts:string id="IDS_ACTION_STOP_QUEUE_TIP"/></xsl:with-param>
  2571. <xsl:with-param name="link-anchor">
  2572. <utml:a utml:op="stack-up" utml:formName="pform">
  2573. <utml:href>
  2574. <xsl:text/>javascript:document.pform.ifrmcmd.value='stop';<xsl:text/>
  2575. <xsl:text/>document.pform.m_smt_imm.value='false';<xsl:text/>
  2576. </utml:href>
  2577. <utml:target>
  2578. <xsl:value-of select="$app"/>/dialog_action_result.xts<xsl:text/>
  2579. </utml:target>
  2580. <xts:string id="IDS_ACTION_STOP_QUEUE_ACTION"/>
  2581. </utml:a>
  2582. </xsl:with-param>
  2583. </xsl:call-template>
  2584. </xsl:if>
  2585. <!--
  2586. ============================================================================
  2587. Action: Refresh data source connections
  2588. Requires: refrech_connection and 'write' access.
  2589. ============================================================================
  2590. -->
  2591. <!-- only display this link after checking to see if there is a report server or batch report server -->
  2592. <xsl:variable name="componentIdPath" select="/root/*[local-name()='theDispatcher']/*[local-name()='queryResponse']/*[local-name()='queryReply']/*[local-name()='installedComponent']/*[local-name()='componentID']"/>
  2593. <xsl:if test="$canWrite and contains($ui-target-obj-act,'refresh_connection') and ($componentIdPath[cm:value='reportService'] != '' or $componentIdPath[cm:value='batchReportService'] != '')">
  2594. <xsl:call-template name="render-action">
  2595. <xsl:with-param name="icon-name" select="'action_refresh_server_connection.gif'"/>
  2596. <xsl:with-param name="icon-alt"><xts:string id="IDS_ACTION_REFRESH_CONNECTIONS_ALT"/></xsl:with-param>
  2597. <xsl:with-param name="link-anchor">
  2598. <a href="javascript:action('submit.xts','refreshConnections');">
  2599. <xts:string id="IDS_ACTION_REFRESH_CONNECTIONS_ACTION"/>
  2600. </a>
  2601. </xsl:with-param>
  2602. </xsl:call-template>
  2603. </xsl:if>
  2604. <!--
  2605. ============================================================================
  2606. Action: Test (dispatchers, connections, or services)
  2607. Requires: test and 'read' access.
  2608. ============================================================================
  2609. -->
  2610. <xsl:if test="$canRead and contains($ui-target-obj-act,'test')">
  2611. <xsl:call-template name="render-action">
  2612. <xsl:with-param name="icon-name">
  2613. <xsl:choose>
  2614. <xsl:when test="$tClass='dataSourceConnection'">
  2615. <xsl:value-of select="'action_test_connection.gif'"/>
  2616. </xsl:when>
  2617. <xsl:otherwise>
  2618. <xsl:value-of select="'action_test.gif'"/>
  2619. </xsl:otherwise>
  2620. </xsl:choose>
  2621. </xsl:with-param>
  2622. <xsl:with-param name="icon-alt">
  2623. <xsl:choose>
  2624. <xsl:when test="$tClass='dataSourceConnection'">
  2625. <xts:string id="IDS_ACTION_TEST_CONNECTION_TIP"/>
  2626. </xsl:when>
  2627. <xsl:when test="$tClass='dispatcher'">
  2628. <xts:string id="IDS_ACTION_TEST_DISPATCHER_TIP"/>
  2629. </xsl:when>
  2630. <xsl:otherwise>
  2631. <xts:string id="IDS_ACTION_TEST"/>
  2632. </xsl:otherwise>
  2633. </xsl:choose>
  2634. </xsl:with-param>
  2635. <xsl:with-param name="link-anchor">
  2636. <xsl:choose>
  2637. <xsl:when test="$tClass='dataSourceConnection'">
  2638. <utml:a utml:op="maintain" utml:formName="pform">
  2639. <utml:target>
  2640. <xsl:value-of select="$app"/>/test_connection.xts<xsl:text/>
  2641. </utml:target>
  2642. <xts:string id="IDS_PROP_CONN_TEST_CONNECTION"/>
  2643. </utml:a>
  2644. </xsl:when>
  2645. <xsl:otherwise>
  2646. <utml:a utml:op="stack-up" utml:formName="pform">
  2647. <utml:href>
  2648. <xsl:text/>javascript:document.pform.ifrmcmd.value='test';<xsl:text/>
  2649. </utml:href>
  2650. <utml:target>
  2651. <xsl:value-of select="$app"/>/dialog_action_result.xts<xsl:text/>
  2652. </utml:target>
  2653. <xts:string id="IDS_ACTION_TEST"/>
  2654. </utml:a>
  2655. </xsl:otherwise>
  2656. </xsl:choose>
  2657. </xsl:with-param>
  2658. </xsl:call-template>
  2659. </xsl:if>
  2660. <!--
  2661. ============================================================================
  2662. Action: Set Members
  2663. Requires: set_members and 'write' access.
  2664. ============================================================================
  2665. -->
  2666. <xsl:if test="$canWrite and $canRead and contains($ui-target-obj-act,'set_members')">
  2667. <xsl:call-template name="render-action">
  2668. <xsl:with-param name="icon-name" select="'action_set_members.gif'"/>
  2669. <xsl:with-param name="icon-alt">
  2670. <xsl:choose>
  2671. <xsl:when test="$tClass='group'">
  2672. <xts:string id="IDS_IMG_SET_GROUP_MEMBERS_ALT"/>
  2673. </xsl:when>
  2674. <xsl:when test="$tClass='role'">
  2675. <xts:string id="IDS_IMG_SET_ROLE_MEMBERS_ALT"/>
  2676. </xsl:when>
  2677. <xsl:when test="$tClass='distributionList'">
  2678. <xts:string id="IDS_IMG_SET_DL_MEMBERS_ALT"/>
  2679. </xsl:when>
  2680. </xsl:choose>
  2681. </xsl:with-param>
  2682. <xsl:with-param name="link-anchor">
  2683. <a href="javascript:submitAction('properties_members.xts')"><xts:string id="IDS_ACT_SET_MEMBERS"/></a>
  2684. </xsl:with-param>
  2685. </xsl:call-template>
  2686. </xsl:if>
  2687. <!--
  2688. ============================================================================
  2689. Action: Set Preferences
  2690. Requires: set_preferences and 'write' access.
  2691. ============================================================================
  2692. -->
  2693. <xsl:if test="$obj-ref/cm:modificationTime != '' and $canWrite and $canRead and contains($ui-target-obj-act,'set_preferences')">
  2694. <xsl:call-template name="render-action">
  2695. <xsl:with-param name="icon-name" select="'action_set_preferences.gif'"/>
  2696. <xsl:with-param name="icon-alt">
  2697. <xsl:choose>
  2698. <xsl:when test="$tClass='account'">
  2699. <xts:string id="IDS_ACT_SET_PREFERENCES_ACCOUNT"/>
  2700. </xsl:when>
  2701. <xsl:when test="$tClass='contact'">
  2702. <xts:string id="IDS_ACT_SET_PREFERENCES_CONTACT"/>
  2703. </xsl:when>
  2704. </xsl:choose>
  2705. </xsl:with-param>
  2706. <xsl:with-param name="link-anchor">
  2707. <a href="javascript:submitAction('properties_preferences.xts')"><xts:string id="IDS_ACT_SET_PREFERENCES"/></a>
  2708. </xsl:with-param>
  2709. </xsl:call-template>
  2710. </xsl:if>
  2711. <!--
  2712. ============================================================================
  2713. Action: Set Personal Properties
  2714. Requires: set_personal and 'write' access.
  2715. ============================================================================
  2716. -->
  2717. <xsl:if test="$canWrite and $canRead and contains($ui-target-obj-act,'set_personal') and (/root/env/param[@name='m_obj'] != 'CAMID(&quot;::Anonymous&quot;)')">
  2718. <xsl:call-template name="render-action">
  2719. <xsl:with-param name="icon-name" select="'action_set_personal_properties.gif'"/>
  2720. <xsl:with-param name="icon-alt">
  2721. <xsl:choose>
  2722. <xsl:when test="$obj-class='account'">
  2723. <xts:string id="IDS_ACT_SET_PERSONAL_ACCOUNT"/>
  2724. </xsl:when>
  2725. <xsl:when test="$obj-class='contact'">
  2726. <xts:string id="IDS_ACT_SET_PERSONAL_CONTACT"/>
  2727. </xsl:when>
  2728. </xsl:choose>
  2729. </xsl:with-param>
  2730. <xsl:with-param name="link-anchor">
  2731. <a href="javascript:submitAction('properties_personal.xts')"><xts:string id="IDS_ACT_SET_PERSONAL"/></a>
  2732. </xsl:with-param>
  2733. </xsl:call-template>
  2734. </xsl:if>
  2735. <!--
  2736. ============================================================================
  2737. Action: Set Portal Tabs
  2738. Requires: set_personal and 'write' access and a non empty modification time (user has already logged in once).
  2739. ============================================================================
  2740. -->
  2741. <xsl:if test="$obj-class != 'contact' and $canWrite and $canRead and contains($ui-target-obj-act,'set_personal') and (/root/env/param[@name='m_obj'] != 'CAMID(&quot;::Anonymous&quot;)') and ($obj-ref/cm:modificationTime != '')">
  2742. <xsl:call-template name="render-action">
  2743. <xsl:with-param name="icon-name" select="'action_set_portal_pages.gif'"/>
  2744. <xsl:with-param name="icon-alt">
  2745. <xsl:choose>
  2746. <xsl:when test="$obj-class='account'">
  2747. <xts:string id="IDS_ACT_SET_PORTAL_TABS_ACCOUNT"/>
  2748. </xsl:when>
  2749. </xsl:choose>
  2750. </xsl:with-param>
  2751. <xsl:with-param name="link-anchor">
  2752. <a href="javascript:submitAction('properties_mypages.xts')"><xts:string id="IDS_ACT_SET_PORTAL_TABS"/></a>
  2753. </xsl:with-param>
  2754. </xsl:call-template>
  2755. </xsl:if>
  2756. <!--
  2757. ============================================================================
  2758. Action: Reset User
  2759. Requires: reset_user, write on the namesapace in which the account is contained
  2760. and a non empty modification time (user has already logged in once).
  2761. ============================================================================
  2762. -->
  2763. <xsl:if test="$obj-ref/cm:modificationTime != '' and contains($ui-target-obj-act,'reset_user') and contains(/root/*[local-name()='namespacePermissions']/*[local-name()='queryResponse']/*/*[local-name()='permissions'], 'write')">
  2764. <xsl:call-template name="render-action">
  2765. <xsl:with-param name="icon-name" select="'action_delete_user_profile.gif'"/>
  2766. <xsl:with-param name="icon-alt">
  2767. <xts:string id="IDS_ACT_RESET_ACCOUNT_ALT"/>
  2768. </xsl:with-param>
  2769. <xsl:with-param name="link-anchor">
  2770. <a href="javascript:doResetAccount();"><xts:string id="IDS_ACT_RESET_ACCOUNT"/></a>
  2771. </xsl:with-param>
  2772. </xsl:call-template>
  2773. </xsl:if>
  2774. <!--
  2775. ============================================================================
  2776. Action: Migrate User
  2777. Requires: migrate_user, a non empty modification time (user has already logged in once).
  2778. and write on the namesapace in which the account is contained
  2779. ============================================================================
  2780. -->
  2781. <xsl:if test="$obj-ref/cm:modificationTime != '' and contains($ui-target-obj-act,'migrate_user') and contains(/root/*[local-name()='namespacePermissions']/*[local-name()='queryResponse']/*/*[local-name()='permissions'], 'write')">
  2782. <xsl:call-template name="render-action">
  2783. <xsl:with-param name="icon-name" select="'action_copy_user_profile.gif'"/>
  2784. <xsl:with-param name="icon-alt">
  2785. <xts:string id="IDS_ACT_MIGRATE_ACCOUNT_ALT"/>
  2786. </xsl:with-param>
  2787. <xsl:with-param name="link-anchor">
  2788. <a href="javascript:submitAction('migrate_user_account.xts');"><xts:string id="IDS_ACT_MIGRATE_ACCOUNT"/></a>
  2789. </xsl:with-param>
  2790. </xsl:call-template>
  2791. </xsl:if>
  2792. <!--
  2793. ============================================================================
  2794. Action: Create User Profile
  2795. Requires: create_user_profile, an empty modification time (user has never logged in).
  2796. and write access
  2797. ============================================================================
  2798. -->
  2799. <xsl:if test="$obj-ref/cm:modificationTime = '' and contains($ui-target-obj-act, 'create_user_profile') and $canWrite">
  2800. <xsl:call-template name="render-action">
  2801. <xsl:with-param name="icon-name" select="'action_create_user_profile.gif'"/>
  2802. <xsl:with-param name="icon-alt">
  2803. <xts:string id="IDS_ACTION_CREATE_PROFILE"/>
  2804. </xsl:with-param>
  2805. <xsl:with-param name="link-anchor">
  2806. <a href="javascript:action('submit.xts','createUserProfile')"><xts:string id="IDS_ACTION_CREATE_PROFILE"/></a>
  2807. </xsl:with-param>
  2808. </xsl:call-template>
  2809. </xsl:if>
  2810. <!--
  2811. ============================================================================
  2812. Action: Preview this style
  2813. Requires: read access.
  2814. ============================================================================
  2815. -->
  2816. <xsl:if test="$tClass='portalSkin' and $canRead">
  2817. <xsl:call-template name="render-action">
  2818. <xsl:with-param name="icon-name" select="'action_preview_style.gif'"/>
  2819. <xsl:with-param name="icon-alt"><xts:string id="IDS_ACT_PREVIEW_STYLE_ALT"/></xsl:with-param>
  2820. <xsl:with-param name="link-anchor"><a href="javascript:action('preview_style.xts')"><xts:string id="IDS_ACT_PREVIEW_STYLE"/></a></xsl:with-param>
  2821. </xsl:call-template>
  2822. </xsl:if>
  2823. <!--
  2824. ============================================================================
  2825. Action: Preview this portlet
  2826. Requires: read access.
  2827. ============================================================================
  2828. -->
  2829. <xsl:if test="$tClass='portlet' and contains($ui-target-obj-act,'preview') and $canRead and $canExecute and $canReadOnParent">
  2830. <xsl:call-template name="render-action">
  2831. <xsl:with-param name="icon-name" select="'action_preview_portlet.gif'"/>
  2832. <xsl:with-param name="icon-alt"><xts:string id="IDS_ACT_PREVIEW_PORTLET_ALT"/></xsl:with-param>
  2833. <xsl:with-param name="link-anchor">
  2834. <a target="_blank">
  2835. <xsl:attribute name="href"><xsl:value-of select="$gateway"/>?b_action=xts.run&amp;m=<xsl:value-of select="$app"/>/cc.xts&amp;m_portlet=/connection/portlet:<xsl:value-of select="$target-store-id"/>&amp;rui=hh</xsl:attribute>
  2836. <xts:string id="IDS_ACT_PREVIEW_PORTLET"/>
  2837. </a>
  2838. </xsl:with-param>
  2839. </xsl:call-template>
  2840. </xsl:if>
  2841. <!--
  2842. ============================================================================
  2843. Action: Modify Registration (portlet producer)
  2844. Requires: read and write access.
  2845. ============================================================================
  2846. -->
  2847. <xsl:if test="$tClass='portletProducer' and contains($ui-target-obj-act,'registration') and $hasRegistration and $canRead and $canWrite">
  2848. <xsl:call-template name="render-action">
  2849. <xsl:with-param name="icon-name" select="'action_set_registration.gif'"/>
  2850. <xsl:with-param name="icon-alt"><xts:string id="IDS_ACT_SET_REGISTRATION_ALT"/></xsl:with-param>
  2851. <xsl:with-param name="link-anchor">
  2852. <a>
  2853. <xsl:attribute name="href"><xsl:value-of select="$gateway"/>?b_action=xts.run&amp;m=<xsl:value-of select="$app"/>/cc.xts&amp;m_portlet=/admin/portlet:registration&amp;rui=hh&amp;m_pagemode=view&amp;wsrp-urlType=blockingAction&amp;cps-portlet=PORTLETID&amp;producer=/connection/<xsl:value-of select="$target-store-id"/>&amp;backURL=<xsl:value-of select="xtsext:protect(xtsext:urlencode($back-url),'url','url','getdata')"/></xsl:attribute>
  2854. <xts:string id="IDS_ACT_SET_REGISTRATION"/>
  2855. </a>
  2856. </xsl:with-param>
  2857. </xsl:call-template>
  2858. </xsl:if>
  2859. <!--
  2860. ============================================================================
  2861. Action: Edit the producer (portlet producer)
  2862. Requires: read and write access.
  2863. ============================================================================
  2864. -->
  2865. <xsl:if test="$tClass='portletProducer' and contains($ui-target-obj-act,'edit_producer') and $canRead and $canWrite and $canExecute">
  2866. <xsl:call-template name="render-action">
  2867. <xsl:with-param name="icon-name" select="'action_edit_producer.gif'"/>
  2868. <xsl:with-param name="icon-alt"><xts:string id="IDS_ACT_EDIT_PRODUCER_ALT"/></xsl:with-param>
  2869. <xsl:with-param name="link-anchor">
  2870. <a>
  2871. <xsl:attribute name="href"><xsl:value-of select="$gateway"/>?b_action=xts.run&amp;m=<xsl:value-of select="$app"/>/cc.xts&amp;m_portlet=/admin/portlet:binding&amp;rui=hh&amp;m_pagemode=view&amp;wsrp-urlType=blockingAction&amp;cps-portlet=PORTLETID&amp;producer=/connection/<xsl:value-of select="$target-store-id"/>&amp;backURL=<xsl:value-of select="xtsext:protect(xtsext:urlencode($back-url),'url','url','getdata')"/></xsl:attribute>
  2872. <xts:string id="IDS_ACT_EDIT_PRODUCER"/>
  2873. </a>
  2874. </xsl:with-param>
  2875. </xsl:call-template>
  2876. </xsl:if>
  2877. <!--
  2878. ============================================================================
  2879. Action: New Portlet (portlet producer)
  2880. Requires: read, traverse and write access.
  2881. ============================================================================
  2882. -->
  2883. <xsl:if test="$tClass='portletProducer' and contains($ui-target-obj-act,'new_portlet') and $hasRegistration and $canRead and $canWrite and $canTraverse">
  2884. <xsl:call-template name="render-action">
  2885. <xsl:with-param name="icon-name" select="'action_add_portlet_frm_producer.gif'"/>
  2886. <xsl:with-param name="icon-alt"><xts:string id="IDS_ACT_ADD_PORTLET_ALT"/></xsl:with-param>
  2887. <xsl:with-param name="link-anchor">
  2888. <a>
  2889. <xsl:attribute name="href"><xsl:value-of select="$gateway"/>?b_action=xts.run&amp;m=<xsl:value-of select="$app"/>/cc.xts&amp;m_portlet=/admin/portlet:newportlet&amp;rui=hh&amp;m_pagemode=view&amp;wsrp-urlType=blockingAction&amp;cps-portlet=PORTLETID&amp;producer=/connection/<xsl:value-of select="$target-store-id"/>&amp;backURL=<xsl:value-of select="xtsext:protect(xtsext:urlencode($back-url),'url','url','getdata')"/></xsl:attribute>
  2890. <xts:string id="IDS_ACT_ADD_PORTLET"/>
  2891. </a>
  2892. </xsl:with-param>
  2893. </xsl:call-template>
  2894. </xsl:if>
  2895. <!--
  2896. ============================================================================
  2897. Action: Custom Actions ...
  2898. ============================================================================
  2899. -->
  2900. <!-- Base object actions -->
  2901. <xsl:for-each select="$ui-obj-act/action[@type = 'custom']">
  2902. <xsl:variable name="qs">
  2903. <xsl:if test="objProperties/property">
  2904. <xsl:choose>
  2905. <xsl:when test="contains(string(url), '=')">&amp;</xsl:when>
  2906. <xsl:when test="contains(string(url), '?')"></xsl:when>
  2907. <xsl:otherwise>?</xsl:otherwise>
  2908. </xsl:choose>
  2909. <xsl:variable name="encoding">
  2910. <xsl:choose>
  2911. <xsl:when test="objProperties/@encode"><xsl:value-of select="objProperties/@encode"/></xsl:when>
  2912. <xsl:otherwise>utf-8</xsl:otherwise>
  2913. </xsl:choose>
  2914. </xsl:variable>
  2915. <xsl:for-each select="objProperties/property">
  2916. <xsl:if test="position() != 1">&amp;</xsl:if>
  2917. <xsl:value-of select="."/>=<xsl:value-of select="xtsext:protect(xtsext:urlencode(string(/root/cm:queryResponse/*/*[local-name()= string(current())]), string($encoding)),'url',concat('NAME', string(.)),'getdata')"/>
  2918. </xsl:for-each>
  2919. </xsl:if>
  2920. </xsl:variable>
  2921. <xsl:call-template name="render-action">
  2922. <xsl:with-param name="icon-name"><xsl:value-of select="icon"/></xsl:with-param>
  2923. <xsl:with-param name="icon-alt"><xsl:value-of select="tooltip[lang($productLocale)]"/></xsl:with-param>
  2924. <xsl:with-param name="link-anchor"><a href="{url}{$qs}"><xsl:value-of select="label[lang($productLocale)]"/></a></xsl:with-param>
  2925. </xsl:call-template>
  2926. </xsl:for-each>
  2927. <!-- Target object actions -->
  2928. <xsl:if test="$obj-class != 'drillPath'">
  2929. <xsl:for-each select="$ui-tobj-act/action[@type = 'custom']">
  2930. <xsl:variable name="qs">
  2931. <xsl:if test="objProperties/property">
  2932. <xsl:choose>
  2933. <xsl:when test="contains(string(url), '=')">&amp;</xsl:when>
  2934. <xsl:when test="contains(string(url), '?')"></xsl:when>
  2935. <xsl:otherwise>?</xsl:otherwise>
  2936. </xsl:choose>
  2937. <xsl:variable name="encoding">
  2938. <xsl:choose>
  2939. <xsl:when test="objProperties/@encode"><xsl:value-of select="objProperties/@encode"/></xsl:when>
  2940. <xsl:otherwise>utf-8</xsl:otherwise>
  2941. </xsl:choose>
  2942. </xsl:variable>
  2943. <xsl:for-each select="objProperties/property">
  2944. <xsl:if test="position() != 1">&amp;</xsl:if>
  2945. <xsl:value-of select="."/>=<xsl:value-of select="xtsext:protect(xtsext:urlencode(string(/root/cm:queryResponse/*/cm:target/*/*[local-name()= string(current())]), string($encoding)),'url',concat('NAME', string(.)),'getdata')"/>
  2946. </xsl:for-each>
  2947. </xsl:if>
  2948. </xsl:variable>
  2949. <xsl:call-template name="render-action">
  2950. <xsl:with-param name="icon-name"><xsl:value-of select="icon"/></xsl:with-param>
  2951. <xsl:with-param name="icon-alt"><xsl:value-of select="tooltip[lang($productLocale)]"/></xsl:with-param>
  2952. <xsl:with-param name="link-anchor"><a href="{url}{$qs}"><xsl:value-of select="label[lang($productLocale)]"/></a></xsl:with-param>
  2953. </xsl:call-template>
  2954. </xsl:for-each>
  2955. </xsl:if>
  2956. </xsl:variable>
  2957. <!-- Store output for edit actions in a variable -->
  2958. <xsl:variable name="edit-actions">
  2959. <!--
  2960. ##################################################################################
  2961. S E C T I O N 3 - Edit Actions
  2962. ##################################################################################
  2963. -->
  2964. <!--
  2965. ============================================================================
  2966. Action: Move
  2967. Requires: move, 'read' & 'write' access on the object, and 'write' on the parent.
  2968. NOTE:
  2969. **** Edit actions are always against the current object (ui-obj-act and not ui-target-obj-act as in
  2970. **** the case of a 'shortcut' class).
  2971. ============================================================================
  2972. -->
  2973. <xsl:if test="not(contains($ui-obj-act/@exclude, 'move')) and $currentCanRead and $currentCanWrite and $canWriteOnParent and not($is3rdPartyNSEntry)">
  2974. <xsl:call-template name="render-action">
  2975. <xsl:with-param name="icon-name" select="'action_move.gif'"/>
  2976. <xsl:with-param name="icon-alt"><xts:string id="IDS_ACT_MOVE_TIP"/></xsl:with-param>
  2977. <xsl:with-param name="link-anchor"><a href="javascript:actionMove()"><xts:string id="IDS_ACT_MOVE"/></a></xsl:with-param>
  2978. </xsl:call-template>
  2979. </xsl:if>
  2980. <!--
  2981. ================================================================================================================
  2982. Action: Copy
  2983. Requires: from Ojbect Model : On object r,t On Parent t (On Target w t ) for /content objects. Spoke w/Daniel and /portal objects need w on producer
  2984. ================================================================================================================
  2985. -->
  2986. <xsl:if test="not(contains($ui-obj-act/@exclude, 'copy')) and $currentCanRead and not($is3rdPartyNSEntry) and not(not($canWriteOnParent) and (/root/env/param[@name='m_class']='portlet'))">
  2987. <xsl:call-template name="render-action">
  2988. <xsl:with-param name="icon-name" select="'action_copy.gif'"/>
  2989. <xsl:with-param name="icon-alt"><xts:string id="IDS_ACT_COPY_TIP"/></xsl:with-param>
  2990. <xsl:with-param name="link-anchor"><a href="javascript:action('save_as.xts','copy','{$obj-class}')"><xts:string id="IDS_ACT_COPY"/></a></xsl:with-param>
  2991. </xsl:call-template>
  2992. </xsl:if>
  2993. <!--
  2994. ============================================================================
  2995. Action: New shortcut
  2996. Requires: shortcut
  2997. ============================================================================
  2998. -->
  2999. <xsl:if test="not(contains($ui-obj-act/@exclude, 'shortcut')) and $ui-obj-act/action[@name = 'shortcut'] and $parent-obj-class!='adminFolder'">
  3000. <xsl:call-template name="render-action">
  3001. <xsl:with-param name="icon-name" select="'action_new_ref.gif'"/>
  3002. <xsl:with-param name="icon-alt"><xts:string id="IDS_ACT_SHORTCUT_TIP"/></xsl:with-param>
  3003. <xsl:with-param name="link-anchor"><a href="javascript:action('new_general.xts','','shortcut')"><xts:string id="IDS_ACT_SHORTCUT"/></a></xsl:with-param>
  3004. </xsl:call-template>
  3005. </xsl:if>
  3006. <!--
  3007. ============================================================================
  3008. Action: Custom view
  3009. Requires: customview and 'read' & 'execute' access.
  3010. ============================================================================
  3011. -->
  3012. <xsl:if test="not(contains($ui-obj-act/@exclude, 'customview')) and contains($ui-target-obj-act,'customview')">
  3013. <xsl:choose>
  3014. <xsl:when test="$tClass='powerPlay8Report' and ($canRead or $canExecute)">
  3015. <xsl:call-template name="render-action">
  3016. <xsl:with-param name="icon-name" select="'action_new_custom_view.gif'"/>
  3017. <xsl:with-param name="icon-alt"><xts:string id="IDS_ACT_CUSTOM_PP8"/></xsl:with-param>
  3018. <xsl:with-param name="link-anchor">
  3019. <xsl:if test="$obj-class!='shortcut'">
  3020. <a href="javascript:action('new_general.xts','','powerPlay8ReportView')"><xts:string id="IDS_ACT_CUSTOM_PP8_EX"/></a>
  3021. </xsl:if>
  3022. <xsl:if test="$obj-class='shortcut'">
  3023. <a onclick="javascript:targObj()" href="javascript:action('new_general.xts','','powerPlay8ReportView')"><xts:string id="IDS_ACT_CUSTOM_PP8_EX"/></a>
  3024. </xsl:if>
  3025. </xsl:with-param>
  3026. </xsl:call-template>
  3027. </xsl:when>
  3028. <xsl:when test="$tClass='dataMovementTask' and ($canRead or $canExecute)">
  3029. <xsl:call-template name="render-action">
  3030. <xsl:with-param name="icon-name" select="'action_new_custom_view.gif'"/>
  3031. <xsl:with-param name="icon-alt"><xts:string id="IDS_ACT_CUSTOM_DMT"/></xsl:with-param>
  3032. <xsl:with-param name="link-anchor">
  3033. <xsl:if test="$obj-class!='shortcut'">
  3034. <a href="javascript:action('new_general.xts','','dataMovementTaskAlias')"><xts:string id="IDS_ACT_CUSTOM_DMT_EX"/></a>
  3035. </xsl:if>
  3036. <xsl:if test="$obj-class='shortcut'">
  3037. <a onclick="javascript:targObj()" href="javascript:action('new_general.xts','','dataMovementTaskAlias')"><xts:string id="IDS_ACT_CUSTOM_DMT_EX"/></a>
  3038. </xsl:if>
  3039. </xsl:with-param>
  3040. </xsl:call-template>
  3041. </xsl:when>
  3042. <xsl:when test="not(starts-with(string($tClass),'agentDef')) and ($canRead or $canExecute)">
  3043. <xsl:call-template name="render-action">
  3044. <xsl:with-param name="icon-name" select="'action_new_custom_view.gif'"/>
  3045. <xsl:with-param name="icon-alt"><xts:string id="IDS_ACT_CUSTOM"/></xsl:with-param>
  3046. <xsl:with-param name="link-anchor">
  3047. <xsl:if test="$obj-class!='shortcut'">
  3048. <a href="javascript:action('new_general.xts','','reportView')"><xts:string id="IDS_ACT_CUSTOM_EX"/></a>
  3049. </xsl:if>
  3050. <xsl:if test="$obj-class='shortcut'">
  3051. <a onclick="javascript:targObj()" href="javascript:action('new_general.xts','','reportView')"><xts:string id="IDS_ACT_CUSTOM_EX"/></a>
  3052. </xsl:if>
  3053. </xsl:with-param>
  3054. </xsl:call-template>
  3055. </xsl:when>
  3056. <xsl:when test="starts-with(string($tClass),'agentDef') and $canRead and $canTraverse">
  3057. <xsl:call-template name="render-action">
  3058. <xsl:with-param name="icon-name" select="'action_new_custom_view.gif'"/>
  3059. <xsl:with-param name="icon-alt"><xts:string id="IDS_ACT_CUSTOM_AGENT"/></xsl:with-param>
  3060. <xsl:with-param name="link-anchor">
  3061. <xsl:if test="$obj-class!='shortcut'">
  3062. <a href="javascript:action('new_general.xts','','agentDefinitionView')"><xts:string id="IDS_ACT_CUSTOM_AGENT_EX"/></a>
  3063. </xsl:if>
  3064. <xsl:if test="$obj-class='shortcut'">
  3065. <a onclick="javascript:targObj()" href="javascript:action('new_general.xts','','agentDefinitionView')"><xts:string id="IDS_ACT_CUSTOM_AGENT_EX"/></a>
  3066. </xsl:if>
  3067. </xsl:with-param>
  3068. </xsl:call-template>
  3069. </xsl:when>
  3070. </xsl:choose>
  3071. </xsl:if>
  3072. <!--
  3073. ============================================================================
  3074. Action: Bookmark This Item
  3075. Requires: read or write or execute access.
  3076. ============================================================================
  3077. -->
  3078. <xsl:variable name="getURLForBookmark">
  3079. <xsl:for-each select="/root/cm:queryResponse/*">
  3080. <!-- Call gen-url to get the default action URL -->
  3081. <xsl:call-template name="gen-url">
  3082. <xsl:with-param name="canExecute" select="$canExecute"/>
  3083. <xsl:with-param name="canRead" select="$canRead"/>
  3084. <xsl:with-param name="canTraverse" select="$canTraverse"/>
  3085. <xsl:with-param name="output_format" select="$output_format"/>
  3086. <xsl:with-param name="class" select="$class"/>
  3087. <xsl:with-param name="userInterfaces" select="$userInterfaces"/>
  3088. <xsl:with-param name="targetUserInterfaces" select="$targetUserInterfaces"/>
  3089. <xsl:with-param name="action" select="$action"/>
  3090. <xsl:with-param name="isDangling" select="$isDangling"/>
  3091. <xsl:with-param name="isContainer" select="key('ui-object', string($class))/@container = 'T'"/>
  3092. <xsl:with-param name="canWrite" select="$canWrite"/>
  3093. <xsl:with-param name="morphlet" select="$defaultMorphlet"/>
  3094. <xsl:with-param name="url-encoded-id" select="$url-encoded-id"/>
  3095. <xsl:with-param name="canReadParent" select="contains(/root/cm:queryResponse/*/cm:parent/*/cm:permissions, 'read')"/>
  3096. <xsl:with-param name="hasChildren" select="cm:hasChildren = 'true'"/>
  3097. <xsl:with-param name="genURLForBookmark" select="true()"/>
  3098. <xsl:with-param name="effectiveUserCapabilities" select="$effectiveUserCapabilities"/>
  3099. </xsl:call-template>
  3100. </xsl:for-each>
  3101. </xsl:variable>
  3102. <xsl:if test="string($getURLForBookmark) != '' and $browser = 'ie'"> <!-- Only display this action if there is a default url to bookmark, and we are using IE -->
  3103. <xsl:choose>
  3104. <xsl:when test="$tClass = 'launchable' and $launchableType ='application/vnd.ibm.cognos.cd'">
  3105. <!-- MVC - No bookmarking for MVC Content Reference! -->
  3106. </xsl:when>
  3107. <xsl:when test="$tClass = 'launchable' and $launchableType ='application/vnd.ibm.cognos.instance'">
  3108. <!-- MVC - No bookmarking for MVC Content Reference! -->
  3109. </xsl:when>
  3110. <xsl:otherwise>
  3111. <xsl:call-template name="render-action">
  3112. <xsl:with-param name="icon-name" select="'action_add_bookmark.gif'"/>
  3113. <xsl:with-param name="icon-alt"><xts:string id="IDS_ACT_ADD_BOOKMARK_TT"/></xsl:with-param>
  3114. <xsl:with-param name="link-anchor">
  3115. <a href="#">
  3116. <xsl:attribute name="onclick">window.external.AddFavorite('<xsl:value-of select="xtsext:javascriptencode($getURLForBookmark)"/>','<xts:string id="IDS_BOOKMARK_NAME_FORMAT" encode="javascript"><xts:param name="action"><xsl:value-of select="xtsext:javascriptencode($actionString)"/></xts:param><xts:param name="objName"><xsl:value-of select="xtsext:javascriptencode($obj-name)"/></xts:param></xts:string>')</xsl:attribute>
  3117. <xts:string id="IDS_ACT_ADD_BOOKMARK"/>
  3118. </a>
  3119. </xsl:with-param>
  3120. </xsl:call-template>
  3121. </xsl:otherwise>
  3122. </xsl:choose>
  3123. </xsl:if>
  3124. <!--
  3125. ============================================================================
  3126. Action: Delete
  3127. Requires: delete and ('write' or 'setPolicy' access on the object) and 'write' on the parent, and if it's a configuration folder, it must not contain contents.
  3128. ============================================================================
  3129. -->
  3130. <xsl:if test="not(contains($ui-obj-act/@exclude, 'delete')) and (($currentCanWrite or $canSetPolicy) and $canWriteOnParent) and not($obj-class = 'configurationFolder' and $hasChildren = 'true') and not($is3rdPartyNSEntry)">
  3131. <xsl:call-template name="render-action">
  3132. <xsl:with-param name="icon-name" select="'action_delete.gif'"/>
  3133. <xsl:with-param name="icon-alt"><xts:string id="IDS_ACT_DELETE_TIP"/></xsl:with-param>
  3134. <xsl:with-param name="link-anchor"><a href="javascript:doDelete()"><xts:string id="IDS_ACT_DELETE"/></a></xsl:with-param>
  3135. </xsl:call-template>
  3136. </xsl:if>
  3137. </xsl:variable>
  3138. <xsl:if test=" $currentCanRead or $currentCanWrite or $canExecute or $actions != '' or $edit-actions != '' ">
  3139. <xsl:if test="$actions != ''">
  3140. <dp:division/>
  3141. <xsl:copy-of select="$actions"/>
  3142. </xsl:if>
  3143. <xsl:if test="$edit-actions != ''">
  3144. <dp:division/>
  3145. <xsl:copy-of select="$edit-actions"/>
  3146. </xsl:if>
  3147. </xsl:if>
  3148. </lyt:section>
  3149. </lyt:layout>
  3150. <dp:footer>
  3151. <df:button df:id="IDS_CANCEL" df:style="back-url"/>
  3152. </dp:footer>
  3153. </utml:form>
  3154. </dp:page>
  3155. </xsl:template>
  3156. <!--
  3157. This template renders the redundant code for each action item.
  3158. Parameters:
  3159. icon-name The portion of the image's URL that comes after $image_root.
  3160. icon-alt The string (not the id) that appears as the images tooltip.
  3161. link-anchor The code that actually renders the hyperlink (<a> or <utml:a>).
  3162. -->
  3163. <xsl:template name="render-action">
  3164. <xsl:param name="icon-name" select="concat('icon_',$sys-ui-target-icon,'.gif')"/>
  3165. <xsl:param name="icon-alt"/>
  3166. <xsl:param name="link-anchor"/>
  3167. <xsl:copy-of select="$link-anchor//script"/>
  3168. <dp:list>
  3169. <dp:section>
  3170. <dp:label/>
  3171. <dp:text>
  3172. <xsl:for-each select="$link-anchor/*[local-name() != 'script']">
  3173. <span>
  3174. <img border="0" vspace="2" height="16" width="16">
  3175. <xsl:attribute name="src"><xsl:value-of select="concat($image_root, $icon-name)"/></xsl:attribute>
  3176. <xsl:attribute name="alt"><xsl:value-of select="normalize-space($icon-alt)"/></xsl:attribute>
  3177. <xsl:attribute name="title"><xsl:value-of select="normalize-space($icon-alt)"/></xsl:attribute>
  3178. </img>
  3179. </span>
  3180. </xsl:for-each>
  3181. </dp:text>
  3182. <xsl:for-each select="$link-anchor/*[local-name() != 'script']">
  3183. <xsl:copy>
  3184. <xsl:copy-of select="./*|@*"/>
  3185. <xsl:value-of select="text()"/>
  3186. </xsl:copy>
  3187. </xsl:for-each>
  3188. </dp:section>
  3189. </dp:list>
  3190. </xsl:template>
  3191. <!-- Variables needed for pf:gen-url -->
  3192. <xsl:variable name="location" select="''"/>
  3193. <xsl:variable name="request-url-params">
  3194. <xsl:if test="/root/env/param[@name='rui']">
  3195. <xsl:text/>&amp;rui=<xsl:value-of select="xtsext:protect(xtsext:urlencode(string(/root/env/param[@name='rui'])),'url','rui','getdata')"/>
  3196. </xsl:if>
  3197. </xsl:variable>
  3198. <!-- Back URLs will be stripped from the final URL, so these variables may be blank. -->
  3199. <xsl:variable name="encodedPPBack" select="''"/>
  3200. <xsl:variable name="encodedPP8Back" select="''"/>
  3201. <xsl:variable name="javascript-encodedPP8Back" select="''"/>
  3202. <xsl:variable name="encoded-back-url" select="''"/>
  3203. <xsl:variable name="encoded-s7-back-url" select="''"/>
  3204. <pf:gen-action/>
  3205. <pf:gen-action-string/>
  3206. <pf:gen-url/>
  3207. </xsl:stylesheet>
  3208. </xts:block>
  3209. <!-- Debug -->
  3210. <xts:block id="debug" type="exec" dependency="format missingObject" mode="output" condition=".[ /root/session/param[@name='debug'] = '1' ]" processor="XSLT" mandatory="false" mimeType="text/html" >
  3211. <xts:logicsheet path="logicsheets/debuglogic.xslt"/>
  3212. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:dbg="http://developer.cognos.com/schemas/xts/logicsheets/xslt/debug/" exclude-result-prefixes="dbg">
  3213. <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no" doctype-system="" doctype-public=""/>
  3214. <dbg:templates/>
  3215. <xsl:template match="/">
  3216. <dbg:dumpxml select="/root"/>
  3217. </xsl:template>
  3218. </xsl:stylesheet>
  3219. </xts:block>
  3220. </xts:morphlet>