123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- Licensed Materials - Property of IBM
- IBM Cognos Products: cogadmin
- (C) Copyright IBM Corp. 2005, 2014
- US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
- -->
- <!--
- Copyright (C) 2008 Cognos ULC, an IBM Company. All rights reserved.
- Cognos (R) is a trademark of Cognos ULC, (formerly Cognos Incorporated).
- -->
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:ui="http://developer.cognos.com/schemas/ui/presentation/markup/"
- xmlns:uic="http://developer.cognos.com/schemas/uic/presentation/markup/"
- xmlns:xts="http://developer.cognos.com/schemas/xts/"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- xmlns:admui="http://developer.cognos.com/schemas/xts/admui"
- xmlns:pgr="http://developer.cognos.com/schemas/uic/presentation/cogadminpager/"
- xmlns:cm="http://developer.cognos.com/schemas/bibus/3/"
- xmlns:nav="http://developer.cognos.com/schemas/cps/navigation/1/"
- xmlns:exslt="http://exslt.org/common"
- exclude-result-prefixes="ui uic xts xtsext admui nav cm exslt">
-
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
- <xsl:key name="ownedBy" match="/root/ownedBy/*[local-name()='queryResponse']/returns/item" use="queryResult/item/searchPath/value"/>
-
- <!-- display variables -->
- <admui:variables/>
- <!-- common pager variables -->
- <admui:pagerVariables pagerName="datasets"/>
- <!-- pager templates -->
- <pgr:cogadminPagerTemplates/>
- <!-- action templates-->
- <ui:commonActions/>
- <xsl:template match="/root">
- <uic:fragment>
- <!-- add the reload event listener -->
- <ui:standardReloadListener/>
- <uic:filterInitScript filterName="datasets"/>
-
- <uic:fragmentHeader>
- <uic:title><xts:string id="IDS_DST_TITLE"/></uic:title>
- <uic:headerActions>
- <ui:groupActionMsgs/>
- <ui:groupAction action="deleteDataset" tablename="datasets"/>
- </uic:headerActions>
- </uic:fragmentHeader>
- <!-- display the chart at the top -->
- <uic:barChart/>
- <uic:table width="100%">
- <uic:features>
- <uic:name>datasets</uic:name>
- <uic:scrollable/>
- <uic:type>checkbox</uic:type>
- <uic:summary><xts:string id="IDS_DST_TABLE_SUMMARY"/></uic:summary>
- <ui:tableFeatures/>
- </uic:features>
- <!-- pager: entries, goto, first, previous, next, last-->
- <xsl:call-template name="pgr:cogadminPager">
- <xsl:with-param name="pagerName" select="$pagerName"/>
- <xsl:with-param name="pageStart" select="nav:searchResponse/nav:content/@start"/>
- <xsl:with-param name="pageEnd" select="nav:searchResponse/nav:content/@end"/>
- <xsl:with-param name="pageMax" select="nav:searchResponse/nav:content/@max"/>
- <xsl:with-param name="pageMore" select="nav:searchResponse/nav:content/@more"/>
- <xsl:with-param name="linesPerPage" select="$linesPerPage"/>
- </xsl:call-template>
- <uic:header>
- <uic:row>
- <!-- TODO: replace style with CSS class -->
- <uic:column nowrap="nowrap"/>
- <uic:column width="100%" nowrap="nowrap" sort="name">
- <uic:text>
- <xts:string id="IDS_HEADING_NAME"/>
- </uic:text>
- </uic:column>
- <uic:column nowrap="nowrap">
- <uic:text>
- <xts:string id="IDS_DST_HEADING_OWNED_BY"/>
- </uic:text>
- </uic:column>
- <uic:column nowrap="nowrap" sort="dataModificationTime">
- <uic:text>
- <xts:string id="IDS_DST_HEADING_REFRESHED"/>
- </uic:text>
- </uic:column>
- <uic:column nowrap="nowrap" sort="dataSetSize">
- <uic:text>
- <xts:string id="IDS_DST_HEADING_SIZE"/>
- </uic:text>
- </uic:column>
- <uic:column nowrap="nowrap">
- <uic:text>
- <xts:string id="IDS_DST_HEADING_ROW_COUNT"/>
- </uic:text>
- </uic:column>
- </uic:row>
- </uic:header>
- <uic:body>
- <xsl:for-each select="/root/nav:searchResponse/nav:content/nav:item">
- <uic:row label="{xtsext:htmlencode(string(nav:name))}">
- <xsl:attribute name="value">
- <xsl:value-of select="xtsext:urlencode(nav:internalId)"/>
- </xsl:attribute>
- <uic:column align="center" nowrap="nowrap">
- <uic:icon>
- <xsl:if test="nav:hidden='true'">
- <xsl:attribute name="disabled">true</xsl:attribute>
- </xsl:if>
- <uic:src>
- <admui:imageURL type="nav">
- <admui:image><xsl:value-of select="nav:imgURL"/></admui:image>
- </admui:imageURL>
- </uic:src>
- <uic:tooltip>
- <xsl:value-of select="nav:screenTip"/>
- </uic:tooltip>
- </uic:icon>
- </uic:column>
- <uic:column scope="row" abbr="{xtsext:htmlencode(nav:name)}" nowrap="nowrap">
- <uic:text>
- <xsl:value-of select="nav:name"/>
- </uic:text>
- <!-- add the drop down menu -->
- <xsl:variable name="permissions" select="nav:permissions"/>
- <xsl:call-template name="ui:menuActions">
- <xsl:with-param name="obj-class" select="nav:type"/>
- <xsl:with-param name="obj-id" select="nav:internalId"/>
- <xsl:with-param name="obj-name" select="nav:name"/>
- <xsl:with-param name="obj-path" select="nav:searchPath"/>
- <xsl:with-param name="obj-parent" select="nav:searchPath"/>
- <xsl:with-param name="priority" select="nav:priority"/>
- <xsl:with-param name="canRead" select="contains($permissions, 'read')"/>
- <xsl:with-param name="canWrite" select="contains($permissions, 'write')"/>
- <xsl:with-param name="canExecute" select="contains($permissions, 'execute')"/>
- <xsl:with-param name="canTraverse" select="contains($permissions, 'traverse')"/>
- </xsl:call-template>
- </uic:column>
- <uic:column nowrap="nowrap">
- <xsl:variable name="userInfo" select="key('ownedBy',nav:owner/nav:searchPath)/queryResult/item"/>
- <xsl:variable name="isDefaultNameCAMID" select="($userInfo/defaultName != '') and not(contains($userInfo/searchPath, '::Anonymous')) and contains($userInfo/searchPath, normalize-space($userInfo/defaultName))"/>
- <uic:text>
- <xsl:choose>
- <xsl:when test="$userInfo/userName/value != '' or ($userInfo/defaultName/value != '' and not($isDefaultNameCAMID))">
- <xsl:value-of select="$userInfo/defaultName/value"/>
- <xsl:if test="$userInfo/userName/value != ''">
- <xsl:value-of select="concat(' (', $userInfo/userName/value, ')')"/>
- </xsl:if>
- </xsl:when>
- <xsl:otherwise>
- <xts:string id="IDS_ADM_USER_UNAVAILABLE"/>
- </xsl:otherwise>
- </xsl:choose>
- </uic:text>
- </uic:column>
- <uic:column nowrap="nowrap">
- <uic:text>
- <xsl:value-of select="nav:dataModificationTime"/>
- </uic:text>
- </uic:column>
- <uic:column nowrap="nowrap">
- <uic:text>
- <xsl:variable name="dataSize" select="round((number(nav:dataSetSize) div 1024)+.499)"/>
- <xsl:value-of select="xtsext:formatNumber(string($dataSize),string('#,##0'),string($contentLocale), number(1))"/>
- </uic:text>
- </uic:column>
- <uic:column nowrap="nowrap">
- <uic:text>
- <xsl:variable name="rowCount" select="number(nav:specification/pdSpec/dataSet/rowCount)"/>
- <xsl:value-of select="xtsext:formatNumber(string($rowCount), string($contentLocale), number(2))"/>
- </uic:text>
- </uic:column>
- </uic:row>
- </xsl:for-each>
- </uic:body>
- <uic:footer displayLastUpdate="true" />
- </uic:table>
- </uic:fragment>
- </xsl:template>
- </xsl:stylesheet>
|