123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- Licensed Materials - Property of IBM
- IBM Cognos Products: ps
- (C) Copyright IBM Corp. 2005, 2014
- US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
- -->
- <!--
- Copyright (C) 2008 Cognos ULC, an IBM Company. All rights reserved.
- Cognos (R) is a trademark of Cognos ULC, (formerly Cognos Incorporated).
- -->
- <xts:morphlet xmlns:xts="http://developer.cognos.com/schemas/xts/" messageBase="messages/portal.xml, messages/portalRL.xml" requiredCapability="canUseAdministrationPortal">
- <!--
- ===============================================================================================
- formlogic_init - standard form logic initialization
- ===============================================================================================
- -->
- <xts:block id="formlogic_init" type="exec" mode="interpret" processor="XSLT" path="/logicsheets/formlogic_init.xslt" nodelist="env,credential,system,http"/>
- <!--
- ===============================================================================================
- callMorphlet - Calls the appropriate morphlet using the passed in params which will return
- markup to be displayed or the expected results
- ===============================================================================================
- -->
- <xts:block
- id="callMorphlet"
- nodelist="requestParams,env, http, session, credential, cookies, header, user"
- processor="XSLT"
- type="exec"
- dependency="formlogic_init"
- condition=".[ /root/env/param[@name='controller_state'] != '' ]" mandatory="false">
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/dialog/controller-templates.xsl"/>
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:dlgctrl="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/controller-templates/"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- xmlns:req-params="http://developer.cognos.com/schemas/request/params"
- exclude-result-prefixes="xsl dlgctrl xtsext req-params">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
-
- <xsl:key name="request-param" match="/root/*[local-name()='requestParams']/*[local-name()='param']" use="@name"/>
-
- <xsl:template match="/">
- <xts:sequence>
- <dlgctrl:XTS2Request>
- <dlgctrl:target>/portal/addEntries/add_entries.xts</dlgctrl:target>
- <dlgctrl:stackName>addEntriesStack</dlgctrl:stackName>
- <req-params:param name="defaultTarget">/portal/new_indexUpdate.xts</req-params:param>
- <req-params:param name="titlePostfix"><xts:string id="IDS_NEW_INDEX_UPDATE_TASK_TITLE"/></req-params:param>
- <req-params:param name="defaultSearchPath">/</req-params:param>
- <req-params:param name="addEntriesUI">indexUpdateLocations</req-params:param>
- <req-params:param name="allowRootBrowsing">true</req-params:param>
- <req-params:param name="allowDuplicates">false</req-params:param>
- <req-params:param name="returnProperties">
- <req-params:property name="userInterfaces"/>
- <req-params:property name="hidden"/>
- </req-params:param>
- </dlgctrl:XTS2Request>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
-
- <!--
- ===============================================================================================
- processReponse - Process the response from the callMorphlet block and either displays
- the markup or processes the results
- ===============================================================================================
- -->
- <xts:block
- id="processResponse"
- nodelist="output,http,env,system,user,morphletResponse,credential,cookies"
- path="/portal/addEntries/logicsheets/process_added_entries.xslt"
- processor="XSLT"
- dependency="callMorphlet"
- type="exec"
- condition=".[ /root/env/param[@name='controller_state'] != '' ]"
- mandatory="false">
- <xts:logicsheet path="logicsheets/presentation/dialog/controller-templates.xsl"/>
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- </xts:block>
- <xts:block id="unpackSelectedItems" type="exec" mode="interpret" processor="XSLT" dependency="processResponse" condition=".[/root/env/param[@name='m_indexUpdate']!='' and not(/root/mode='addEntries')]" mandatory="false">
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:template match="/">
- <xts:sequence>
- <xts:append>
- <xsl:value-of select="xtsext:web64decode(xtsext:cafaction('sign_unwrap',string(/root/env/param[@name='m_indexUpdate'])), true())" disable-output-escaping="yes"/>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ===============================================================================================
- execute_command
-
- Execute the operation: delete, additems_
- ===============================================================================================
- -->
- <xts:block id="execute_command" dependency="unpackSelectedItems" type="exec" mode="interpret" processor="XSLT" condition=".[not(/root/mode='addEntries')]" mandatory="false">
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- <xts:logicsheet path="logicsheets/contentadmin.xsl"/>
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:adm="http://developer.cognos.com/schemas/xts/logicsheets/contentadmin/"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
- exclude-result-prefixes="xsl xtsext adm pf">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <pf:variables/>
- <xsl:template match="/">
- <adm:executeIndexUpdateCommand/>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ===============================================================================================
- encode_list
-
- Serialize the data (web64 encoded)
- ===============================================================================================
- -->
- <xts:block id="encode_list" dependency="execute_command getContent" type="exec" mode="interpret" processor="XSLT" condition=".[not(/root/mode='addEntries')]" mandatory="false">
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
- exclude-result-prefixes="xsl xtsext pf">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <pf:serialize-xml/>
- <pf:variables/>
- <xsl:template match="/">
- <xts:sequence>
- <xts:delete select="/root/env/param[@name = 'm_indexUpdate']"/>
- <xts:append select="/root/env">
- <xsl:variable name="markup">
- <xsl:apply-templates mode="markup" select="/root/indexUpdates"/>
- </xsl:variable>
- <param name="m_indexUpdate">
- <xsl:value-of select="xtsext:cafaction( concat('sign_wrap_setpassportid_', $passport),xtsext:web64encode(string($markup), true()))"/>
- </param>
- </xts:append>
- <xts:delete select="/root/env/param[@name='m_io_includedObjects']"/>
- <xts:delete select="/root/env/param[@name='m_io_excludedObjects']"/>
- <xts:delete select="/root/env/param[@name='m_io_force']"/>
- <xts:delete select="/root/env/param[@name='m_io_indexObjectTypes']"/>
- <xts:delete select="/root/env/param[@name='m_io_indexReferencedData']"/>
- <xts:delete select="/root/env/param[@name='m_io_indexModeledData']"/>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ===============================================================================================
- getObjects - get object class names
- ===============================================================================================
- -->
- <xts:block id="classNames" type="exec" mode="input" processor="XML" path="/portal/uiExtensions.xml" condition=".[not(/root/mode='addEntries')]" mandatory="false">
- <xts:logicsheet path="/logicsheets/uiobjects/uiobjects_names.xslt"/>
- </xts:block>
-
- <!--
- ===============================================================================================
- Generate the HTML
- ===============================================================================================
- -->
- <xts:block id="format" dependency="encode_list classNames" mode="output" processor="XSLT" type="exec" mimeType="text/html" condition=".[not(/root/mode='addEntries')]" mandatory="false">
- <xts:logicsheet path="logicsheets/contentadmin.xsl"/>
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/dialog/framework.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/layout.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/dialog/presentation.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/controls/framework.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/controls/presentation.xsl"/>
- <xts:logicsheet path="logicsheets/formlogic.xslt"/>
- <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:cm="http://developer.cognos.com/schemas/xts-cm/1/"
- xmlns:xts="http://developer.cognos.com/schemas/xts/"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- 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:df="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/framework/"
- 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:adm="http://developer.cognos.com/schemas/xts/logicsheets/contentadmin/"
- xmlns:utml="http://developer.cognos.com/schemas/xts/logicsheet/xslt/formlogic/"
- exclude-result-prefixes="xsl cf cp pf df dp lyt cm utml xts xtsext adm">
- <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no" omit-xml-declaration="yes"/>
- <!-- current file name -->
- <xsl:variable name="mname" select="'new_indexUpdate.xts'"/>
- <pf:variables/>
- <pf:gen-icon/>
-
- <!-- start the output -->
- <xsl:template match="/root">
- <xsl:variable name="has_write_permission" select="true()"/>
- <xsl:variable name="wizard-title"><xts:string id="IDS_NEW_INDEX_UPDATE_TASK_TITLE"/></xsl:variable>
- <xsl:variable name="browserTitle">
- <xts:string id="IDS_INDEX_UPDATE_TASK_SELECT_TYPE_TITLE">
- <xts:param name="wizardName">
- <xsl:value-of select="$wizard-title"/>
- </xts:param>
- </xts:string>
- </xsl:variable>
- <xsl:text disable-output-escaping='yes'><!DOCTYPE html></xsl:text><dp:page longTitle="$browserTitle">
- <dp:meta>
- <pf:meta/>
- <!-- Standard meta tags -->
- </dp:meta>
- <script language="javascript" src="{$webcontent}/{$app}/js/list.js"/>
- <dp:script>
- <!-- Help system -->
- <pf:help/>
- <script language="JavaScript">
- function init()
- {
- if (document.pform.controller_state)
- {
- document.pform.controller_state.value = '';
- }
- }
-
- function validate()
- {
- <xsl:if test="count(/root/indexUpdates/include/*) = 0">
- alert('<xts:string id="IDS_INDEX_UPDATE_NO_ADDED_ENTRY" encode="javascript"/>');
- return false;
- </xsl:if>
- return true;
- }
- function clearSelections()
- {
- for(var i=0; document.pform.length > i; i++)
- {
- if (document.pform.elements[i].name.substring( 0, 17) == 'checkbox_location')
- {
- document.pform.elements[i].checked = false;
- }
- }
- }
- </script>
- </dp:script>
- <utml:form name="pform" method="post" action="{$gateway}">
- <utml:excludes>checkbox_location checkbox_located_in checkbox_based_on</utml:excludes>
- <utml:input type="hidden" name="ifrmcmd" utml:update="false" value="create"/>
- <utml:input type="hidden" name="controller_state" value="" utml:update="false"/>
- <utml:input type="hidden" name="listop" value="" utml:update="false"/>
- <utml:input type="hidden" name="include_or_exclude" value="" utml:update="false"/>
- <xsl:for-each select="/root/indexUpdates/include/*">
- <utml:input type="hidden" name="m_io_includedObjects" utml:update="false">
- <xsl:attribute name="value"><xsl:value-of select="cm:searchPath"/></xsl:attribute>
- </utml:input>
- </xsl:for-each>
- <xsl:for-each select="/root/indexUpdates/exclude/*">
- <utml:input type="hidden" name="m_io_excludedObjects" utml:update="false">
- <xsl:attribute name="value"><xsl:value-of select="cm:searchPath"/></xsl:attribute>
- </utml:input>
- </xsl:for-each>
- <!-- dialog header -->
- <dp:header>
- <dp:title><xsl:value-of select="$browserTitle"/></dp:title>
- <!-- description tabs -->
- <dp:description>
- <xts:string id="IDS_INDEX_UPDATE_TASK_HINT"/>
- </dp:description>
- </dp:header>
-
- <lyt:layout style="1" title="IDS_INDEX_UPDATE_TASK_TABLE_TITLE_INCLUDE" border="yes">
- <lyt:section>
- <adm:indexUpdateOptions IncludeOrExclude="include"/>
- </lyt:section>
- </lyt:layout>
- <lyt:layout style="1" title="IDS_INDEX_UPDATE_TASK_TABLE_TITLE_EXCLUDE" border="yes">
- <lyt:section>
- <adm:indexUpdateOptions IncludeOrExclude="exclude"/>
- </lyt:section>
- </lyt:layout>
- <dp:footer>
- <df:button df:id="IDS_CANCEL" df:style="back-url"/>
- <df:button df:id="IDS_BACK" df:style="maintain">
- <df:target>
- <xsl:value-of select="concat($app, '/new_general.xts')"/>
- </df:target>
- </df:button>
- <df:button df:id="IDS_NEXT" df:style="maintain" utml:validate="true">
- <df:target>
- <xsl:value-of select="concat($app, '/new_select_action.xts')"/>
- </df:target>
- </df:button>
- <df:button df:id="IDS_FINISH"/>
- </dp:footer>
- <!-- if the user tried to add a duplicate entry -->
- <script language="javascript">
- <xsl:variable name="indexUpdateItems" select="/root/indexUpdates/*[local-name()=key('env-param','include_or_exclude')]/*"/>
- <xsl:if test="/root/totalEntriesCount and (/root/totalEntriesCount != count($indexUpdateItems))">
- window.alert("<xts:string id="IDS_DUPLICATE_ENTRY" encode="javascript"/>");
- </xsl:if>
- </script>
- </utml:form>
- </dp:page>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
-
- <!--
- ===============================================================================================
- getContent - This block pre-populates the list of included content with Public Folders. This is the default entry to be shown before
- the user selets any content. This block should only run the first time we reach the "Select the content" page of the wizard.
- ===============================================================================================
- -->
- <xts:block id="getContent" processor="XSLT" type="exec" dependency="formlogic_init" condition=".[not(root/indexUpdates) and not(/root/env/param[@name='listop'] = 'delete') and not(/root/env/param[@name='controller_state'])]" mandatory="false">
- <xts:logicsheet path="logicsheets/contentadmin.xsl"/>
- <xts:logicsheet path="logicsheets/cm-logic.xsl"/>
- <xts:logicsheet path="logicsheets/buslogic.xslt"/>
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:cml="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/cml/1/"
- xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- xmlns:adm="http://developer.cognos.com/schemas/xts/logicsheets/contentadmin/"
- xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/"
- exclude-result-prefixes="xsl cml cm send adm">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:variable name="passport" select="/root/credential/param[@name='CAM']/*[local-name() ='CAM']/*[local-name() = 'CAMPassport']/*[local-name() = 'id']"/>
- <xsl:key name="env-param" match="/root/env/param" use="@name"/>
- <xsl:template match="/">
- <xts:sequence>
- <xts:append>
- <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>/content</cm:search>
- <cm:properties>
- <cm:property name="defaultName"/>
- <cm:property name="hidden"/>
- <cm:property name="searchPath"/>
- <cm:property name="searchPathForURL"/>
- <cm:property name="ancestors"/>
- </cm:properties>
- <cm:options schemaInfo="true"/>
- </cm:query>
- </xts:transform>
- </send:request>
- </xts:transform>
- </xts:append>
-
- <xts:append>
- <indexUpdates>
- <include>
- <xts:queryNode select="/root/*[local-name()='queryResponse']/*"/>
- </include>
- </indexUpdates>
- </xts:append>
-
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
-
- <!--
- =============================================
- Output debug dump
- =============================================
- -->
- <xts:block id="debug" type="exec" mode="output" processor="XSLT" condition=".[/root/env/param[@name='d'] = '1' or /root/session/param[@name='debug'] = '1']" mandatory="false" mimeType="text/html" dependency="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>
|