12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817 |
- <?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/" xmlns:cml="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/cml/1/" messageBase="messages/portal.xml, messages/portalRL.xml" requiredCapability="canUseUsersGroupsAndRolesTool canUseDataSourcesTool canUseDistributionListsAndContactsTool or or">
- <!--
- ===============================================================================================
- 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="groupEdit buildSession getPath mergeTenantNames"
- condition=".[/root/updateSession]"
- mandatory="false"/>
- <!-- Load predefined actions map ============================================================== -->
- <xts:block id="getActions" type="exec" mode="input" processor="XML" path="/portal/uiExtensions.xml">
- <xts:logicsheet path="/logicsheets/uiobjects/uiobjects_actions.xslt"/>
- </xts:block>
-
- <!--
- =============================================
- Request properties of the current container
- =============================================
- -->
- <xts:block id="getPath" processor="XSLT" type="exec" dependency="buildSession">
- <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:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/" xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/" xmlns:pf="http://developer.cognos.com/schemas/xts/pf" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" omit-xml-declaration="yes" indent="no"/>
- <pf:variables/>
- <xsl:template match="root">
- <xsl:variable name="tooltab">
- <xsl:value-of select="/root/env/param[@name = 'tool_tab']"/>
- </xsl:variable>
- <xsl:if test="($tooltab = '') or ($tooltab != 'u' and $tooltab != 'd' and $tooltab != 'l')">
- <xts:sequence>
- <xts:delete select="/root/env/param[@name='search' or @name='tool_tab' or @name='m_path']"/>
- <xts:append select="/root/env">
- <param name="m_path">
- <xsl:value-of select="'/directory'"/>
- </param>
- </xts:append>
- </xts:sequence>
- </xsl:if>
- <xsl:variable name="tool-tab-desired">
- <xsl:choose>
- <xsl:when test="/root/env/param[@name = 'tool_tab']">
- <xsl:value-of select="/root/env/param[@name = 'tool_tab']"/>
- </xsl:when>
- <xsl:otherwise>
- <!-- Default to Users, Groups, and Roles if the tool_tab parameter is not present. -->
- <xsl:text>u</xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="checkCanUseUsersGroupsAndRolesTool" select="string(/root/header/*[local-name()='biBusHeader']/*[local-name()='userCapabilityCache']/*[local-name()='userCapabilities']/item[text()='canUseUsersGroupsAndRolesTool'])"/>
- <xsl:variable name="checkCanUseDataSourcesTool" select="string(/root/header/*[local-name()='biBusHeader']/*[local-name()='userCapabilityCache']/*[local-name()='userCapabilities']/item[text()='canUseDataSourcesTool'])"/>
- <xsl:variable name="checkCanUseDistributionListsAndContactsTool" select="string(/root/header/*[local-name()='biBusHeader']/*[local-name()='userCapabilityCache']/*[local-name()='userCapabilities']/item[text()='canUseDistributionListsAndContactsTool'])"/>
-
- <xsl:variable name="tool-tab">
- <xsl:choose>
- <xsl:when test="$tool-tab-desired = 'u'">
- <xsl:choose>
- <xsl:when test="$checkCanUseUsersGroupsAndRolesTool=''">
- <xsl:choose>
- <xsl:when test="$checkCanUseDataSourcesTool=''">l</xsl:when>
- <xsl:otherwise>d</xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$tool-tab-desired"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:when test="$tool-tab-desired = 'd'">
- <xsl:choose>
- <xsl:when test="$checkCanUseDataSourcesTool=''">
- <xsl:choose>
- <xsl:when test="$checkCanUseUsersGroupsAndRolesTool=''">l</xsl:when>
- <xsl:otherwise>u</xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$tool-tab-desired"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:otherwise>
- <xsl:choose>
- <xsl:when test="$checkCanUseDistributionListsAndContactsTool=''">
- <xsl:choose>
- <xsl:when test="$checkCanUseUsersGroupsAndRolesTool=''">d</xsl:when>
- <xsl:otherwise>u</xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$tool-tab-desired"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="m_path" select="/root/env/param[@name='m_path']"/>
- <xsl:variable name="m_pathID" select="/root/env/param[@name='m_pathID']"/>
- <xsl:variable name="path">
- <xsl:choose>
- <xsl:when test="$tool-tab!='u' and $tool-tab!='l'">
- <xsl:choose>
- <xsl:when test="starts-with($m_path, "CAMID(':')") or starts-with($m_path, 'CAMID(":")')">
- <xsl:value-of select="$m_path"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="'CAMID(":")'"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:otherwise>
- <xsl:choose>
- <xsl:when test="$m_path!='' and contains(string($m_path), '/rule')">
- <xsl:value-of select="substring-before($m_path, '/rule')"/>
- </xsl:when>
- <xsl:when test="$m_path!='' and contains(string($m_path), '/alert')">
- <xsl:value-of select="substring-before($m_path, '/alert')"/>
- </xsl:when>
- <xsl:when test="$m_path!=''">
- <xsl:value-of select="$m_path"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text>/directory</xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xts:sequence>
- <xts:append>
- <path>
- <!-- Request properties of the current container. -->
- <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:search>
- <xsl:choose>
- <xsl:when test="$m_pathID!=''">
- <xsl:text>storeID('</xsl:text>
- <xsl:value-of select="$m_pathID"/>
- <xsl:text>')</xsl:text>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$path"/>
- </xsl:otherwise>
- </xsl:choose>
- </cm:search>
- <cm:properties>
- <cm:property name="objectClass"/>
- <cm:property name="defaultName"/>
- <cm:property name="ancestors"/>
- <cm:property name="permissions"/>
- <cm:property name="searchPath"/>
- <cm:property name="storeID"/>
- <xsl:if test="$tool-tab = 'd'">
- <cm:property name="credentialNamespaces"/>
- <cm:property name="connectionString"/>
- </xsl:if>
- </cm:properties>
- <cm:options>
- <cm:refProps>
- <cm:refProp refPropName="parent">
- <cm:properties>
- <cm:property name="searchPath"/>
- </cm:properties>
- </cm:refProp>
- </cm:refProps>
- </cm:options>
- </cm:query>
- </xts:transform>
- </send:request>
- </xts:transform>
- </path>
- </xts:append>
- <xts:delete select="/root/env/param[@name='m_pathID']"/>
- <xts:append select="/root/env">
- <param name="m_pathID"><xts:queryValue select="/root/path/*[local-name()='queryResponse']/*/*[local-name()='storeID']"/></param>
- </xts:append>
- <!--
- Leaving the storeID in the response changes the behaviour of the parent permissions action and causes the OK/Cancel buttons to return the user to the root of the Cognos Namespace.
- Now that we've captured it we can delete it from the response to avoid this side effect.
- -->
- <xts:delete select="/root/path/*[local-name()='queryResponse']/*/*[local-name()='storeID']"/>
- <xts:delete select="/root/env/param[@name='tool_tab']"/>
- <xts:append select="/root/env">
- <param name="tool_tab"><xsl:value-of select="$tool-tab"/></param>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!--
- =======================================================================================
- When the enable-3rdparty-namespace-browsing system.xml parameter is set to false, we
- force the UI into search mode whenever we enter any part of a 3rd party namespace.
- =======================================================================================
- -->
- <xts:block id="secure-3rdpartyNS-browsing" dependency="getPath" nodelist="system,path" processor="XSLT" type="exec" condition=".[not(/root/env/param[@name='search'])]" mandatory="false">
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" omit-xml-declaration="yes" indent="no"/>
- <xsl:template match="root">
- <xsl:variable name="m_path" select="/root/path/cm:queryResponse/*/cm:searchPath"/>
- <xsl:variable name="inDirectoryRoot" select="/root/path/cm:queryResponse/*/cm:objectClass/cm:value='directory'"/>
- <xsl:variable name="insideCognosNamespace" select="(starts-with($m_path, "CAMID(':") or starts-with($m_path, 'CAMID(":'))"/>
- <xsl:variable name="insideAccount" select="(/root/path/cm:queryResponse/*/cm:objectClass/cm:value='account') or (/root/path/cm:queryResponse/*/cm:ancestors/cm:ancestorInfo/cm:objectClass='account')"/>
- <xsl:variable name="canBrowse3rdPartyNamespace" select="not(/root/system/param[@name='enable-3rdparty-namespace-browsing']='false')"/>
-
- <xsl:if test="not($canBrowse3rdPartyNamespace or $inDirectoryRoot or $insideCognosNamespace or $insideAccount)">
- <xts:sequence>
- <xts:append select="/root/env">
- <param name="search"/>
- </xts:append>
- </xts:sequence>
- </xsl:if>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ======================================
- Generat the search expression
- ======================================
- -->
- <xts:block id="generateSearchExp" processor="XSLT" type="exec" dependency="secure-3rdpartyNS-browsing" 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:cm="http://developer.cognos.com/schemas/xts-cm/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="search cm 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="browsingUserMyFolder" select="/root/path/cm:queryResponse/*/cm:objectClass='account' or /root/path/cm:queryResponse/*/cm:ancestors/*/cm:objectClass='account'"/>
- <xsl:variable name="tool-tab">
- <xsl:choose>
- <xsl:when test="/root/env/param[@name = 'tool_tab']">
- <xsl:value-of select="/root/env/param[@name = 'tool_tab']"/>
- </xsl:when>
- <xsl:otherwise>
- <!-- Default to Users, Groups, and Roles if the tool_tab parameter is not present. -->
- <xsl:text>u</xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="path">
- <xsl:choose>
- <xsl:when test="/root/env/param[@name = 'm_path'] and /root/env/param[@name = 'm_path'] != ''">
- <xsl:choose>
- <xsl:when test="$tool-tab='u' and contains(string(/root/env/param[@name='m_path']), '/alert')">
- <xsl:value-of select="substring-before(string(/root/env/param[@name = 'm_path']), '/alert')"/>
- </xsl:when>
- <xsl:when test="$tool-tab='u' and contains(string(/root/env/param[@name='m_path']), '/rule')">
- <xsl:value-of select="substring-before(string(/root/env/param[@name = 'm_path']), '/rule')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="/root/env/param[@name = 'm_path']"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:otherwise>/directory</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <!-- get current namespace path-->
- <xsl:variable name="t-ns-path">
- <xsl:choose>
- <xsl:when test="/root/path/cm:queryResponse/child::*[local-name() = 'namespace']">
- <xsl:value-of select="/root/path/cm:queryResponse/child::*/cm:searchPath"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="/root/path/cm:queryResponse/child::*/cm:ancestors/cm:ancestorInfo[./cm:objectClass = 'namespace']/cm:searchPath"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="ns-path">
- <xsl:choose>
- <xsl:when test="$t-ns-path != ''">
- <xsl:value-of select="$t-ns-path"/>
- </xsl:when>
- <!-- By default, use cognos namespace.-->
- <xsl:otherwise>
- <xsl:value-of select="'CAMID(":")'"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
-
- <xts:sequence>
- <xsl:choose>
- <xsl:when test="$tool-tab = 'u' and $browsingUserMyFolder">
- <search:gen-search-exp defaultRoot="directory">
- <search:defaultTypes>
- <search:defaultType>document</search:defaultType>
- <search:defaultType>shortcut</search:defaultType>
- <search:defaultType>analysis</search:defaultType>
- <search:defaultType>agentDefinition</search:defaultType>
- <search:defaultType>agentDefinitionView</search:defaultType>
- <search:defaultType>analyticsPackage</search:defaultType>
- <search:defaultType>cd</search:defaultType>
- <search:defaultType>contentReference</search:defaultType>
- <search:defaultType>report</search:defaultType>
- <search:defaultType>query</search:defaultType>
- <search:defaultType>reportView</search:defaultType>
- <search:defaultType>folder</search:defaultType>
- <search:defaultType>subscriptionFolder</search:defaultType>
- <search:defaultType>URL</search:defaultType>
- <search:defaultType>pagelet</search:defaultType>
- <search:defaultType>package</search:defaultType>
- <search:defaultType>jobDefinition</search:defaultType>
- <search:defaultType>powerPlayCube</search:defaultType>
- <search:defaultType>powerPlayReport</search:defaultType>
- <search:defaultType>powerPlay8Report</search:defaultType>
- <search:defaultType>reportTemplate</search:defaultType>
- <search:defaultType>reportDataServiceAgentDefinition</search:defaultType>
- <search:defaultType>metricsFileImportTask</search:defaultType>
- <search:defaultType>metricsDataSourceETLTask</search:defaultType>
- <search:defaultType>metricsMaintenanceTask</search:defaultType>
- <search:defaultType>metricsExportTask</search:defaultType>
- </search:defaultTypes>
- </search:gen-search-exp>
- </xsl:when>
- <xsl:when test="$tool-tab = 'u'">
- <search:gen-search-exp defaultRoot="directory">
- <search:defaultTypes>
- <search:defaultType>namespace</search:defaultType>
- <search:defaultType>namespaceFolder</search:defaultType>
- <search:defaultType>group</search:defaultType>
- <search:defaultType>role</search:defaultType>
- <search:defaultType>account</search:defaultType>
- </search:defaultTypes>
- </search:gen-search-exp>
- </xsl:when>
- <xsl:when test="$tool-tab = 'd'">
- <search:gen-search-exp defaultRoot="directory">
- <search:defaultTypes>
- <search:defaultType>dataSource</search:defaultType>
- <search:defaultType>dataSourceConnection</search:defaultType>
- <search:defaultType>dataSourceSignon</search:defaultType>
- <search:defaultType>modelView</search:defaultType>
- </search:defaultTypes>
- </search:gen-search-exp>
- </xsl:when>
- <xsl:when test="$tool-tab = 'l'">
- <search:gen-search-exp defaultRoot="directory">
- <search:defaultTypes>
- <search:defaultType>namespace</search:defaultType>
- <search:defaultType>namespaceFolder</search:defaultType>
- <search:defaultType>distributionList</search:defaultType>
- <search:defaultType>contact</search:defaultType>
- </search:defaultTypes>
- </search:gen-search-exp>
- </xsl:when>
- </xsl:choose>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ===============================================================================================
- Get the list of objects from Content Manager
- ===============================================================================================
- -->
- <xts:block id="getContent" processor="XSLT" type="exec" dependency="generateSearchExp getPath getActions">
- <xts:logicsheet path="logicsheets/tenantlogic.xsl"/>
- <xts:logicsheet path="logicsheets/cm-logic.xsl"/>
- <xts:logicsheet path="logicsheets/buslogic.xslt"/>
- <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
- xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/"
- xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
- xmlns:cml="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/cml/1/"
- exclude-result-prefixes="send cm cml">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <cml:object-predicates/>
- <xsl:variable name="inDirectoryRoot" select="/root/path/cm:queryResponse/*/cm:objectClass/cm:value='directory'"/>
- <xsl:variable name="tool-tab">
- <xsl:choose>
- <xsl:when test="/root/env/param[@name = 'tool_tab']">
- <xsl:value-of select="/root/env/param[@name = 'tool_tab']"/>
- </xsl:when>
- <xsl:otherwise>
- <!-- Default to Users, Groups, and Roles if the tool_tab parameter is not present. -->
- <xsl:text>u</xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="m_sort">
- <xsl:value-of select="/root/session/param[@name='s_dir']"/>
- </xsl:variable>
- <xsl:variable name="m_path" select="/root/env/param[@name='m_path']"/>
- <xsl:variable name="path" select="/root/path/*[local-name()='queryResponse']/*/*[local-name()='searchPath']"/>
- <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="browsingUserMyFolder" select="/root/path/cm:queryResponse/*/cm:objectClass='account' or /root/path/cm:queryResponse/*/cm:ancestors/*/cm:objectClass='account'"/>
- <xsl:variable name="browsingUserSubscriptionFolder" select="/root/path/cm:queryResponse/*/cm:objectClass='subscriptionFolder'"/>
- <xsl:variable name="userMyFolderPath" select="/root/*[local-name()='path']/cm:queryResponse/*/cm:ancestors/cm:ancestorInfo[cm:objectClass='account']/cm:searchPath"/>
- <xsl:variable name="browsingUserMyWatchItems" select="/root/path/cm:queryResponse/*/cm:objectClass='subscriptionFolder' and /root/path/cm:queryResponse/*/cm:parent/*/cm:objectClass='account'"/>
- <xsl:variable name="watchitem" select="/root/env/param[@name='m_watch_item']"/>
- <xsl:variable name="class-filter">
- <xsl:choose>
- <xsl:when test="/root/path/cm:queryResponse/*/cm:objectClass='account'">
- <xsl:text>[@objectClass='folder' or @objectClass='subscriptionFolder']</xsl:text>
- </xsl:when>
- <xsl:when test="/root/path/cm:queryResponse/*/cm:ancestors/*/cm:objectClass='account'">
- <xsl:text>[@objectClass!='model' and @objectClass!='packageConfiguration']</xsl:text>
- </xsl:when>
- <xsl:when test="$tool-tab='u'">
- <xsl:text>[@objectClass='account' or @objectClass='group' or @objectClass='role' or @objectClass='namespace' or @objectClass='namespaceFolder']</xsl:text>
- </xsl:when>
- <xsl:when test="$tool-tab='d'">
- <xsl:text>[@objectClass='dataSource' or @objectClass='dataSourceConnection' or @objectClass='dataSourceSignon' or @objectClass='rolapDataSource' or @objectClass='model' or @objectClass='modelView' or @objectClass='rolapVirtualDataSource']</xsl:text>
- </xsl:when>
- <xsl:when test="$tool-tab='l'">
- <xsl:text>[@objectClass='contact' or @objectClass='distributionList' or @objectClass='namespaceFolder' or @objectClass='namespace']</xsl:text>
- </xsl:when>
- </xsl:choose>
- </xsl:variable>
- <xsl:template match="/">
- <xsl:if test="/root/search">
- <xsl:variable name="inside3rdPartyNamespace">
- <xsl:variable name="nsObj" select="/root/path/cm:queryResponse/*"/>
- <xsl:variable name="insideCognosNamespace" select="(starts-with($nsObj/cm:searchPath, "CAMID(':") or starts-with($nsObj/cm:searchPath, 'CAMID(":'))"/>
- <xsl:value-of select="($nsObj/cm:objectClass='namespace' or $nsObj/cm:ancestors/cm:ancestorInfo/cm:objectClass='namespace') and not($insideCognosNamespace)"/>
- </xsl:variable>
- <xsl:if test="$inside3rdPartyNamespace = 'true'">
- <xts:sequence>
- <xts:delete select="/root/env/param[@name='queryNamespaceSearchDefaultMethodOptionSetting']"/>
- <xts:append select="/root/env">
- <param name="queryNamespaceSearchDefaultMethodOptionSetting">true</param>
- </xts:append>
- </xts:sequence>
- </xsl:if>
- </xsl:if>
-
- <xts:sequence>
- <!-- Don't need to query CM if we are in search dialog without running a search query. -->
- <xsl:if test="/root/search/expression or not(/root/search)">
- <xts:append>
- <xsl:choose>
- <!-- we should not call this if we're in search, under alert or rule. Also, only when we're under user's watch items folder -->
- <xsl:when test="$browsingUserMyWatchItems and not(contains($m_path, '/rule')) and not(contains($m_path, '/alert')) and not(/root/search)">
- <xsl:variable name="searchPathRule">
- <xsl:choose>
- <xsl:when test="not(contains($m_path, '/rule'))">
- <xsl:value-of select="concat($m_path, '/rule')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$path"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="searchPathAlert">
- <xsl:choose>
- <xsl:when test="not(contains($path, '/alert'))">
- <xsl:value-of select="concat($path, '/alert')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$path"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <queryResponse xmlns="http://developer.cognos.com/schemas/xts-cm/1/">
- <queryReply xmlns="http://developer.cognos.com/schemas/xts-cm/1/">
- <subscriptionFolder xmlns="http://developer.cognos.com/schemas/xts-cm/1/">
- <objectClass>subscriptionFolder</objectClass>
- <defaultName type="cm:tokenProp"><xts:string id="IDS_MYSUB_ALERTS"/></defaultName>
- <subscriptionFolderType type="cm:tokenProp">alert</subscriptionFolderType>
- <defaultScreenTip type="cm:stringProp" nil="true"/>
- <permissions type="xsd:string">execute read setPolicy traverse write</permissions>
- <usage type="cm:nmtokenProp">object</usage>
- <disabled type="cm:booleanProp">false</disabled>
- <hidden type="cm:booleanProp">false</hidden>
- <iconURI type="cm:anyURIProp">icon_watch_alert.gif</iconURI>
- <hasChildren type="cm:booleanProp">true</hasChildren>
- <searchPath><xsl:value-of select="$searchPathAlert"/></searchPath>
- </subscriptionFolder>
- <subscriptionFolder>
- <objectClass>subscriptionFolder</objectClass>
- <defaultName type="cm:tokenProp"><xts:string id="IDS_MYSUB_SUBSCRIPTIONS"/></defaultName>
- <subscriptionFolderType type="cm:tokenProp">rule</subscriptionFolderType>
- <defaultScreenTip type="cm:stringProp" nil="true"/>
- <permissions type="xsd:string">execute read setPolicy traverse write</permissions>
- <usage type="cm:nmtokenProp">object</usage>
- <disabled type="cm:booleanProp">false</disabled>
- <hidden type="cm:booleanProp">false</hidden>
- <iconURI type="cm:anyURIProp">icon_watch_rule.gif</iconURI>
- <hasChildren type="cm:booleanProp">true</hasChildren>
- <searchPath><xsl:value-of select="$searchPathRule"/></searchPath>
- </subscriptionFolder>
- </queryReply>
- </queryResponse>
- </xsl:when>
- <xsl:otherwise>
- <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:choose>
- <xsl:when test="/root/search/expression">
- <xsl:choose>
- <!-- If we are inside an external namespace then do not add the predicate -->
- <xsl:when test="$path!='CAMID(":")' and starts-with($path, 'CAMID(') and not($browsingUserMyFolder) and not($browsingUserSubscriptionFolder)">
- <xsl:value-of select="/root/search/expression"/>
- </xsl:when>
- <!-- if we are searching for modelViews then do not add the predicate -->
- <xsl:when test="/root/env/param[@name = 'stype'] = 'modelView'">
- <xsl:value-of select="/root/search/expression"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="concat(/root/search/expression, $hidden-objects-predicate)"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:when test="$browsingUserMyWatchItems and not(contains($m_path, '/rule'))">
- <xsl:value-of select="concat('//*[containsReferences(@notificationList,', $userMyFolderPath, ')]', $visibility-predicate)"/>
- </xsl:when>
- <!-- if we're in a model, then don't use the hidden objects predicate. Models contain modelViews which are not UIClass objects. -->
- <xsl:when test="contains($path, '/model[')">
- <xsl:value-of select="$path"/>/*<xsl:value-of select="concat($class-filter, /root/system/param[@name='visible'])"/>
- </xsl:when>
- <!-- if we're in the Cognos namespace and we're not browsing a users My Folders, then check for permissions -->
- <xsl:when test="(starts-with($path, "CAMID(':") or starts-with($path, 'CAMID(":')) and not($browsingUserMyFolder)">
- <xsl:value-of select="$path"/>/*<xsl:value-of select="concat($class-filter, $visibility-predicate)"/>
- </xsl:when>
- <xsl:otherwise>
- <!-- TODO: Add the visibility check here when cm fixes issue with 3rd party namespaces -->
- <xsl:value-of select="concat($path, '/*', $class-filter)"/>
- <!-- Bug 516145 - if we're getting a list of namespaces use the namespace filter-->
- <xsl:if test="not(starts-with($m_path, 'CAMID(')) and not($browsingUserMyFolder)">
- <xsl:text/><xsl:value-of select="/root/system/param[@name='namespace_filter']"/><xsl:text/>
- <xsl:text/><xsl:value-of select="$hidden-objects-predicate"/><xsl:text/>
- </xsl:if>
- <xsl:if test="$browsingUserMyFolder">
- <xsl:text/>
- <xsl:value-of select="$visibility-predicate"/>
- <xsl:text/>
- </xsl:if>
- <!-- no need to check for permissions in a third party namespace. Security is configured by the third party tool -->
- </xsl:otherwise>
- </xsl:choose>
- </cm:search>
- <cm:sortBy>
- <xsl:if test="not($browsingUserMyWatchItems)">
- <cm:sort name="usage" order="ascending"/>
- </xsl:if>
- <xsl:choose>
- <xsl:when test="/root/search/expression">
- <cm:sort name="defaultName" order="ascending"/>
- </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:when test="$m_sort='ma'">
- <cm:sort name="modificationTime" order="ascending"/>
- </xsl:when>
- <xsl:when test="$m_sort='md'">
- <cm:sort name="modificationTime" order="descending"/>
- </xsl:when>
- <xsl:when test="$m_sort = 'ia'">
- <cm:sort name="objectClass" order="ascending"/>
- </xsl:when>
- <xsl:when test="$m_sort = 'id'">
- <cm:sort name="objectClass" order="descending"/>
- </xsl:when>
- <xsl:otherwise>
- <cm:sort name="defaultName"/>
- </xsl:otherwise>
- </xsl:choose>
- </cm:sortBy>
- <cm:properties>
- <!-- include the cml variables -->
- <cml:prop-base/>
- <cm:property name="documentType"/>
- <cm:property name="launchableType"/>
- <cm:property name="userName"/>
- <cm:property name="hasChildren"/>
- <cm:property name="position"/>
- <cm:property name="connectionString"/>
- <!-- If we are doing search or we're inside Alerts folder then request ancestors too -->
- <xsl:if test="/root/search/expression or ($browsingUserMyWatchItems and not(contains($m_path, '/rule')))">
- <cm:property name="ancestors"/>
- </xsl:if>
- <xsl:if test="$inDirectoryRoot">
- <cm:property name="active"/>
- </xsl:if>
- </cm:properties>
- <cm:options maxObjects="{($maxObjects)+1}" skipObjects="{$skipObjects}">
- <xsl:if test="$browsingUserMyFolder">
- <cm:refProps>
- <cm:refProp refPropName="target">
- <cm:properties>
- <cm:property name="searchPath"/>
- <cm:property name="defaultName"/>
- <cm:property name="defaultOutputFormat"/>
- <cm:property name="uri"/>
- <cm:property name="base"/>
- <cm:property name="format"/>
- <cm:property name="contentLocale"/>
- <cm:property name="permissions"/>
- <cm:property name="usage"/>
- <cm:property name="documentType"/>
- <cm:property name="launchableType"/>
- </cm:properties>
- </cm:refProp>
- <cm:refProp refPropName="base">
- <cm:properties>
- <cm:property name="searchPath"/>
- <cm:property name="permissions"/>
- <cm:property name="defaultOutputFormat"/>
- </cm:properties>
- </cm:refProp>
- </cm:refProps>
- </xsl:if>
- </cm:options>
- </cm:query>
- <!-- need to get the searchPath property of the namespace object if we're in the user, groups and roles tab and we're not searching -->
- <xsl:if test="($tool-tab='u' or $tool-tab='l') and not(/root/search/expression)">
- <xsl:choose>
- <xsl:when test="count(/root/path/cm:queryResponse/*/cm:ancestors/cm:ancestorInfo) = 1">
- <cm:query>
- <cm:search>
- <xsl:value-of select="$path"/>
- </cm:search>
- <cm:properties>
- <cm:property name="capabilities"/>
- <cm:property name="searchPath"/>
- <cm:property name="permissions"/>
- </cm:properties>
- </cm:query>
- </xsl:when>
- <xsl:when test="($tool-tab='u' or $tool-tab='l') and /root/path/cm:queryResponse/*/cm:ancestors/cm:ancestorInfo[2]/*">
- <cm:query>
- <cm:search>
- <xsl:value-of select="/root/path/cm:queryResponse/*/cm:ancestors/cm:ancestorInfo[2]/cm:searchPath"/>
- </cm:search>
- <cm:properties>
- <cm:property name="capabilities"/>
- <cm:property name="searchPath"/>
- <cm:property name="permissions"/>
- </cm:properties>
- </cm:query>
- </xsl:when>
- </xsl:choose>
- </xsl:if>
- </cm:requests>
- </cm:query>
- </xts:transform>
- </send:request>
- </xts:transform>
- </xsl:otherwise>
- </xsl:choose>
- </xts:append>
- </xsl:if>
- <!-- 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>
- <xts:delete select="/root/env/param[starts-with(@name, 'checkbox_')]"/>
- </xts:sequence>-->
- <xts:sequence>
- <xts:delete select="/root/env/param[@name='pagerfrom']"/>
- <xts:delete select="/root/env/param[@name='pagerto']"/>
- <xts:delete select="/root/env/param[@name='pagerfrom_d']"/>
- <xts:delete select="/root/env/param[@name='pagerto_d']"/>
- <xts:delete select="/root/env/param[@name='m_path']"/>
- <xts:delete select="/root/env/param[@name='tool_tab']"/>
- <xts:append select="/root/env">
- <param name="m_path">
- <xsl:choose>
- <xsl:when test="$tool-tab='u'">
- <xsl:value-of select="$m_path"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$path"/>
- </xsl:otherwise>
- </xsl:choose>
- </param>
- <param name="tool_tab">
- <xsl:value-of select="$tool-tab"/>
- </param>
- </xts:append>
- <xsl:call-template name="createNewAncestors"/>
- </xts:sequence>
- </xsl:template>
- <xsl:template name="createNewAncestors">
- <xsl:variable name="watchSearchPath">
- <xsl:value-of select="/root/path/*[local-name()='queryResponse']/*/cm:ancestors/cm:ancestorInfo[./cm:objectClass='subscriptionFolder']/cm:searchPath"/>
- </xsl:variable>
- <xsl:variable name="currentWatchSearchPath">
- <xsl:value-of select="/root/path/*[local-name()='queryResponse']/*/cm:searchPath"/>
- </xsl:variable>
- <xsl:variable name="currentDefaultName">
- <xsl:value-of select="/root/path/*[local-name()='queryResponse']/*/cm:defaultName"/>
- </xsl:variable>
- <xsl:variable name="countSubcriptionAncestors" select="count(/root/*[local-name()='path']/cm:queryResponse/*/cm:ancestors/cm:ancestorInfo[./cm:objectClass='subscriptionFolder'])"/>
- <xsl:variable name="countSubcriptionAncestorsNewPath" select="count(/root/*[local-name()='newPath']/*[local-name()='ancestors']/*[local-name()='ancestorInfo']/*[local-name()='objectClass' and .='subscriptionFolder'])"/>
-
- <xsl:variable name="watchItemLabel">
- <xsl:choose>
- <xsl:when test="$countSubcriptionAncestors and $countSubcriptionAncestors > 0">
- <xts:string id="IDS_MYSUB_SUBSCRIPTIONS"/>
- </xsl:when>
- <xsl:otherwise>
- <xts:string id="IDS_MYSUB_ALERTS"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="watchItemSearchPath">
- <xsl:choose>
- <!-- if the last element is an account then we are inside a the watch my item root -->
- <xsl:when test="/root/path/cm:queryResponse/*/cm:ancestors/*[last()]/*[local-name()='objectClass']='account'">
- <xsl:value-of select="$watchSearchPath"/>
- </xsl:when>
- <!-- If there are more then 1 subscriptionFolder then we're inside the Rule folder -->
- <xsl:when test="$countSubcriptionAncestors and $countSubcriptionAncestors > 0">
- <xsl:value-of select="concat($watchSearchPath, '/rule')"/>
- </xsl:when>
- <!-- The alert is not a real folder... therefore we should under alert folder. -->
- <xsl:otherwise>
- <xsl:value-of select="concat($watchSearchPath, '/alert')"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xts:append select="/root">
- <newPath>
- <ancestors>
- <xsl:for-each select="/root/path/cm:queryResponse/*/cm:ancestors/*">
- <xsl:copy-of select="."/>
- <xsl:if test="$watchSearchPath != '' and $watchSearchPath = cm:searchPath">
- <xsl:element name="ancestorInfo" xmlns="http://developer.cognos.com/schemas/xts-cm/1/">
- <objectClass type="cm:classEnum">subscriptionFolder</objectClass>
- <searchPath>
- <xsl:value-of select="$watchItemSearchPath"/>
- </searchPath>
- <title>
- <xsl:value-of select="$watchItemLabel"/>
- </title>
- </xsl:element>
- </xsl:if>
- </xsl:for-each>
- <xsl:if test="contains($m_path, '/alert') or contains($m_path, '/rule')">
- <xsl:element name="ancestorInfo" xmlns="http://developer.cognos.com/schemas/xts-cm/1/">
- <objectClass type="cm:classEnum">subscriptionFolder</objectClass>
- <searchPath>
- <xsl:value-of select="$currentWatchSearchPath"/>
- </searchPath>
- <title><xsl:value-of select="$currentDefaultName"/></title>
- <addedItem>true</addedItem>
- </xsl:element>
- </xsl:if>
- </ancestors>
- <xsl:for-each select="/root/path/cm:queryResponse/*/*[local-name()!='ancestors']">
- <xsl:choose>
- <xsl:when test="(contains($m_path, '/alert') or contains($m_path, '/rule')) and local-name()='defaultName'">
- <defaultName>
- <xsl:choose>
- <xsl:when test="contains($m_path, '/rule')"><xts:string id="IDS_MYSUB_SUBSCRIPTIONS"/></xsl:when>
- <xsl:otherwise><xts:string id="IDS_MYSUB_ALERTS"/></xsl:otherwise>
- </xsl:choose>
- </defaultName>
- </xsl:when>
- <xsl:otherwise>
- <xsl:copy-of select="."/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:for-each>
- </newPath>
- </xts:append>
- </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>
- <!--
- ===============================================================================================
- Render the page
- ===============================================================================================
- -->
- <xts:block id="format" dependency="mergeTenantNames getClassNames" mode="output" processor="XSLT" type="exec" mimeType="text/html">
- <xts:logicsheet path="logicsheets/buslogic.xslt"/>
- <xts:logicsheet path="logicsheets/toollogic.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"/>
- <xts:logicsheet path="logicsheets/presentation/main/search.xsl"/>
- <!-- Cognos Central controls logic -->
- <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:pf="http://developer.cognos.com/schemas/xts/pf" xmlns:bus="http://developer.cognos.com/schemas/bibus/3/" xmlns:tool="http://developer.cognos.com/schemas/xts/logicsheets/xslt/toollogic/" xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/" xmlns:mt="http://developer.cognos.com/schemas/xts/logicsheets/presentation/main/mt" xmlns:xts="http://developer.cognos.com/schemas/xts/" xmlns:mf="http://developer.cognos.com/schemas/xts/logicsheets/presentation/main/mf" xmlns:lyt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/layout/" xmlns:dp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/presentation/" 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:xtsext="xalan://com.cognos.xts.ext.XTSExt" xmlns:cml="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/cml/1/" xmlns:utml="http://developer.cognos.com/schemas/xts/logicsheet/xslt/formlogic/" exclude-result-prefixes="cml xts bus tool cm mt mf lyt dp cf cp utml xtsext pf">
- <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no" omit-xml-declaration="yes"/>
- <!-- current file name -->
- <xsl:variable name="mname" select="'legacy_tools/tools_directory.xts'"/>
- <xsl:variable name="inDirectoryRoot" select="/root/path/cm:queryResponse/*/cm:objectClass/cm:value='directory'"/>
- <xsl:variable name="browsingUserMyFolder" select="/root/path/cm:queryResponse/*/cm:objectClass='account'"/>
- <xsl:variable name="browsingUserContent" select="/root/path/cm:queryResponse/*/cm:ancestors/*/cm:objectClass='account'"/>
- <xsl:variable name="insideCognosNamespace" select="(starts-with($m_path, "CAMID(':") or starts-with($m_path, 'CAMID(":'))"/>
- <xsl:variable name="insideAccount" select="(/root/path/cm:queryResponse/*/cm:objectClass/cm:value='account') or (/root/path/cm:queryResponse/*/cm:ancestors/cm:ancestorInfo/cm:objectClass='account')"/>
- <xsl:variable name="userCanNotTraverse" select="not(contains(/root/path/cm:queryResponse/*/cm:permissions, 'traverse'))"/>
- <xsl:variable name="userCanNotWrite" select="not(contains(/root/path/cm:queryResponse/*/cm:permissions, 'write'))"/>
- <xsl:variable name="canBrowse3rdPartyNamespace" select="not(/root/system/param[@name='enable-3rdparty-namespace-browsing']='false')"/>
- <xsl:variable name="browsingUserMyWatchItems" select="/root/path/cm:queryResponse/*/cm:objectClass='subscriptionFolder' and /root/path/cm:queryResponse/*/cm:parent/*/cm:objectClass='account'"/>
- <xsl:variable name="insideROLAPDataSource" select="(/root/path/cm:queryResponse/*/cm:objectClass/cm:value='rolapDataSource') or (/root/path/cm:queryResponse/*/cm:ancestors/cm:ancestorInfo/cm:objectClass='rolapDataSource')"/>
- <xsl:variable name="insideROLAPModel" select="/root/path/cm:queryResponse/*/cm:objectClass/cm:value='model'"/>
- <cp:flyoutControl/>
-
- <!-- start the output -->
- <xsl:template match="/root">
- <xsl:variable name="tab">
- <xsl:choose>
- <xsl:when test="key('env-param','tool_tab') = 'd'"><xts:string id="IDS_DIRECTORY_DATASOURCE_TAB"/></xsl:when>
- <xsl:when test="key('env-param','tool_tab') = 'l'"><xts:string id="IDS_DIRECTORY_DISTRLIST_TAB"/></xsl:when>
- <xsl:otherwise><xts:string id="IDS_DIRECTORY_UGR_TAB"/></xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="toolName"><xts:string id="IDS_TOOLS_DIRECTORY"/></xsl:variable>
- <tool:page formName="frmEntryAdmin" stateParams="m_path m_pathID m_section m_pagerfrom m_pagerto" hideHeaders="true">
- <tool:name>
- <xts:string id="IDS_TOOLS_TITLE">
- <xts:param name="toolTab"><xsl:value-of select="$tab"/></xts:param>
- <xts:param name="toolName"><xsl:value-of select="$toolName"/></xts:param>
- </xts:string>
- </tool:name>
- <tool:title>
- <xsl:value-of select="$toolName"/>
- </tool:title>
- <tool:regionLabel id="lbl_page_region">
- <xsl:value-of select="$tab"/>
- </tool:regionLabel>
-
- <xsl:if test="$inDirectoryRoot">
- <tool:script>
- function doDeleteOne(path, msg)
- {
- if (confirm(msg))
- {
- document.forms[frmEditForm].backURL.value = "<xsl:value-of select="xtsext:javascriptencode(string($back-url))"/>";
- document.forms[frmEditForm].ifrmcmd.value = "delete"; <!--set the operation, and submit it. -->
- document.forms[frmEditForm].m_obj.value = path;
- document.forms[frmEditForm].m.value = "<xsl:value-of select="$app"/>/submit.xts";
- document.forms[frmEditForm].submit();
- }
- else
- {
- return;
- }
- }
- </tool:script>
- <input type="hidden" name="m_obj" value=""/>
- </xsl:if>
- <tool:hideEditToolbarButtons test="not($browsingUserContent) and ($tool-tab='u' and not(starts-with($m_path, "CAMID(':") or starts-with($m_path, 'CAMID(":')))"/>
- <tool:hideCopyToolbarButton test="$browsingUserContent"/>
- <tool:search mod="$tool-tab='u' and not(starts-with($m_path, "CAMID(':") or starts-with($m_path, 'CAMID(":')) and not($browsingUserContent)">
- <mt:stypes>
- <xsl:choose>
- <xsl:when test="$tool-tab = 'u' and ($browsingUserContent or $browsingUserMyFolder)">
- <mt:stype name="interactiveReport"><xts:string id="IDS_OBJ_INTERACTIVEREPORT"/></mt:stype>
- <mt:stype name="analyticsPackage"><xts:string id="IDS_OBJ_AATOCPACKAGE"/></mt:stype>
- <mt:stype name="agentDefinition"><xts:string id="IDS_OBJ_AGENT"/></mt:stype>
- <mt:stype name="agentDefinitionView"><xts:string id="IDS_OBJ_AGENTVIEW"/></mt:stype>
- <mt:stype name="analysis"><xts:string id="IDS_OBJ_ANALYSIS"/></mt:stype>
- <mt:stype name="contentReference"><xts:string id="IDS_OBJ_MVC_CONTENT_REFERENCE"/></mt:stype> <!-- Not actual object type, returns Content Reference objects -->
- <mt:stype name="dataMovementTask"><xts:string id="IDS_OBJ_DATAMOVEMENTTASK"/></mt:stype>
- <mt:stype name="dataMovementTaskAlias"><xts:string id="IDS_OBJ_DATAMOVEMENTTASKALIAS"/></mt:stype>
- <mt:stype name="document"><xts:string id="IDS_OBJ_DOCUMENT"/></mt:stype>
- <mt:stype name="advisorView"><xts:string id="IDS_OBJ_LAUNCHABLE_ADVISOR_VIEW"/></mt:stype>
- <mt:stype name="advisorCanvas"><xts:string id="IDS_OBJ_LAUNCHABLE_ADVISOR_CANVAS"/></mt:stype>
- <mt:stype name="_folderAndSubscriptionFolder"><xts:string id="IDS_OBJ_FOLDER"/></mt:stype>
- <mt:stype name="cd"><xts:string id="IDS_OBJ_LAUNCHABLE_CD"/></mt:stype> <!-- Not actual object type, returns Cognos Insight objects -->
- <mt:stype name="jobDefinition"><xts:string id="IDS_OBJ_JOBDEFINITION"/></mt:stype>
- <mt:stype name="metricsExportTask"><xts:string id="IDS_OBJ_METRICSEXPORTTASK"/></mt:stype>
- <mt:stype name="metricsDataSourceETLTask"><xts:string id="IDS_OBJ_METRICSDATASOURCEETLTASK"/></mt:stype>
- <mt:stype name="metricsFileImportTask"><xts:string id="IDS_OBJ_METRICSFILEIMPORTTASK"/></mt:stype>
- <mt:stype name="metricsMaintenanceTask"><xts:string id="IDS_OBJ_METRICSMAINTENANCETASK"/></mt:stype>
- <mt:stype name="metricsPackage"><xts:string id="IDS_OBJ_METRICSPACKAGE"/></mt:stype> <!-- Not actual object type, package with userInterfaces for metrics manager-->
- <mt:stype name="package"><xts:string id="IDS_OBJ_PACKAGE"/></mt:stype>
- <mt:stype name="pagelet"><xts:string id="IDS_OBJ_PAGELET"/></mt:stype>
- <mt:stype name="planningPackage"><xts:string id="IDS_OBJ_PLANNING_PACKAGE"/></mt:stype> <!-- Not actual object type, package with userInterfaces for planning package-->
- <mt:stype name="planningTask"><xts:string id="IDS_OBJ_PLANNING_TASK"/></mt:stype>
- <mt:stype name="powerPlayCube"><xts:string id="IDS_OBJ_POWERPLAYCUBE"/></mt:stype>
- <mt:stype name="powerPlayReport"><xts:string id="IDS_OBJ_POWERPLAYREPORT"/></mt:stype>
- <mt:stype name="powerPlay8Report"><xts:string id="IDS_OBJ_POWERPLAY8REPORT"/></mt:stype>
- <mt:stype name="powerPlay8ReportView"><xts:string id="IDS_OBJ_POWERPLAY8REPORTVIEW"/></mt:stype>
- <mt:stype name="query"><xts:string id="IDS_OBJ_QUERY"/></mt:stype>
- <mt:stype name="report"><xts:string id="IDS_OBJ_REPORT"/></mt:stype>
- <mt:stype name="reportTemplate"><xts:string id="IDS_OBJ_REPORTTEMPLATE"/></mt:stype>
- <mt:stype name="reportView"><xts:string id="IDS_OBJ_REPORTVIEW"/></mt:stype>
- <mt:stype name="shortcut"><xts:string id="IDS_SHORTCUTS"/></mt:stype>
- <mt:stype name="reportDataServiceAgentDefinition"><xts:string id="IDS_OBJ_SUBSCRIPTION"/></mt:stype>
- <mt:stype name="URL"><xts:string id="IDS_OBJ_URL"/></mt:stype>
- <mt:stype name="TM1Package"><xts:string id="IDS_OBJ_TM1PACKAGE"/></mt:stype>
- <mt:stype name="dashboard"><xts:string id="IDS_OBJ_DASHBOARD"/></mt:stype>
- </xsl:when>
- <xsl:when test="$tool-tab = 'u'">
- <mt:stype name="namespaceFolder"><xts:string id="IDS_OBJ_NAMESPACEFOLDER"/></mt:stype>
- <mt:stype name="group"><xts:string id="IDS_OBJ_GROUP"/></mt:stype>
- <mt:stype name="namespace"><xts:string id="IDS_OBJ_NAMESPACE"/></mt:stype>
- <mt:stype name="role"><xts:string id="IDS_OBJ_ROLE"/></mt:stype>
- <mt:stype name="account"><xts:string id="IDS_OBJ_ACCOUNT"/></mt:stype>
- </xsl:when>
- <xsl:when test="$tool-tab = 'd'">
- <mt:stype name="dataSourceConnection"><xts:string id="IDS_OBJ_DATASOURCECONNECTION"/></mt:stype>
- <mt:stype name="dataSource"><xts:string id="IDS_OBJ_DATASOURCE"/></mt:stype>
- <mt:stype name="dataSourceSignon"><xts:string id="IDS_OBJ_DATASOURCESIGNON"/></mt:stype>
- <mt:stype name="modelView"><xts:string id="IDS_OBJ_MODELVIEW"/></mt:stype>
- </xsl:when>
- <xsl:when test="$tool-tab = 'l'">
- <mt:stype name="contact"><xts:string id="IDS_OBJ_CONTACT"/></mt:stype>
- <mt:stype name="distributionList"><xts:string id="IDS_OBJ_DISTRIBUTIONLIST"/></mt:stype>
- <mt:stype name="namespaceFolder"><xts:string id="IDS_OBJ_NAMESPACEFOLDER"/></mt:stype>
- <mt:stype name="namespace"><xts:string id="IDS_OBJ_NAMESPACE"/></mt:stype>
- </xsl:when>
- </xsl:choose>
- </mt:stypes>
- <mt:scopes>
- <mt:scope>fb</mt:scope>
- <mt:scope>fo</mt:scope>
- <xsl:if test="not($browsingUserContent) and not($browsingUserMyFolder)">
- <mt:scope type="security">any</mt:scope>
- </xsl:if>
- </mt:scopes>
- <mt:close-params>
- <param>backURL</param>
- <param>tool_tab</param>
- <param>m_path</param>
- <param>m_section</param>
- </mt:close-params>
- </tool:search>
- <tool:pathSearch>
- <xsl:choose>
- <xsl:when test="$tool-tab='u' and /root/*[local-name()='path']/*[local-name()='queryResponse']/*[local-name()='subscriptionFolder']">
- <cf:do-the-path-link>
- <cf:param name="familytree">newPath/*[local-name()='ancestors']</cf:param>
- <cf:param name="familymember">newPath/*[local-name()='defaultName']</cf:param>
- <cf:param name="lastIsLink">true</cf:param>
- <cf:param name="anchorpath">
- <a>
- <xsl:choose>
- <xsl:when test="*[local-name()='title']">
- <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:value-of select="concat('&tool_tab=', $tool-tab)"/><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="*[local-name()='title']"/>
- </xsl:when>
- <xsl:otherwise>
- <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(newPath/*[local-name()='searchPath'])),'url','searchPath','getdata'))"/><xsl:value-of select="concat('&tool_tab=', $tool-tab)"/><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="newPath/*[local-name()='defaultName']"/>
- </xsl:otherwise>
- </xsl:choose>
- </a>
- </cf:param>
- </cf:do-the-path-link>
- </xsl:when>
- <xsl:otherwise>
- <cf:do-the-path-link>
- <cf:param name="familytree">path/cm:queryResponse/*/cm:ancestors</cf:param>
- <cf:param name="familymember">path/cm:queryResponse/*/cm:defaultName</cf:param>
- <cf:param name="lastIsLink">
- <xsl:choose>
- <xsl:when test="$canBrowse3rdPartyNamespace or $insideCognosNamespace or $insideAccount">true</xsl:when>
- <xsl:otherwise>false</xsl:otherwise>
- </xsl:choose>
- </cf:param>
- <cf:param name="anchorpath">
- <xsl:choose>
- <xsl:when test="$tool-tab!='u' and $tool-tab!='l' and /root/path/cm:queryResponse/*/cm:ancestors/cm:ancestorInfo[1] = self::node()">
- <xsl:value-of select="cm:title"/>
- </xsl:when>
- <xsl:otherwise>
- <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:value-of select="concat('&tool_tab=', $tool-tab)"/><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:when test="$canBrowse3rdPartyNamespace or $insideCognosNamespace or $insideAccount">
- <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(path/cm:queryResponse/*/cm:searchPath)),'url','searchPath','getdata'))"/><xsl:value-of select="concat('&tool_tab=', $tool-tab)"/><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="path/cm:queryResponse/*/cm:defaultName"/>
- </a>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="path/cm:queryResponse/*/cm:defaultName"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:otherwise>
- </xsl:choose>
- </cf:param>
- </cf:do-the-path-link>
- </xsl:otherwise>
- </xsl:choose>
- </tool:pathSearch>
- <tool:tabs tabset-name="directory">
- <xsl:value-of select="/root/env/param[@name='tool_tab']"/>
- </tool:tabs>
- <tool:path>
- <xsl:choose>
- <xsl:when test="$tool-tab='u' and /root/path/*[local-name()='queryResponse']/*[local-name()='subscriptionFolder']">
- <cf:do-the-path-link>
- <cf:param name="familytree">newPath/*[local-name()='ancestors']</cf:param>
- <cf:param name="familymember">newPath/*[local-name()='defaultName']</cf:param>
- <cf:param name="anchorpath">
- <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:value-of select="concat('&tool_tab=', $tool-tab)"/><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="*[local-name()='title']"/>
- </a>
- </cf:param>
- </cf:do-the-path-link>
- </xsl:when>
- <xsl:otherwise>
- <cf:do-the-path-link>
- <cf:param name="familytree">path/cm:queryResponse/*/cm:ancestors</cf:param>
- <cf:param name="familymember">path/cm:queryResponse/*/cm:defaultName</cf:param>
- <cf:param name="anchorpath">
- <xsl:choose>
- <xsl:when test="$tool-tab!='u' and $tool-tab!='l' and /root/path/cm:queryResponse/*/cm:ancestors/cm:ancestorInfo[1] = self::node()">
- <xsl:value-of select="cm:title"/>
- </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(cm:searchPath)),'url','searchPath','getdata'))"/><xsl:value-of select="concat('&tool_tab=', $tool-tab)"/><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:otherwise>
- </xsl:choose>
- </cf:param>
- </cf:do-the-path-link>
- </xsl:otherwise>
- </xsl:choose>
- </tool:path>
- <tool:actions>
- <mt:toolbar cogadmin="true">
- <xsl:choose>
- <!-- The toolbar items below are only available inside the Cognos namespace. -->
- <xsl:when test="not($insideROLAPDataSource) and $insideCognosNamespace and not($browsingUserContent) and not($browsingUserMyFolder)">
- <!-- don't show the new printer and new dataSource icons when the user doesn't have write permissions to the Cognos namespace -->
- <xsl:if test="not($insideROLAPDataSource)and ($tool-tab!='d' or $m_class != 'namespace' or contains(/root/path/cm:queryResponse/*/cm:permissions, 'write'))">
- <mt:tool-group cogadmin="true">
- <xsl:if test="$m_class != 'dataSource' and $m_class != 'dataSourceConnection' and $tool-tab != 'd'">
- <xsl:choose>
- <xsl:when test="$userCanNotWrite or $userCanNotTraverse">
- <mt:tool cogadmin="true" name="new" disable="true" new-class="namespaceFolder"/>
- </xsl:when>
- <xsl:otherwise>
- <mt:tool cogadmin="true" name="new" new-class="namespaceFolder"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:if>
- <xsl:choose>
- <xsl:when test="$tool-tab='u'">
- <xsl:choose>
- <xsl:when test="$userCanNotWrite or $userCanNotTraverse">
- <mt:tool cogadmin="true" name="new" disable="true" new-class="group"/>
- <mt:tool cogadmin="true" name="new" disable="true" new-class="role"/>
- </xsl:when>
- <xsl:otherwise>
- <mt:tool cogadmin="true" name="new" new-class="group"/>
- <mt:tool cogadmin="true" name="new" new-class="role"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:when test="$tool-tab='d'">
- <xsl:choose>
- <xsl:when test="$m_class='dataSource'">
- <xsl:variable name="isExternalRepository" select="contains(/root/cm:queryResponse/cm:queryReply/cm:dataSourceConnection/cm:connectionString,'LOCAL;RP-CMIS-FILENET')"/>
- <xsl:variable name="isDataSource" select="/root/cm:queryResponse/cm:queryReply/cm:dataSourceConnection/cm:connectionString"/>
- <xsl:choose>
- <xsl:when test="$userCanNotWrite or $userCanNotTraverse">
- <mt:tool cogadmin="true" name="new" disable="true" new-class="dataSourceConnection"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:choose>
- <xsl:when test="$isExternalRepository">
- <mt:tool cogadmin="true" name="new" new-class="dataSourceConnection" class-subType="application/externalRepository"/>
- </xsl:when>
- <xsl:when test="$isDataSource">
- <mt:tool cogadmin="true" name="new" new-class="dataSourceConnection" class-subType="application/dataSource"/>
- </xsl:when>
- <xsl:otherwise>
- <mt:tool cogadmin="true" name="new" new-class="dataSourceConnection"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:when test="$m_class='dataSourceConnection'">
- <xsl:choose>
- <xsl:when test="/root/path/cm:queryResponse/*/cm:credentialNamespaces[@nil='true'] or contains(/root/path/cm:queryResponse/cm:dataSourceConnection/cm:connectionString,';LOCAL;PC;')">
- <xsl:variable name="isFileSystemExternalRepository" select="contains(/root/path/cm:queryResponse/cm:dataSourceConnection/cm:connectionString,';DRIVER_NAME=com.ibm.cognos.cm.fileSystemPlugin.FileSystemArchivePlugin')"/>
- <xsl:variable name="isCMISExternalRepository" select="contains(/root/path/cm:queryResponse/cm:dataSourceConnection/cm:connectionString,';DRIVER_NAME=com.ibm.cognos.cm.CMISRepository.CMISRepositoryPlugin')"/>
- <xsl:variable name="allowOneSignon">
- <xsl:if test="$isCMISExternalRepository and count(/root/cm:queryResponse/cm:queryReply/cm:dataSourceSignon) >= 1"><xsl:text>true</xsl:text></xsl:if>
- </xsl:variable>
- <xsl:choose>
- <xsl:when test="$userCanNotWrite or $userCanNotTraverse or $isFileSystemExternalRepository or $allowOneSignon = 'true'">
- <mt:tool cogadmin="true" name="new" disable="true" new-class="dataSourceSignon"/>
- </xsl:when>
- <xsl:otherwise>
- <mt:tool cogadmin="true" name="new" new-class="dataSourceSignon"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:otherwise>
- <td class="toolbarImageNormal" onmouseover="this.className = 'toolbarImageOver'" onmouseout="this.className = 'toolbarImageNormal'">
- <img height="16" width="16" border="0">
- <xsl:attribute name="src"><xsl:value-of select="concat($image_root,'action_new_signon_dis.gif')"/></xsl:attribute>
- <xsl:attribute name="alt"><xts:string id="IDS_NEW_SIGNON_DISABLED"/></xsl:attribute>
- </img>
- </td>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:otherwise>
- <xsl:choose>
- <xsl:when test="$userCanNotWrite or $userCanNotTraverse">
- <mt:tool cogadmin="true" name="new" disable="true" new-class="dataSource"/>
- </xsl:when>
- <xsl:otherwise>
- <mt:tool cogadmin="true" name="new" new-class="dataSource"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:when test="$tool-tab='l'">
- <xsl:choose>
- <xsl:when test="$userCanNotWrite or $userCanNotTraverse">
- <mt:tool cogadmin="true" name="new" disable="true" new-class="contact"/>
- <mt:tool cogadmin="true" name="new" disable="true" new-class="distributionList"/>
- </xsl:when>
- <xsl:otherwise>
- <mt:tool cogadmin="true" name="new" new-class="contact"/>
- <mt:tool cogadmin="true" name="new" new-class="distributionList"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- </xsl:choose>
- </mt:tool-group>
- </xsl:if>
- <mt:tool-group cogadmin="true">
- <xsl:if test="($tool-tab='d' and key('env-param','m_path') != 'CAMID(":")') or $tool-tab='l' or $tool-tab='u'">
- <mt:tool cogadmin="true" name="cut"/>
- <mt:tool cogadmin="true" name="copy"/>
- <xsl:choose>
- <xsl:when test="$m_class='dataSourceConnection'">
- <xsl:choose>
- <xsl:when test="/root/path/cm:queryResponse/*/cm:credentialNamespaces[@nil='true'] or contains(/root/path/cm:queryResponse/cm:dataSourceConnection/cm:connectionString,';LOCAL;PC;')">
- <mt:tool cogadmin="true" name="paste" mode="tools"/>
- </xsl:when>
- <xsl:otherwise>
- <td class="toolbarImageNormal" onmouseover="this.className = 'toolbarImageOver'" onmouseout="this.className = 'toolbarImageNormal'">
- <img height="16" width="16" border="0">
- <xsl:attribute name="src"><xsl:value-of select="concat($image_root,'action_paste_dis.gif')"/></xsl:attribute>
- <xsl:attribute name="alt"><xts:string id="IDS_PASTE_SIGNON_DISABLED"/></xsl:attribute>
- </img>
- </td>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:otherwise>
- <mt:tool cogadmin="true" name="paste" mode="tools"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:if>
- <mt:tool cogadmin="true" name="delete" mode="tools"/>
- </mt:tool-group>
- </xsl:when>
- <!-- when browsing a users my folders -->
- <xsl:when test="($browsingUserContent and not($browsingUserMyWatchItems)) or contains($m_path, '/rule')">
- <mt:tool-group cogadmin="true">
- <mt:tool cogadmin="true" name="cut"/>
- <mt:tool cogadmin="true" name="copy"/>
- <mt:tool cogadmin="true" name="paste" mode="tools"/>
- <mt:tool cogadmin="true" name="delete" mode="tools"/>
- </mt:tool-group>
- </xsl:when>
- </xsl:choose>
- <xsl:choose>
- <xsl:when test="not(contains($m_path, '/alert'))">
- <mt:tool-group cogadmin="true" lastgroup="true">
- <!-- do not show this properties for rule as the folder does not exist -->
- <xsl:if test="not($insideROLAPModel) and not(contains($m_path, '/rule'))">
- <mt:tool cogadmin="true" name="parent_properties">
- <tool-name>directory_properties</tool-name>
- <request-path>/root/path/cm:queryResponse/*</request-path>
- </mt:tool>
- </xsl:if>
- <!-- only show the edit user profile when at the root of the Cognos namespace -->
- <xsl:if test="$tool-tab='u' and ($m_path="CAMID(':')" or $m_path='CAMID(":")')">
- <mt:tool cogadmin="true" name="defaultUserProfile"/>
- </xsl:if>
- <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:when>
- <!-- TODO: enable this action for alerts when the functionality is available -->
- <!--xsl:when test="contains($m_path, '/alert')">
- <mt:tool-group>
- <xsl:choose>
- <xsl:when test="$userCanNotTraverse">
- <mt:tool cogadmin="true" name="removeMeAlert" disable="true"/>
- </xsl:when>
- <xsl:otherwise>
- <mt:tool cogadmin="true" name="removeMeAlert" currentPath="{$m_path}"/>
- </xsl:otherwise>
- </xsl:choose>
- </mt:tool-group>
- </xsl:when-->
- </xsl:choose>
- </mt:toolbar>
- </tool:actions>
- <tool:contents>
- <xsl:choose>
- <!-- If no traverse permissions then just do not display the pager -->
- <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/path/cm:queryResponse/*)">
- <mt:containerNoAccess/>
- </xsl:when>
- <xsl:when test="$browsingUserContent or $browsingUserMyFolder">
- <tool:browser virtualPage="true" useQueryReply="true" hideActions="true">
- <tool:selectables>
- <xsl:if test="$browsingUserContent">
- <xsl:text>allObjects</xsl:text>
- </xsl:if>
- </tool:selectables>
- <tool:containers>
- <xsl:text>folder subscriptionFolder package</xsl:text>
- </tool:containers>
- <tool:columnHeaders session-name="s_dir">
- <xsl:choose>
- <xsl:when test="$browsingUserMyWatchItems and (not(contains($m_path, '/alert')))">
- <cp:columnHeader width="20" id="columnHeader_1st"/>
- </xsl:when>
- <xsl:otherwise>
- <cp:columnHeader width="20" sort="i" id="columnHeader_1st">
- <cp:sortHref>
- <xsl:value-of select="$back-url"/>&m_s_dir=<xsl:text/>
- <xsl:choose>
- <xsl:when test="key('session-param', 's_dir') = 'ia' ">id</xsl:when>
- <xsl:when test="key('session-param', 's_dir') = 'id' "/>
- <xsl:otherwise>ia</xsl:otherwise>
- </xsl:choose>
- </cp:sortHref>
- </cp:columnHeader>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:choose>
- <xsl:when test="$browsingUserMyWatchItems and not(contains($m_path, '/alert'))">
- <cp:columnHeader width="100%" id="columnHeader_name"><xts:string id="IDS_NAME"/></cp:columnHeader>
- </xsl:when>
- <xsl:when test="$browsingUserMyWatchItems and contains($m_path, '/alert')">
- <cp:columnHeader width="100%" id="columnHeader_name">
- <xsl:text/><xts:string id="IDS_PATH_INDICATOR"/><xsl:text> </xsl:text><xts:string id="IDS_NAME"/><xsl:text/>
- </cp:columnHeader>
- </xsl:when>
- <xsl:otherwise>
- <cp:columnHeader width="100%" sort="n" id="columnHeader_name">
- <cp:sortHref>
- <xsl:value-of select="$back-url"/>&m_s_dir=<xsl:text/>
- <xsl:choose>
- <xsl:when test="key('session-param', 's_dir') = 'na' ">nd</xsl:when>
- <xsl:when test="key('session-param', 's_dir') = 'nd' "/>
- <xsl:otherwise>na</xsl:otherwise>
- </xsl:choose>
- </cp:sortHref>
- <xts:string id="IDS_NAME"/>
- </cp:columnHeader>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:if test="not($browsingUserMyWatchItems) or contains($m_path, '/alert') or contains($m_path, '/rule')">
- <cp:columnHeader sort="m" id="columnHeader_modified">
- <cp:sortHref>
- <xsl:value-of select="$back-url"/>&m_s_dir=<xsl:text/>
- <xsl:choose>
- <xsl:when test="key('session-param', 's_dir') = 'ma' ">md</xsl:when>
- <xsl:when test="key('session-param', 's_dir') = 'md' "/>
- <xsl:otherwise>ma</xsl:otherwise>
- </xsl:choose>
- </cp:sortHref>
- <xts:string id="IDS_MODIFIED"/>
- </cp:columnHeader>
- </xsl:if>
- </tool:columnHeaders>
- <tool:columnContents>
- <cp:columnContent scope="row">
- <!-- Render the path -->
- <xsl:if test="$browsingUserMyWatchItems and contains($m_path, '/alert')">
- <img width="20" height="16" align="absmiddle" src="{$skin_images}path.gif">
- <xsl:attribute name="alt">
- <xsl:variable name="object-start-at-path">
- <xsl:if test="starts-with(cm:searchPath, '~') or starts-with(cm:searchPath,key('session-param', 'e_hp'))">
- <xsl:value-of select="concat(key('session-param', 'e_hp'), '/folder')"/>
- </xsl:if>
- <xsl:if test="starts-with(cm:searchPath,'/content')">
- <xsl:value-of select="$defaultContentRoot"/>
- </xsl:if>
- </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="contains(concat(' ', $containers, ' '), concat(' ', cm:objectClass, ' ')) and contains(concat(' ', cm:permissions, ' '), ' traverse ')">
- <a>
- <xsl:attribute name="href"><xsl:call-template name="gen-url"/></xsl:attribute>
- <xsl:value-of select="cm:defaultName"/>
- <xsl:if test="cm:userName != ''">
- <xsl:text> (</xsl:text>
- <xsl:value-of select="cm:userName"/>
- <xsl:text>)</xsl:text>
- </xsl:if>
- </a>
- </xsl:when>
- <xsl:when test="contains($hierarchy-objects, concat(' ', cm:objectClass, ' ')) and cm:hasChildren = 'true' and contains(concat(' ', cm:permissions, ' '), ' traverse ')">
- <a>
- <xsl:attribute name="href"><xsl:call-template name="gen-url"/></xsl:attribute>
- <xsl:value-of select="cm:defaultName"/>
- <xsl:if test="cm:userName != ''">
- <xsl:text> (</xsl:text>
- <xsl:value-of select="cm:userName"/>
- <xsl:text>)</xsl:text>
- </xsl:if>
- </a>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="cm:defaultName"/>
- <xsl:if test="cm:userName != ''">
- <xsl:text> (</xsl:text>
- <xsl:value-of select="cm:userName"/>
- <xsl:text>)</xsl:text>
- </xsl:if>
- </xsl:otherwise>
- </xsl:choose>
- <!-- Render the disabled icon if this entry is disabled -->
- <xsl:choose>
- <xsl:when 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:when>
- <xsl: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">
- <xsl:attribute name="alt"><xts:string id="IDS_DISABLED"/></xsl:attribute>
- </img>
- </xsl:when>
- </xsl:choose>
- <xsl:text>  </xsl:text>
- </cp:columnContent>
- <xsl:if test="not($browsingUserMyWatchItems) or contains($m_path, '/alert') or contains($m_path, '/rule')">
- <cp:columnContent>
- <xsl:choose>
- <xsl:when test="cm:modificationTime!=''">
- <xsl:value-of select="xtsext:formatDateFromUTC(string(cm:modificationTime), number('2'), number('3'), string($timeZone), string($contentLocale))"/>
- </xsl:when>
- <xsl:otherwise> </xsl:otherwise>
- </xsl:choose>
- </cp:columnContent>
- </xsl:if>
- </tool:columnContents>
- </tool:browser>
- </xsl:when>
- <xsl:when test="not(/root/cm:queryResponse/cm:queryReply[2]) or (/root/cm:queryResponse/cm:queryReply[2]/*/cm:capabilities/cm:string = 'sort')">
- <tool:browser virtualPage="true" useQueryReply="true">
- <tool:selectables>
- <xsl:choose>
- <xsl:when test="$tool-tab='u' and $insideCognosNamespace">
- <xsl:text>namespaceFolder account group role</xsl:text>
- </xsl:when>
- <xsl:when test="$tool-tab='d'">
- <xsl:text>namespaceFolder dataSource dataSourceConnection dataSourceSignon rolapDataSource rolapVirtualDataSource</xsl:text>
- </xsl:when>
- <xsl:when test="$tool-tab='l' and $insideCognosNamespace">
- <xsl:text>namespaceFolder contact distributionList</xsl:text>
- </xsl:when>
- </xsl:choose>
- </tool:selectables>
- <tool:containers>
- <xsl:text>namespaceFolder </xsl:text>
- <xsl:choose>
- <xsl:when test="$tool-tab='u' or $tool-tab='l'">
- <xsl:text>namespace</xsl:text>
- </xsl:when>
- <xsl:when test="$tool-tab='d'">
- <xsl:text>dataSource dataSourceConnection rolapDataSource model</xsl:text>
- </xsl:when>
- </xsl:choose>
- </tool:containers>
- <tool:hierarchy-objects>account group role</tool:hierarchy-objects>
- <tool:columnHeaders session-name="s_dir">
- <cp:columnHeader width="20" sort="i">
- <cp:sortHref>
- <xsl:value-of select="$back-url"/>&m_s_dir=<xsl:text/>
- <xsl:choose>
- <xsl:when test="key('session-param', 's_dir') = 'ia' ">id</xsl:when>
- <xsl:when test="key('session-param', 's_dir') = 'id' "/>
- <xsl:otherwise>ia</xsl:otherwise>
- </xsl:choose>
- </cp:sortHref>
- </cp:columnHeader>
- <cp:columnHeader width="100%" sort="n" id="columnHeader_name">
- <cp:sortHref>
- <xsl:value-of select="$back-url"/>&m_s_dir=<xsl:text/>
- <xsl:choose>
- <xsl:when test="key('session-param', 's_dir') = 'na' ">nd</xsl:when>
- <xsl:when test="key('session-param', 's_dir') = 'nd' "/>
- <xsl:otherwise>na</xsl:otherwise>
- </xsl:choose>
- </cp:sortHref>
- <xts:string id="IDS_NAME"/>
- </cp:columnHeader>
- <xsl:choose>
- <!-- The sorting on modified is not allowed for external namespaces -->
- <xsl:when test="not(/root/cm:queryResponse/cm:queryReply[2]) or /root/cm:queryResponse/cm:queryReply[2]/*/cm:searchPath = 'CAMID(":")' or contains($m_path, '/alert') or contains($m_path, '/rule')">
- <cp:columnHeader sort="m" id="columnHeader_modified">
- <cp:sortHref>
- <xsl:value-of select="$back-url"/>&m_s_dir=<xsl:text/>
- <xsl:choose>
- <xsl:when test="key('session-param', 's_dir') = 'ma' ">md</xsl:when>
- <xsl:when test="key('session-param', 's_dir') = 'md' "/>
- <xsl:otherwise>ma</xsl:otherwise>
- </xsl:choose>
- </cp:sortHref>
- <xts:string id="IDS_MODIFIED"/>
- </cp:columnHeader>
- </xsl:when>
- <xsl:otherwise>
- <cp:columnHeader id="columnHeader_modified">
- <xts:string id="IDS_MODIFIED"/>
- </cp:columnHeader>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:if test="$inDirectoryRoot">
- <cp:columnHeader>
- <xts:string id="IDS_DIRECTORY_ACTIVE"/>
- </cp:columnHeader>
- </xsl:if>
- </tool:columnHeaders>
- <tool:columnContents>
- <cp:columnContent scope="row">
- <xsl:choose>
- <xsl:when test="contains(concat(' ', $containers, ' '), concat(' ', cm:objectClass, ' ')) and contains(concat(' ', cm:permissions, ' '), ' traverse ')">
- <a>
- <xsl:attribute name="href"><xsl:call-template name="gen-url"/></xsl:attribute>
- <xsl:value-of select="cm:defaultName"/>
- <xsl:if test="cm:userName != ''">
- <xsl:text> (</xsl:text>
- <xsl:value-of select="cm:userName"/>
- <xsl:text>)</xsl:text>
- </xsl:if>
- </a>
- </xsl:when>
- <xsl:when test="contains($hierarchy-objects, concat(' ', cm:objectClass, ' ')) and cm:hasChildren = 'true' and contains(concat(' ', cm:permissions, ' '), ' traverse ')">
- <a>
- <xsl:attribute name="href"><xsl:call-template name="gen-url"/></xsl:attribute>
- <xsl:value-of select="cm:defaultName"/>
- <xsl:if test="cm:userName != ''">
- <xsl:text> (</xsl:text>
- <xsl:value-of select="cm:userName"/>
- <xsl:text>)</xsl:text>
- </xsl:if>
- </a>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="cm:defaultName"/>
- <xsl:if test="cm:userName != ''">
- <xsl:text> (</xsl:text>
- <xsl:value-of select="cm:userName"/>
- <xsl:text>)</xsl:text>
- </xsl:if>
- </xsl:otherwise>
- </xsl:choose>
- <!-- Render the disabled icon if this entry is disabled -->
- <xsl:choose>
- <xsl:when 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:when>
- <xsl: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">
- <xsl:attribute name="alt"><xts:string id="IDS_DISABLED"/></xsl:attribute>
- </img>
- </xsl:when>
- </xsl:choose>
- <xsl:text>  </xsl:text>
- </cp:columnContent>
- <cp:columnContent>
- <xsl:choose>
- <xsl:when test="cm:modificationTime!=''">
- <xsl:value-of select="xtsext:formatDateFromUTC(string(cm:modificationTime), number('2'), number('3'), string($timeZone), string($contentLocale))"/>
- </xsl:when>
- <xsl:otherwise> </xsl:otherwise>
- </xsl:choose>
- <xsl:text>  </xsl:text>
- </cp:columnContent>
- <xsl:if test="$inDirectoryRoot">
- <cp:columnContent>
- <xsl:choose>
- <xsl:when test="cm:active = 'true'">
- <img height="16" width="16" hspace="4" align="absmiddle" src="{$image_root}active_namespace.gif">
- <xsl:attribute name="alt"><xts:string id="IDS_DIRECTORY_ACTIVE"/></xsl:attribute>
- </img>
- </xsl:when>
- <xsl:otherwise> </xsl:otherwise>
- </xsl:choose>
- </cp:columnContent>
- </xsl:if>
- </tool:columnContents>
- <tool:columnFooters session-name="s_dir">
- <cp:columnFooter width="100%" colspan="13" 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>
- </tool:columnFooters>
- <tool:row-actions>
- <tool:action name="supportPropertiesAction" test="not(contains(' model modelView ', concat(' ',cm:objectClass,' ')))"/>
- <tool:action name="supportPermissionsAction" test="cm:objectClass='modelView'"/>
- <tool:action name="supportTestConnection"/>
- <tool:action name="supportAllActionsAction" test="cm:objectClass!='model'"/>
- <tool:action name="supportDeleteAction" test="cm:active='false'"/>
- <tool:action name="supportCreateProfileAction" test="cm:modificationTime=''"/>
- </tool:row-actions>
- </tool:browser>
- </xsl:when>
- <xsl:otherwise>
- <tool:browser virtualPage="true" useQueryReply="true">
- <tool:selectables>
- <xsl:text>namespaceFolder </xsl:text>
- <xsl:choose>
- <xsl:when test="$tool-tab='u'">
- <xsl:text>account group role</xsl:text>
- </xsl:when>
- <xsl:when test="$tool-tab='l'">
- <xsl:text>contact distributionList</xsl:text>
- </xsl:when>
- </xsl:choose>
- </tool:selectables>
- <tool:containers>
- <xsl:text>namespaceFolder </xsl:text>
- <xsl:choose>
- <xsl:when test="$tool-tab='u'">
- <xsl:text>namespace</xsl:text>
- </xsl:when>
- </xsl:choose>
- </tool:containers>
- <tool:hierarchy-objects>account group role</tool:hierarchy-objects>
- <tool:columnHeaders>
- <cp:columnHeader width="20">
- </cp:columnHeader>
- <cp:columnHeader width="100%" id="columnHeader_name">
- <xts:string id="IDS_NAME"/>
- </cp:columnHeader>
- <cp:columnHeader id="columnHeader_modified">
- <xts:string id="IDS_MODIFIED"/>
- </cp:columnHeader>
- <xsl:if test="$inDirectoryRoot">
- <cp:columnHeader>
- <xts:string id="IDS_DIRECTORY_ACTIVE"/>
- </cp:columnHeader>
- </xsl:if>
- </tool:columnHeaders>
- <tool:columnContents>
- <cp:columnContent scope="row">
- <xsl:choose>
- <xsl:when test="contains(concat(' ', $containers, ' '), concat(' ', cm:objectClass, ' ')) and contains(concat(' ', cm:permissions, ' '), ' traverse ')">
- <a>
- <xsl:attribute name="href"><xsl:call-template name="gen-url"/></xsl:attribute>
- <xsl:value-of select="cm:defaultName"/>
- <xsl:if test="cm:userName != ''">
- <xsl:text> (</xsl:text>
- <xsl:value-of select="cm:userName"/>
- <xsl:text>)</xsl:text>
- </xsl:if>
- </a>
- </xsl:when>
- <xsl:when test="contains($hierarchy-objects, concat(' ', cm:objectClass, ' ')) and cm:hasChildren = 'true' and contains(concat(' ', cm:permissions, ' '), ' traverse ')">
- <a>
- <xsl:attribute name="href"><xsl:call-template name="gen-url"/></xsl:attribute>
- <xsl:value-of select="cm:defaultName"/>
- <xsl:if test="cm:userName != ''">
- <xsl:text> (</xsl:text>
- <xsl:value-of select="cm:userName"/>
- <xsl:text>)</xsl:text>
- </xsl:if>
- </a>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="cm:defaultName"/>
- <xsl:if test="cm:userName != ''">
- <xsl:text> (</xsl:text>
- <xsl:value-of select="cm:userName"/>
- <xsl:text>)</xsl:text>
- </xsl:if>
- </xsl:otherwise>
- </xsl:choose>
- <!-- Render the disabled icon if this entry is disabled -->
- <xsl:choose>
- <xsl:when 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:when>
- <xsl: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">
- <xsl:attribute name="alt"><xts:string id="IDS_DISABLED"/></xsl:attribute>
- </img>
- </xsl:when>
- </xsl:choose>
- <xsl:text>  </xsl:text>
- </cp:columnContent>
- <cp:columnContent>
- <xsl:choose>
- <xsl:when test="cm:modificationTime!=''">
- <xsl:value-of select="xtsext:formatDateFromUTC(string(cm:modificationTime), number('2'), number('3'), string($timeZone), string($contentLocale))"/>
- </xsl:when>
- <xsl:otherwise> </xsl:otherwise>
- </xsl:choose>
- <xsl:text>  </xsl:text>
- </cp:columnContent>
- <xsl:if test="$inDirectoryRoot">
- <cp:columnContent>
- <xsl:choose>
- <xsl:when test="cm:active = 'true'">
- <img height="16" width="16" hspace="4" align="absmiddle" src="{$image_root}active_namespace.gif">
- <xsl:attribute name="alt"><xts:string id="IDS_DIRECTORY_ACTIVE"/></xsl:attribute>
- </img>
- </xsl:when>
- <xsl:otherwise> </xsl:otherwise>
- </xsl:choose>
- </cp:columnContent>
- </xsl:if>
- </tool:columnContents>
- <tool:row-actions>
- <tool:action name="supportPropertiesAction"/>
- <tool:action name="supportTestConnection"/>
- <tool:action name="supportAllActionsAction"/>
- <tool:action name="supportDeleteAction" test="cm:active='false'"/>
- <tool:action name="supportCreateProfileAction" test="cm:modificationTime=''"/>
- </tool:row-actions>
- </tool:browser>
- </xsl:otherwise>
- </xsl:choose>
- </tool:contents>
- </tool:page>
- </xsl:template>
- <!-- This will add the template that adjusts the URL for sorting. -->
- <mf:tweak-url/>
- <cp:tabControl/>
- </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="format">
- <!-- 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>
|