123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884 |
- <?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:xts="http://developer.cognos.com/schemas/xts/"
- xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
- xmlns:mt="http://developer.cognos.com/schemas/xts/logicsheets/presentation/main/mt"
- xmlns:mf="http://developer.cognos.com/schemas/xts/logicsheets/presentation/main/mf"
- 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:tool="http://developer.cognos.com/schemas/xts/logicsheets/xslt/toollogic/"
- xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" xmlns:out="dummy-uri">
- <xsl:output method="xml" encoding="UTF-8" indent="no"/>
- <xsl:namespace-alias stylesheet-prefix="out" result-prefix="xsl"/>
- <xsl:variable name="tool-namespace-uri" select="'http://developer.cognos.com/schemas/xts/logicsheets/xslt/toollogic/'"/>
- <!--
- ===============================================================================================
- xsl:stylesheet - adds the templates that are called within this logic sheet
-
- available global variables:
- $cur-obj : Content Manager node of current object (e.g. /Directory/DataSource1)
- $m_class : Content Manager class of $cur-obj
- $m_name : Name of $cur-obj, may also contains the display name (e.g. All Data Sources)
- ===============================================================================================
- -->
- <xsl:template match="xsl:stylesheet">
- <xsl:copy>
- <xsl:copy-of select="@*"/>
- <pf:variables/>
- <out:variable name="tool-search">
- <out:choose>
- <out:when test="/root/search">true</out:when>
- <out:otherwise>false</out:otherwise>
- </out:choose>
- </out:variable>
- <out:variable name="tool-stateParams">
- <xsl:value-of select="concat(' ', //tool:page/@stateParams, ' backURL tool_tab ')"/>
- </out:variable>
- <!-- Global portal variables -->
- <mf:variables>
- <mf:stateParams>
- <out:choose>
- <out:when test="$tool-search = 'true'">
- <out:value-of select="concat($tool-stateParams, 'search stext sscope smethod sfield sstatus stype smodified sshortcuts stime m_searchsection m_pagerfromsearch m_pagertosearch ')"/>
- </out:when>
- <out:otherwise>
- <out:value-of select="$tool-stateParams"/>
- </out:otherwise>
- </out:choose>
- </mf:stateParams>
- </mf:variables>
- <xsl:variable name="form-name" select="//tool:page/@formName"/>
- <out:variable name="cmd-form">
- <xsl:value-of select="concat('c', $form-name)"/>
- </out:variable>
- <!-- Required -->
- <out:variable name="edit-form">
- <xsl:value-of select="concat('p', $form-name)"/>
- </out:variable>
- <!-- Required -->
- <!-- Tool specific variables -->
- <out:variable name="cur-obj" select="/root/path/cm:queryResponse/*"/>
- <out:variable name="m_class" select="local-name($cur-obj)"/>
- <out:variable name="tool-back-url"><out:value-of select="xtsext:protect(xtsext:urlencode(string(/root/env/param[@name = 'backURL'])),'url','url','getdata')"/></out:variable>
- <out:variable name="tool-path"><out:value-of select="xtsext:protect(xtsext:urlencode(string(/root/env/param[@name='m_path'])),'url','searchPath','getdata')"/></out:variable>
- <out:variable name="showTenantInfo" select="/root/session/param[@name='e_showTenantInfo']='true'"/>
-
- <xsl:apply-templates/>
- <!-- Insert common templates -->
- <mt:actions mode="tools"/>
- <pf:gen-action/>
- <pf:gen-icon/>
- <pf:gen-url/>
- </xsl:copy>
- </xsl:template>
- <!--
- ===============================================================================================
- tool:page -
- ===============================================================================================
- -->
- <xsl:template match="tool:page" priority="1">
-
- <html encodeDocType="false">
- <out:attribute name="lang"><out:value-of select="$productLocale"/></out:attribute>
- <head>
- <pf:meta/>
- <!-- Standard meta tags -->
- <title>
- <xsl:choose>
- <xsl:when test="./tool:name">
- <out:text/>
- <xsl:copy-of select="./tool:name/child::node()"/>
- <out:text/>
- </xsl:when>
- <xsl:otherwise>
- <xts:string id="IDS_COGNOS_REPORTS"/>
- </xsl:otherwise>
- </xsl:choose>
- </title>
- <mt:stylesheet/>
- <!-- add the theme style sheet -->
- <mf:head/>
- <!-- Common framework logic for Cognos Central main view -->
- <pf:help context="{@helpid}"/>
- <!-- Help system -->
- <pf:launch/>
- <!-- adds functions to launch the studios.... -->
- <xsl:apply-templates select="tool:script"/>
- </head>
- <mt:page>
- <xsl:if test="tool:regionLabel">
- <mt:regionLabel>
- <xsl:copy-of select="./tool:regionLabel/@id"/>
- <xsl:copy-of select="./tool:regionLabel/child::node()"/>
- </mt:regionLabel>
- </xsl:if>
- <xsl:if test="tool:tabs">
- <out:variable name="tool-tab">
- <xsl:copy-of select="tool:tabs/child::node()"/>
- </out:variable>
- </xsl:if>
- <xsl:if test="@hideHeaders!='true'">
- <mt:h1>
- <mt:title>
- <xsl:copy-of select="./tool:title/child::node()"/>
- </mt:title>
- </mt:h1>
-
- <xsl:choose>
- <xsl:when test="tool:tabs">
- <xsl:call-template name="gen-tabs">
- <xsl:with-param name="tabset-name" select="tool:tabs/@tabset-name"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <mt:h3/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:if>
- <out:choose>
- <out:when test="$tool-search = 'true'">
- <mt:h4>
- <mt:path>
- <xsl:apply-templates select="tool:pathSearch/child::node()"/>
- <out:if test="$tool-search = 'true'">
- <xsl:text/>  - <span class="bold"><xts:string id="IDS_SEARCH"/></span>
- <xsl:text/>
- </out:if>
- </mt:path>
- <xsl:if test="not (tool:search/@toolBar) or tool:search/@toolBar = 'true'">
- <mt:toolbar>
- <out:variable name="hideEditButton">
- <xsl:choose>
- <xsl:when test="tool:hideEditToolbarButtons/@test">
- <out:choose>
- <out:when test="{tool:hideEditToolbarButtons/@test}">true</out:when>
- <out:otherwise>false</out:otherwise>
- </out:choose>
- </xsl:when>
- <xsl:otherwise>false</xsl:otherwise>
- </xsl:choose>
- </out:variable>
- <!-- Show the toolbar when we have data to display -->
- <out:choose>
- <out:when test="count(/root/cm:queryResponse/*) > 0">
- <!-- only show the edit toolbar buttons if we're in the cognos namespace or we're not looking at the UGR tab -->
- <out:if test="$hideEditButton='false'">
- <mt:tool-group hideDivider="true">
- <out:if test="{not(tool:hideCopyToolbarButton/@test)}">
- <mt:tool name="copy"/>
- </out:if>
- <xsl:choose>
- <!-- The 'config' param will allow the tool to check if we are deleting configurationFolder -->
- <xsl:when test="tool:search/@type='config'">
- <mt:tool name="delete" type="config" mode="tools"/>
- </xsl:when>
- <xsl:otherwise>
- <mt:tool name="delete" mode="tools"/>
- </xsl:otherwise>
- </xsl:choose>
- </mt:tool-group>
- </out:if>
- </out:when>
- <out:otherwise>
- <!-- only show the edit toolbar buttons if we're in the cognos namespace or we're not looking at the UGR tab -->
- <out:if test="$hideEditButton='false'">
- <mt:tool-group hideDivider="true">
- <out:choose>
- <out:when test="contains(string(key('session-param','edit')),'copy')"><mt:tool name="copy"/></out:when>
- <out:when test="{not(tool:hideCopyToolbarButton/@test)}"><mt:tool name="copy" disable="true"/></out:when>
- </out:choose>
- <mt:tool name="delete" disable="true"/>
- </mt:tool-group>
- </out:if>
- </out:otherwise>
- </out:choose>
- </mt:toolbar>
- </xsl:if>
- </mt:h4>
- </out:when>
- <out:otherwise>
- <mt:h4 cogadmin="true">
- <mt:path>
- <xsl:apply-templates select="tool:path/child::node()"/>
- </mt:path>
- <xsl:apply-templates select="tool:actions/child::node()"/>
- </mt:h4>
- </out:otherwise>
- </out:choose>
- <out:if test="$tool-search = 'true'">
- <xsl:apply-templates select="tool:search"/>
- </out:if>
- <form method="post" onload="if (window.init) init();">
- <xsl:attribute name="name"><xsl:value-of select="'{$edit-form}'"/></xsl:attribute>
- <xsl:attribute name="action"><xsl:value-of select="'{$gateway}'"/></xsl:attribute>
- <xsl:apply-templates select="*[not(self::tool:script or self::tool:path or self::tool:actions or self::tool:search)]"/>
- <mf:edit-vars mode="tools"/>
- <!-- standard set of form variables used to process commands like actions, new ... -->
- </form>
- <form method="post">
- <xsl:attribute name="name"><xsl:value-of select="'{$cmd-form}'"/></xsl:attribute>
- <xsl:attribute name="action"><xsl:value-of select="'{$gateway}'"/></xsl:attribute>
- <mf:cmd-vars/>
- <input type="hidden" name="from_tool" value="true"/>
- </form>
- </mt:page>
- </html>
- </xsl:template>
- <xsl:template match="tool:script" priority="1">
- <script language="javascript">
- <xsl:apply-templates/>
- </script>
- </xsl:template>
- <xsl:template match="tool:contents" priority="1">
- <xsl:apply-templates/>
- </xsl:template>
- <!--
- ===============================================================================================
- tool:search - generate search dialog
- ===============================================================================================
- -->
- <xsl:template match="tool:search" priority="1">
- <xsl:variable name="modExists">
- <xsl:choose>
- <xsl:when test="@mod"><xsl:value-of select="@mod"/></xsl:when>
- <xsl:otherwise><xsl:value-of select="false()"/></xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <out:choose>
- <out:when test="{$modExists}">
- <mt:search type="tools" modified="no">
- <xsl:apply-templates/>
- </mt:search>
- </out:when>
- <out:otherwise>
- <mt:search type="tools">
- <xsl:apply-templates/>
- </mt:search>
- </out:otherwise>
- </out:choose>
-
- </xsl:template>
- <!--
- ===============================================================================================
- tool:browser -
- ===============================================================================================
- -->
- <xsl:template match="tool:browser" priority="1">
- <out:variable name="containers">
- <xsl:apply-templates select="tool:containers"/>
- </out:variable>
- <!-- The extra leading and trailing spaces in this variable allow us to omit a concat that
- would be repeated for every row. Don't remove them or collapse them. -->
- <out:variable name="hierarchy-objects">
- <xsl:text> </xsl:text>
- <xsl:apply-templates select="tool:hierarchy-objects"/>
- <xsl:text> </xsl:text>
- </out:variable>
- <out:variable name="isConfig">
- <xsl:choose>
- <xsl:when test="@type='config'">true</xsl:when>
- <xsl:otherwise>false</xsl:otherwise>
- </xsl:choose>
- </out:variable>
- <out:variable name="selectables">
- <xsl:apply-templates select="tool:selectables"/>
- </out:variable>
- <out:variable name="hasSearchToolBar">
- <xsl:choose>
- <xsl:when test="not (//tool:page/tool:search/@toolBar) or //tool:page/tool:search/@toolBar = 'true' ">true</xsl:when>
- <xsl:otherwise>false</xsl:otherwise>
- </xsl:choose>
- </out:variable>
- <out:choose>
- <!-- Empty search query. -->
- <out:when test="/root/search/emptySearchExpression">
- <mt:objectNoneFound id="IDS_EMPTY_QUERY"/>
- </out:when>
-
- <!-- show the page or search results -->
- <out:when test="/root/search/expression or not(/root/search)">
- <xsl:variable name="vPage" select="@virtualPage"/>
- <cf:main-pager-section virtualPage="{$vPage}">
- <cf:param name="target">concat($app,'/',$mname)</cf:param>
- <cf:param name="item-path">
- <xsl:choose>
- <xsl:when test="@useQueryReply='true'">/root/cm:queryResponse/cm:queryReply[1]/*</xsl:when>
- <xsl:otherwise>/root/cm:queryResponse/*</xsl:otherwise>
- </xsl:choose>
- </cf:param>
- <cf:param name="lines-per-page">
- <out:value-of select="key('session-param', 'linesPerPage')"/>
- </cf:param>
- <cf:param name="rows">
- <!-- First define the columns -->
- <cp:tableHeader>
- <xsl:attribute name="session-name">
- <xsl:value-of select="tool:columnHeaders/@session-name"/>
- </xsl:attribute>
- <out:choose>
- <out:when test="$tool-search = 'true'">
- <cp:columnHeader width="16" toggleName="checkbox_" noLabel="true">
- <cp:columnHeaderForm><out:value-of select="$edit-form"/></cp:columnHeaderForm>
- </cp:columnHeader>
- <cp:columnHeader width="20"/>
- <cp:columnHeader width="100%">
- <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>
- <xts:string id="IDS_NAME"/>
- </cp:columnHeader>
- <cp:columnHeader width="100">
- <xsl:if test="@valign and @valign!=''">
- <xsl:attribute name="valign">
- <xsl:value-of select="@valign"/>
- </xsl:attribute>
- </xsl:if>
- <cp:columnCondition><out:value-of select="$showTenantInfo"/></cp:columnCondition>
- <xts:string id="IDS_OBJ_TENANT"/>
- </cp:columnHeader>
- <xsl:if test="@hideActions != 'true'">
- <cp:columnHeader width="150">
- <xts:string id="IDS_HEADING_ACTIONS"/>
- </cp:columnHeader>
- </xsl:if>
- </out:when>
- <out:otherwise>
- <xsl:if test="not(tool:columnHeaders[@session-name='monitor-sort'])">
- <cp:columnHeader width="16" toggleName="checkbox_" noLabel="true">
- <cp:columnHeaderForm><out:value-of select="$edit-form"/></cp:columnHeaderForm>
- </cp:columnHeader>
- </xsl:if>
- <xsl:if test="not(tool:columnHeaders)">
- <cp:columnHeader width="20"/>
- <cp:columnHeader width="200">
- <xts:string id="IDS_NAME"/>
- </cp:columnHeader>
- <cp:columnHeader width="200">
- <xts:string id="IDS_MODIFIED"/>
- </cp:columnHeader>
- </xsl:if>
-
- <xsl:apply-templates select="tool:columnHeaders/*"/>
- <cp:columnHeader width="100">
- <xsl:if test="@valign and @valign!=''">
- <xsl:attribute name="valign">
- <xsl:value-of select="@valign"/>
- </xsl:attribute>
- </xsl:if>
- <cp:columnCondition><out:value-of select="$showTenantInfo"/></cp:columnCondition>
- <xts:string id="IDS_OBJ_TENANT"/>
- </cp:columnHeader>
- <xsl:if test="@hideActions != 'true'">
- <cp:columnHeader width="100%">
- <xsl:if test="@valign and @valign!=''">
- <xsl:attribute name="valign">
- <xsl:value-of select="@valign"/>
- </xsl:attribute>
- </xsl:if>
- <xts:string id="IDS_HEADING_ACTIONS"/>
- </cp:columnHeader>
- </xsl:if>
- </out:otherwise>
- </out:choose>
- </cp:tableHeader>
- <!-- Then define the column contents -->
- <cp:tableContent>
- <out:choose>
- <out:when test="$tool-search = 'true'">
- <cp:columnContent>
- <out:choose>
- <out:when test="$selectables='allObjects' or (contains(concat(' ', $selectables, ' '), concat(' ', cm:objectClass, ' ')) and $hasSearchToolBar = 'true') ">
- <input type="checkbox">
- <out:attribute name="value"><out:value-of select="xtsext:urlencode(string(cm:searchPath))"/></out:attribute>
- <out:attribute name="aria-label"><xts:string id="IDS_SELECTION_FOR_PAGER_ITEM" encode="html"><xts:param name="pagerItemName"><out:value-of select="xtsext:htmlencode(cm:defaultName)"/></xts:param></xts:string></out:attribute>
- <out:choose>
- <out:when test="cm:objectClass = 'configurationFolder' and $isConfig='true'">
- <out:choose>
- <out:when test="cm:hasChildren and cm:hasChildren != ''">
- <out:attribute name="name">checkbox_<out:value-of select="cm:objectClass"/>_<out:value-of select="cm:hasChildren"/>_<out:value-of select="position()"/></out:attribute>
- <out:if test="key('env-param',concat('checkbox_' , cm:objectClass , '_' , cm:hasChildren , '_' , position()))">
- <out:attribute name="checked">checked</out:attribute>
- </out:if>
- </out:when>
- <out:otherwise>
- <out:attribute name="name">checkbox_<out:value-of select="cm:objectClass"/>_<out:value-of select="position()"/></out:attribute>
- <out:if test="key('env-param',concat('checkbox_' , cm:objectClass , '_' , position()))">
- <out:attribute name="checked">checked</out:attribute>
- </out:if>
- </out:otherwise>
- </out:choose>
- </out:when>
- <out:otherwise>
- <out:attribute name="name">checkbox_<out:value-of select="position()"/></out:attribute>
- <out:if test="key('env-param',concat('checkbox_' , position()))">
- <out:attribute name="checked">checked</out:attribute>
- </out:if>
- </out:otherwise>
- </out:choose>
- </input>
- </out:when>
- <out:otherwise> </out:otherwise>
- </out:choose>
- </cp:columnContent>
- <cp:columnContent>
- <out:call-template name="gen-icon">
- <out:with-param name="hiddenObject" select="cm:hidden"/>
- </out:call-template>
- </cp:columnContent>
- <cp:columnContent scope="row">
- <img width="20" height="16" align="absmiddle" src="{'{$skin_images}'}path.gif">
- <out:attribute name="alt">
- <cf:do-the-path-link>
- <cf:param name="familytree">cm:ancestors</cf:param>
- <cf:param name="familymember">cm:defaultName</cf:param>
- <cf:param name="onlyAncestors">true</cf:param>
- </cf:do-the-path-link>
- </out:attribute>
- </img><xsl:text> </xsl:text>
- <out:choose>
- <out:when test="contains(concat(' ', $containers, ' '), concat(' ', cm:objectClass, ' ')) and contains(concat(' ', cm:permissions, ' '), ' traverse ')">
- <a>
- <out:attribute name="href">
- <out:call-template name="gen-url"/>
- </out:attribute>
- <out:value-of select="cm:defaultName"/>
- <out:if test="cm:userName != ''">
- <out:text> (</out:text>
- <out:value-of select="cm:userName"/>
- <out:text>)</out:text>
- </out:if>
- </a>
- </out:when>
- <out:when test="contains($hierarchy-objects, concat(' ', cm:objectClass, ' ')) and cm:hasChildren = 'true' and contains(concat(' ', cm:permissions, ' '), ' traverse ')">
- <a>
- <out:attribute name="href">
- <out:call-template name="gen-url"/>
- </out:attribute>
- <out:value-of select="cm:defaultName"/>
- <out:if test="cm:userName != ''">
- <out:text> (</out:text>
- <out:value-of select="cm:userName"/>
- <out:text>)</out:text>
- </out:if>
- </a>
- </out:when>
- <out:otherwise>
- <out:value-of select="cm:defaultName"/>
- <out:if test="cm:userName != ''">
- <out:text> (</out:text>
- <out:value-of select="cm:userName"/>
- <out:text>)</out:text>
- </out:if>
- </out:otherwise>
- </out:choose>
- <!-- Render the disabled icon if this entry is disabled -->
- <out:choose>
- <out:when test="cm:disabled = 'true'">
- <img height="16" width="16" hspace="4" align="absmiddle" src="{'{$image_root}'}state_disabled.gif">
- <out:attribute name="alt"><xts:string id="IDS_DISABLED"/></out:attribute>
- </img>
- </out:when>
- <out:when test="cm:target/*/cm:disabled = 'true' or cm:base/*/cm:disabled = 'true'">
- <img height="16" width="16" hspace="4" align="absmiddle" src="{'{$image_root}'}state_source_disabled.gif">
- <out:attribute name="alt"><xts:string id="IDS_DISABLED"/></out:attribute>
- </img>
- </out:when>
- </out:choose>
- </cp:columnContent>
- <cp:columnContent>
- <cp:columnCondition><out:value-of select="$showTenantInfo"/></cp:columnCondition>
- <out:value-of select="cm:tenantName"/>
- </cp:columnContent>
- <xsl:if test="@hideActions != 'true'">
- <cp:columnContent>
- <out:call-template name="action-properties">
- <xsl:for-each select="tool:row-actions/tool:action">
- <out:with-param>
- <xsl:attribute name="name"><xsl:value-of select="@name"/></xsl:attribute>
- <xsl:attribute name="select"><xsl:choose><xsl:when test="@test and @test != ''"><xsl:value-of select="@test"/></xsl:when><xsl:otherwise><xsl:value-of select="'true()'"/></xsl:otherwise></xsl:choose></xsl:attribute>
- </out:with-param>
- </xsl:for-each>
- </out:call-template>
- </cp:columnContent>
- </xsl:if>
- </out:when>
- <out:otherwise>
- <cp:columnContent>
- <out:choose>
- <out:when test="$selectables='allObjects' or (contains(concat(' ', $selectables, ' '), concat(' ', cm:objectClass, ' ')))">
- <input type="checkbox">
- <out:attribute name="value"><out:value-of select="xtsext:urlencode(string(cm:searchPath))"/></out:attribute>
- <out:attribute name="aria-label"><xts:string id="IDS_SELECTION_FOR_PAGER_ITEM" encode="html"><xts:param name="pagerItemName"><out:value-of select="xtsext:htmlencode(cm:defaultName)"/></xts:param></xts:string></out:attribute>
-
- <out:choose>
- <out:when test="cm:objectClass = 'dispatcher' or cm:objectClass = 'configurationFolder' ">
- <out:choose>
- <out:when test="cm:hasChildren and cm:hasChildren != ''">
- <out:attribute name="name">checkbox_<out:value-of select="cm:objectClass"/>_<out:value-of select="cm:hasChildren"/>_<out:value-of select="position()"/></out:attribute>
- <out:if test="key('env-param',concat('checkbox_' , cm:objectClass , '_' , cm:hasChildren , '_' , position()))">
- <out:attribute name="checked">checked</out:attribute>
- </out:if>
- </out:when>
- <out:otherwise>
- <out:attribute name="name">checkbox_<out:value-of select="cm:objectClass"/>_<out:value-of select="position()"/></out:attribute>
- <out:if test="key('env-param',concat('checkbox_' , cm:objectClass , '_' , position()))">
- <out:attribute name="checked">checked</out:attribute>
- </out:if>
- </out:otherwise>
- </out:choose>
- </out:when>
- <out:otherwise>
- <out:attribute name="name">checkbox_<out:value-of select="position()"/></out:attribute>
- <out:if test="key('env-param',concat('checkbox_' , position()))">
- <out:attribute name="checked">checked</out:attribute>
- </out:if>
- </out:otherwise>
- </out:choose>
- </input>
- </out:when>
- <out:otherwise> </out:otherwise>
- </out:choose>
- </cp:columnContent>
- <cp:columnContent>
- <out:variable name="class">
- <out:if test="cm:objectClass='shortcut'">
- <out:value-of select="*[local-name()='target']/*/*[local-name()='objectClass']"/>
- </out:if>
- </out:variable>
- <out:call-template name="gen-icon">
- <out:with-param name="hiddenObject" select="cm:hidden"/>
- <out:with-param name="class" select="$class"/>
- </out:call-template>
- </cp:columnContent>
- <xsl:if test="not(tool:columnContents)">
- <cp:columnContent scope="row">
- <out:choose>
- <out:when test="contains(concat(' ', $containers, ' '), concat(' ', cm:objectClass, ' ')) and contains(concat(' ', cm:permissions, ' '), ' traverse ')">
- <a>
- <out:attribute name="href">
- <out:call-template name="gen-url"/>
- </out:attribute>
- <out:value-of select="cm:defaultName"/>
- <out:if test="cm:userName != ''">
- <out:text> (</out:text>
- <out:value-of select="cm:userName"/>
- <out:text>)</out:text>
- </out:if>
- </a>
- </out:when>
- <out:when test="contains($hierarchy-objects, concat(' ', cm:objectClass, ' ')) and cm:hasChildren = 'true' and contains(concat(' ', cm:permissions, ' '), ' traverse ')">
- <a>
- <out:attribute name="href">
- <out:call-template name="gen-url"/>
- </out:attribute>
- <out:value-of select="cm:defaultName"/>
- <out:if test="cm:userName != ''">
- <out:text> (</out:text>
- <out:value-of select="cm:userName"/>
- <out:text>)</out:text>
- </out:if>
- </a>
- </out:when>
- <out:otherwise>
- <out:value-of select="cm:defaultName"/>
- <out:if test="cm:userName != ''">
- <out:text> (</out:text>
- <out:value-of select="cm:userName"/>
- <out:text>)</out:text>
- </out:if>
- </out:otherwise>
- </out:choose>
- <!-- Render the disabled icon if this entry is disabled -->
- <out:choose>
- <out:when test="cm:disabled = 'true'">
- <img height="16" width="16" hspace="4" align="absmiddle" src="{'{$image_root}'}state_disabled.gif">
- <out:attribute name="alt"><xts:string id="IDS_DISABLED"/></out:attribute>
- </img>
- </out:when>
- <out:when test="cm:target/*/cm:disabled = 'true' or cm:base/*/cm:disabled = 'true'">
- <img height="16" width="16" hspace="4" align="absmiddle" src="{'{$image_root}'}state_source_disabled.gif">
- <out:attribute name="alt"><xts:string id="IDS_DISABLED"/></out:attribute>
- </img>
- </out:when>
- </out:choose>
- </cp:columnContent>
- <cp:columnContent>
- <out:choose>
- <out:when test="cm:modificationTime!=''">
- <out:value-of select="xtsext:formatDateFromUTC(string(cm:modificationTime), number('2'), number('3'), string($timeZone), string($contentLocale))"/>
- </out:when>
- <out:otherwise> </out:otherwise>
- </out:choose>
- </cp:columnContent>
- </xsl:if>
- <xsl:apply-templates select="tool:columnContents/*"/>
- <cp:columnContent>
- <cp:columnCondition><out:value-of select="$showTenantInfo"/></cp:columnCondition>
- <out:value-of select="cm:tenantName"/>
- </cp:columnContent>
- <xsl:if test="@hideActions != 'true'">
- <cp:columnContent>
- <out:call-template name="action-properties">
- <xsl:for-each select="tool:row-actions/tool:action">
- <out:with-param>
- <xsl:attribute name="name"><xsl:value-of select="@name"/></xsl:attribute>
- <xsl:attribute name="select">
- <xsl:choose>
- <xsl:when test="@test and @test != ''">
- <xsl:value-of select="@test"/>
- </xsl:when>
- <xsl:otherwise><xsl:value-of select="'true()'"/></xsl:otherwise>
- </xsl:choose>
- </xsl:attribute>
- </out:with-param>
- </xsl:for-each>
- </out:call-template>
- </cp:columnContent>
- </xsl:if>
- </out:otherwise>
- </out:choose>
- </cp:tableContent>
- <cp:tableFooter>
- <xsl:apply-templates select="tool:columnFooters/*"/>
- </cp:tableFooter>
- </cf:param>
- </cf:main-pager-section>
- </out:when>
- </out:choose>
- <xsl:apply-templates select="*[not(self::tool:columns or self::tool:row-actions or self::tool:containers or self::tool:selectables or self::tool:hierarchy-objects)]"/>
- </xsl:template>
- <xsl:template match="tool:containers" priority="1">
- <xsl:apply-templates/>
- </xsl:template>
- <xsl:template match="tool:selectables" priority="1">
- <xsl:apply-templates/>
- </xsl:template>
- <xsl:template match="tool:hierarchy-objects" priority="1">
- <xsl:apply-templates/>
- </xsl:template>
- <xsl:template match="tool:row-actions" priority="1">
- <xsl:apply-templates/>
- </xsl:template>
- <xsl:template match="tool:action" priority="1">
- <xsl:apply-templates/>
- <out:text> </out:text>
- </xsl:template>
- <!--
- ===============================================================================================
- retrieve the name attribute or child tool:name element from the given node.
- ===============================================================================================
- -->
- <xsl:template name="get-tool-name">
- <xsl:param name="node"/>
- <xsl:choose>
- <xsl:when test="$node/@name">
- <out:text/>
- <xsl:value-of select="$node/@name"/>
- <out:text/>
- </xsl:when>
- <xsl:when test="$node/tool:name">
- <out:text/>
- <xsl:copy-of select="$node/tool:name/child::node()"/>
- <out:text/>
- </xsl:when>
- </xsl:choose>
- </xsl:template>
- <!--
- ===============================================================================================
- retrieve the name attribute or child tool:name element from the given node.
- ===============================================================================================
- -->
- <xsl:template name="gen-tabs">
- <xsl:param name="selected"/>
- <xsl:param name="tabset-name"/>
- <out:variable name="selected">
- <xsl:value-of select="$selected"/>
- </out:variable>
- <xsl:if test="$tabset-name != ''">
- <mt:h3>
- <mt:tabs>
- <out:variable name="tabs">
- <xsl:choose>
- <!-- Directory Tool tabs: (u) Users, Groups, and Roles; (d) Data Sources; (l) Distribution Lists and Contacts; (p) Printers. -->
- <xsl:when test="$tabset-name = 'directory'">
- <tab>
- <out:choose>
- <out:when test="not($tool-tab) or $tool-tab='u'">
- <out:attribute name="selected">true</out:attribute>
- <xts:string id="IDS_DIRECTORY_UGR_TAB"/>
- </out:when>
- <out:otherwise>
- <a class="tabAnchor">
- <xsl:attribute name="href">
- <xsl:value-of select="'{$gateway}'"/>?b_action=xts.run<xsl:text/>
- <xsl:text/>&m=<xsl:value-of select="'{$app}'"/><xsl:value-of select="'/tools_directory.xts'"/><xsl:text/>
- <xsl:text/>&m_path=<xsl:value-of select="'/directory'"/><xsl:text/>
- <xsl:text/>&tool_tab=u&backURL=<xsl:value-of select="'{$tool-back-url}'"/><xsl:text/>
- </xsl:attribute>
- <xts:string id="IDS_DIRECTORY_UGR_TAB"/>
- </a>
- </out:otherwise>
- </out:choose>
- </tab>
- <tab>
- <out:choose>
- <out:when test="$tool-tab='d'">
- <out:attribute name="selected">true</out:attribute>
- <xts:string id="IDS_DIRECTORY_DATASOURCE_TAB"/>
- </out:when>
- <out:otherwise>
- <a class="tabAnchor">
- <xsl:attribute name="href">
- <xsl:value-of select="'{$gateway}'"/>?b_action=xts.run<xsl:text/>
- <xsl:text/>&m=<xsl:value-of select="'{$app}'"/><xsl:value-of select="'/tools_directory.xts'"/><xsl:text/>
- <xsl:text/>&m_path={xtsext:protect(xtsext:urlencode('CAMID(":")'),'url','searchPath','getdata')}<xsl:text/>
- <xsl:text/>&tool_tab=d&backURL=<xsl:value-of select="'{$tool-back-url}'"/><xsl:text/>
- </xsl:attribute>
- <xts:string id="IDS_DIRECTORY_DATASOURCE_TAB"/>
- </a>
- </out:otherwise>
- </out:choose>
- </tab>
- <tab>
- <out:choose>
- <out:when test="$tool-tab='l'">
- <out:attribute name="selected">true</out:attribute>
- <xts:string id="IDS_DIRECTORY_DISTRLIST_TAB"/>
- </out:when>
- <out:otherwise>
- <a class="tabAnchor">
- <xsl:attribute name="href">
- <xsl:value-of select="'{$gateway}'"/>?b_action=xts.run<xsl:text/>
- <xsl:text/>&m=<xsl:value-of select="'{$app}'"/><xsl:value-of select="'/tools_directory.xts'"/><xsl:text/>
- <xsl:text/>&m_path={xtsext:protect(xtsext:urlencode('CAMID(":")'),'url','searchPath','getdata')}<xsl:text/>
- <xsl:text/>&tool_tab=l&backURL=<xsl:value-of select="'{$tool-back-url}'"/><xsl:text/>
- </xsl:attribute>
- <xts:string id="IDS_DIRECTORY_DISTRLIST_TAB"/>
- </a>
- </out:otherwise>
- </out:choose>
- </tab>
- <tab>
- <out:choose>
- <out:when test="$tool-tab='p'">
- <out:attribute name="selected">true</out:attribute>
- <xts:string id="IDS_DIRECTORY_PRINTER_TAB"/>
- </out:when>
- <out:otherwise>
- <a class="tabAnchor">
- <xsl:attribute name="href">
- <xsl:value-of select="'{$gateway}'"/>?b_action=xts.run<xsl:text/>
- <xsl:text/>&m=<xsl:value-of select="'{$app}'"/><xsl:value-of select="'/tools_directory.xts'"/><xsl:text/>
- <xsl:text/>&m_path={xtsext:protect(xtsext:urlencode('CAMID(":")'),'url','searchPath','getdata')}<xsl:text/>
- <xsl:text/>&tool_tab=p&backURL=<xsl:value-of select="'{$tool-back-url}'"/><xsl:text/>
- </xsl:attribute>
- <xts:string id="IDS_DIRECTORY_PRINTER_TAB"/>
- </a>
- </out:otherwise>
- </out:choose>
- </tab>
- </xsl:when>
- <!-- Server Administration tabs: (m) Monitor; (c) Configure. -->
- <xsl:when test="$tabset-name = 'server'">
- <tab>
- <out:choose>
- <out:when test="not($tool-tab) or $tool-tab='m'">
- <out:attribute name="selected">true</out:attribute>
- <xts:string id="IDS_SERVICE_MONITOR"/>
- </out:when>
- <out:otherwise>
- <a class="tabAnchor">
- <xsl:attribute name="href">
- <xsl:value-of select="'{$gateway}'"/>?b_action=xts.run<xsl:text/>
- <xsl:text/>&m=<xsl:value-of select="'{$app}'"/><xsl:value-of select="'/tools_service_monitor.xts'"/><xsl:text/>
- <xsl:text/>&m_path=<xsl:value-of select="'{$tool-path}'"/><xsl:text/>
- <xsl:text/>&backURL=<xsl:value-of select="'{$tool-back-url}'"/><xsl:text/>
- </xsl:attribute>
- <cp:label><xts:string id="IDS_SERVICE_MONITOR"/></cp:label>
- </a>
- </out:otherwise>
- </out:choose>
- </tab>
- <tab>
- <out:choose>
- <out:when test="not($tool-tab) or $tool-tab='c'">
- <out:attribute name="selected">true</out:attribute>
- <xts:string id="IDS_SERVICE_CONFIG"/>
- </out:when>
- <out:otherwise>
- <a class="tabAnchor">
- <xsl:attribute name="href">
- <xsl:value-of select="'{$gateway}'"/>?b_action=xts.run<xsl:text/>
- <xsl:text/>&m=<xsl:value-of select="'{$app}'"/><xsl:value-of select="'/tools_service_config.xts'"/><xsl:text/>
- <xsl:text/>&m_path=<xsl:value-of select="'{$tool-path}'"/><xsl:text/>
- <xsl:text/>&backURL=<xsl:value-of select="'{$tool-back-url}'"/><xsl:text/>
- </xsl:attribute>
- <cp:label><xts:string id="IDS_SERVICE_CONFIG"/></cp:label>
- </a>
- </out:otherwise>
- </out:choose>
- </tab>
- </xsl:when>
- </xsl:choose>
- </out:variable>
- <out:call-template name="renderTabs">
- <out:with-param name="tabs" select="$tabs"/>
- <out:with-param name="scroll" select="false()"/>
- </out:call-template>
- </mt:tabs>
- </mt:h3>
- </xsl:if>
- </xsl:template>
- <!--
- ===============================================================================================
- Generate path string from ancestors property.
- ===============================================================================================
- -->
- <xsl:template match="tool:gen-path-str" priority="1">
- <out:template name="gen-path-str">
- <out:param name="ancestorsInfo"/>
- <out:for-each select="$ancestorsInfo/child::cm:ancestorInfo">
- <out:choose>
- <out:when test="following-sibling::*">
- <out:value-of select="concat(string(./cm:title), ' > ')"/>
- </out:when>
- <out:otherwise>
- <out:value-of select="./cm:title"/>
- </out:otherwise>
- </out:choose>
- </out:for-each>
- </out:template>
- </xsl:template>
- <!--
- ===============================================================================================
- The main engine
- ===============================================================================================
- -->
- <xsl:template match="*[namespace-uri() = $tool-namespace-uri]" priority="0">
- <xsl:comment>Ignoring <xsl:value-of select="name()"/> element.</xsl:comment>
- </xsl:template>
- <xsl:template match="*">
- <xsl:copy>
- <xsl:copy-of select="@*"/>
- <xsl:apply-templates/>
- </xsl:copy>
- </xsl:template>
- </xsl:stylesheet>
|