welcome.xsl 53 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317
  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, 2014
  6. US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  7. -->
  8. <!--
  9. Copyright (C) 2008 Cognos ULC, an IBM Company. All rights reserved.
  10. Cognos (R) is a trademark of Cognos ULC, (formerly Cognos Incorporated).
  11. -->
  12. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  13. xmlns:out="dummy-uri"
  14. xmlns:wl="http://developer.cognos.com/schemas/xts/logicsheets/welcome/wl"
  15. xmlns:mf="http://developer.cognos.com/schemas/xts/logicsheets/presentation/main/mf"
  16. xmlns:cp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/presentation/"
  17. xmlns:pf="http://developer.cognos.com/schemas/xts/pf" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  18. xmlns:xts="http://developer.cognos.com/schemas/xts/"
  19. xmlns:skinCache="com.cognos.portal.skin.SkinCache">
  20. <xsl:output method="xml" encoding="UTF-8" indent="no"/>
  21. <xsl:namespace-alias stylesheet-prefix="out" result-prefix="xsl"/>
  22. <!-- Default welcome screen layout/rendering -->
  23. <xsl:template match="wl:welcome">
  24. <!-- In lite mode we skip rendering the header and footer -->
  25. <out:variable name="liteMode" select="/root/env/param[@name='basewelcome']"/>
  26. <div>
  27. <out:attribute name="style">
  28. <out:text>text-align:center;</out:text>
  29. <out:if test="not(/root/env/param[@name='basewelcome'])">height:100%</out:if>
  30. </out:attribute>
  31. <div id="welcomePageBorder">
  32. <!-- Header -->
  33. <div class="welcomeTop">
  34. <div class="welcomeFixedBarTop"></div>
  35. <div class="welcomeTopPanelBodyWrapper">
  36. <div class="welcomeTopPanelBody">
  37. <out:if test="not($liteMode)">
  38. <table border="0" cellpadding="0" cellspacing="0" width="100%" class="" role="presentation" style="position: absolute; bottom: 0; margin-bottom: 35px;">
  39. <tr>
  40. <td role="presentation">
  41. <div class="welcomeHeaderIcon"></div>
  42. </td>
  43. </tr>
  44. <tr>
  45. <out:call-template name="renderCompanyLogo"/>
  46. <!-- <td role="presentation" valign="top" align="right">
  47. <out:call-template name="renderHeaderOptions"/>
  48. </td>
  49. -->
  50. <!-- <td role="presentation" id="ibmLogo"></td> -->
  51. </tr>
  52. </table>
  53. </out:if>
  54. <out:if test="$liteMode">
  55. <out:call-template name="renderHeaderOptions"/>
  56. </out:if>
  57. </div>
  58. </div>
  59. </div>
  60. <!-- The main course -->
  61. <div class="welcomeContent">
  62. <div class="welcomeBottomBody">
  63. <table border="0" cellpadding="0" cellspacing="0" width="100%" class="welcomeMiddlePanel" role="presentation">
  64. <tr>
  65. <td role="presentation">
  66. <div style="float: right; margin: 0px 30px;"><out:call-template name="renderHeaderOptions"/></div>
  67. </td>
  68. </tr>
  69. <tr>
  70. <td>
  71. <out:call-template name="renderTools"/>
  72. </td>
  73. </tr>
  74. <tr>
  75. <td role="presentation">
  76. <!-- Footer options -->
  77. <table border="0" cellpadding="0" cellspacing="0" width="100%" role="presentation">
  78. <tr>
  79. <td role="presentation" align="left" width="100%">
  80. <out:call-template name="renderWelcomeScreenVisibilityControl"/>
  81. </td>
  82. </tr>
  83. </table>
  84. </td>
  85. </tr>
  86. </table>
  87. </div>
  88. </div>
  89. <div class="welcomeFixedBarBottom"></div>
  90. </div>
  91. </div>
  92. </xsl:template>
  93. <!-- Welcome page parts -->
  94. <xsl:template match="wl:common-templates">
  95. <!--
  96. ========================================================================================
  97. Build the tools inventory one by one. Start with the built-in ones then the custom ones.
  98. ========================================================================================
  99. -->
  100. <out:variable name="tools">
  101. <!-- Home -->
  102. <tool name="Home">
  103. <xsl:call-template name="buildActionMarkUp">
  104. <xsl:with-param name="tool">
  105. <heading><xts:string id="IDS_WELCOME_GO_HOME"/></heading>
  106. <action>launchWelcomeTool('home')</action>
  107. <out:attribute name="src"><out:value-of select="$brand_images"/>home_32.gif</out:attribute>
  108. <body>
  109. <xts:string id="IDS_WELCOME_VIEW_GO_HOME"/>
  110. </body>
  111. </xsl:with-param>
  112. <xsl:with-param name="ariaID">goHomeID</xsl:with-param>
  113. </xsl:call-template>
  114. </tool>
  115. <!-- My Dashboard -->
  116. <out:variable name="hasFavorites" select="/root/favorites/dashboard/*[local-name()='flyout']"/>
  117. <!-- only show my dashboard link if there are favorites -->
  118. <out:if test="$userCanUseDashboardViewer and $hasFavorites">
  119. <tool name="MyDashboard">
  120. <xsl:call-template name="buildFavoritesMarkUp">
  121. <xsl:with-param name="tool">
  122. <id>dashboard</id>
  123. <heading><xts:string id="IDS_WELCOME_DASHBOARD"/></heading>
  124. <out:attribute name="src"><out:value-of select="$brand_images"/>cognos_dashboard_app_32.gif</out:attribute>
  125. </xsl:with-param>
  126. </xsl:call-template>
  127. </tool>
  128. </out:if>
  129. <!-- Portal -->
  130. <tool name="ViewCognosContent">
  131. <xsl:call-template name="buildActionMarkUp">
  132. <xsl:with-param name="tool">
  133. <heading><xts:string id="IDS_WELCOME_VIEW_BI"/></heading>
  134. <action>launchWelcomeTool('cc')</action>
  135. <out:attribute name="src"><out:value-of select="$brand_images"/>cognos_connection_app_32.gif</out:attribute>
  136. <body>
  137. <out:variable name="ccLnk">
  138. <xts:string id="IDS_PORTAL"/>
  139. </out:variable>
  140. <xts:string id="IDS_WELCOME_VIEW_BI_DESC">
  141. <xts:param name="ccLink"><out:value-of select="$ccLnk"/></xts:param>
  142. </xts:string>
  143. </body>
  144. </xsl:with-param>
  145. <xsl:with-param name="ariaID">viewCCID</xsl:with-param>
  146. </xsl:call-template>
  147. </tool>
  148. <!-- Portal -->
  149. <out:if test="not(contains($ui_black_list, 'CRN_HEADER_PERSONAL_myinbox')) and $userCanUseMyInbox">
  150. <tool name="MyInbox">
  151. <xsl:call-template name="buildActionMarkUp">
  152. <xsl:with-param name="tool">
  153. <heading><xts:string id="IDS_WELCOME_MYINBOX"/></heading>
  154. <action>launchWelcomeTool('mi')</action>
  155. <out:attribute name="src"><out:value-of select="$brand_images"/>cognos_my_inbox_app_32.gif</out:attribute>
  156. <body>
  157. <xts:string id="IDS_WELCOME_MYINBOX_DESC">
  158. </xts:string>
  159. </body>
  160. </xsl:with-param>
  161. <xsl:with-param name="ariaID">myInboxID</xsl:with-param>
  162. </xsl:call-template>
  163. </tool>
  164. </out:if>
  165. <out:if test="$userCanUseMyDataSets">
  166. <tool name="MyDataset">
  167. <xsl:call-template name="buildActionMarkUp">
  168. <xsl:with-param name="tool">
  169. <heading><xts:string id="IDS_WELCOME_MYDATASET"/></heading>
  170. <action>launchWelcomeTool('pd')</action>
  171. <out:attribute name="src"><out:value-of select="$brand_images"/>cognos_my_datasets_app_32.gif</out:attribute>
  172. <body>
  173. <xts:string id="IDS_WELCOME_MYDATASET_DESC">
  174. </xts:string>
  175. </body>
  176. </xsl:with-param>
  177. <xsl:with-param name="ariaID">myDatasetID</xsl:with-param>
  178. </xsl:call-template>
  179. </tool>
  180. </out:if>
  181. <!-- Cognos Administration -->
  182. <out:if test="$userCanUseAdminConsole">
  183. <tool name="Administration">
  184. <xsl:call-template name="buildActionMarkUp">
  185. <xsl:with-param name="tool">
  186. <heading><xts:string id="IDS_WELCOME_ADMINISTER_CONTENT"/></heading>
  187. <action>launchWelcomeTool('ac')</action>
  188. <out:attribute name="src"><out:value-of select="$brand_images"/>cognos_administration_app_32.gif</out:attribute>
  189. <body>
  190. <out:variable name="adminLnk">
  191. <xts:string id="IDS_TOOLS_CA"/>
  192. </out:variable>
  193. <xts:string id="IDS_WELCOME_COGNOS_ADMINISTRATION">
  194. <xts:param name="adminLink"><out:value-of select="$adminLnk"/></xts:param>
  195. </xts:string>
  196. </body>
  197. </xsl:with-param>
  198. <xsl:with-param name="ariaID">adminID</xsl:with-param>
  199. </xsl:call-template>
  200. </tool>
  201. </out:if>
  202. <!-- IBM Cognos Dashboard -->
  203. <out:choose>
  204. <out:when test="$userCanUseDashboardViewer and $userCanUseAdvancedDashboardFeatures">
  205. <tool name="IBMCognosDashboard">
  206. <xsl:call-template name="buildActionMarkUp">
  207. <xsl:with-param name="tool">
  208. <heading><xts:string id="IDS_WELCOME_IBM_COGNOS_DASHBOARD"/></heading>
  209. <action>launchWelcomeTool('IBMCognosDashboard')</action>
  210. <out:attribute name="src"><out:value-of select="$brand_images"/>cognos_dashboard_app_32.gif</out:attribute>
  211. <body>
  212. <xts:string id="IDS_WELCOME_IBM_COGNOS_DASHBOARD_DESC"/>
  213. </body>
  214. </xsl:with-param>
  215. <xsl:with-param name="ariaID">dbViewerID</xsl:with-param>
  216. </xsl:call-template>
  217. </tool>
  218. </out:when>
  219. <!-- both consumer and interact use term 'view my workspaces' -->
  220. <out:when test="$userCanUseDashboardViewer">
  221. <tool name="IBMCognosDashboard">
  222. <xsl:call-template name="buildActionMarkUp">
  223. <xsl:with-param name="tool">
  224. <heading><xts:string id="IDS_WELCOME_IBM_COGNOS_DASHBOARD_VIEW"/></heading>
  225. <action>launchWelcomeTool('IBMCognosDashboard')</action>
  226. <out:attribute name="src"><out:value-of select="$brand_images"/>cognos_dashboard_app_32.gif</out:attribute>
  227. <body>
  228. <xts:string id="IDS_WELCOME_IBM_COGNOS_DASHBOARD_VIEW_DESC"/>
  229. </body>
  230. </xsl:with-param>
  231. <xsl:with-param name="ariaID">dbViewerID</xsl:with-param>
  232. </xsl:call-template>
  233. </tool>
  234. </out:when>
  235. </out:choose>
  236. <out:if test="($userCanUseRS or $userCanUseFullRS) and $rsBIAProfile">
  237. <tool name="ReportStudioBUA">
  238. <xsl:call-template name="buildActionMarkUp">
  239. <xsl:with-param name="tool">
  240. <heading><xts:string id="IDS_WELCOME_IBM_COGNOS_EXPLORER"/></heading>
  241. <action>launchWelcomeTool('rsbua')</action>
  242. <out:attribute name="src"><out:value-of select="$brand_images"/>report_studio_bua_app_32.gif</out:attribute>
  243. <body>
  244. <xts:string id="IDS_WELCOME_IBM_COGNOS_EXPLORER_DESC"/>
  245. </body>
  246. </xsl:with-param>
  247. <xsl:with-param name="ariaID">rsID</xsl:with-param>
  248. </xsl:call-template>
  249. </tool>
  250. </out:if>
  251. <out:if test="$userCanUseCI">
  252. <tool name="CognosInsight">
  253. <xsl:call-template name="buildActionMarkUp">
  254. <xsl:with-param name="tool">
  255. <heading><xts:string id="IDS_WELCOME_IBM_COGNOS_INSIGHT"/></heading>
  256. <action>launchWelcomeTool('ci')</action>
  257. <out:attribute name="src"><out:value-of select="$brand_images"/>cognos_insight_app_32.gif</out:attribute>
  258. <body>
  259. <xts:string id="IDS_WELCOME_IBM_COGNOS_INSIGHT_DESC"/>
  260. </body>
  261. </xsl:with-param>
  262. <xsl:with-param name="ariaID">ciID</xsl:with-param>
  263. </xsl:call-template>
  264. </tool>
  265. </out:if>
  266. <!-- Contributor -->
  267. <out:if test="$userCanUsePlanningContributor">
  268. <tool name="Planning">
  269. <xsl:call-template name="buildActionMarkUp">
  270. <xsl:with-param name="tool">
  271. <heading><xts:string id="IDS_WELCOME_PLANNING"/></heading>
  272. <action>launchWelcomeTool('pc')</action>
  273. <out:attribute name="src"><out:value-of select="$brand_images"/>contributor_app_32.gif</out:attribute>
  274. <body>
  275. <out:variable name="planningLnk">
  276. <xts:string id="IDS_TOOLS_CONTRIBUTOR"/>
  277. </out:variable>
  278. <xts:string id="IDS_WELCOME_VIEW_PLANNING">
  279. <xts:param name="planningLink">
  280. <out:value-of select="$planningLnk"/>
  281. </xts:param>
  282. </xts:string>
  283. </body>
  284. </xsl:with-param>
  285. <xsl:with-param name="ariaID">planID</xsl:with-param>
  286. </xsl:call-template>
  287. </tool>
  288. </out:if>
  289. <!-- Controller -->
  290. <out:if test="$userCanUseControllerStudio">
  291. <tool name="Controller">
  292. <xsl:call-template name="buildActionMarkUp">
  293. <xsl:with-param name="tool">
  294. <heading><xts:string id="IDS_WELCOME_CONTROLLER"/></heading>
  295. <action>cognosLaunch('ui.gateway', sGateway, 'ui.tool', 'Controller')</action>
  296. <out:attribute name="src"><out:value-of select="$brand_images"/>controller_app_32.gif</out:attribute>
  297. <body>
  298. <out:variable name="controllerLnk">
  299. <xts:string id="IDS_TOOLS_CONTROLLER"/>
  300. </out:variable>
  301. <xts:string id="IDS_WELCOME_VIEW_CONTROLLER">
  302. <xts:param name="controllerLink">
  303. <out:value-of select="$controllerLnk"/>
  304. </xts:param>
  305. </xts:string>
  306. </body>
  307. </xsl:with-param>
  308. <xsl:with-param name="ariaID">controllerID</xsl:with-param>
  309. </xsl:call-template>
  310. </tool>
  311. </out:if>
  312. <!-- CMM -->
  313. <out:if test="$userCanUseMetricsManager">
  314. <tool name="MetricsManager">
  315. <xsl:call-template name="buildActionMarkUp">
  316. <xsl:with-param name="tool">
  317. <heading><xts:string id="IDS_WELCOME_MONITOR_PERFORMANCE"/></heading>
  318. <action>launchWelcomeTool('cmm')</action>
  319. <out:attribute name="src"><out:value-of select="$brand_images"/>metric_studio_app_32.gif</out:attribute>
  320. <body>
  321. <out:variable name="cmmLnk">
  322. <xts:string id="IDS_TOOL_CMM"/>
  323. </out:variable>
  324. <xts:string id="IDS_WELCOME_VIEW_CMM">
  325. <xts:param name="cmmLink">
  326. <out:value-of select="$cmmLnk"/>
  327. </xts:param>
  328. </xts:string>
  329. </body>
  330. </xsl:with-param>
  331. <xsl:with-param name="ariaID">cmmID</xsl:with-param>
  332. </xsl:call-template>
  333. </tool>
  334. </out:if>
  335. <!-- Adaptive Analytics -->
  336. <out:if test="$userCanUseAdaptiveAnalyticsAdministration">
  337. <tool name="AdaptiveAnalytics">
  338. <xsl:call-template name="buildActionMarkUp">
  339. <xsl:with-param name="tool">
  340. <heading><xts:string id="IDS_WELCOME_ANALYTICS_DATA"/></heading>
  341. <action>launchWelcomeTool('aa')</action>
  342. <out:attribute name="src"><out:value-of select="$brand_images"/>adaptive_analytics_app_32.gif</out:attribute>
  343. <body>
  344. <out:variable name="analyticsLnk">
  345. <xts:string id="IDS_TOOLS_ANALYTICS"/>
  346. </out:variable>
  347. <xts:string id="IDS_WELCOME_VIEW_ANALYTICS">
  348. <xts:param name="analyticsLink">
  349. <out:value-of select="$analyticsLnk"/>
  350. </xts:param>
  351. </xts:string>
  352. </body>
  353. </xsl:with-param>
  354. <xsl:with-param name="ariaID">aaID</xsl:with-param>
  355. </xsl:call-template>
  356. </tool>
  357. </out:if>
  358. <!-- query Studio -->
  359. <out:if test="$userCanUseFullQS">
  360. <tool name="QueryStudio">
  361. <xsl:call-template name="buildActionMarkUp">
  362. <xsl:with-param name="tool">
  363. <heading><xts:string id="IDS_WELCOME_QUERY_DATA"/></heading>
  364. <action>launchWelcomeTool('qs')</action>
  365. <out:attribute name="src"><out:value-of select="$brand_images"/>query_studio_app_32.gif</out:attribute>
  366. <body>
  367. <out:variable name="qryLnk">
  368. <xts:string id="IDS_TOOLS_QUERY"/>
  369. </out:variable>
  370. <xts:string id="IDS_WELCOME_CREATE_NEW_QUERY">
  371. <xts:param name="queryLink">
  372. <out:value-of select="$qryLnk"/>
  373. </xts:param>
  374. </xts:string>
  375. </body>
  376. </xsl:with-param>
  377. <xsl:with-param name="ariaID">qsID</xsl:with-param>
  378. </xsl:call-template>
  379. </tool>
  380. </out:if>
  381. <!-- Analysis Studio -->
  382. <out:if test="$userCanUseANS">
  383. <tool name="AnalysisStudio">
  384. <xsl:call-template name="buildActionMarkUp">
  385. <xsl:with-param name="tool">
  386. <heading><xts:string id="IDS_WELCOME_ANALYSE_DATA"/></heading>
  387. <action>launchWelcomeTool('as')</action>
  388. <out:attribute name="src"><out:value-of select="$brand_images"/>analysis_studio_app_32.gif</out:attribute>
  389. <body>
  390. <out:variable name="ppLnk">
  391. <xts:string id="IDS_TOOLS_ANALYSIS"/>
  392. </out:variable>
  393. <xts:string id="IDS_WELCOME_CREATE_NEW_ANALYSIS">
  394. <xts:param name="analysisLink">
  395. <out:value-of select="$ppLnk"/>
  396. </xts:param>
  397. </xts:string>
  398. </body>
  399. </xsl:with-param>
  400. <xsl:with-param name="ariaID">analysisID</xsl:with-param>
  401. </xsl:call-template>
  402. </tool>
  403. </out:if>
  404. <!-- Powerplay -->
  405. <out:if test="$userCanUsePPS">
  406. <tool name="PowerplayStudio">
  407. <xsl:call-template name="buildActionMarkUp">
  408. <xsl:with-param name="tool">
  409. <heading><xts:string id="IDS_WELCOME_ANALYSE_DATA_POWERPLAY"/></heading>
  410. <action>launchWelcomeTool('pp')</action>
  411. <out:attribute name="src"><out:value-of select="$brand_images"/>powerplay_studio_app_32.gif</out:attribute>
  412. <body>
  413. <out:variable name="pp2Lnk">
  414. <xts:string id="IDS_TOOLS_POWERPLAY"/>
  415. </out:variable>
  416. <xts:string id="IDS_WELCOME_CREATE_NEW_POWERPLAY">
  417. <xts:param name="powerplayLink">
  418. <out:value-of select="$pp2Lnk"/>
  419. </xts:param>
  420. </xts:string>
  421. </body>
  422. </xsl:with-param>
  423. <xsl:with-param name="ariaID">ppsID</xsl:with-param>
  424. </xsl:call-template>
  425. </tool>
  426. </out:if>
  427. <!-- Report studio -->
  428. <out:if test="$userCanUseFullRS">
  429. <tool name="ReportStudioPro">
  430. <xsl:call-template name="buildActionMarkUp">
  431. <xsl:with-param name="tool">
  432. <heading><xts:string id="IDS_WELCOME_CREATE_NEW"/></heading>
  433. <action>launchWelcomeTool('rspro')</action>
  434. <out:attribute name="src"><out:value-of select="$brand_images"/>report_studio_app_32.gif</out:attribute>
  435. <body>
  436. <out:variable name="rptLnk">
  437. <xts:string id="IDS_TOOLS_REPORT"/>
  438. </out:variable>
  439. <xts:string id="IDS_WELCOME_CREATE_NEW_REPORT">
  440. <xts:param name="reportLink">
  441. <out:value-of select="$rptLnk"/>
  442. </xts:param>
  443. </xts:string>
  444. </body>
  445. </xsl:with-param>
  446. <xsl:with-param name="ariaID">fullRSID</xsl:with-param>
  447. </xsl:call-template>
  448. </tool>
  449. </out:if>
  450. <!-- agent studio -->
  451. <out:if test="$userCanUseAGS">
  452. <tool name="EventStudio">
  453. <xsl:call-template name="buildActionMarkUp">
  454. <xsl:with-param name="tool">
  455. <heading><xts:string id="IDS_WELCOME_CREATE_AGT"/></heading>
  456. <action>launchWelcomeTool('es')</action>
  457. <out:attribute name="src"><out:value-of select="$brand_images"/>event_studio_app_32.gif</out:attribute>
  458. <body>
  459. <out:variable name="agsLnk">
  460. <xts:string id="IDS_TOOLS_AGENT"/>
  461. </out:variable>
  462. <xts:string id="IDS_WELCOME_CREATE_NEW_AGENT">
  463. <xts:param name="agentLink">
  464. <out:value-of select="$agsLnk"/>
  465. </xts:param>
  466. </xts:string>
  467. </body>
  468. </xsl:with-param>
  469. <xsl:with-param name="ariaID">agsID</xsl:with-param>
  470. </xsl:call-template>
  471. </tool>
  472. </out:if>
  473. <!-- Lotus Connections Activities -->
  474. <out:if test="$userCanLaunchCollaborationTools and ($hasLCHomepage or $hasLCActivities)">
  475. <tool name="LotusConnectionsActions">
  476. <out:variable name="lcAction">
  477. <out:choose>
  478. <out:when test="$hasLCHomepage">launchWelcomeTool('lch')</out:when>
  479. <out:otherwise>launchWelcomeTool('lca')</out:otherwise>
  480. </out:choose>
  481. </out:variable>
  482. <out:variable name="lcHeading">
  483. <out:choose>
  484. <out:when test="$hasLCHomepage"><xts:string id="IDS_WELCOME_LOTUSCONNECTIONS"/></out:when>
  485. <out:otherwise><xts:string id="IDS_WELCOME_LOTUSCONNECTIONS_ACTIVITIES"/></out:otherwise>
  486. </out:choose>
  487. </out:variable>
  488. <out:variable name="lcBody">
  489. <out:choose>
  490. <out:when test="$hasLCHomepage"><xts:string id="IDS_WELCOME_LOTUSCONNECTIONS_DESC"/></out:when>
  491. <out:otherwise><xts:string id="IDS_WELCOME_LOTUSCONNECTIONS_ACTIVITIES_DESC"/></out:otherwise>
  492. </out:choose>
  493. </out:variable>
  494. <xsl:call-template name="buildActionMarkUp">
  495. <xsl:with-param name="tool">
  496. <heading><out:value-of select="$lcHeading"/></heading>
  497. <action out-var="$lcAction"/>
  498. <out:attribute name="src"><out:value-of select="$brand_images"/>lotusconnections_32.gif</out:attribute>
  499. <body><out:value-of select="$lcBody"/></body>
  500. </xsl:with-param>
  501. <xsl:with-param name="ariaID">lotusConnectionsID</xsl:with-param>
  502. </xsl:call-template>
  503. </tool>
  504. </out:if>
  505. <!-- custom tools -->
  506. <out:for-each select="/root/welcome/tool[@type='custom' and (not(@group) or @group = '')]">
  507. <tool>
  508. <out:attribute name="name"><out:value-of select="@name"/></out:attribute>
  509. <out:attribute name="show"><out:value-of select="@show"/></out:attribute>
  510. <xsl:call-template name="buildCustomActionMarkUp">
  511. <xsl:with-param name="tool">
  512. <heading><out:copy-of select="./heading[@xml:lang = string($productLocale)]"/></heading>
  513. <body><out:copy-of select="./body[@xml:lang = string($productLocale)]"/></body>
  514. </xsl:with-param>
  515. </xsl:call-template>
  516. </tool>
  517. </out:for-each>
  518. </out:variable>
  519. <!--
  520. ========================================================================================
  521. Output templates to build markup for the bits and pieces that appear on the screen
  522. ========================================================================================
  523. -->
  524. <!-- logo -->
  525. <out:template name="renderCompanyLogo">
  526. <out:variable name="smuCustomWelcomeTitle">
  527. <out:variable name="customWelcomePageTitle">/uiSkin/branding/welcomePage/value[@name='cognos.connection.welcomepage']</out:variable>
  528. <out:value-of disable-output-escaping="yes" select="skinCache:getSkinPropertyStatic(key('session-param', 'skin'), string($customWelcomePageTitle), string(/root/cookies/cookie[@name='cam_passport']))"/>
  529. </out:variable>
  530. <out:choose>
  531. <out:when test="$smuCustomWelcomeTitle != ''">
  532. <td role="presentation" class="welcomeHeaderTitle" onclick="debug(event)">
  533. <out:copy-of select="$smuCustomWelcomeTitle"/>
  534. </td>
  535. </out:when>
  536. <out:otherwise>
  537. <td role="presentation" class="welcomeHeaderTitle" onclick="debug(event)">
  538. <xts:string id="IDS_COGNOS_REPORTS"/>
  539. </td>
  540. </out:otherwise>
  541. </out:choose>
  542. </out:template>
  543. <!-- Header Options -->
  544. <out:template name="renderHeaderOptions">
  545. <table border="0" cellpadding="0" cellspacing="0" role="presentation">
  546. <tr>
  547. <!-- User Name -->
  548. <out:if test=" $is-named = '1' ">
  549. <td role="presentation">
  550. <div class="welcomeUserNameContainer">
  551. <out:choose>
  552. <out:when test="key('session-param', 'e_showTenantInfo') = 'true' and key('session-param', 'e_tenantDisplayName') != ''">
  553. <xts:string id="IDS_USERINFO_WITHTENANT">
  554. <xts:param name="userName"><out:value-of select="key('session-param', 'e_user')"/></xts:param>
  555. <xts:param name="tenantName"><out:value-of select="key('session-param', 'e_tenantDisplayName')"/></xts:param>
  556. </xts:string>
  557. </out:when>
  558. <out:otherwise>
  559. <xts:string id="IDS_USERINFO">
  560. <xts:param name="userName"><out:value-of select="key('session-param', 'e_user')"/></xts:param>
  561. </xts:string>
  562. </out:otherwise>
  563. </out:choose>
  564. </div>
  565. </td>
  566. </out:if>
  567. <!-- Logon -->
  568. <td role="presentation" class="welcomeAuthentication">
  569. <out:if test="$is-secure = '1'">
  570. <out:if test="not(contains($ui_black_list, 'CC_HEADER_MENU_logon')) and key('session-param', 'show_logon') = 'true'">
  571. <out:choose>
  572. <out:when test="$is-named='1'">
  573. <a onclick="delCookie('cc_state');"
  574. href="{'{$gateway}?b_action=xts.run&amp;m=portal/main.xts&amp;startwel=yes&amp;h_CAM_action=logon&amp;m_reload='}">
  575. <out:if test="$anchorTarget != ''">
  576. <out:attribute name="target">
  577. <out:value-of select="$anchorTarget"/>
  578. </out:attribute>
  579. </out:if>
  580. <xts:string id="IDS_TOOLS_LOGON"/>
  581. </a>
  582. </out:when>
  583. <out:otherwise>
  584. <a onclick="delCookie('cc_state')" href="{'{$gateway}?b_action=xts.run&amp;m=portal/main.xts&amp;startwel=yes&amp;h_CAM_action=logon&amp;m_reload='}">
  585. <out:if test="$anchorTarget != ''">
  586. <out:attribute name="target">
  587. <out:value-of select="$anchorTarget"/>
  588. </out:attribute>
  589. </out:if>
  590. <xts:string id="IDS_TOOLS_LOGON"/>
  591. </a>
  592. </out:otherwise>
  593. </out:choose>
  594. </out:if>
  595. <!-- Logoff -->
  596. <out:if test="$is-named = '1' and not(contains($ui_black_list, 'CC_HEADER_MENU_logoff'))">
  597. <out:if test="not(contains($ui_black_list, 'CC_HEADER_MENU_logon')) and key('session-param', 'show_logon') = 'true'">
  598. <span>&#160;&#124;&#160;</span>
  599. </out:if>
  600. <a onclick="delCookie('cc_state');" href="{'{$gateway}'}?b_action=xts.run&amp;m={'{$app}'}/logoff.xts&amp;h_CAM_action=logoff">
  601. <out:if test="$anchorTarget != ''">
  602. <out:attribute name="target">
  603. <out:value-of select="$anchorTarget"/>
  604. </out:attribute>
  605. </out:if>
  606. <xts:string id="IDS_TOOLS_LOGOFF"/>
  607. </a>
  608. </out:if>
  609. </out:if>
  610. </td>
  611. </tr>
  612. </table>
  613. </out:template>
  614. <!-- Tools -->
  615. <out:template name="renderTools">
  616. <!-- First: sort the tools into groups -->
  617. <!-- Portal -->
  618. <out:variable name="portalGroup">
  619. <out:for-each select="/root/welcome/tool[@group = 'portal']">
  620. <out:variable name="userAllowedToSeeThisTool">
  621. <out:call-template name="isVisible">
  622. <out:with-param name="visibility" select="@show"/>
  623. </out:call-template>
  624. </out:variable>
  625. <out:variable name="currentToolName" select="@name"/>
  626. <out:if test="$userAllowedToSeeThisTool = 'true'">
  627. <out:copy-of select="$tools/tool[@name = $currentToolName]/*"/>
  628. </out:if>
  629. </out:for-each>
  630. </out:variable>
  631. <!-- Admin -->
  632. <out:variable name="adminGroup">
  633. <out:for-each select="/root/welcome/tool[@group = 'admin']">
  634. <out:variable name="userAllowedToSeeThisTool">
  635. <out:call-template name="isVisible">
  636. <out:with-param name="visibility" select="@show"/>
  637. </out:call-template>
  638. </out:variable>
  639. <out:variable name="currentToolName" select="@name"/>
  640. <out:if test="$userAllowedToSeeThisTool = 'true'">
  641. <out:copy-of select="$tools/tool[@name = $currentToolName]/*"/>
  642. </out:if>
  643. </out:for-each>
  644. </out:variable>
  645. <!-- CPM -->
  646. <out:variable name="appGroup">
  647. <out:for-each select="/root/welcome/tool[@group = 'app']">
  648. <out:variable name="userAllowedToSeeThisTool">
  649. <out:call-template name="isVisible">
  650. <out:with-param name="visibility" select="@show"/>
  651. </out:call-template>
  652. </out:variable>
  653. <out:variable name="currentToolName" select="@name"/>
  654. <out:if test="$userAllowedToSeeThisTool = 'true'">
  655. <out:copy-of select="$tools/tool[@name = $currentToolName]/*"/>
  656. </out:if>
  657. </out:for-each>
  658. </out:variable>
  659. <!-- Custom tools that don't belong in any of the built in groups -->
  660. <out:variable name="noNameGroup">
  661. <out:for-each select="/root/welcome/tool[@group = '' or not(@group)]">
  662. <out:variable name="userAllowedToSeeThisTool">
  663. <out:call-template name="isVisible">
  664. <out:with-param name="visibility" select="@show"/>
  665. </out:call-template>
  666. </out:variable>
  667. <out:variable name="currentToolName" select="@name"/>
  668. <out:if test="$userAllowedToSeeThisTool = 'true'">
  669. <out:copy-of select="$tools/tool[@name = $currentToolName]/*"/>
  670. </out:if>
  671. </out:for-each>
  672. </out:variable>
  673. <table border="0" width="100%" cellpadding="222" cellspacing="0" role="presentation">
  674. <tr>
  675. <!-- Portal Stuff - there are always items to show here. -->
  676. <!-- This can be empty if the welcome.xml is from blaring or older and there are
  677. no group attributes -->
  678. <out:if test="$portalGroup/*">
  679. <td valign="top" width="50%" class="welcomeToolGroupContainer">
  680. <div>
  681. <table border="0" width="100%" cellpadding="0" cellspacing="0" role="presentation">
  682. <tr>
  683. <td role="presentation" colspan="2">
  684. <table border="0" width="100%" cellpadding="0" cellspacing="0" role="presentation">
  685. <tr>
  686. <td role="presentation"><div class="welcomeToolGroupHeaderLeft"/></td>
  687. <td role="presentation" class="welcomeToolGroupHeaderContainer"><xts:string id="IDS_WELCOME_GROUP_MY_CONTENT"/></td>
  688. <td role="presentation"><div class="welcomeToolGroupHeaderRight"/></td>
  689. </tr>
  690. </table>
  691. </td>
  692. </tr>
  693. <tr>
  694. <td valign="top" colspan="1" class="welcomeToolGroupBody"><out:copy-of select="$portalGroup"/></td>
  695. <td valign="top" align="right"><div /></td>
  696. </tr>
  697. </table>
  698. </div>
  699. </td>
  700. </out:if>
  701. <!-- App Stuff -->
  702. <out:if test="$appGroup/*">
  703. <td valign="top" width="50%" class="welcomeToolGroupContainer" rowspan="33">
  704. <div>
  705. <table border="0" width="100%" cellpadding="0" cellspacing="0" role="presentation">
  706. <tr>
  707. <td role="presentation" colspan="2">
  708. <table border="0" width="100%" cellpadding="0" cellspacing="0" role="presentation">
  709. <tr>
  710. <td role="presentation"><div class="welcomeToolGroupHeaderLeft"/></td>
  711. <td role="presentation" class="welcomeToolGroupHeaderContainer"><xts:string id="IDS_WELCOME_GROUP_MY_ACTIONS"/></td>
  712. <td role="presentation"><div class="welcomeToolGroupHeaderRight"/></td>
  713. </tr>
  714. </table>
  715. </td>
  716. </tr>
  717. <tr>
  718. <td valign="top" colspan="1" class="welcomeToolGroupBody"><out:copy-of select="$appGroup"/></td>
  719. <td valign="top" align="right"><div /></td>
  720. </tr>
  721. </table>
  722. </div>
  723. </td>
  724. </out:if>
  725. </tr>
  726. <tr>
  727. <!-- Admin Stuff -->
  728. <out:if test="$adminGroup/*">
  729. <td valign="top" width="50%" class="welcomeToolGroupContainer">
  730. <div class="welcomeToolGroupContainerBorderTop">
  731. <table border="0" width="100%" cellpadding="0" cellspacing="0" role="presentation">
  732. <tr>
  733. <td role="presentation" colspan="2">
  734. <table border="0" width="100%" cellpadding="0" cellspacing="0" role="presentation">
  735. <tr>
  736. <td role="presentation"><div class="welcomeToolGroupHeaderLeft borderBottom"/></td>
  737. <td role="presentation" class="welcomeToolGroupHeaderContainer borderBottom"><xts:string id="IDS_WELCOME_GROUP_ADMINISTRATION"/></td>
  738. <td role="presentation"><div class="welcomeToolGroupHeaderRight borderBottom"/></td>
  739. </tr>
  740. </table>
  741. </td>
  742. </tr>
  743. <tr>
  744. <td valign="top" colspan="1" class="welcomeToolGroupBody"><out:copy-of select="$adminGroup"/></td>
  745. <td valign="top" align="right"><div /></td>
  746. </tr>
  747. </table>
  748. </div>
  749. </td>
  750. </out:if>
  751. </tr>
  752. <out:if test="$noNameGroup/*">
  753. <tr>
  754. <td valign="top" width="50%" class="welcomeToolGroupContainer">
  755. <div class="welcomeToolGroupContainerBorderTop">
  756. <table border="0" width="100%" cellpadding="0" cellspacing="0" role="presentation">
  757. <tr>
  758. <td role="presentation" colspan="2">
  759. <table border="0" width="100%" cellpadding="0" cellspacing="0" role="presentation">
  760. <tr>
  761. <td role="presentation"><div class="welcomeToolGroupHeaderLeft"/></td>
  762. <td role="presentation" class="welcomeToolGroupHeaderContainer"></td>
  763. <td role="presentation"><div class="welcomeToolGroupHeaderRight"/></td>
  764. </tr>
  765. </table>
  766. </td>
  767. </tr>
  768. <tr>
  769. <td valign="top" colspan="1" class="welcomeToolGroupBody"><out:copy-of select="$noNameGroup"/></td>
  770. <td valign="top" align="right"><div /></td>
  771. </tr>
  772. </table>
  773. </div>
  774. </td>
  775. </tr>
  776. </out:if>
  777. </table>
  778. </out:template>
  779. <!-- Show/Hide welcome screen -->
  780. <out:template name="renderWelcomeScreenVisibilityControl">
  781. <div class="welcomeHideShowContainer">
  782. <script language="javascript">
  783. function showWelcomeClicked()
  784. {
  785. var sBackURL = "<out:value-of select="$gateway"/>?b_action=xts.run&amp;m=portal/welcome/welcome.xts";
  786. <out:if test="/root/env/param[@name='basewelcome']">
  787. sBackURL += "&amp;basewelcome=yes";
  788. </out:if>
  789. <out:if test="/root/env/param[@name='wtarget']">
  790. sBackURL += "&amp;wtarget=" + "<out:value-of select="xtsext:javascriptencode(/root/env/param[@name='wtarget'])"/>";
  791. </out:if>
  792. var showWelcomePage = 'true';
  793. <out:if test="not(string(/root/user/param[@name='showWelcomePage']) = 'false')">
  794. showWelcomePage = 'false';
  795. </out:if>
  796. document.updateOptionsForm.m_po_showWelcomePage.value = showWelcomePage;
  797. document.updateOptionsForm.backURL.value = sBackURL;
  798. document.updateOptionsForm.submit();
  799. }
  800. </script>
  801. <form name="welcomdisform" style="margin:0px">
  802. <table class="welcomeHideShowNormal" role="checkbox" border="0" cellpadding="0" cellspacing="0" tabindex="0"
  803. aria-labelledby="labelForHideWelcome"
  804. onmouseover="this.className='welcomeHideShowOver';" onfocus="this.className='welcomeHideShowOver'"
  805. onmouseout="this.className='welcomeHideShowNormal'" onblur="this.className='welcomeHideShowNormal'"
  806. onclick="showWelcomeClicked()"
  807. onkeypress="if(event.keyCode==9) return true; if(event.keyCode==13 || event.charCode==32 || event.keyCode==32) showWelcomeClicked(); return false;"
  808. >
  809. <out:choose>
  810. <out:when test="not(string(/root/user/param[@name='showWelcomePage']) = 'false')">
  811. <out:attribute name="aria-checked">true</out:attribute>
  812. </out:when>
  813. <out:otherwise>
  814. <out:attribute name="aria-checked">false</out:attribute>
  815. </out:otherwise>
  816. </out:choose>
  817. <tr>
  818. <td role="presentation">
  819. <input id="m_p_do_not_show_welcome" name="m_p_do_not_show_welcome" type="checkbox" tabindex="-1" aria-labelledby="labelForHideWelcome">
  820. <out:if test="not(string(/root/user/param[@name='showWelcomePage']) = 'false')">
  821. <out:attribute name="checked">yes</out:attribute>
  822. </out:if>
  823. </input>
  824. </td>
  825. <td id="labelForHideWelcome" role="presentation" class="welcomeHideShowText">
  826. <xts:string id="IDS_WELCOME_SHOW_PAGE"/>
  827. </td>
  828. </tr>
  829. </table>
  830. </form>
  831. <form name="updateOptionsForm" method="post" action="{'{$gateway}'}" style="margin:0px">
  832. <input name="b_action" type="hidden" value="xts.run"/>
  833. <input name="m" type="hidden" value="portal/submit.xts"/>
  834. <input name="m_obj" type="hidden" value="~"/>
  835. <input name="m_class" type="hidden" value="account"/>
  836. <input name="ifrmcmd" type="hidden" value="save"/>
  837. <input name="m_po_showWelcomePage" value="" type="hidden"/>
  838. <input name="backURL" value="" type="hidden"/>
  839. <!-- Insert a cafcontextid if it is needed -->
  840. <out:if test="xtsext:cafaction('get_extendedcontextid', '') = 'true'">
  841. <input type="hidden" name="ui.cafcontextid">
  842. <out:attribute name="value">
  843. <out:value-of select="xtsext:cafaction(concat('get_contextid_settemplatename_mainframeworkxsl_setcomponent_ps_setpassportid_', $passport), '')"/>
  844. </out:attribute>
  845. </input>
  846. </out:if>
  847. </form>
  848. </div>
  849. </out:template>
  850. <!--
  851. Helper template:
  852. Evaluates a "show" attribute on a customized UI element to determine if the element can be shown
  853. Takes a string value (@show) and returns a boolean.
  854. -->
  855. <out:template name="isVisible">
  856. <out:param name="visibility"/>
  857. <out:value-of select="(string($visibility) = '') or
  858. (contains( concat(' ', $visibility, ' '), 'Administrators') and $isAdminUser) or
  859. (contains(concat(' ', $visibility, ' ') , 'QSUsers') and $userCanUseFullQS) or
  860. (contains(concat(' ', $visibility, ' ') , 'RSUsers') and $userCanUseFullRS) or
  861. (contains(concat(' ', $visibility, ' ') , 'Consumers') and $is-named='1') or
  862. (contains(concat(' ', $visibility, ' ') , 'Anonymous') and $is-named='0') or
  863. (key('system-param', 'ui_groups')/group[contains(concat(' ', $visibility, ' '), concat(' ', @id, ' ')) and
  864. contains( key('session-param', 'uig'), concat(' ', @id, ' '))])"/>
  865. </out:template>
  866. </xsl:template>
  867. <!-- Builds ready to go HTML markup for one action (tool). -->
  868. <xsl:template name="buildActionMarkUp">
  869. <xsl:param name="tool"/>
  870. <xsl:param name="ariaID"/>
  871. <xsl:variable name="actionID">
  872. <xsl:value-of select="$ariaID"/>
  873. </xsl:variable>
  874. <div class="welcomeToolContainerNormal" tabindex="0"
  875. onmouseover="this.className='welcomeToolContainerOver'"
  876. onfocus="this.className='welcomeToolContainerOver'"
  877. onmouseout="this.className='welcomeToolContainerNormal'"
  878. onblur="this.className='welcomeToolContainerNormal'"
  879. id="{$actionID}_link"
  880. role="link">
  881. <out:attribute name="aria-labelledby">
  882. <xsl:value-of select="$actionID"/>
  883. </out:attribute>
  884. <out:attribute name="title">
  885. <xsl:copy-of select="$tool/body"/>
  886. </out:attribute>
  887. <xsl:if test="$tool/action">
  888. <xsl:variable name="out-var" select="$tool/action/@out-var"/>
  889. <out:attribute name="onclick">
  890. <xsl:choose>
  891. <xsl:when test="$out-var!=''"><out:value-of select="{$out-var}"/></xsl:when>
  892. <xsl:otherwise><xsl:value-of select="$tool/action"/></xsl:otherwise>
  893. </xsl:choose>
  894. </out:attribute>
  895. <out:attribute name="onkeypress"><out:text>if(event.keyCode==9) return true; else if (event.keyCode==13 || event.charCode==32 || event.keyCode==32) </out:text>
  896. <xsl:choose>
  897. <xsl:when test="$out-var!=''"><out:value-of select="{$out-var}"/></xsl:when>
  898. <xsl:otherwise><xsl:value-of select="$tool/action"/></xsl:otherwise>
  899. </xsl:choose>
  900. </out:attribute>
  901. </xsl:if>
  902. <span style="position:absolute; margin-left: -9999px; margin-top: -9999px">
  903. <out:attribute name="id">
  904. <xsl:value-of select="$actionID"/>
  905. </out:attribute>
  906. <xsl:copy-of select="$tool/body"/>
  907. </span>
  908. <table border="0" width="100%" cellpadding="0" cellspacing="0" role="presentation">
  909. <tr role="presentation">
  910. <td role="presentation" class="welcomeToolIconContainer" >
  911. <img role="presentation">
  912. <out:attribute name="alt"><xsl:copy-of select="$tool/heading"/></out:attribute>
  913. <xsl:copy-of select="$tool/out:attribute"/>
  914. </img>
  915. </td>
  916. <td role="presentation" class="welcomeToolHeadingContainer" ><xsl:copy-of select="$tool/heading/child::node()"/></td>
  917. </tr>
  918. </table>
  919. </div>
  920. </xsl:template>
  921. <!-- Builds ready to go HTML markup for custom welcome tools -->
  922. <xsl:template name="buildCustomActionMarkUp">
  923. <xsl:param name="tool"/>
  924. <div class="welcomeToolContainer">
  925. <div class="welcomeToolHeading">
  926. <xsl:copy-of select="$tool/heading"/>
  927. </div>
  928. <div class="welcomeToolDescription">
  929. <xsl:copy-of select="$tool/body"/>
  930. </div>
  931. </div>
  932. </xsl:template>
  933. <xsl:template name="buildFavoritesMarkUp">
  934. <xsl:param name="tool"/>
  935. <out:variable name="favs" select="/root/favorites"/>
  936. <out:variable name="flyout" select="$favs/*[local-name()='{$tool/id}']/*[local-name()='flyout']"/>
  937. <out:variable name="keyAction">
  938. <out:choose>
  939. <out:when test="$flyout">
  940. <out:text>javascript:toggleDynamicSection_<xsl:value-of select="$tool/id"/>('expand_<xsl:value-of select="$tool/id"/>')</out:text>
  941. </out:when>
  942. <out:otherwise>
  943. <out:value-of select="$favs/*[local-name()='{$tool/id}']/*[local-name()='action']"/>
  944. </out:otherwise>
  945. </out:choose>
  946. </out:variable>
  947. <out:variable name="altText" select="$favs/*[local-name()='{$tool/id}']/*[local-name()='title']"/>
  948. <div class="welcomeToolContainerNormal" tabindex="0"
  949. onmouseover="this.className='welcomeToolContainerOver'"
  950. onfocus="this.className='welcomeToolContainerOver'"
  951. onmouseout="this.className='welcomeToolContainerNormal'"
  952. onblur="this.className='welcomeToolContainerNormal'"
  953. id="dashboard_link"
  954. aria-labelledby="favouritesToolContainerID"
  955. title="{'{$altText}'}"
  956. onclick="{'{$keyAction}'}"
  957. onkeypress="if(event.keyCode==9) return true; else if (event.keyCode==13 || event.charCode==32 || event.keyCode==32){'{$keyAction}'}"
  958. role="link">
  959. <out:if test="$flyout">
  960. <out:attribute name="aria-describedby">favoritesClosedStatus</out:attribute>
  961. <span style="position:absolute; margin-left: -9999px; margin-top: -9999px" id="favoritesOpenStatus"><xts:string id="IDS_WELCOME_FAVORITES_DIALOG_DESCRIPTION_OPEN"/></span>
  962. <span style="position:absolute; margin-left: -9999px; margin-top: -9999px" id="favoritesClosedStatus"><xts:string id="IDS_WELCOME_FAVORITES_DIALOG_DESCRIPTION_CLOSED"/></span>
  963. </out:if>
  964. <span style="position:absolute; margin-left: -9999px; margin-top: -9999px" id="favouritesToolContainerID">
  965. <out:value-of select="$altText"/>
  966. </span>
  967. <out:if test="$favs/*[local-name()='{$tool/id}']/*[local-name()='script']">
  968. <script language="javascript">
  969. <out:value-of select="$favs/*[local-name()='{$tool/id}']/*[local-name()='script']"/>
  970. </script>
  971. </out:if>
  972. <div>
  973. <table border="0" width="100%" cellpadding="0" cellspacing="0" role="presentation">
  974. <tr role="presentation">
  975. <td role="presentation" class="welcomeToolIconContainer" >
  976. <img role="presentation">
  977. <out:attribute name="alt"><xsl:copy-of select="$tool/heading"/></out:attribute>
  978. <xsl:copy-of select="$tool/out:attribute"/>
  979. </img>
  980. </td>
  981. <td role="presentation" class="welcomeToolHeadingContainer" ><xsl:copy-of select="$tool/heading/child::node()"/><out:if test="$flyout">&#160;&#160;<img id="img_{$tool/id}" src="{'{$skin_images}'}popup_expand.gif" role="presentation"><out:attribute name="alt"><xts:string id="IDS_SECTION_EXPAND"/></out:attribute></img></out:if></td>
  982. </tr>
  983. </table>
  984. </div>
  985. </div>
  986. <!-- Generate the fly-out only as there are always favorites -->
  987. <!-- ability to create workspace if have advanced dashboard features capability -->
  988. <out:variable name="createWksp" select="$flyout/*[local-name()='entries']/*[local-name()='item'][@createWksp='true']"/>
  989. <!-- Variable contains the html structure for the title in the favorites flyout -->
  990. <out:variable name="topRegion">
  991. <div class="favoritesTopContainer" aria-labelledby="faveTitle" role="presentation">
  992. <span style="position: absolute;margin-left: -9999px; margin-top: -9999px; " id="faveTitle"><out:value-of select="$flyout/caption"/></span>
  993. <table border="0" cellpadding="0" cellspacing="0" id="favClose" tabindex="-1" role="presentation">
  994. <tr class="favoritesAlignText">
  995. <td role="presentation">
  996. <img>
  997. <out:attribute name="alt"></out:attribute>
  998. <out:attribute name="src"><out:value-of select="$skin_images"/>favorites.gif</out:attribute>
  999. </img>
  1000. </td>
  1001. <td role="presentation" class="favoritesTopContainerText">
  1002. <out:value-of select="$flyout/caption"/>
  1003. </td>
  1004. <td role="presentation" width="100%" >
  1005. <img align="right" class="favoritesCloseIcon" tabindex="0" role="button">
  1006. <out:attribute name="onclick">
  1007. <out:text>javascript:hide_<xsl:value-of select="$tool/id"/>()</out:text>
  1008. </out:attribute>
  1009. <out:attribute name="onkeypress">
  1010. <out:text>if(event.keyCode==9) return true; else if (event.keyCode==13 || event.charCode==32 || event.keyCode==32 || event.keyCode==27) </out:text>
  1011. <out:text>javascript:hide_<xsl:value-of select="$tool/id"/>()</out:text>
  1012. </out:attribute>
  1013. <out:attribute name="alt"><xts:string id="IDS_CLOSE"/></out:attribute>
  1014. <out:attribute name="src"><out:value-of select="$skin_images"/>popup_close_28.png</out:attribute>
  1015. </img>
  1016. </td>
  1017. </tr>
  1018. </table>
  1019. </div>
  1020. </out:variable>
  1021. <!-- Variable contains the html structure for the favorites entries inside a scrollable region in the favorites flyout -->
  1022. <out:variable name="scrollRegion">
  1023. <div id="favoritesScrollContainer" class="favoritesScrollContainer" tabindex="0" role="list" aria-labelledby="favoritesScrollLabel">
  1024. <out:attribute name="onkeypress">favourites_onkeypress(event);</out:attribute>
  1025. <span id="favoritesScrollLabel" style="position:absolute; margin-left: -9999px; margin-top: -9999px"><xts:string id="IDS_WELCOME_FAVORITES_LIST_DESCRIPTION"/></span>
  1026. <out:for-each select="$flyout/*[local-name()='entries']/*[local-name()='item' and not(@createWksp='true')]">
  1027. <out:variable name="atLast" select="position()=last()"/>
  1028. <out:variable name="action" select="./action"/>
  1029. <out:variable name="image" select="./image"/>
  1030. <out:variable name="pos" select="position()"/>
  1031. <div class="favoritesEntry" onmouseout="this.className='favoritesEntry'" tabIndex="-1" role="listitem">
  1032. <out:attribute name="onmouseover">updateFavRow(this, <out:value-of select="$pos"/>);</out:attribute>
  1033. <out:attribute name="id">favoritesEntry<out:value-of select="$pos"/></out:attribute>
  1034. <out:if test="$action">
  1035. <out:attribute name="onclick"><out:value-of select="$action"/>;hide_<xsl:value-of select="$tool/id"/>();</out:attribute>
  1036. </out:if>
  1037. <out:if test="./altText">
  1038. <out:attribute name="alt"><out:value-of select="./altText"/></out:attribute>
  1039. <out:attribute name="title"><out:value-of select="./altText"/></out:attribute>
  1040. </out:if>
  1041. <out:if test="./ariaText">
  1042. <out:attribute name="aria-labelledby">dashOpenLabel_<out:value-of select="$pos"/></out:attribute>
  1043. <span id="dashOpenLabel_{'{$pos}'}" style="position:absolute; margin-left: -9999px; margin-top: -9999px"><out:value-of select="./ariaText"/></span>
  1044. </out:if>
  1045. <table role="presentation">
  1046. <tr class="favoritesAlignText">
  1047. <td role="presentation">
  1048. <img>
  1049. <out:attribute name="alt"></out:attribute>
  1050. <out:attribute name="src"><out:value-of select="$image"/></out:attribute>
  1051. </img>
  1052. </td>
  1053. <td role="presentation" class="favoritesItemNormal">
  1054. <div>
  1055. <out:attribute name="id">favEntry<out:value-of select="$pos"/></out:attribute>
  1056. <out:value-of select="string(./name)"/>
  1057. </div>
  1058. </td>
  1059. </tr>
  1060. </table>
  1061. </div>
  1062. </out:for-each>
  1063. </div>
  1064. </out:variable>
  1065. <!-- Declare the favourites flyout area -->
  1066. <div id="expand_{$tool/id}" class="hidden" role="dialog" aria-labelledby="faveTitle">
  1067. <out:attribute name="onclick">
  1068. <out:choose>
  1069. <out:when test="$browser = 'ie'">event.cancelBubble='true';</out:when>
  1070. <out:otherwise>event.stopPropagation();</out:otherwise>
  1071. </out:choose>
  1072. </out:attribute>
  1073. <script language="javascript">
  1074. //images used for the expanding section
  1075. var imgUp_<xsl:value-of select="$tool/id"/> = new Image();
  1076. var imgDown_<xsl:value-of select="$tool/id"/> = new Image();
  1077. imgUp_<xsl:value-of select="$tool/id"/>.src = '<out:value-of select="xtsext:javascriptencode($skin_images)"/>popup_collapse.gif';
  1078. imgUp_<xsl:value-of select="$tool/id"/>.alt = '<xts:string id="IDS_SECTION_COLLAPSE" encode="javascript"/>';
  1079. imgDown_<xsl:value-of select="$tool/id"/>.src = '<out:value-of select="xtsext:javascriptencode($skin_images)"/>popup_expand.gif';
  1080. imgDown_<xsl:value-of select="$tool/id"/>.alt = '<xts:string id="IDS_SECTION_EXPAND" encode="javascript"/>';
  1081. // Register to hide dialog when the user clicks anywhere on the document
  1082. if (document.addEventListener) {
  1083. document.addEventListener("click", hide_<xsl:value-of select="$tool/id"/>, false);
  1084. } else if (document.attachEvent) {
  1085. document.attachEvent("onclick", hide_<xsl:value-of select="$tool/id"/>);
  1086. }
  1087. function hide_<xsl:value-of select="$tool/id"/>()
  1088. {
  1089. obj = document.getElementById('expand_<xsl:value-of select="$tool/id"/>');
  1090. obj.className = "hidden";
  1091. var imgName = document.getElementById('img_<xsl:value-of select="$tool/id"/>');
  1092. imgName.src = imgDown_<xsl:value-of select="$tool/id"/>.src;
  1093. imgName.alt = imgDown_<xsl:value-of select="$tool/id"/>.alt;
  1094. imgName.title = imgDown_<xsl:value-of select="$tool/id"/>.alt;
  1095. var linkEl = document.getElementById("<xsl:value-of select="$tool/id"/>_link");
  1096. linkEl.setAttribute("aria-describedby","favoritesClosedStatus");
  1097. linkEl.focus();
  1098. }
  1099. function createDashboardKeypress_<xsl:value-of select="$tool/id"/>(event)
  1100. {
  1101. //tab key
  1102. if (event.keyCode == 9 &amp;&amp; event.shiftKey == false){
  1103. var closeEl = document.getElementById("favClose");
  1104. closeEl.focus();
  1105. }
  1106. //esc key
  1107. else if (event.keyCode==27 || event.charCode==32)
  1108. {
  1109. hide_<xsl:value-of select="$tool/id"/>();
  1110. }
  1111. else if (event.keyCode==13 || event.charCode==32){
  1112. <out:value-of select="$createWksp/action"/>;
  1113. }
  1114. return true;
  1115. }
  1116. function show_<xsl:value-of select="$tool/id"/>(wasDelayed)
  1117. {
  1118. if (wasDelayed) {
  1119. obj = document.getElementById('expand_<xsl:value-of select="$tool/id"/>');
  1120. obj.className = "welcomeFavorites";
  1121. // Set focus to the scroll container
  1122. favScrollArea = document.getElementById('favoritesScrollContainer');
  1123. favScrollArea.focus();
  1124. var imgName = document.getElementById('img_<xsl:value-of select="$tool/id"/>');
  1125. imgName.src = imgUp_<xsl:value-of select="$tool/id"/>.src;
  1126. imgName.alt = imgUp_<xsl:value-of select="$tool/id"/>.alt;
  1127. imgName.title = imgUp_<xsl:value-of select="$tool/id"/>.alt;
  1128. var favLink = document.getElementById("<xsl:value-of select="$tool/id"/>_link");
  1129. favLink.setAttribute("aria-describedby","favoritesOpenStatus");
  1130. } else {
  1131. <!-- delay 'show' a bit to ensure it gets executed after 'hide' in some instances -->
  1132. setTimeout('show_<xsl:value-of select="$tool/id"/>("wasDelayed")', 10);
  1133. }
  1134. }
  1135. function toggleDynamicSection_<xsl:value-of select="$tool/id"/>(name)
  1136. {
  1137. if(document.getElementById(name).className == 'hidden')
  1138. {
  1139. show_<xsl:value-of select="$tool/id"/>("");
  1140. }
  1141. else
  1142. {
  1143. hide_<xsl:value-of select="$tool/id"/>();
  1144. }
  1145. }
  1146. var curfav = null;
  1147. var Favorites_Entry = "favoritesEntry";
  1148. var Favorites_Entry_Over = "favoritesEntryOver";
  1149. function favourites_onkeypress(evt) {
  1150. evt = evt != null ? evt : window.event;
  1151. var e = evt.srcElement ? evt.srcElement : evt.target;
  1152. // Enter: Act on the current menu
  1153. if (evt.keyCode == 13) {
  1154. if (curfav == null) {
  1155. curfav = 1;
  1156. }
  1157. curElem = document.getElementById(Favorites_Entry + curfav);
  1158. curElem.onclick();
  1159. }
  1160. // Esc Key: Close menu
  1161. else if (evt.keyCode == 27) {
  1162. if (curfav != null) {
  1163. curElem = document.getElementById(Favorites_Entry + curfav).className = Favorites_Entry;
  1164. curfav = null;
  1165. }
  1166. hide_<xsl:value-of select="$tool/id"/>();
  1167. }
  1168. // Up Arrow
  1169. else if (evt.keyCode == 38) {
  1170. if (curfav != null) {
  1171. document.getElementById(Favorites_Entry + curfav).className = Favorites_Entry;
  1172. if (curfav > 1) {
  1173. curfav--;
  1174. }
  1175. else{
  1176. curfav = document.getElementById(Favorites_Entry + "1").parentNode.childNodes.length - 1;
  1177. }
  1178. newElem = document.getElementById(Favorites_Entry + curfav)
  1179. newElem.className = Favorites_Entry_Over;
  1180. newElem.focus();
  1181. }
  1182. }
  1183. // Down arrow
  1184. else if (evt.keyCode == 40) {
  1185. if (curfav != null) {
  1186. var itemList = document.getElementById(Favorites_Entry + "1").parentNode.childNodes.length - 1;
  1187. oldElem = document.getElementById(Favorites_Entry + curfav);
  1188. if (oldElem == null){
  1189. curfav = 1;
  1190. oldElem = document.getElementById(Favorites_Entry);
  1191. }
  1192. oldElem.className = Favorites_Entry;
  1193. if (itemList > curfav) {
  1194. curfav++;
  1195. }
  1196. else {
  1197. curfav = 1;
  1198. }
  1199. }
  1200. else {
  1201. curfav = 1;
  1202. }
  1203. newElem = document.getElementById(Favorites_Entry + curfav)
  1204. newElem.className = Favorites_Entry_Over;
  1205. newElem.focus();
  1206. }
  1207. evt.cancelBubble = true;
  1208. if (evt.stopPropagation) evt.stopPropagation();
  1209. }
  1210. function updateFavRow(elem, rowNum) {
  1211. if (curfav != null) {
  1212. document.getElementById(Favorites_Entry + curfav).className = Favorites_Entry;
  1213. }
  1214. elem.className = Favorites_Entry_Over;
  1215. curfav=rowNum;
  1216. }
  1217. </script>
  1218. <div>
  1219. <table width="100%" border="0" cellpadding="0" cellspacing="0" role="presentation">
  1220. <tr class="favoritesTopInsideRow">
  1221. <td role="presentation" class="favoritesTopInsideImage"><out:copy-of select="$topRegion"/></td>
  1222. </tr>
  1223. </table>
  1224. </div>
  1225. <out:copy-of select="$scrollRegion"/>
  1226. </div>
  1227. </xsl:template>
  1228. <xsl:template match="*">
  1229. <xsl:copy>
  1230. <xsl:copy-of select="@*"/>
  1231. <xsl:apply-templates/>
  1232. </xsl:copy>
  1233. </xsl:template>
  1234. </xsl:stylesheet>