123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- Licensed Materials - Property of IBM
- IBM Cognos Products: ps
- (C) Copyright IBM Corp. 2005, 2015
- 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).
- -->
- <xts:morphlet xmlns:xts="http://developer.cognos.com/schemas/xts/" messageBase="messages/portal.xml, messages/portalRL.xml" requiredCapability="canUseContentStoreTool">
-
- <!--
- ===============================================================================================
- formlogic_init
- ===============================================================================================
- -->
- <xts:block id="formlogic_init" type="exec" mode="interpret" processor="XSLT" path="/logicsheets/formlogic_init.xslt" nodelist="env,credential,system,http"/>
-
- <!--
- ===============================================================================================
- If external backURLs are not allowed then verify the backURL is in the crn domain and replace it if it isn't
- ===============================================================================================
- -->
- <xts:block id="secureBackURL" path="portal/secureBackURL.xml" processor="XSLT" type="exec" condition=".[/root/system/param[@name = 'allowExternalURLs'] = 'false']" mandatory="false"/>
- <!--
- ===============================================================================================
- Saves cut/copied entries in a user session - Only executes after a cut or a copy operation.
- ===============================================================================================
- -->
- <xts:block id="groupEdit" path="portal/set_clipboard.xml" processor="XSLT" type="exec" mandatory="false" condition=".[/root/env/param[@name='editentries']]">
- <xts:logicsheet path="logicsheets/buslogic.xslt"/>
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- </xts:block>
- <!-- ======================================================== -->
- <!-- Session Management -->
- <!-- ======================================================== -->
-
- <!-- Reads session-sensitive info from CM -->
- <xts:block processor="XSLT" type="exec" mandatory="false"
- id="refreshSession"
- path="portal/cc/read_session.xml"
- condition=".[
- string(/root/cookies/cookie[@name = 'cc_session']) = ''
- or /root/env/param[@name='m_reload']
- or /root/env/param[@name='m_root'] ]">
-
- <xts:logicsheet path="logicsheets/cm-logic.xsl"/>
- <xts:logicsheet path="logicsheets/buslogic.xslt"/>
- </xts:block>
-
- <!-- Update the <session> element for this request. -->
- <xts:block id="buildSession" path="portal/session.xml" dependency="refreshSession secureBackURL" processor="XSLT" type="exec"
- condition=".[
- /root/newSession
- or /root/env/param[@name='ui']
- or /root/env/param[@name='d']
- or /root/env/param[starts-with(@name,'m_s_')]
- or /root/env/param[@name = 'resetSort'] ]"
- mandatory="false"/>
-
- <!-- Save changes to the state info in a cookie -->
- <xts:block mode="interpret" processor="XSLT" type="exec"
- id="setSession"
- path="portal/set_session.xml"
- dependency="buildSession getContent"
- condition=".[/root/updateSession]"
- mandatory="false"/>
- <!--
- ======================================
- Generat the search expression
- ======================================
- -->
- <xts:block id="generateSearchExp" processor="XSLT" type="exec" dependency="buildSession" condition=".[/root/env/param[@name='search']]" mandatory="false">
- <xts:logicsheet path="logicsheets/searchlogic.xslt"/>
- <xts:logicsheet path="logicsheets/cm-logic.xsl"/>
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:search="http://developer.cognos.com/schemas/xts/logicsheets/xslt/searchlogic/"
- xmlns:cml="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/cml/1/"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- exclude-result-prefixes="search cml xtsext">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" omit-xml-declaration="yes" indent="no"/>
- <cml:object-predicates/>
- <xsl:template match="root">
- <xsl:variable name="path">
- <xsl:choose>
- <xsl:when test=" /root/env/param[@name='m_path'] != '' ">
- <xsl:value-of select="/root/env/param[@name='m_path']"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="'/adminFolder'"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xts:sequence>
- <search:gen-search-exp defaultRoot="adminFolder">
- <search:defaultTypes>
- <search:defaultType>adminFolder</search:defaultType>
- <search:defaultType>contentTask</search:defaultType>
- <search:defaultType>indexUpdateTask</search:defaultType>
- <search:defaultType>importDeployment</search:defaultType>
- <search:defaultType>exportDeployment</search:defaultType>
- <search:defaultType>jobDefinition</search:defaultType>
- <search:defaultType>planningMacroTask</search:defaultType>
- <search:defaultType>queryServiceTask</search:defaultType>
- </search:defaultTypes>
- </search:gen-search-exp>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!--
- =============================================
- Query Content Manager. Get the contents.
- =============================================
- -->
- <xts:block id="getContent" processor="XSLT" type="exec" dependency="formlogic_init buildSession generateSearchExp">
- <xts:logicsheet path="logicsheets/tenantlogic.xsl"/>
- <xts:logicsheet path="logicsheets/cm-logic.xsl"/>
- <xts:logicsheet path="logicsheets/buslogic.xslt"/>
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
- xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
- xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/"
- xmlns:cml="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/cml/1/"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- exclude-result-prefixes="xsl cm pf send cml xtsext">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" omit-xml-declaration="yes" indent="no"/>
- <pf:variables/>
- <cml:object-predicates/>
- <xsl:template match="root">
- <xsl:variable name="userPrefs" select="/root/session/param"/>
-
- <xsl:variable name="userPrefsDefault" select="/root/system/param[@name='defaultPortalPreferences']"/>
-
- <!-- How many objects to retrieve from CM in a single query-->
- <xsl:variable name="maxObjects">
- <xsl:choose>
- <xsl:when test="string(/root/env/param[@name = 'm_pagertocsadmin']) !='' and string(/root/env/param[@name = 'm_pagerfromcsadmin']) !=''">
- <xsl:value-of select="(/root/env/param[@name = 'm_pagertocsadmin'] - /root/env/param[@name = 'm_pagerfromcsadmin']) + 1"/>
- </xsl:when>
- <xsl:when test="$userPrefs[@name='linesPerPage']!=''">
- <xsl:value-of select="$userPrefs[@name='linesPerPage']"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$userPrefsDefault/pref[@name='lines']"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
-
- <xsl:variable name="skipObjects">
- <xsl:choose>
- <xsl:when test="/root/env/param[@name = 'm_pagerfromcsadmin'] and /root/env/param[@name = 'm_pagerfromcsadmin']!=''">
- <xsl:value-of select="(/root/env/param[@name = 'm_pagerfromcsadmin'])-1"/>
- </xsl:when>
- <xsl:when test="/root/env/param[@name='m_csadminsection']!=''">
- <xsl:choose>
- <xsl:when test="/root/env/param[@name='m_csadminsection']!='-1'">
- <xsl:value-of select="((/root/env/param[@name='m_csadminsection']) -1)"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="($maxObjects) * -1"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:otherwise>0</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
-
- <!-- Get the current adminFolder path from m_path env parameter. If m_path does not exist or is blank then set the path to the root adminFolder. -->
- <xsl:variable name="path">
- <xsl:choose>
- <xsl:when test="/root/env/param[@name='m_path']!=''">
- <xsl:value-of select="/root/env/param[@name='m_path']"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text>/adminFolder</xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
-
- <xsl:variable name="m_sort" select="/root/session/param[@name='s_cs']"/>
-
- <!-- Query the CM and append the response to the /root/content -->
- <xts:sequence>
- <xts:append>
- <content>
- <xts:transform src="transforms/CM/post-process.xslt" processor="XSLT">
- <send:request provider="cm">
- <xts:transform src="transforms/CM/pre-process.xslt" processor="XSLT">
- <cm:query>
- <cm:requests>
-
- <!-- Get the current adminFolder properties -->
- <cm:query>
- <cm:search>
- <xsl:value-of select="$path"/>
- </cm:search>
- <cm:properties>
- <cm:property name="defaultName"/>
- <cm:property name="ancestors"/>
- <cm:property name="searchPath"/>
- <cm:property name="storeID"/>
- <cm:property name="objectClass"/>
- <cm:property name="disabled"/>
- <cm:property name="permissions"/>
- <cm:property name="tenantID"/>
- </cm:properties>
- </cm:query>
- <!-- Get the properties of ALL of the objects under the current adminFolder regardless of object type. -->
- <xsl:if test="/root/search/expression or not(/root/search)">
- <cm:query>
- <cm:search>
- <xsl:choose>
- <xsl:when test="/root/search/expression">
- <xsl:value-of select="concat(/root/search/expression, $visibility-predicate)"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="concat(string($path), '/*', $visibility-predicate)"/>
- </xsl:otherwise>
- </xsl:choose>
- </cm:search>
- <cm:properties>
- <cml:prop-base/>
- <cm:property name="hasChildren"/>
- <cm:property name="ancestors"/>
- <cm:property name="displaySequence"/>
- <cm:property name="position"/>
- </cm:properties>
- <cm:options maxObjects="{($maxObjects+1)}" skipObjects="{$skipObjects}"/>
- <cm:sortBy>
- <cm:sort name="usage" order="ascending"/>
- <xsl:choose>
- <xsl:when test="$m_sort = 'da'">
- <cm:sort name="modificationTime" order="ascending"/>
- </xsl:when>
- <xsl:when test="$m_sort = 'dd'">
- <cm:sort name="modificationTime" order="descending"/>
- </xsl:when>
- <xsl:when test="$m_sort = 'na'">
- <cm:sort name="defaultName" order="ascending"/>
- </xsl:when>
- <xsl:when test="$m_sort = 'nd'">
- <cm:sort name="defaultName" order="descending"/>
- </xsl:when>
- <xsl:otherwise>
- <cm:sort name="displaySequence" order="ascending"/>
- </xsl:otherwise>
- </xsl:choose>
- </cm:sortBy>
- </cm:query>
- </xsl:if>
- </cm:requests>
- </cm:query>
- </xts:transform>
- </send:request>
- </xts:transform>
- </content>
- </xts:append>
- </xts:sequence>
-
- <!-- Every time the page is reloaded, delete the following pager parameters from the /root/env. This is required for the pager to work properly. -->
- <xts:sequence>
- <xts:delete select="/root/env/param[@name='pagerfromcsadmin']"/>
- <xts:delete select="/root/env/param[@name='pagertocsadmin']"/>
- <xts:delete select="/root/env/param[@name='pagerfrom_dcsadmin']"/>
- <xts:delete select="/root/env/param[@name='pagerto_dcsadmin']"/>
- </xts:sequence>
-
- <!-- if there is no m_path parameter under /root/env then append it to /root/env and set its value to the administrattion root folder /adminFolder -->
- <xts:sequence>
- <xsl:if test="not(/root/env/param[@name = 'm_path']) or /root/env/param[@name = 'm_path'] = '' ">
- <xts:append select="/root/env">
- <param name="m_path">/adminFolder</param>
- </xts:append>
- </xsl:if>
- </xts:sequence>
-
- <xts:sequence>
- <xts:append>
- <installedComponents>
- <xts:function name="getConfiguration">
- <xts:param name="installedComponents"/>
- </xts:function>
- </installedComponents>
- </xts:append>
- </xts:sequence>
-
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
-
- <!-- Merge the tenantNames into the response -->
- <xts:block processor="XSLT" type="exec" mandatory="false"
- path="/portal/tenancy/mergeTenantNames.xslt"
- id="mergeTenantNames"
- dependency="getContent"
- condition=".[/root/session/param[@name='e_showTenantInfo']='true']">
- <xts:logicsheet path="logicsheets/buslogic.xslt"/>
- </xts:block>
- <!--
- ===============================================================================================
- Load class names map
- ===============================================================================================
- -->
- <xts:block id="getClassNames" type="exec" mode="input" processor="XML" path="/portal/uiExtensions.xml">
- <xts:logicsheet path="/logicsheets/uiobjects/uiobjects_names.xslt"/>
- </xts:block>
- <!--
- ===============================================================================================
- head - This block generates the HTML <head> tag.
- ===============================================================================================
- -->
- <xts:block id="head" type="exec" mode="output" processor="XSLT" dependency="getContent" mimeType="text/html" contentId="head" partId="1" xmlns:tool="http://developer.cognos.com/schemas/xts/logicsheets/xslt/toollogic/" 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/">
- <xts:logicsheet path="logicsheets/toollogic2.xslt"/>
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/main/framework.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/main/presentation.xsl"/>
- <xts:logicsheet path="logicsheets/validation.xslt"/> <xts:logicsheet path="logicsheets/presentation/touch_up.xslt"/>
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" exclude-result-prefixes="cm tool pf mt mf cf cp xsl xts xtsext">
- <xsl:output method="html" encoding="utf-8" indent="no"/>
- <!-- current file name -->
- <xsl:variable name="mname" select="'legacy_tools/tools_cs_administration.xts'"/>
- <tool:variables formName="frmEntryAdmin" stateParams="m_path m_csadminsection m_pagerfromcsadmin m_pagertocsadmin"/>
- <xsl:template match="/">
- <tool:head title="IDS_TOOLS_CSADMIN" helpid="HID_MAINT_CONTENTSTORE"/>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
-
- <!--
- ===============================================================================================
- banner - This block generates the portal banner at the top of the tool.
- ===============================================================================================
- -->
- <xts:block id="banner" type="exec" mode="output" processor="XSLT" dependency="getContent" mimeType="text/html" contentId="banner" partId="1">
- <xts:logicsheet path="logicsheets/toollogic2.xslt"/>
- <!-- Cognos Central main behaviour logic -->
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/main/framework.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/main/presentation.xsl"/>
- <!-- Cognos Central controls logic -->
- <xts:logicsheet path="logicsheets/presentation/controls/framework.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/controls/presentation.xsl"/>
- <xts:logicsheet path="logicsheets/validation.xslt"/>
- <xts:logicsheet path="logicsheets/presentation/touch_up.xslt"/>
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- xmlns:tool="http://developer.cognos.com/schemas/xts/logicsheets/xslt/toollogic/"
- xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
- xmlns:mf="http://developer.cognos.com/schemas/xts/logicsheets/presentation/main/mf"
- xmlns:mt="http://developer.cognos.com/schemas/xts/logicsheets/presentation/main/mt"
- 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:xts="http://developer.cognos.com/schemas/xts/"
- exclude-result-prefixes="tool pf mf mt cf cp cm xtsext xts">
- <xsl:output method="html" encoding="utf-8" indent="no"/>
- <!-- current file name -->
- <xsl:variable name="mname" select="'legacy_tools/tools_cs_administration.xts'"/>
- <xsl:variable name="the-object" select="/root/content/cm:queryResponse/cm:queryReply[1]/*"/>
- <xsl:variable name="userCanNotTraverse" select="not(contains(/root/content/cm:queryResponse/cm:queryReply[1]/*/cm:permissions, 'traverse'))"/>
- <xsl:variable name="userCanNotWrite" select="not(contains(/root/content/cm:queryResponse/cm:queryReply[1]/*/cm:permissions, 'write'))"/>
- <xsl:variable name="disableToolIcons">
- <xsl:choose>
- <xsl:when test="/root/env/param[@name='search'] and (/root/search/emptySearchExpression or not(/root/content/cm:queryResponse/cm:queryReply[2]/*) or not(string(/root/search)))">true</xsl:when>
- <xsl:otherwise>false</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <tool:variables formName="frmEntryAdmin" stateParams="m_path m_csadminsection m_pagerfromcsadmin m_pagertocsadmin"/>
- <xsl:variable name="showMigration" select="count(/root/installedComponents/configuration/property/component[string(.)='migrationService']) > 0 and count(/root/installedComponents/configuration/property/component[string(.)='powerPlayService']) > 0 and $userCanUseUGRT and $userCanUseDST"/>
- <cp:flyoutControl/>
- <xsl:variable name="searchIsEnabled">
- <xsl:choose>
- <xsl:when test="key('env-param', 'search')">true</xsl:when>
- <xsl:otherwise>false</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:template match="/">
- <tool:banner title="IDS_TOOLS_CSADMIN" hideHeaders="true" id="lbl_csAdmin_region">
- <tool:path>
- <cf:do-the-path-link>
- <cf:param name="familytree">$the-object/cm:ancestors</cf:param>
- <cf:param name="familymember">$the-object/cm:defaultName</cf:param>
- <cf:param name="lastIsLink"><xsl:value-of select="$searchIsEnabled"/></cf:param>
- <cf:param name="anchorpath">
- <xsl:choose>
- <xsl:when test="cm:title">
- <a>
- <xsl:attribute name="href"><xsl:value-of select="concat($gateway, '?b_action=xts.run')"/><xsl:value-of select="concat('&m=', key('env-param', 'm'))"/><xsl:value-of select="concat('&m_path=', xtsext:protect(xtsext:urlencode(string(cm:searchPath)),'url','searchPath','getdata'))"/><xsl:if test="key('env-param', 'backURL')"><xsl:value-of select="concat('&backURL=', xtsext:protect(xtsext:urlencode(string(key('env-param', 'backURL'))),'url','url','getdata'))"/></xsl:if></xsl:attribute>
- <xsl:value-of select="cm:title"/>
- </a>
- </xsl:when>
- <xsl:otherwise>
- <a>
- <xsl:attribute name="href"><xsl:value-of select="concat($gateway, '?b_action=xts.run')"/><xsl:value-of select="concat('&m=', key('env-param', 'm'))"/><xsl:value-of select="concat('&m_path=', xtsext:protect(xtsext:urlencode(string($the-object/cm:searchPath)),'url','searchPath','getdata'))"/><xsl:if test="key('env-param', 'backURL')"><xsl:value-of select="concat('&backURL=', xtsext:protect(xtsext:urlencode(string(key('env-param', 'backURL'))),'url','url','getdata'))"/></xsl:if></xsl:attribute>
- <xsl:value-of select="$the-object/cm:defaultName"/>
- </a>
- </xsl:otherwise>
- </xsl:choose>
- </cf:param>
- </cf:do-the-path-link>
- <xsl:if test="/root/env/param[@name='search']">
- <xsl:text/>  -  <span class="bold"><xts:string id="IDS_SEARCH"/></span><xsl:text/>
- </xsl:if>
- </tool:path>
- <tool:actions>
- <mt:toolbar cogadmin="true">
- <xsl:if test="not(/root/env/param[@name='search'])">
- <mt:tool-group cogadmin="true">
- <xsl:choose>
- <xsl:when test="$userCanNotWrite or $userCanNotTraverse">
- <mt:tool cogadmin="true" name="new" disable="true" new-class="adminFolder"/>
- <mt:tool cogadmin="true" name="new" disable="true" new-class="jobDefinition"/>
- <mt:tool cogadmin="true" name="export" disable="true"/>
- <mt:tool cogadmin="true" name="import" disable="true"/>
- <xsl:if test="$showMigration">
- <mt:tool cogadmin="true" name="new_migration" disable="true"/>
- </xsl:if>
- <mt:tool cogadmin="true" name="new" disable="true" new-class="contentTask"/>
- <xsl:if test="$userCanUseQST">
- <mt:tool cogadmin="true" name="new" disable="true" new-class="queryServiceTask"/>
- </xsl:if>
- </xsl:when>
- <xsl:otherwise>
- <mt:tool cogadmin="true" name="new" new-class="adminFolder"/>
- <mt:tool cogadmin="true" name="new" new-class="jobDefinition"/>
- <mt:tool cogadmin="true" name="export"/>
- <mt:tool cogadmin="true" name="import"/>
- <xsl:if test="$showMigration">
- <mt:tool cogadmin="true" name="new_migration"/>
- </xsl:if>
- <mt:tool cogadmin="true" name="new" new-class="contentTask"/>
- <xsl:if test="$userCanUseQST">
- <mt:tool cogadmin="true" name="new" new-class="queryServiceTask"/>
- </xsl:if>
- </xsl:otherwise>
- </xsl:choose>
- </mt:tool-group>
- </xsl:if>
- <mt:tool-group cogadmin="true" lastgroup="true">
- <xsl:if test="not(/root/env/param[@name='search'])">
- <mt:tool cogadmin="true" name="cut"/>
- </xsl:if>
- <xsl:choose>
- <xsl:when test="$disableToolIcons='true'">
- <mt:tool cogadmin="true" name="copy" disable="true"/>
- </xsl:when>
- <xsl:otherwise>
- <mt:tool cogadmin="true" name="copy"/>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:if test="not(/root/env/param[@name='search'])">
- <mt:tool cogadmin="true" name="paste" mode="tools"/>
- </xsl:if>
- <xsl:choose>
- <xsl:when test="$disableToolIcons='true'">
- <mt:tool cogadmin="true" name="delete" mode="tools" disable="true"/>
- </xsl:when>
- <xsl:otherwise>
- <mt:tool cogadmin="true" name="delete" mode="tools"/>
- </xsl:otherwise>
- </xsl:choose>
- </mt:tool-group>
- <xsl:if test="not(/root/env/param[@name='search'])">
- <mt:tool-group cogadmin="true" lastgroup="true">
- <mt:tool cogadmin="true" name="parent_properties">
- <tool-name>adminfolder_properties</tool-name>
- <request-path>/root/content/cm:queryResponse/cm:queryReply[1]/*</request-path>
- </mt:tool>
- <xsl:choose>
- <xsl:when test="$userCanNotTraverse">
- <mt:tool cogadmin="true" name="search" disable="true"/>
- </xsl:when>
- <xsl:otherwise>
- <mt:tool cogadmin="true" name="search"/>
- </xsl:otherwise>
- </xsl:choose>
- </mt:tool-group>
- </xsl:if>
- </mt:toolbar>
- </tool:actions>
- </tool:banner>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
-
- <!--
- ===============================================================================================
- body - This block generates the tool contents.
- ===============================================================================================
- -->
- <xts:block id="body" type="exec" mode="output" processor="XSLT" dependency="mergeTenantNames getClassNames" mimeType="text/html" contentId="body" partId="1" xmlns:tool="http://developer.cognos.com/schemas/xts/logicsheets/xslt/toollogic/" xmlns:pf="http://developer.cognos.com/schemas/xts/pf" xmlns:pm="http://developer.cognos.com/schemas/xts/pm" xmlns:mf="http://developer.cognos.com/schemas/xts/logicsheets/presentation/main/mf" xmlns:mt="http://developer.cognos.com/schemas/xts/logicsheets/presentation/main/mt" 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:lyt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/layout/" xmlns:utml="http://developer.cognos.com/schemas/xts/logicsheet/xslt/formlogic/" xmlns:dp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/presentation/">
- <xts:logicsheet path="logicsheets/toollogic2.xslt"/>
- <xts:logicsheet path="logicsheets/formlogic.xslt"/>
- <!-- Cognos Central main behaviour logic -->
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- <xts:logicsheet path="logicsheets/permissions.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/main/framework.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/main/presentation.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/main/search.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/layout.xsl"/>
- <!-- Cognos Central controls logic -->
- <xts:logicsheet path="logicsheets/presentation/controls/framework.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/controls/presentation.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/dialog/presentation.xsl"/>
- <xts:logicsheet path="logicsheets/validation.xslt"/>
- <xts:logicsheet path="logicsheets/presentation/touch_up.xslt"/>
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" exclude-result-prefixes="tool pf pm mf mt cf cp dp cm xtsext xts">
- <xsl:output method="html" encoding="utf-8" indent="no"/>
- <!-- current file name -->
- <xsl:variable name="mname" select="'legacy_tools/tools_cs_administration.xts'"/>
- <xsl:variable name="userCanNotTraverse" select="not(contains(/root/content/cm:queryResponse/cm:queryReply[1]/*/cm:permissions, 'traverse'))"/>
- <xsl:variable name="showMigration" select="count(/root/installedComponents/configuration/property/component[string(.)='migrationService']) > 0 and count(/root/installedComponents/configuration/property/component[string(.)='powerPlayService']) > 0"/>
- <tool:variables formName="frmEntryAdmin" stateParams="m_path m_csadminsection m_pagerfromcsadmin m_pagertocsadmin m_pg_ecsadmin"/>
- <cp:flyoutControl/>
- <xsl:template match="/">
- <xsl:if test="$tool-search='true'">
- <xsl:call-template name="search-panel"/>
- </xsl:if>
- <tool:content formName="frmEntryAdmin" tool="contentadmin">
- <lyt:layout style="1" joinSection="yes">
- <lyt:section width="100%">
- <xsl:choose>
- <xsl:when test="$userCanNotTraverse">
- <mt:objectNoneFound id="IDS_NO_TRAVERSE_CONTAINER"/>
- </xsl:when>
- <!-- when we get an empty response for the ancestor then the user used a bookmark and he no longer has access or the directory was deleted -->
- <xsl:when test="not(/root/content/cm:queryResponse/cm:queryReply[1]/*)">
- <mt:containerNoAccess/>
- </xsl:when>
- <xsl:when test="/root/search/emptySearchExpression">
- <mt:objectNoneFound id="IDS_EMPTY_QUERY"/>
- </xsl:when>
- <xsl:when test="/root/search/expression or not(/root/search)">
- <cf:main-pager-section virtualPage="true" width="100%" name="csadmin">
- <cf:param name="target">concat(concat($app,'/'),$mname)</cf:param>
- <cf:param name="item-path">root/content/cm:queryResponse/cm:queryReply[2]/*</cf:param>
- <cf:param name="lines-per-page">
- <xsl:value-of select="key('session-param', 'linesPerPage')"/>
- </cf:param>
- <cf:param name="rows">
- <cp:tableHeader session-name="s_cs">
- <cp:columnHeader width="16" toggleName="checkbox_" noLabel="true" form="pfrmEntryAdmin"/>
- <cp:columnHeader width="20"/>
- <cp:columnHeader width="100%" sort="n" id="columnHeader_name">
- <cp:sortHref>
- <xsl:value-of select="$back-url"/>&m_s_cs=<xsl:choose>
- <xsl:when test="key('session-param', 's_cs') = 'na' ">nd</xsl:when>
- <xsl:when test="key('session-param', 's_cs') = 'nd' ">sa</xsl:when>
- <xsl:otherwise>na</xsl:otherwise>
- </xsl:choose>
- </cp:sortHref>
- <xsl:if test="/root/search">
- <img height="5" width="1" border="0"><xsl:attribute name="src"><xsl:value-of select="$webcontent"/>/images/space.gif</xsl:attribute></img>
- <xsl:text/><xts:string id="IDS_PATH_INDICATOR"/><xsl:text> </xsl:text>
- <img height="5" width="1" border="0"><xsl:attribute name="src"><xsl:value-of select="$webcontent"/>/images/space.gif</xsl:attribute></img>
- </xsl:if>
- <xts:string id="IDS_NAME"/>
- </cp:columnHeader>
- <cp:columnHeader sort="d" id="columnHeader_modified">
- <cp:sortHref>
- <xsl:value-of select="$back-url"/>&m_s_cs=<xsl:choose>
- <xsl:when test="key('session-param', 's_cs') = 'da' ">dd</xsl:when>
- <xsl:when test="key('session-param', 's_cs') = 'dd' ">sa</xsl:when>
- <xsl:otherwise>da</xsl:otherwise>
- </xsl:choose>
- </cp:sortHref>
- <xts:string id="IDS_MODIFIED"/>
- </cp:columnHeader>
- <cp:columnHeader>
- <cp:columnCondition><xsl:value-of select="/root/session/param[@name='e_showTenantInfo']='true'"/></cp:columnCondition>
- <xts:string id="IDS_OBJ_TENANT"/>
- </cp:columnHeader>
- <cp:columnHeader>
- <xts:string id="IDS_HEADING_ACTIONS"/>
- </cp:columnHeader>
- </cp:tableHeader>
- <cp:tableContent>
- <cp:common-render-variables>
- <!-- Common variables used in rendering icons, actions .. etc. -->
- <pm:permissions/>
- <mf:common-entry-varaibles/>
- </cp:common-render-variables>
- <cp:columnContent>
- <input type="checkbox" value="{xtsext:urlencode(string(cm:searchPath))}" name="checkbox_{position()}">
- <xsl:attribute name="aria-label"><xts:string id="IDS_SELECTION_FOR_PAGER_ITEM" encode="html"><xts:param name="pagerItemName"><xsl:value-of select="xtsext:htmlencode(cm:defaultName)"/></xts:param></xts:string></xsl:attribute>
- <xsl:if test="key('env-param',concat('checkbox_' , position()))">
- <xsl:attribute name="checked">checked</xsl:attribute>
- </xsl:if>
- </input>
- </cp:columnContent>
- <cp:columnContent>
- <xsl:call-template name="gen-icon">
- <xsl:with-param name="class" select="$class"/>
- <xsl:with-param name="hiddenObject" select="$hiddenObject"/>
- </xsl:call-template>
- </cp:columnContent>
- <cp:columnContent scope="row">
- <!-- Logic to figure out if an entry is to be hyperlinked and if it is what the URL should be -->
- <xsl:if test="/root/search">
- <img width="20" height="16" align="absmiddle" src="{$skin_images}path.gif">
- <xsl:attribute name="alt">
- <xsl:variable name="object-start-at-path">
- <xsl:value-of select="'/adminFolder'"/>
- </xsl: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"><xsl:value-of select="$object-start-at-path"/></cf:param>
- </cf:do-the-path-link>
- </xsl:attribute>
- </img><xsl:text> </xsl:text>
- </xsl:if>
- <xsl:choose>
- <xsl:when test="(cm:objectClass = 'adminFolder')">
- <a>
- <xsl:attribute name="href"><xsl:call-template name="gen-url"/></xsl:attribute>
- <xsl:value-of select="cm:defaultName"/>
- </a>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="cm:defaultName"/>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:if test="cm:disabled = 'true'">
- <img height="16" width="16" hspace="4" align="absmiddle" src="{$image_root}state_disabled.gif">
- <xsl:attribute name="alt"><xts:string id="IDS_DISABLED"/></xsl:attribute>
- </img>
- </xsl:if>
- <xsl:text>  </xsl:text>
- </cp:columnContent>
- <cp:columnContent>
- <!-- this will give us the time formatted with the java long(2) date and medium(3) time using the locale date and time patterns provided by java -->
- <nobr>
- <xsl:value-of select="xtsext:formatDateFromUTC( string( cm:modificationTime ), number( '2' ), number( '3' ), string( $timeZone ), string( $contentLocale ) )"/>
- </nobr>
- <xsl:text>  </xsl:text>
- </cp:columnContent>
- <cp:columnContent>
- <cp:columnCondition><xsl:value-of select="/root/session/param[@name='e_showTenantInfo']='true'"/></cp:columnCondition>
- <xsl:value-of select="cm:tenantName"/>
- <xsl:text>  </xsl:text>
- </cp:columnContent>
- <cp:columnContent>
- <nobr>
- <xsl:call-template name="action-properties">
- <xsl:with-param name="class" select="$class"/>
- <xsl:with-param name="supportPropertiesAction" select="true()"/>
- <xsl:with-param name="supportRunOptionsAction" select="true()"/>
- <xsl:with-param name="supportViewRunHistory" select="false()"/>
- <xsl:with-param name="supportScheduleAction" select="true()"/>
- <xsl:with-param name="supportAllActionsAction" select="true()"/>
- <xsl:with-param name="canExecute" select="contains(cm:permissions, 'execute')"/>
- </xsl:call-template>
- </nobr>
- </cp:columnContent>
- </cp:tableContent>
- <cp:tableFooter>
- <cp:columnFooter width="100%" colspan="11" timezone="string(/root/user/param[@name='timeZoneID'])">
- <!-- display the current timestamp -->
- <xsl:variable name="time_now" select="xtsext:getCurrentDateTime(string(/root/user/param[@name='timeZoneID']))"/>
- <xts:string id="IDS_LAST_UPDATED">
- <xts:param name="time">
- <xsl:value-of select="xtsext:formatDateFromUTC(string($time_now), number('2'), number('3'), '', string($contentLocale))"/>
- </xts:param>
- </xts:string>
- </cp:columnFooter>
- </cp:tableFooter>
- </cf:param>
- </cf:main-pager-section>
- </xsl:when>
- </xsl:choose>
- </lyt:section>
- </lyt:layout>
- </tool:content>
- </xsl:template>
- <xsl:template name="search-panel">
- <mt:search type="tools">
- <mt:scopes>
- <mt:scope>fb</mt:scope>
- <mt:scope>fo</mt:scope>
- <mt:scope>any</mt:scope>
- </mt:scopes>
- <mt:stypes>
- <mt:stype name="contentTask">
- <xts:string id="IDS_OBJ_CONTENTMAINTENANCE"/>
- </mt:stype>
- <mt:stype name="exportDeployment">
- <xts:string id="IDS_OBJ_EXPORTDEPLOYMENT"/>
- </mt:stype>
- <mt:stype name="adminFolder">
- <xts:string id="IDS_OBJ_CONTENT"/>
- </mt:stype>
- <mt:stype name="importDeployment">
- <xts:string id="IDS_OBJ_IMPORTDEPLOYMENT"/>
- </mt:stype>
- <xsl:if test="$userCanUseIndexSearch">
- <mt:stype name="indexUpdateTask">
- <xts:string id="IDS_OBJ_INDEXUPDATETASK"/>
- </mt:stype>
- </xsl:if>
- <xsl:if test="$showMigration">
- <mt:stype name="migrationTask">
- <xts:string id="IDS_OBJ_MIGRATIONTASK"/>
- </mt:stype>
- </xsl:if>
- <mt:stype name="jobDefinition">
- <xts:string id="IDS_OBJ_JOBDEFINITION"/>
- </mt:stype>
- <mt:stype name="queryServiceTask">
- <xts:string id="IDS_OBJ_QUERYSERVICETASK"/>
- </mt:stype>
- </mt:stypes>
- <mt:close-params>
- <param>backURL</param>
- <param>m_path</param>
- <param>m_section</param>
- </mt:close-params>
- </mt:search>
- </xsl:template>
- <!-- Insert common templates -->
- <mt:actions mode="tools"/>
- <pf:gen-action/>
- <pf:gen-icon/>
- <pf:gen-url/>
- </xsl:stylesheet>
- </xts:block>
-
- <!--
- ===============================================================================================
- render-page - Main page rendering block.
- ===============================================================================================
- -->
- <xts:block id="render-page" type="exec" mode="interpret" processor="XSLT" dependency="head banner body" mimeType="text/html" xmlns:mt="http://developer.cognos.com/schemas/xts/logicsheets/presentation/main/mt">
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- <!-- Cognos Central main behaviour logic -->
- <xts:logicsheet path="logicsheets/presentation/main/presentation.xsl"/>
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xos="http://developer.cognos.com/schemas/xts/output/" xmlns:bus="http://developer.cognos.com/schemas/bibus/3/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:pf="http://developer.cognos.com/schemas/xts/pf" xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/" xmlns:mt="http://developer.cognos.com/schemas/xts/logicsheets/presentation/main/mt" xmlns:mf="http://developer.cognos.com/schemas/xts/logicsheets/theme/main/mf" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" xmlns:xts="http://developer.cognos.com/schemas/xts/" exclude-result-prefixes="xsl cm pf mt mf bus xts xos SOAP-ENV">
- <xsl:output method="xml" version="1.0" encoding="utf-8" indent="no"/>
- <pf:variables/>
- <xsl:template match="/root">
- <xts:sequence>
- <xts:replace select="/root/output/*[local-name() = 'part']">
- <xos:part>
- <xos:entityHeader>
- <xos:param name="Content-Type">text/html; charset=utf-8</xos:param>
- </xos:entityHeader>
- <xos:entityBody>
- <html lang="{$productLocale}">
- <!-- copy in the head content -->
- <xsl:copy-of select="output/xos:part/xos:entityBody/xos:content[@id = 'head']"/>
- <mt:page region="IDS_TOOLS_CSADMIN">
- <!-- copy in the banner -->
- <xsl:copy-of select="output/xos:part/xos:entityBody/xos:content[@id = 'banner']"/>
- <!-- copy in the body -->
- <xsl:copy-of select="output/xos:part/xos:entityBody/xos:content[@id = 'body']"/>
- </mt:page>
- </html>
- </xos:entityBody>
- </xos:part>
- </xts:replace>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
-
- <!--
- =============================================
- Output debug dump
- =============================================
- -->
- <xts:block id="debug" type="exec" mode="output" processor="XSLT" condition=".[/root/env/param[@name='d'] = '1' or /root/session/param[@name='debug'] = '1']" mandatory="false" mimeType="text/html" dependency="render-page">
- <!-- get the debug logic sheet -->
- <xts:logicsheet path="logicsheets/debuglogic.xslt"/>
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:dbg="http://developer.cognos.com/schemas/xts/logicsheets/xslt/debug/" exclude-result-prefixes="dbg">
- <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no" omit-xml-declaration="yes"/>
- <xsl:template match="/">
- <dbg:dumpxml select="/root"/>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- </xts:morphlet>
|