123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735 |
- <?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).
- -->
- <xts:morphlet xmlns:xts="http://developer.cognos.com/schemas/xts/" messageBase="messages/portal.xml, messages/portalRL.xml" requiredCapability="canUsePortalAdministrationTool">
- <!--
- ===============================================================================================
- 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"/>
- <!-- ======================================================== -->
- <!-- 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 mergeTenantNames"
- 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'] and /root/env/param[@name = 'm_path'] != ''">
- <xsl:value-of select="/root/env/param[@name = 'm_path']"/>
- </xsl:when>
- <xsl:otherwise>/portal/portalPackage[@defaultName='connection']/portletFolder</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xts:sequence>
- <search:gen-search-exp defaultRoot="portal/portalPackage[@defaultName='connection']/portletFolder">
- <search:defaultTypes>
- <search:defaultType>portletProducer</search:defaultType>
- <search:defaultType>portlet</search:defaultType>
- </search:defaultTypes>
- </search:gen-search-exp>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!--
- =============================================
- Request properties of the portlets
- =============================================
- -->
- <xts:block id="getContent" processor="XSLT" type="exec" dependency="buildSession generateSearchExp">
- <xts:logicsheet path="logicsheets/tenantlogic.xsl"/>
- <xts:logicsheet path="logicsheets/buslogic.xslt"/>
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- <xts:logicsheet path="logicsheets/cm-logic.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']"/>
- <xsl:variable name="maxObjects">
- <xsl:choose>
- <xsl:when test="string(/root/env/param[@name = 'm_pagerto']) !='' and string(/root/env/param[@name = 'm_pagerfrom']) !=''">
- <xsl:value-of select="(/root/env/param[@name = 'm_pagerto'] - /root/env/param[@name = 'm_pagerfrom']) + 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_newsearch'] ='true'">0</xsl:when>
- <xsl:when test="/root/env/param[@name = 'm_pagerfrom'] and /root/env/param[@name = 'm_pagerfrom']!=''">
- <xsl:value-of select="(/root/env/param[@name = 'm_pagerfrom'])-1"/>
- </xsl:when>
- <xsl:when test="/root/env/param[@name='m_section']!=''">
- <xsl:choose>
- <xsl:when test="/root/env/param[@name='m_section']!='-1'">
- <xsl:value-of select="((/root/env/param[@name='m_section']) -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>
- <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>/portal/portalPackage[@defaultName='connection']/portletFolder</xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="m_sort" select="/root/session/param[@name='s_ct']"/>
- <xts:sequence>
- <xts:append>
- <content>
- <!-- Request properties of the portlet objects. -->
- <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>
- <cm:query>
- <cm:search>
- <xsl:value-of select="$path"/>
- </cm:search>
- <cm:properties>
- <cm:property name="objectClass"/>
- <cm:property name="defaultName"/>
- <cm:property name="ancestors"/>
- <cm:property name="searchPath"/>
- <cm:property name="storeID"/>
- <cm:property name="permissions"/>
- <cm:property name="tenantID"/>
- </cm:properties>
- </cm:query>
- <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="/root/search/expression"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$path"/>/*<xsl:value-of select="$visibility-predicate"/>
- </xsl:otherwise>
- </xsl:choose>
- </cm:search>
- <cm:properties>
- <cm:property name="defaultName"/>
- <cm:property name="hasChildren"/>
- <cm:property name="permissions"/>
- <cm:property name="searchPath"/>
- <cm:property name="storeID"/>
- <cm:property name="modificationTime"/>
- <cm:property name="displaySequence"/>
- <cm:property name="canCustomize"/>
- <cm:property name="name"/>
- <cm:property name="position"/>
- <cm:property name="defaultScreenTip"/>
- <cm:property name="disabled"/>
- <cm:property name="hidden"/>
- <cm:property name="ancestors"/>
- <cm:property name="iconURI"/>
- </cm:properties>
- <cm:options maxObjects="{($maxObjects+1)}" skipObjects="{$skipObjects}">
- <cm:refProps>
- <cm:refProp refPropName="parent">
- <cm:properties>
- <cm:property name="permissions"/>
- </cm:properties>
- </cm:refProp>
- </cm:refProps>
- </cm:options>
- <cm:sortBy>
- <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>
- <!-- The tool does not browse from the root of the /portal content area. As a result we need to tweak the ancestor property to
- make the pathlinks control work -->
- <xts:delete select="/root/content/*[local-name()='queryResponse']/*[local-name()='queryReply']/*/*[local-name()='ancestors']/*[./*[local-name()='objectClass']='portal' or ./*[local-name()='objectClass']='portalPackage']"/>
- <!-- Reset m_newsearch to false, so next time the skipObjects will be set to 0.-->
- <xsl:if test="/root/env/param[@name = 'm_newsearch'] = 'true' ">
- <xts:replace select="/root/env/param[@name = 'm_newsearch']">
- <param name="m_newsearch">false</param>
- </xts:replace>
- </xsl:if>
- </xts:sequence>
- <xts:sequence>
- <!-- This is required for proper functioning of the pager control -->
- <xts:delete select="/root/env/param[@name='pagerfrom' or @name='pagerto' or @name='pagerfrom_d' or @name='pagerto_d']"/>
- </xts:sequence>
- <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">/portal/portalPackage[@defaultName='connection']/portletFolder</param>
- </xts:append>
- </xsl:if>
- </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="mergeTenantNames" 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_portaladmin.xts'"/>
- <tool:variables formName="frmEntryAdmin" stateParams="m_path m_section m_pagerto m_pagerfrom"/>
- <xsl:template match="/">
- <tool:head title="IDS_TOOLS_PORTAL_ADMIN" tab="IDS_TOOLS_PORTAL_ADMIN_PORTLETS_TAB" helpid="HID_ADMIN_PORTLETS"/>
- </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="mergeTenantNames" mimeType="text/html" contentId="banner" partId="1" 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/">
- <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" 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_portaladmin.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="canRead" select="contains(concat(' ',$the-object/cm:permissions,' '),' read ')"/>
- <xsl:variable name="canWrite" select="contains(concat(' ',$the-object/cm:permissions,' '),' write ')"/>
-
- <cp:flyoutControl/>
-
- <tool:variables formName="frmEntryAdmin" stateParams="m_path m_section m_pagerfrom m_pagerto"/>
- <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_PORTAL_ADMIN" hideHeaders="true">
- <tool:tabs tabset-name="portalAdmin">p</tool:tabs>
- <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'))"/>&m_path=<pf:idToSearchPathForURL source="cm:storeID"/><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'))"/>&m_path=<pf:idToSearchPathForURL source="$the-object/cm:storeID"/><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="$searchIsEnabled='true'">
- <xsl:text/>  -  <span class="bold"><xts:string id="IDS_SEARCH"/></span><xsl:text/>
- </xsl:if>
- </tool:path>
- <tool:actions>
- <mt:toolbar cogadmin="true">
- <xsl:choose>
- <xsl:when test="$searchIsEnabled='true'">
- <xsl:choose>
- <xsl:when test="count(/root/content/cm:queryResponse/cm:queryReply[2]/*) = 0">
- <mt:tool-group cogadmin="true" lastgroup="true">
- <mt:tool cogadmin="true" name="delete" mode="tools" disable="true"/>
- </mt:tool-group>
- </xsl:when>
- <xsl:otherwise>
- <mt:tool-group cogadmin="true" lastgroup="true">
- <xsl:choose>
- <xsl:when test="not($canWrite)">
- <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:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:otherwise>
- <xsl:choose>
- <xsl:when test="$the-object/cm:objectClass = 'portletProducer'">
- <xsl:choose>
- <!-- user needs traverse, write and read to create a new portlet -->
- <xsl:when test="$userCanNotTraverse or not($canRead) or not($canWrite)">
- <mt:tool cogadmin="true" name="new_portlets" disable="true"/>
- </xsl:when>
- <xsl:otherwise>
- <mt:tool cogadmin="true" name="new_portlets"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- </xsl:choose>
- <mt:tool-group cogadmin="true">
- <xsl:choose>
- <xsl:when test="not($canWrite)">
- <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>
- <mt:tool-group cogadmin="true" lastgroup="true">
- <mt:tool cogadmin="true" name="parent_properties">
- <tool-name>portaladmin</tool-name>
- <request-path>$the-object</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:otherwise>
- </xsl:choose>
- </mt:toolbar>
- </tool:actions>
- </tool:banner>
- </xsl:template>
- <cp:tabControl/>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ===============================================================================================
- search - This block generates the search interface, when it is enabled.
- ===============================================================================================
- -->
- <xts:block id="search" type="exec" mode="output" processor="XSLT" dependency="mergeTenantNames" mimeType="text/html" contentId="search" partId="1" condition=".[/root/env/param[@name='search']]" mandatory="false"
- 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:dp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/presentation/"
- 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/">
- <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/search.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/controls/framework.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/controls/presentation.xsl"/>
- <!-- Generic logicsheets -->
- <xts:logicsheet path="logicsheets/presentation/dialog/framework.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/dialog/presentation.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/layout.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="pf mt dp lyt xts">
- <xsl:output method="html" encoding="utf-8" indent="no"/>
- <xsl:variable name="mname" select="'legacy_tools/tools_portaladmin.xts'"/>
- <tool:variables formName="frmEntryAdmin" stateParams="m_path m_section m_pagerfrom m_pagerto"/>
- <cp:flyoutControl/>
- <xsl:template match="/">
- <mt:search type="tools">
- <mt:stypes>
- <mt:stype name="portlet"><xts:string id="IDS_OBJ_PORTLET"/></mt:stype>
- <mt:stype name="portletProducer"><xts:string id="IDS_OBJ_PORTLETPRODUCER"/></mt:stype>
- </mt:stypes>
- <mt:close-params>
- <param>backURL</param>
- <param>m_path</param>
- </mt:close-params>
- </mt:search>
- </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:dp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/presentation/">
- <xts:logicsheet path="logicsheets/toollogic2.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"/>
- <!-- 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_portaladmin.xts'"/>
- <xsl:variable name="the-object" select="/root/content/cm:queryResponse/cm:queryReply[1]/*"/>
- <xsl:variable name="canReadParent" select="contains($the-object/cm:permissions, 'read')"/>
- <xsl:variable name="userCanNotTraverse" select="not(contains(/root/content/cm:queryResponse/cm:queryReply[1]/*/cm:permissions, 'traverse'))"/>
- <tool:variables formName="frmEntryAdmin" stateParams="m_path m_section m_pagerto m_pagerfrom"/>
- <xsl:template match="/">
- <tool:content formName="frmEntryAdmin" tool="portaladmin">
- <xsl:choose>
- <!-- 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($the-object)">
- <mt:containerNoAccess/>
- </xsl:when>
- <xsl:when test="$userCanNotTraverse">
- <mt:objectNoneFound id="IDS_NO_TRAVERSE_CONTAINER"/>
- </xsl:when>
- <xsl:when test="/root/search/emptySearchExpression">
- <mt:objectNoneFound id="IDS_EMPTY_QUERY"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:if test="/root/search/expression or not(/root/search)">
- <cf:main-pager-section virtualPage="true" width="100%">
- <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_ct">
- <cp:columnHeader toggleName="checkbox_" form="pfrmEntryAdmin"/>
- <cp:columnHeader width="20"/>
- <cp:columnHeader width="100%" sort="n">
- <cp:sortHref>
- <xsl:value-of select="$back-url"/>&m_s_ct=<xsl:choose>
- <xsl:when test="key('session-param', 's_ct') = 'na' ">nd</xsl:when>
- <xsl:when test="key('session-param', 's_ct') = 'nd' ">sa</xsl:when>
- <xsl:otherwise>na</xsl:otherwise>
- </xsl:choose>
- </cp:sortHref>
- <xsl:if test="/root/env/param[@name='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>
- <xsl:if test="not(/root/env/param[@name='search'])">
- <cp:columnHeader sort="d">
- <cp:sortHref>
- <xsl:value-of select="$back-url"/>&m_s_ct=<xsl:choose>
- <xsl:when test="key('session-param', 's_ct') = 'da' ">dd</xsl:when>
- <xsl:when test="key('session-param', 's_ct') = 'dd' ">sa</xsl:when>
- <xsl:otherwise>da</xsl:otherwise>
- </xsl:choose>
- </cp:sortHref>
- <xts:string id="IDS_MODIFIED"/>
- </cp:columnHeader>
- </xsl:if>
-
- <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><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>
- </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">
- <xsl:if test="/root/env/param[@name='search']">
- <img width="20" height="16" align="absmiddle" src="{$skin_images}path.gif">
- <xsl: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:do-the-path-link>
- </xsl:attribute>
- </img><xsl:text> </xsl:text>
- </xsl:if>
- <xsl:variable name="parentHasReadPermission" select="contains(cm:parent/*/cm:permissions, 'read')"/>
- <xsl:variable name="url-encoded-id"><pf:idToSearchPathForURL source="cm:storeID"/></xsl:variable>
- <mf:entry-name tool="portalAdmin"/>
- <xsl:text>  </xsl:text>
- </cp:columnContent>
- <xsl:if test="not(/root/env/param[@name='search'])">
- <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>
- </xsl:if>
-
- <cp:columnContent>
- <cp:columnCondition><xsl:value-of select="/root/session/param[@name='e_showTenantInfo']='true'"/></cp:columnCondition>
- <xsl:value-of select="cm:tenantName"/>
- </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="supportPortletControlAction" select="true()"/>
- <xsl:with-param name="supportAllActionsAction" select="true()"/>
- <xsl:with-param name="canWrite" select="contains(cm:permissions, 'write')"/>
- <xsl:with-param name="canRead" select="contains(cm:permissions, 'read')"/>
- </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:if>
- </xsl:otherwise>
- </xsl:choose>
- </tool:content>
- </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 search 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>
- <!-- copy in the head content -->
- <xsl:copy-of select="output/xos:part/xos:entityBody/xos:content[@id = 'head']"/>
- <mt:page>
- <!-- copy in the banner -->
- <xsl:copy-of select="output/xos:part/xos:entityBody/xos:content[@id = 'banner']"/>
- <!-- copy in the search part, when it exists -->
- <xsl:copy-of select="output/xos:part/xos:entityBody/xos:content[@id = 'search']"/>
- <!-- 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>
|