123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- Licensed Materials - Property of IBM
- IBM Cognos Products: ps
- (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:cf="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/framework/"
- xmlns:cp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/presentation/"
- xmlns:dp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/presentation/"
- xmlns:xts="http://developer.cognos.com/schemas/xts/"
- xmlns:sos="http://developer.cognos.com/schemas/xts/logicsheets/xslt/sos/"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
- xmlns:pm="http://developer.cognos.com/schemas/xts/pm"
- xmlns:mf="http://developer.cognos.com/schemas/xts/logicsheets/presentation/main/mf"
- xmlns:out="dummy-uri"
- exclude-result-prefixes="xts xsl cp dp cf cm mf pm sos">
- <xsl:output method="xml" encoding="UTF-8" indent="no"/>
- <xsl:namespace-alias stylesheet-prefix="out" result-prefix="xsl"/>
- <!-- Generate the 3 flavours of the pagers:
- NAVIGATE: checkbox, icon, name
- SEARCH: checkbox, icon, fullpath, name
- LAUNCH: icon, name -->
- <xsl:template match="sos:pagers">
- <cf:main-pager-section width="100%" form="pform" virtualPage="true" role="main" id="maincontent">
- <cf:param name="pagerSummary"><xts:string id="IDS_MAINPAGER_SUMMARY"/></cf:param>
- <cf:param name="item-path">cm:queryResponse/cm:queryReply[2]/*</cf:param>
- <cf:param name="target">concat(concat($app,'/'),$mname)</cf:param>
- <cf:param name="lines-per-page">
- <out:value-of select="$lines"/>
- </cf:param>
- <cf:param name="noGoto"><out:value-of select="$noGoto"/></cf:param>
- <cf:param name="navContext"><out:value-of select="$navContext"/></cf:param>
- <xsl:if test="string(@modes)='launch' and not(string(@type)='search')">
- <cf:param name="displayPath"><out:copy-of select="$displayPath"/></cf:param>
- </xsl:if>
- <cf:param name="rows">
- <cp:tableHeader session-name="s_so">
- <xsl:if test="not(string(@modes)='launch')">
- <cp:columnHeader width="16"/>
- </xsl:if>
- <cp:columnHeader width="20" aria-labelledby="sosItemTypeColumnHeader">
- <span id="sosItemTypeColumnHeader" style="position: absolute;margin-top: -9999px;margin-left: -9999px; ">Item Type</span>
- </cp:columnHeader>
- <cp:columnHeader width="100%">
- <xsl:if test="not(string(@noSort)='true')"><xsl:attribute name="sort">n</xsl:attribute></xsl:if>
- <xsl:if test="string(@modes)='search' or string(@type)='search'">
- <img height="5" width="1" border="0"><out:attribute name="src"><out:value-of select="$webcontent"/>/images/space.gif</out:attribute></img>
- <out:text/><xts:string id="IDS_PATH_INDICATOR"/><out:text> </out:text>
- <img height="5" width="1" border="0"><out:attribute name="src"><out:value-of select="$webcontent"/>/images/space.gif</out:attribute></img>
- </xsl:if>
- <xsl:if test="not(string(@noSort)='true')">
- <cp:sortHref>
- <out:text/>javascript:resetItem();reSort('<out:choose>
- <out:when test="key('session-param', 's_so') = 'na' ">nd</out:when>
- <out:when test="key('session-param', 's_so') = 'nd' ">sa</out:when>
- <out:otherwise>na</out:otherwise>
- </out:choose>')<out:text/>
- </cp:sortHref>
- </xsl:if>
- <out:variable name="sortOrderMessage">
- <out:choose>
- <out:when test="key('session-param', 's_so') = 'na' "><xts:string id="IDS_SORT_ASCENDING"/></out:when>
- <out:when test="key('session-param', 's_so') = 'nd' "><xts:string id="IDS_SORT_DESCENDING"/></out:when>
- <out:otherwise><xts:string id="IDS_SORT_NONE"/></out:otherwise>
- </out:choose>
- </out:variable>
- <xts:string id="IDS_NAME"/>
- </cp:columnHeader>
- </cp:tableHeader>
- <cp:tableContent>
- <xsl:if test="not(string(@modes)='launch')">
- <cp:columnContent>
- <out:choose>
- <out:when test="cm:radio">
- <out:variable name="title">
- <out:choose>
- <out:when test="cm:launch or cm:noActionLaunch">
- <out:choose>
- <out:when test="cm:launch"><out:value-of select="cm:launch/@name"/></out:when>
- <out:otherwise><out:value-of select="cm:noActionLaunch/@name"/></out:otherwise>
- </out:choose>
- </out:when>
- <out:when test="cm:drill"><out:value-of select="cm:drill/@name"/></out:when>
- <out:otherwise><out:value-of select="cm:defaultName"/></out:otherwise>
- </out:choose>
- </out:variable>
- <span style="position: absolute;margin-top: -9999px;margin-left: -9999px; " >
- <out:attribute name="id">selectRB_<out:value-of select="position()"/></out:attribute>
- <xts:string id="IDS_SELECT_RADIO_DESC"><xts:param name="name"><out:value-of select="$title"/></xts:param></xts:string>
- </span>
- <input type="radio" name="pageitem">
- <out:attribute name="aria-labelledBy">selectRB_<out:value-of select="position()"/></out:attribute>
- <out:attribute name="value"><out:value-of select="cm:storeID"/></out:attribute>
- <out:attribute name="id"><out:value-of select="cm:storeID"/></out:attribute>
- <out:if test="cm:radio/@checked">
- <out:attribute name="checked">checked</out:attribute>
- </out:if>
- <out:attribute name="title">
- <out:value-of select="xtsext:enforceBTD($title, $baseTextDirection, $productLocale, boolean($isBidiEnabled='true'))"/>
- </out:attribute>
- </input>
- <out:call-template name="genJSInline_setItemReturnArray">
- <out:with-param name="curnode" select="."/>
- </out:call-template>
- </out:when>
- <out:otherwise>
- <img height="18" width="18" hspace="1">
- <out:attribute name="src"><out:value-of select="$webcontent"/>/images/space.gif</out:attribute>
- </img>
- </out:otherwise>
- </out:choose>
- </cp:columnContent>
- </xsl:if>
- <cp:columnContent width="20">
- <out:attribute name="aria-describedby">sosItemTypeColumnHeader</out:attribute>
- <out:variable name="curObjEntry" select="."/>
- <out:variable name="overRideTooltipEntry">
- <out:choose>
- <out:when test="/root/objectClass/class[@name=string($curObjEntry/cm:objectClass)][not($curObjEntry/cm:userInterfaces) or $curObjEntry/cm:userInterfaces/@nil or @userInterface=string($curObjEntry/cm:userInterfaces/cm:uiComponentEnum)]">
- <out:value-of select="/root/objectClass/class[@name=string($curObjEntry/cm:objectClass)][not($curObjEntry/cm:userInterfaces) or $curObjEntry/cm:userInterfaces/@nil or @userInterface=string($curObjEntry/cm:userInterfaces/cm:uiComponentEnum)]"/>
- </out:when>
- <out:otherwise>
- <out:value-of select="/root/objectClass/class[@name=string($curObjEntry/cm:objectClass)]"/>
- </out:otherwise>
- </out:choose>
- </out:variable>
- <out:choose>
- <out:when test="cm:genIcon/@type='default'">
- <out:call-template name="gen-icon">
- <out:with-param name="userInterfaces" select="cm:userInterfaces/cm:uiComponentEnum"/>
- <out:with-param name="hiddenObject" select="cm:hidden"/>
- <out:with-param name="tooltipOverride" select="$overRideTooltipEntry"/>
- </out:call-template>
- </out:when>
- <out:when test="cm:genIcon/@type='myFolders'">
- <out:call-template name="gen-icon">
- <out:with-param name="class" select="'pfr'"/>
- </out:call-template>
- </out:when>
- <out:otherwise>
- <out:call-template name="gen-icon">
- <out:with-param name="class" select="cm:objectClass"/>
- <out:with-param name="isDangling" select="cm:base/@nil='true'"/>
- <out:with-param name="hiddenObject" select="cm:hidden"/>
- </out:call-template>
- </out:otherwise>
- </out:choose>
- </cp:columnContent>
- <cp:columnContent width="100%">
- <out:choose>
- <out:when test="cm:launch or cm:noActionLaunch">
- <xsl:if test="string(@type)='search'">
- <xsl:call-template name="path_gif"/>
- </xsl:if>
- <out:choose>
- <out:when test="cm:launch">
- <out:variable name="cmLaunchName">
- <out:value-of select="cm:launch/@name"/>
- </out:variable>
- <!-- BASED ON WO2070 -->
- <a href="javascript:document.returnform.submit();" onclick="launch('{'{cm:launch}'}')">
- <out:if test="$isBidiEnabled = 'true'">
- <out:attribute name="dir"><out:value-of select="xtsext:getBTD($cmLaunchName, $baseTextDirection, $productLocale)"/></out:attribute>
- </out:if>
- <out:value-of select="$cmLaunchName"/>
- </a>
- </out:when>
- <out:otherwise>
- <out:variable name="cmNoLaunchName">
- <out:value-of select="cm:noActionLaunch/@name"/>
- </out:variable>
- <out:text/>
- <out:value-of select="xtsext:enforceBTD($cmNoLaunchName, $baseTextDirection, $productLocale, boolean($isBidiEnabled='true'))"/>
- <out:text/>
- </out:otherwise>
- </out:choose>
- <xsl:if test="string(@type)!='search'">
- <out:if test="cm:drill">
- <img class="dialogNavigationIndicator" tabindex="0" role="link" onclick="resetItem();resetPager();drill('{'{cm:drill}'}','{'{cm:objectClass}'}')" src="{'{$image_root}'}action_open_package.gif">
- <out:attribute name="alt"><xts:string id="IDS_SELECT_VIEW_PACKAGE_AND_FOLDERS"><xts:param name="objectName"><out:value-of select="cm:drill/@name"/></xts:param></xts:string></out:attribute>
- </img>
- </out:if>
- </xsl:if>
- <out:call-template name="genJSInline_setItemReturnArray">
- <out:with-param name="curnode" select="."/>
- </out:call-template>
- </out:when>
- <!-- Only hyperlink a container if:
- user has traverse access to it
- and ( it is not the same container a "move" operation is being performed on (if we are doing a move op)
- or object is a signon and we're listing dataSources )
- -->
- <out:when test="cm:drill">
- <xsl:if test="string(@modes)='search' or string(@type)='search'">
- <xsl:call-template name="path_gif"/>
- </xsl:if>
- <out:variable name="cmDrillName">
- <out:value-of select="cm:drill/@name"/>
- </out:variable>
- <a onclick="resetItem();resetPager();drill('{'{cm:drill}'}','{'{cm:objectClass}'}')" href="#">
- <out:if test="$isBidiEnabled = 'true'">
- <out:attribute name="dir"><out:value-of select="xtsext:getBTD($cmDrillName, $baseTextDirection, $productLocale)"/></out:attribute>
- </out:if>
- <out:value-of select="$cmDrillName"/>
- </a>
- </out:when>
- <out:otherwise>
- <xsl:if test="string(@modes)='search'">
- <xsl:call-template name="path_gif"/>
- </xsl:if>
- <out:variable name="cmDefaultName">
- <out:value-of select="cm:defaultName"/>
- </out:variable>
- <out:value-of select="xtsext:enforceBTD($cmDefaultName, $baseTextDirection, $productLocale, boolean($isBidiEnabled='true'))"/>
- </out:otherwise>
- </out:choose>
- </cp:columnContent>
- </cp:tableContent>
- <!-- Show the "New Folder" option -->
- </cf:param>
- <cf:param name="actions">
- <cp:action>
- <out:if test="$actionNew">
- <a align="right" href="javascript:doNew()"><out:text/><out:value-of select="$actionNew/cm:selectionActionLink"/><out:text/></a>
- </out:if>
- </cp:action>
- </cf:param>
- </cf:main-pager-section>
- </xsl:template>
- <!-- path_gif template-->
- <xsl:template name="path_gif">
- <img width="20" height="16" align="absmiddle" src="{'{$skin_images}'}path.gif">
- <out:attribute name="alt">
- <out:choose>
- <out:when test="cm:fullName">
- <out:value-of select="cm:fullName"/>
- </out:when>
- <out:otherwise>
- <out:variable name="object-start-at-path">
- <out:if test="starts-with(cm:searchPath,'/content')">
- <out:value-of select="$defaultContentRoot"/>
- </out:if>
- </out:variable>
- <cf:do-the-path-link>
- <cf:param name="familytree">cm:ancestors</cf:param>
- <cf:param name="familymember">cm:defaultName</cf:param>
- <cf:param name="home"><out:value-of select="$object-start-at-path"/></cf:param>
- <cf:param name="onlyAncestors">true</cf:param>
- </cf:do-the-path-link>
- </out:otherwise>
- </out:choose>
- </out:attribute>
- </img><xsl:text> </xsl:text>
- </xsl:template>
- <!-- The main engine -->
- <xsl:template match="*">
- <xsl:copy>
- <xsl:copy-of select="@*"/>
- <xsl:apply-templates/>
- </xsl:copy>
- </xsl:template>
- </xsl:stylesheet>
|