tenants.xslt 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. Licensed Materials - Property of IBM
  4. IBM Cognos Products: cogadmin
  5. (C) Copyright IBM Corp. 2013, 2014
  6. US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  7. -->
  8. <xsl:stylesheet version="1.0"
  9. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  10. xmlns:ui="http://developer.cognos.com/schemas/ui/presentation/markup/"
  11. xmlns:uic="http://developer.cognos.com/schemas/uic/presentation/markup/"
  12. xmlns:xts="http://developer.cognos.com/schemas/xts/"
  13. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  14. xmlns:admui="http://developer.cognos.com/schemas/xts/admui"
  15. xmlns:pgr="http://developer.cognos.com/schemas/uic/presentation/cogadminpager/"
  16. xmlns:cm="http://developer.cognos.com/schemas/bibus/3/"
  17. xmlns:nav="http://developer.cognos.com/schemas/cps/navigation/1/"
  18. exclude-result-prefixes="ui uic xts xtsext admui nav cm">
  19. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
  20. <!-- Display variables -->
  21. <admui:variables/>
  22. <!-- Pager variables -->
  23. <admui:pagerVariables pagerName="tenants"/>
  24. <!-- Pager templates -->
  25. <pgr:cogadminPagerTemplates/>
  26. <!-- Action templates-->
  27. <ui:commonActions/>
  28. <xsl:variable name="containerId" select="/root/nav:getContainerResponse/nav:container/nav:internalId"/>
  29. <xsl:template match="/root">
  30. <uic:fragment>
  31. <!-- add the reload event listener -->
  32. <ui:standardReloadListener/>
  33. <xsl:if test="not(key('env-param','searchMode')) or key('env-param','searchMode') = ''">
  34. <uic:fragmentHeader>
  35. <uic:pathControl>
  36. <uic:breadcrumb>
  37. <xsl:if test="$productLocale != $contentLocale">
  38. <xsl:attribute name="lang"><xsl:value-of select="$contentLocale"/></xsl:attribute>
  39. </xsl:if>
  40. <xsl:value-of select="string(nav:getContainerResponse/nav:container/nav:name)"/>
  41. </uic:breadcrumb>
  42. </uic:pathControl>
  43. <uic:headerActions>
  44. <xsl:variable name="permissions" select="nav:getContainerResponse/nav:container/nav:permissions"/>
  45. <xsl:variable name="canWrite" select="contains($permissions, 'write')"/>
  46. <ui:groupActionMsgs/>
  47. <xsl:if test="/root/session/param[@name='e_readTenantID' or @name='e_writeTenantID'] != ''">
  48. <ui:groupAction action="impersonateTenant" tablename="tenants"/>
  49. </xsl:if>
  50. <uic:icon rollOver="true">
  51. <uic:src>
  52. <admui:imageURL image="action_new_tenant.gif" type="common"/>
  53. </uic:src>
  54. <uic:tooltip><xts:string id="IDS_ADM_TENANTS_NEW"/></uic:tooltip>
  55. <xsl:variable name="url">?b_action=xts.run&amp;m=<xsl:value-of select="$common_app"/>/new_general.xts&amp;m_new_class=tenant&amp;m_path=/directory/tenants&amp;backURL=javascript:parent._THIS_callBack();</xsl:variable>
  56. <uic:onclick>ui_modal_dialog.open('<xsl:value-of select="xtsext:javascriptencode($url)"/>', false, true, true)</uic:onclick>
  57. </uic:icon>
  58. <ui:groupAction action="deleteTenants" tablename="tenants"/>
  59. <uic:headerSeperator/>
  60. <ui:groupAction action="exportTenants" tablename="tenants"/>
  61. <ui:groupAction action="createContentUtilizationInfo" tablename="tenants"/>
  62. <uic:headerSeperator/>
  63. <ui:groupAction action="enableDisableObj" tablename="tenants"/>
  64. <ui:groupAction action="terminateSessions" tablename="tenants"/>
  65. <uic:headerSeperator/>
  66. <ui:groupAction action="editDefaultUserProfile" tablename="tenants"/>
  67. <ui:groupAction action="deleteTenantUserProfile" tablename="tenants"/>
  68. <uic:icon rollOver="true">
  69. <uic:src><admui:imageURL image="action_search_basic.gif" type="common"/></uic:src>
  70. <uic:tooltip><xts:string id="IDS_ADM_SEARCH"/></uic:tooltip>
  71. <uic:onclick>_THIS_.retrieve('searchMode=tenant')</uic:onclick>
  72. </uic:icon>
  73. </uic:headerActions>
  74. </uic:fragmentHeader>
  75. </xsl:if>
  76. <xsl:variable name="tooltip"><xts:string id="IDS_SORT_TOOLTIP"/></xsl:variable>
  77. <xsl:choose>
  78. <xsl:when test="key('env-param','searchMode') = 'tenant'">
  79. <div id="_THIS_TENANTS_SEARCH_FRAGMENTcontent">_THIS?frag-subfragment=TENANTS_SEARCH_FRAGMENT/THIS_</div>
  80. </xsl:when>
  81. <xsl:otherwise>
  82. <uic:table width="100%">
  83. <uic:features>
  84. <uic:name>tenants</uic:name>
  85. <uic:summary><xts:string id="IDS_ADM_TENANTS_SUMMARY"/></uic:summary>
  86. <uic:scrollable/>
  87. <uic:type>checkbox</uic:type>
  88. <uic:hideTenant>true</uic:hideTenant>
  89. <ui:tableFeatures/>
  90. </uic:features>
  91. <xsl:call-template name="pgr:cogadminPager">
  92. <xsl:with-param name="pagerName" select="$pagerName"/>
  93. <xsl:with-param name="pageStart" select="nav:getContainerResponse/nav:container/nav:content/@start"/>
  94. <xsl:with-param name="pageEnd" select="nav:getContainerResponse/nav:container/nav:content/@end"/>
  95. <xsl:with-param name="pageMax" select="nav:getContainerResponse/nav:container/nav:content/@max"/>
  96. <xsl:with-param name="pageMore" select="nav:getContainerResponse/nav:container/nav:content/@more"/>
  97. <xsl:with-param name="linesPerPage" select="$linesPerPage"/>
  98. </xsl:call-template>
  99. <uic:header>
  100. <uic:row>
  101. <uic:column nowrap="nowrap"/>
  102. <uic:column width="100%" nowrap="nowrap" sort="defaultName" iconTooltip="{$tooltip}">
  103. <uic:text>
  104. <xts:string id="IDS_HEADING_NAME"/>
  105. </uic:text>
  106. </uic:column>
  107. <uic:column nowrap="nowrap" sort="lastModifiedDate" iconTooltip="{$tooltip}">
  108. <uic:text>
  109. <xts:string id="IDS_HEADING_MODIFIED"/>
  110. </uic:text>
  111. </uic:column>
  112. </uic:row>
  113. </uic:header>
  114. <uic:body>
  115. <xsl:for-each select="nav:getContainerResponse/nav:container/nav:content/nav:item">
  116. <uic:row value="{string(nav:tenantID)}" label="{xtsext:htmlencode(string(nav:name))}">
  117. <xsl:if test="$productLocale != $contentLocale">
  118. <xsl:attribute name="lang"><xsl:value-of select="$contentLocale"/></xsl:attribute>
  119. </xsl:if>
  120. <uic:column nowrap="nowrap">
  121. <uic:icon>
  122. <uic:src>
  123. <admui:imageURL type="nav">
  124. <admui:image><xsl:value-of select="nav:imgURL"/></admui:image>
  125. </admui:imageURL>
  126. </uic:src>
  127. <uic:tooltip>
  128. <xsl:value-of select="nav:screenTip"/>
  129. </uic:tooltip>
  130. <xsl:if test="nav:hidden='true'">
  131. <uic:class>hiddenEntryIcon</uic:class>
  132. </xsl:if>
  133. </uic:icon>
  134. </uic:column>
  135. <uic:column nowrap="nowrap" scope="row" abbr="{xtsext:htmlencode(nav:name)}">
  136. <uic:text>
  137. <xsl:value-of select="nav:name"/>
  138. </uic:text>
  139. <!-- Render the disabled icon if this entry is disabled -->
  140. <xsl:if test="nav:icon/nav:name = 'disabled'">
  141. <uic:icon height="16" width="16" valign="middle">
  142. <uic:src>
  143. <admui:imageURL type="nav">
  144. <admui:image><xsl:value-of select="nav:icon/nav:imgURL"/></admui:image>
  145. </admui:imageURL>
  146. </uic:src>
  147. <uic:tooltip>
  148. <xsl:value-of select="nav:icon/nav:alt"/>
  149. </uic:tooltip>
  150. </uic:icon>
  151. </xsl:if>
  152. <xsl:variable name="permissions" select="nav:permissions"/>
  153. <xsl:variable name="parentPermissions" select="../../nav:permissions"/>
  154. <xsl:call-template name="ui:menuActions">
  155. <xsl:with-param name="obj-class" select="nav:type"/>
  156. <xsl:with-param name="obj-id" select="nav:internalId"/>
  157. <xsl:with-param name="obj-name" select="nav:name"/>
  158. <xsl:with-param name="obj-disabled" select="boolean(nav:icon/nav:name = 'disabled')"/>
  159. <xsl:with-param name="tenant-id" select="nav:tenantID"/>
  160. <xsl:with-param name="supportSetProperties" select="true()"/>
  161. <xsl:with-param name="supportExportTenant" select="true()"/>
  162. <xsl:with-param name="supportCreateContentUtilizationInfo" select="true()"/>
  163. <xsl:with-param name="supportTerminateSessions" select="true()"/>
  164. <xsl:with-param name="supportEnableDisableObj" select="true()"/>
  165. <xsl:with-param name="supportDelete" select="true()"/>
  166. <xsl:with-param name="supportUserProfileActions" select="true()"/>
  167. <xsl:with-param name="supportImpersonateTenant" select="true()"/>
  168. </xsl:call-template>
  169. </uic:column>
  170. <uic:column nowrap="nowrap">
  171. <uic:text>
  172. <xsl:value-of select="nav:lastModifiedDate"/>
  173. </uic:text>
  174. </uic:column>
  175. </uic:row>
  176. </xsl:for-each>
  177. </uic:body>
  178. <uic:footer displayLastUpdate="true" />
  179. </uic:table>
  180. </xsl:otherwise>
  181. </xsl:choose>
  182. </uic:fragment>
  183. </xsl:template>
  184. </xsl:stylesheet>