123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- Licensed Materials - Property of IBM
- IBM Cognos Products: ps
- (C) Copyright IBM Corp. 2005, 2014
- US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
- -->
- <!--
- Copyright (C) 2008 Cognos ULC, an IBM Company. All rights reserved.
- Cognos (R) is a trademark of Cognos ULC, (formerly Cognos Incorporated).
- -->
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
- xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
- xmlns:lyt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/layout/"
- xmlns:dt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/templates/"
- xmlns:dp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/presentation/"
- xmlns:df="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/framework/"
- xmlns:dc="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/confirm/1/"
- xmlns:cp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/presentation/"
- xmlns:cf="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/framework/"
- xmlns:utml="http://developer.cognos.com/schemas/xts/logicsheet/xslt/formlogic/"
- xmlns:out="dummy-uri"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- xmlns:xts="http://developer.cognos.com/schemas/xts/"
- xmlns:rdb="http://developer.cognos.com/schemas/xts/rdb">
-
- <xsl:output method="xml" encoding="UTF-8" indent="no"/>
- <xsl:namespace-alias stylesheet-prefix="out" result-prefix="xsl"/>
-
-
- <xsl:template name="generateReadOnlyPageList">
- <cf:main-pager-section name="sharedPagesPager" form="pform" width="100%" genDelete="no">
- <cf:param name="item-path">/root/sharedPagesListForDisplay/*</cf:param>
- <cf:param name="target">concat(concat($app,'/'),$mname)</cf:param>
- <cf:param name="lines-per-page">
- <out:choose>
- <out:when test="key('session-param','linesPerPage')!=''">
- <out:value-of select="key('session-param','linesPerPage')" />
- </out:when>
- <out:otherwise>
- <out:value-of select="/root/system/param[@name='defaultPortalPreferences']/pref[@name='lines']" />
- </out:otherwise>
- </out:choose>
- </cf:param>
- <cf:param name="rows">
- <cp:tableHeader>
- <cp:columnHeader width="20" />
- <cp:columnHeader width="100%">
- <span style="padding-left: 1px; padding-right: 1px;"><xts:string id="IDS_PATH_INDICATOR"/> </span>
- <out:text/><xts:string id="IDS_NAME"/><out:text/>
- </cp:columnHeader>
- </cp:tableHeader>
- <cp:tableContent>
- <cp:columnContent>
- <out:variable name="classForIcon">
- <!-- we must identify the personal folder as we can not use the icon associated with folder...we must use the icon for a personal folder -->
- <xsl:choose>
- <!-- the id of the my folder could be in one of two places -->
- <!-- for admin dialogs portal pages tab it is in the second query response. -->
- <!-- A query would have been required in the admin case cause the user is editing an account that is not there own or is editing the -->
- <!-- account object under config (ie the profile) -->
- <xsl:when test="@mode = 'properties'">
- <out:choose>
- <out:when test="$privateFolder/cm:storeID = cm:storeID">pfr</out:when>
- <out:otherwise>
- <out:value-of select="cm:objectClass"/>
- </out:otherwise>
- </out:choose>
- </xsl:when>
- <!-- for preferences portal pages tab it is in the session -->
- <xsl:otherwise>
- <out:choose>
- <out:when test="contains(cm:storeID,/root/session/param[@name = 'mrootid'])">pfr</out:when>
- <out:otherwise>
- <out:value-of select="cm:objectClass"/>
- </out:otherwise>
- </out:choose>
- </xsl:otherwise>
- </xsl:choose>
- </out:variable>
- <out:call-template name="gen-icon">
- <out:with-param name="class" select="$classForIcon"/>
- <out:with-param name="hiddenObject" select="cm:hidden"/>
- </out:call-template>
- </cp:columnContent>
- <cp:columnContent>
- <out:variable name="privateFolderId">
- <xsl:if test="@mode='properties'">
- <out:value-of select="$privateFolder/cm:storeID"/>
- </xsl:if>
- </out:variable>
- <out:if test="not(key('session-param','mrootid') = cm:storeID or key('session-param','prootid') = cm:storeID or ($privateFolderId != '' and $privateFolderId = cm:storeID))">
- <out:variable name="object-start-at-path">
- <out:choose>
- <!-- Do not provide a path for contact otherwise invalid path displayed for logged on user -->
- <out:when test="starts-with(cm:searchPath, '~') or starts-with(cm:searchPath,key('session-param', 'e_hp'))">
- <out:value-of select="concat(key('session-param', 'e_hp'), '/folder')"/>
- </out:when>
- <out:when test="starts-with(cm:searchPath,'/content')">
- <out:value-of select="/content"/>
- </out:when>
- </out:choose>
- </out:variable>
- <span style="padding-left: 1px; padding-right: 1px;">
- <img border="0" align="absmiddle" height="16" width="20" src="{'{$skin_images}'}path.gif">
- <out:attribute name="alt">
- <cf:do-the-path-link>
- <cf:param name="familytree">cm:ancestors</cf:param>
- <cf:param name="home">
- <out:value-of select="{'$object-start-at-path'}"/>
- </cf:param>
- <cf:param name="familymember">cm:defaultName</cf:param>
- <cf:param name="onlyAncestors">true</cf:param>
- </cf:do-the-path-link>
- </out:attribute>
- </img>
-  
- </span>
- </out:if>
- <out:choose>
- <out:when test="string(cm:defaultName) != ''">
- <out:value-of select="cm:defaultName"/>
- </out:when>
- <out:otherwise>
- <dp:inactiveText><i><xts:string id="IDS_PAGE_UNAVAILABLE"/></i></dp:inactiveText>
- </out:otherwise>
- </out:choose>
- <!-- If inaccessible tabs are supposed to be hidden then show some indication that they will not appear in the portal -->
- <out:if test="string(key('system-param', 'hideInaccessibleTabs')) = 'true'">
- <xsl:call-template name="genWarningSigns"/>
- </out:if>
- </cp:columnContent>
- </cp:tableContent>
- </cf:param>
- </cf:main-pager-section>
- </xsl:template>
- <xsl:template name="generateWriteablePageList">
- <cf:main-pager-section name="sharedPagesPager" form="pform" width="100%" genDelete="no">
- <cf:param name="item-path">/root/sharedPagesListForDisplay/*</cf:param>
- <cf:param name="target">concat(concat($app,'/'),$mname)</cf:param>
- <cf:param name="lines-per-page">
- <out:choose>
- <out:when test="key('session-param','linesPerPage')!=''">
- <out:value-of select="key('session-param','linesPerPage')" />
- </out:when>
- <out:otherwise>
- <out:value-of select="/root/system/param[@name='defaultPortalPreferences']/pref[@name='lines']" />
- </out:otherwise>
- </out:choose>
- </cf:param>
- <cf:param name="actions">
- <xsl:if test="@mode = 'properties'">
- <cp:action>
- <out:variable name="publicFolderId"><out:value-of select="$publicFolder/cm:storeID"/></out:variable>
- <out:if test="not(/root/sharedPagesListForDisplay/pagelet[cm:storeID = $publicFolderId])">
- <utml:a utml:op="maintain" utml:formName="pform">
- <utml:href>document.pform.sharedPagesChanged.value="addpublic";</utml:href>
- <out:text /><xts:string id="IDS_MYPAGES_ADDPUBLIC"><xts:param name="publicContainerName"><out:value-of select="/root/session/param[@name='e_proot']"/></xts:param></xts:string><out:text />
- </utml:a>
- </out:if>
- </cp:action>
- <cp:action>
- <out:variable name="personalFolderId"><out:value-of select="$privateFolder/cm:storeID"/></out:variable>
- <out:if test="not(/root/sharedPagesListForDisplay/pagelet[cm:storeID = $personalFolderId])">
- <utml:a utml:op="maintain" utml:formName="pform">
- <utml:href>document.pform.sharedPagesChanged.value="addprivate";</utml:href>
- <out:text /><xts:string id="IDS_MYPAGES_ADDPRIVATE"/><out:text />
- </utml:a>
- </out:if>
- </cp:action>
- </xsl:if>
- <cp:action>
- <utml:a utml:op="maintain" utml:formName="pform">
- <utml:href>document.pform.m_sharedPagesPagersection.value='1';document.pform.controller_state.value='addSharedPageEntries|navigate';</utml:href>
- <utml:target><out:value-of select="concat($app, '/', $mname)"/></utml:target>
- <out:text /><xts:string id="IDS_ADD_PAGES"/><out:text />
- </utml:a>
- </cp:action>
- <cp:action>
- <out:choose>
- <out:when test="count(/root/sharedPagesListForDisplay/pagelet) < 1">
- <dp:inactiveHRef><xts:string id="IDS_REMOVE"/></dp:inactiveHRef>
- </out:when>
- <out:otherwise>
- <utml:a utml:op="maintain" utml:formName="pform">
- <utml:href>document.pform.sharedPagesChanged.value="remove";</utml:href>
- <out:text /><xts:string id="IDS_REMOVE"/><out:text />
- </utml:a>
- </out:otherwise>
- </out:choose>
- </cp:action>
- <cp:action>
- <out:choose>
- <out:when test="count(/root/sharedPagesListForDisplay/pagelet) < 2">
- <dp:inactiveHRef><xts:string id="IDS_COMMAND_RESEQUENCE"/></dp:inactiveHRef>
- </out:when>
- <out:otherwise>
- <utml:a utml:op="stack-up" utml:formName="pform" >
- <utml:target><out:value-of select="$app"/>/preferences/resequence.xts<xsl:text/></utml:target>
- <out:text /><xts:string id="IDS_COMMAND_RESEQUENCE"/><out:text />
- </utml:a>
- </out:otherwise>
- </out:choose>
- </cp:action>
- </cf:param>
- <cf:param name="rows">
- <cp:tableHeader>
- <cp:columnHeader width="16" toggleName="sharedPage_select_" noLabel="true"/>
- <cp:columnHeader width="20" />
- <cp:columnHeader width="100%">
- <span style="padding-left: 1px; padding-right: 1px;"><xts:string id="IDS_PATH_INDICATOR"/> </span>
- <out:text/><xts:string id="IDS_NAME"/><out:text/>
- </cp:columnHeader>
- </cp:tableHeader>
- <cp:tableContent>
- <out:variable name="entryLabel">
- <out:choose>
- <out:when test="string(cm:defaultName) != ''">
- <out:value-of select="xtsext:enforceBTD(cm:defaultName, $baseTextDirection, $productLocale, boolean($isBidiEnabled='true'))"/>
- </out:when>
- <out:otherwise>
- <dp:inactiveText><i><xts:string id="IDS_PAGE_UNAVAILABLE"/></i></dp:inactiveText>
- </out:otherwise>
- </out:choose>
- </out:variable>
- <cp:columnContent>
- <input type="checkbox">
- <out:attribute name="aria-label"><xts:string id="IDS_SELECTION_FOR_PAGER_ITEM" encode="html"><xts:param name="pagerItemName"><out:value-of select="$entryLabel"/></xts:param></xts:string></out:attribute>
- <out:attribute name="value"><out:value-of select="@id"/></out:attribute>
- <out:attribute name="name">sharedPage_select_<out:value-of select="position()"/></out:attribute>
- </input>
- </cp:columnContent>
- <cp:columnContent>
- <out:variable name="classForIcon">
- <!-- we must identify the personal folder as we can not use the icon associated with folder...we must use the icon for a personal folder -->
- <xsl:choose>
- <!-- the id of the my folder could be in one of two places -->
- <!-- for admin dialogs portal pages tab it is in the second query response. -->
- <!-- A query would have been required in the admin case cause the user is editing an account that is not there own or is editing the -->
- <!-- account object under config (ie the profile) -->
- <xsl:when test="@mode = 'properties'">
- <out:choose>
- <out:when test="$privateFolder/cm:storeID = cm:storeID">pfr</out:when>
- <out:otherwise>
- <out:value-of select="cm:objectClass"/>
- </out:otherwise>
- </out:choose>
- </xsl:when>
- <!-- for preferences portal pages tab it is in the session -->
- <xsl:otherwise>
- <out:choose>
- <out:when test="contains(cm:storeID,/root/session/param[@name = 'mrootid'])">pfr</out:when>
- <out:otherwise>
- <out:value-of select="cm:objectClass"/>
- </out:otherwise>
- </out:choose>
- </xsl:otherwise>
- </xsl:choose>
- </out:variable>
- <out:call-template name="gen-icon">
- <out:with-param name="class" select="$classForIcon"/>
- <out:with-param name="hiddenObject" select="cm:hidden"/>
- </out:call-template>
- </cp:columnContent>
- <cp:columnContent>
- <out:variable name="privateFolderId">
- <xsl:if test="@mode='properties'">
- <out:value-of select="$privateFolder/cm:storeID"/>
- </xsl:if>
- </out:variable>
- <out:if test="not(key('session-param','mrootid') = cm:storeID or key('session-param','prootid') = cm:storeID or ($privateFolderId != '' and $privateFolderId = cm:storeID))">
- <out:variable name="object-start-at-path">
- <out:choose>
- <!-- Do not provide a path for contact otherwise invalid path displayed for logged on user -->
- <out:when test="starts-with(cm:searchPath, '~') or starts-with(cm:searchPath,key('session-param', 'e_hp'))">
- <out:value-of select="concat(key('session-param', 'e_hp'), '/folder')"/>
- </out:when>
- <out:when test="starts-with(cm:searchPath,'/content')">
- <out:value-of select="/content"/>
- </out:when>
- </out:choose>
- </out:variable>
-
- <span style="padding-left: 1px; padding-right: 1px;">
- <img border="0" align="absmiddle" height="16" width="20" src="{'{$skin_images}'}path.gif">
- <out:attribute name="alt">
- <cf:do-the-path-link>
- <cf:param name="familytree">cm:ancestors</cf:param>
- <cf:param name="home">
- <out:value-of select="{'$object-start-at-path'}"/>
- </cf:param>
- <cf:param name="familymember">cm:defaultName</cf:param>
- <cf:param name="onlyAncestors">true</cf:param>
- </cf:do-the-path-link>
- </out:attribute>
- </img>
-  
- </span>
- </out:if>
- <out:value-of select="$entryLabel"/>
- <!-- If inaccessible tabs are supposed to be hidden then show some indication that they will not appear in the portal -->
- <out:if test="string(key('system-param', 'hideInaccessibleTabs')) = 'true'">
- <xsl:call-template name="genWarningSigns"/>
- </out:if>
- </cp:columnContent>
- </cp:tableContent>
- </cf:param>
- </cf:main-pager-section>
- </xsl:template>
-
- <xsl:template match="rdb:preferences">
- <!-- selectall / deselectall functions.-->
- <dt:selectDeselectAll/>
- <script language="javascript">
- function init()
- {
- if (document.pform.controller_state)
- {
- document.pform.controller_state.value = '';
- }
- }
- function processModalCommand(sAction)
- {
- <!-- Set the right call back target -->
-
- var callBackTarget = <out:value-of select="$callBackTargetJSVar"/>;
-
- if( callBackTarget )
- {
- callBackTarget.<out:value-of select="$callBackFunctionName"/>(sAction, null);
- }
- }
- </script>
-
- <!-- global form command fields -->
- <utml:input type="hidden" name="ifrmcmd" value="save" utml:update="false"/>
- <utml:input type="hidden" name="m_return" value="" utml:update="false"/>
- <utml:input type="hidden" name="controller_state" value="" utml:update="false"/>
- <lyt:layout style="1">
- <lyt:section>
-
- <!-- if the m_pp_shared_pages has been passed in then use it -->
- <!-- otherwise use re-create it using the shared pages -->
- <utml:input name="m_pp_shared_pages" type="hidden" update="false">
- <out:attribute name="value">
- <out:variable name="markup">
- <out:apply-templates select="/root/sharedPagesListForDisplay" mode="markup"/>
- </out:variable>
- <out:value-of select="xtsext:cafaction( concat('sign_wrap_setpassportid_', $passport), xtsext:web64encode(string($markup),true()))"/>
- </out:attribute>
- </utml:input>
- </lyt:section>
- </lyt:layout>
- <lyt:layout style="1">
- <lyt:section>
- <out:choose>
- <out:when test="$isNamedAccountReadOnly = 'true'"><xsl:call-template name="generateReadOnlyPageList"/></out:when>
- <out:otherwise><xsl:call-template name="generateWriteablePageList"/></out:otherwise>
- </out:choose>
- </lyt:section>
- </lyt:layout>
-
- <script language="javascript">
- <out:if test="/root/duplicateEntry">
- <out:variable name="msg">
- <xts:string id="IDS_DUPLICATE_ENTRY" encode="javascript"/>
- </out:variable>
- window.alert('<out:value-of select="$msg"/>');
- </out:if>
- </script>
- </xsl:template>
-
- <!-- Generate warning labels for inaccessible pages -->
- <xsl:template name="genWarningSigns">
- <out:variable name="warningMessage">
- <out:choose>
- <out:when test="not(cm:objectClass) or cm:objectClass = 'nil'">
- <xts:string id="IDS_PAGE_UNAVAILABLE"/>
- </out:when>
- <out:when test="cm:objectClass = 'pagelet' and not(contains(cm:permissions, 'execute'))">
- <xts:string id="IDS_PAGE_NO_ACCESS"/>
- </out:when>
- </out:choose>
- </out:variable>
-
- <out:if test="$warningMessage != ''">
- <img style="margin-right:5px;margin-left:5px;" src="{'{$image_root}'}state_warning.gif" width="11" height="16" border="0" align="absmiddle" title="{'{$warningMessage}'}" alt="{'{$warningMessage}'}"/>
- </out:if>
- </xsl:template>
-
- <xsl:template match="*">
- <xsl:copy>
- <xsl:copy-of select="@*"/>
- <xsl:apply-templates/>
- </xsl:copy>
- </xsl:template>
-
- </xsl:stylesheet>
|