123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968 |
- <?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" includeConfig="true">
- <!--
- ===============================================================================================
- 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"/>
-
- <!-- Load object-specific property tabs map ============================================================== -->
- <xts:block id="getTabs1" type="exec" mode="interpret" processor="XML" path="/portal/uiobjects_tabs.xml" condition=".[not(/root/env/param[@name='setPrompts']='true')]" mandatory="false"/>
- <!-- Load object-specific property tabs map ============================================================== -->
- <xts:block id="getTabs" type="exec" mode="interpret" processor="XML" condition=".[/root/env/param[@name='setPrompts']='true']" mandatory="false">
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
- <xsl:template match="/">
- <xts:sequence>
- <xts:append>
- <tabs>
- <object class="powerPlay8Report">
- <tab name="run_options" page="properties_powerplay_8_run_options.xts"><xts:string id="IDS_PROP_TAB_POWERPLAY8_REPORT"/></tab>
- </object>
- </tabs>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
-
- </xts:block>
- <!--
- ===============================================================================================
- restore_state - have been called from powerPlayService so we have to restore the state and extract the new prompt parameters
- ===============================================================================================
- -->
- <xts:block id="restore_state" processor="XSLT" dependency="formlogic_init" type="exec" condition=".[ /root/env/param[@name='opaque'] or /root/env/param[@name='ccstate']]" mandatory="false">
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
- exclude-result-prefixes="xsl pf xtsext xsi SOAP-ENC">
- <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>
- <!-- get the parameters returned from powerPlayService and append to root -->
- <xsl:if test="key('env-param','m_parameter')!=''">
- <xts:append select="/root">
- <parameters>
- <xts:transform src="transforms/portal/parameters/post-WARP-process.xslt" processor="XSLT">
- <xts:transform name="XMLDecode">
- <xsl:value-of select="string(key('env-param','m_parameter'))"/>
- </xts:transform>
- </xts:transform>
- </parameters>
- <view>properties</view>
- </xts:append>
- </xsl:if>
-
- <!-- save the value of this environment variable while we restore the <env> node -->
- <xsl:variable name="saved_parameters" select="key('env-param','m_parameter')"/>
-
- <!-- restore the saved state -->
- <xts:replace select="/root/env">
- <env>
- <xts:transform name="XMLDecode">
- <xsl:choose>
- <!-- ccstate is returned from powerPlay when the user presses Cancel so unpack the state that is returned from ccstate -->
- <xsl:when test="/root/env/param[@name='ccstate']">
- <xsl:value-of select="xtsext:web64decode(string(xtsext:cafaction('sign_unwrap', string( key('env-param','ccstate')))), true())"/>
- </xsl:when>
- <!-- opaque is returned from powerPlay when the user presses OK. -->
- <xsl:otherwise>
- <xsl:value-of select="xtsext:web64decode(string(xtsext:cafaction('sign_unwrap', string( key('env-param','opaque')))), true())"/>
- </xsl:otherwise>
- </xsl:choose>
- </xts:transform>
- </env>
- </xts:replace>
-
- <!-- restore the environment variable that was saved prior to restoring the <env> node -->
- <xts:delete select="/root/env/param[@name='m_parameter']"/>
- <xts:append select="/root/env">
- <param name="m_parameter">
- <xsl:value-of select="$saved_parameters"/>
- </param>
- </xts:append>
-
- <!-- clear some environment parameters from the restored state -->
- <xts:delete select="/root/env/param[@name='controller_state']"/>
- <xts:delete select="/root/env/param[@name='parameterDescription']"/> <!-- force generation of new parameter description -->
- <xts:delete select="/root/env/param[@name='cleared_prompts']"/>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ===============================================================================================
- save_state - saves the current state to be passed to the powerPlayService
- ===============================================================================================
- -->
- <xts:block id="save_state" processor="XSLT" dependency="restore_state" type="exec" condition=".[starts-with(/root/env/param[@name='controller_state'],'prompt')]" mandatory="false">
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- 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" 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>
- <!-- remove any existing saved state-->
- <xts:delete select="/root/env/param[@name='savedEnv']"/>
- <!-- encode the current state and append to the environment in savedEnv -->
- <xts:append select="/root/env">
- <xsl:variable name="markup">
- <xsl:call-template name="serialize-xml">
- <xsl:with-param name="node-set" select="/root/env/param[@name != 'savedEnv']"/>
- </xsl:call-template>
- </xsl:variable>
- <param name="savedEnv">
- <xsl:value-of select="xtsext:cafaction( concat('sign_wrap_setpassportid_', $passport), xtsext:web64encode(string($markup), true()))"/>
- </param>
- </xts:append>
- <!-- web64encode the parameters retrieved from getContent block. This only occurs the first time Edit or Set are pressed-->
- <xsl:if test="not(/root/env/param[@name='m_rp_parameters']) or /root/env/param[@name='m_rp_parameters']=''">
- <xsl:variable name="markup">
- <xsl:call-template name="serialize-xml">
- <xsl:with-param name="node-set" select="/root/*[local-name()='parameters']"/>
- </xsl:call-template>
- </xsl:variable>
- <xsl:if test="$markup!=''">
- <xts:delete select="/root/env/param[@name='m_rp_parameters']"/>
- <xts:append select="/root/env">
- <param name="m_rp_parameters">
- <xsl:value-of select="xtsext:web64encode(string($markup),true())"/>
- </param>
- </xts:append>
- </xsl:if>
- </xsl:if>
- </xts:sequence>
- </xsl:template>
- <pf:serialize-xml/>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ===============================================================================================
- callPowerPlayService - Calls the powerPlayService to deal with prompts by creating a blank redirect page and submitting
- ===============================================================================================
- -->
- <xts:block id="callPowerPlayService" dependency="save_state" mode="output" processor="XSLT" type="exec" condition=".[starts-with(/root/env/param[@name='controller_state'],'prompt')]" mimeType="text/html" mandatory="false">
- <!-- portal specific information -->
- <xts:logicsheet path="logicsheets/portal.xsl"/>
-
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:xts="http://developer.cognos.com/schemas/xts/"
- xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- exclude-result-prefixes="xsl xts pf xtsext">
- <pf:variables/>
- <xsl:key name="env-param" match="/root/env/param" use="@name"/>
- <xsl:template match="/">
- <!-- call powerPlayServce via POST to get the prompt information -->
- <html>
- <body>
- <form name="pform" method="post" action="{$gateway}">
- <input type="hidden" name="ui.backURL" value="{$gateway}?b_action=xts.run&m={$app}/properties_powerplay_8_run_options.xts&ccstate={/root/env/param[@name='savedEnv']}"/>
- <input type="hidden" name="PP_BACK" value="{$gateway}?b_action=xts.run&m={$app}/properties_powerplay_8_run_options.xts&ccstate={/root/env/param[@name='savedEnv']}"/>
- <input type="hidden" name="b_action" value="powerPlayService"/>
- <input type="hidden" name="ui.action" value="setPowerPlay8Prompt"/>
- <input type="hidden" name="m" value="{$app}/properties_powerplay_8_run_options.xts"/>
- <input type="hidden" name="crnobj" value="{key('env-param','m_obj')}"/>
- <input type="hidden" name="ui.crnfrm" value="PDF"/>
- <input type="hidden" name="opaque" value="{key('env-param','savedEnv')}"/>
- <input type="hidden" name="store_ID" value="{key('env-param','m_storeID')}"/>
-
- <!-- add the existing parameters if the edit (and not the set) link was pressed -->
- <xsl:if test="key('env-param','controller_state')='prompt_edit' and key('env-param','m_rp_parameters')!=''">
- <input type="hidden" name="m_parameter" value="{key('env-param','m_parameter')}"/>
- </xsl:if>
- </form>
-
- <!-- submit form -->
- <script type="text/javascript">
- document.pform.submit();
- </script>
- </body>
- </html>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
-
- <!--
- ===============================================================================================
- getObjects - get object class names
- ===============================================================================================
- -->
- <xts:block id="classNames" type="exec" mode="input" processor="XML" condition=".[ not(/root/env/param[@name='controller_state'])]" mandatory="false" path="/portal/uiExtensions.xml">
- <xts:logicsheet path="/logicsheets/uiobjects/uiobjects_names.xslt"/>
- </xts:block>
- <!--
- ===============================================================================================
- getContent - get our data from Content Manager
- ===============================================================================================
- -->
- <xts:block id="getContent" processor="XSLT" type="exec" condition=".[ not(/root/env/param[@name='controller_state']) or /root/env/param[@name='controller_state']='' ]" mandatory="false" dependency="formlogic_init restore_state">
- <xts:logicsheet path="logicsheets/presentation/dialog/templates.xsl"/>
- <xts:logicsheet path="logicsheets/cm-logic.xsl"/>
- <xts:logicsheet path="logicsheets/buslogic.xslt"/>
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:cml="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/cml/1/"
- xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
- xmlns:dt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/templates/"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/" exclude-result-prefixes="xsl cml dt xtsext pf send">
- <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>
- <!-- web64encode the contents of m_parameter returned from powerPlay and save as environment variable m_rp_parameters which
- is where various morphlets such as save.xts, and view_prompts.xts expect to find them -->
- <xsl:variable name="markup">
- <xsl:call-template name="serialize-xml">
- <xsl:with-param name="node-set" select="/root/*[local-name()='parameters']"/>
- </xsl:call-template>
- </xsl:variable>
- <xsl:if test="$markup!=''">
- <xts:delete select="/root/env/param[@name='m_rp_parameters']"/>
- <xts:append select="/root/env">
- <param name="m_rp_parameters">
- <xsl:value-of select="xtsext:web64encode(string($markup),true())"/>
- </param>
- </xts:append>
- </xsl:if>
- <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 xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
- <cm:search>
- <xsl:value-of select="/root/env/param[@name='m_obj']"/>
- </cm:search>
- <cm:properties>
- <cm:property name="defaultName"/>
- <cm:property name="storeID"/>
- <cm:property name="permissions"/>
- <cm:property name="options"/>
- <cm:property name="parameters"/>
- <cm:property name="defaultPortalAction"/>
- </cm:properties>
- <cm:options schemaInfo="false" maxObjects="1"/>
- </cm:query>
- </xts:transform>
- </send:request>
- </xts:transform>
- <view>properties</view>
- </xts:append>
- <xsl:if test="not(/root/parameters)">
- <dt:splitParameters queryNode="/root/*[local-name()='queryResponse']"/>
- </xsl:if>
- </xts:sequence>
- </xsl:template>
- <pf:serialize-xml/>
- </xsl:stylesheet>
- </xts:block>
-
- <!--
- ===============================================================================================
- generateParameterDescription
- ===============================================================================================
- -->
- <xts:block id="generateParameterDescription"
- nodelist="env,credentialParameters,parameters,dataSources"
- path="/portal/iPrompting/logicsheets/gen-prompt-description.xslt"
- processor="XSLT"
- type="exec"
- dependency="getContent"
- condition=".[/root/view='properties' and not(/root/env/param[@name='parameterDescription'] and /root/env/param[@name='controller_state']) or /root/env/param[@name='m_rp_parameters']!='']"
- mandatory="false">
- <xts:logicsheet path="logicsheets/presentation/dialog/templates.xsl"/>
- </xts:block>
- <!--
- ===============================================================================================
- Produce default runOption under /root/env
- ===============================================================================================
- -->
- <xts:block id="generateDefaultRunOptions"
- processor="XSLT" type="exec"
- dependency="getContent formlogic_init"
- condition=".[not(/root/env/param[@name = 'visited_run_options_property']) and (not(/root/env/param[@name='controller_state']) or /root/env/param[@name='controller_state']='' )]"
- mandatory="false">
- <xts:logicsheet path="logicsheets/cm-logic.xsl"/>
- <xts:logicsheet path="logicsheets/buslogic.xslt"/>
- <xts:logicsheet path="logicsheets/presentation/dialog/templates.xsl"/>
- <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:dt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/templates/"
- xmlns:xts="http://developer.cognos.com/schemas/xts/"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/" exclude-result-prefixes="cml dt xts xtsext cm">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
-
- <xsl:template match="/">
- <xts:sequence>
- <xts:append select="/root/env">
- <xts:transform src="transforms/portal/options/generateParams.xslt" processor="XSLT">
- <xts:param name="messageBase">/messages/portal.xml</xts:param>
- <root>
- <xts:transform src="transforms/portal/options/mergeReportOptions.xslt" processor="XSLT">
- <root>
- <xts:queryNode select="/root/*[local-name()='queryResponse']/*"/>
- </root>
- </xts:transform>
- <deliverySection>false</deliverySection>
- <defaultOptions>true</defaultOptions>
- <preferences>
- <xsl:copy-of select="/root/header/*[local-name() = 'biBusHeader']/*[local-name() = 'userPreferenceVars']/*"/>
- </preferences>
- <system>
- <param name="reportFormats">
- <xsl:copy-of select="/root/system/param[@name='reportFormats']/*"/>
- </param>
- </system>
- <basicOptions>true</basicOptions>
- </root>
- </xts:transform>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
-
-
- <xts:block id="renderPage2" mode="output" processor="XSLT" type="exec" mimeType="text/html" condition=".[ ((not(/root/env/param[@name='controller_state']) or /root/env/param[@name='controller_state']='') and (/root/env/param[@name='setPrompts']='true')) ]" mandatory="false" dependency="generateDefaultRunOptions getTabs classNames">
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/dialog/ui-templates.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/presentation/dialog/confirm.xslt"/>
- <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:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- xmlns:xts="http://developer.cognos.com/schemas/xts/"
- 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:ut="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/ui-templates/"
- xmlns:dc="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/confirm/1/"
- 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:utml="http://developer.cognos.com/schemas/xts/logicsheet/xslt/formlogic/"
- xmlns:thm="http://developer.cognos.com/schemas/xts/logicsheets/xslt/theme/"
- exclude-result-prefixes="xsl cf cp df dp dc lyt cm thm utml xtsext ut">
-
- <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no" omit-xml-declaration="yes"/>
- <!-- current file name -->
- <xsl:variable name="mname" select="'properties_powerplay_8_run_options.xts'"/>
- <xsl:variable name="the-object" select="/root/cm:queryResponse/*"/>
- <xsl:variable name="has_write_permission" select="contains(concat(' ', /root/cm:queryResponse/*[position()=1]/cm:permissions, ' '), ' write ')"/>
- <xsl:variable name="has_execute_permission" select="contains(concat(' ', /root/cm:queryResponse/*[position()=1]/cm:permissions, ' '), ' execute ')"/>
- <xsl:variable name="has_policy_permission" select="contains(concat(' ', /root/cm:queryResponse/*[position()=1]//cm:permissions, ' '), ' setPolicy ')"/>
- <xsl:variable name="showOKCancel" select="$has_write_permission or $has_policy_permission"/>
-
- <xsl:variable name="pp_option" select="/root/*[local-name()='queryResponse']/*[contains(local-name(),'powerPlay8Report')]/*[local-name()='options']"/>
- <xsl:variable name="reportOptionsExists">
- <xsl:choose>
- <xsl:when test="string(key('env-param','override_default_reportOptions')) = 'true'">true</xsl:when>
- <xsl:when test="key('env-param','changed_override_default_reportOptions')">false</xsl:when>
- <xsl:when test="string(/root/cm:queryResponse/*/cm:executionLocale) != '' or string(/root/cm:queryResponse/*/cm:executionFormat) != ''">true</xsl:when>
- <xsl:otherwise>false</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <pf:variables/>
- <!-- start the output -->
- <xsl:template match="/root">
- <xsl:variable name="browserTitle">
- <xts:string id="IDS_PROPERTIES_TITLE">
- <xts:param name="objectName">
- <span lang="{$contentLocale}"><xsl:value-of select="xtsext:enforceBTD(key('env-param', 'm_name'), $baseTextDirection, $productLocale, boolean($isBidiEnabled='true'))"/></span>
- </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>
- <!-- get passed in parameters -->
- <dp:script>
- <pf:help context="HID_PP_RUN_OPTIONS"/> <!-- Help system -->
- <xsl:if test="$has_write_permission = true()">
- <script language="javascript">
- function init()
- {
- var frm = document.pform;
- frm.m.value = 'portal/properties_powerplay_8_run_options.xts';
- frm.method.value="";
- }
-
- </script>
- <dc:confirm-cancel/>
- </xsl:if>
- <script language="javascript">
- function togglePageState( item )
- {
- <!-- Change state based on the checkbox selected or dynamic sections expanded -->
- var val = getSessionValue(item);
- if (val != '0') {
- setStateValue(item,'0');
- }
- else
- {
- setStateValue(item,'1');
- }
- }
- </script>
-
- </dp:script>
- <utml:form name="pform" method="post" action="{$gateway}">
- <utml:input type="hidden" name="controller_state" value="" utml:update="false"/>
- <utml:input type="hidden" name="m_storeID">
- <xsl:attribute name="value">
- <xsl:value-of select="/root/cm:queryResponse/*[position()=1]/cm:storeID"/>
- </xsl:attribute>
- </utml:input>
- <utml:read-only>
- <xsl:choose>
- <xsl:when test="$has_write_permission = true()">
- <xsl:text>false</xsl:text>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text>true</xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- </utml:read-only>
- <!--
- add a hidden input for the 'ps_nav_op', doing this will define the default behavior when submitting
- this form, we don't want the operation set when tabing, so set it to empty here. ideally this would
- be done by the tabbing itself, but since it's done in the theme stuff (and can't use utml) we'll just do
- it here.
- -->
- <utml:input type="hidden" name="ps_nav_op" value="" utml:update="false"/>
- <!--
- this defines the form command operation to be performed when all the collected properties are submitted.
- -->
- <utml:input type="hidden" name="ifrmcmd" value="save" utml:update="false"/>
- <!-- dialog header -->
- <dp:header useBackURL="not($showOKCancel)">
- <!-- header titles-->
- <dp:title><xsl:copy-of select="$browserTitle"/></dp:title>
- </dp:header>
- <!-- property tabs -->
- <xsl:choose>
- <xsl:when test="/root/env/param[@name='setPrompts']='true'">
- <df:propertiesTabsTitan select="run_options">
- <df:hasSetPolicy><xsl:value-of select="$has_policy_permission"/></df:hasSetPolicy>
- </df:propertiesTabsTitan>
- </xsl:when>
- <xsl:otherwise>
- <df:propertiesTabs select="run_options">
- <df:hasSetPolicy><xsl:value-of select="$has_policy_permission"/></df:hasSetPolicy>
- </df:propertiesTabs>
- </xsl:otherwise>
- </xsl:choose>
-
- <!-- get the format saved in CM. -->
- <xsl:variable name="savedOutputFormat">
- <xsl:value-of select="$pp_option/*/*[name='outputFormat']/value"/>
- </xsl:variable>
- <!-- used by ut:propDefaultActionSection template -->
- <xsl:variable name="defaultAction">
- <xsl:choose>
- <xsl:when test="key('env-param', 'm_p_defaultPortalAction') and key('env-param', 'm_p_defaultPortalAction') != ''">
- <xsl:value-of select="key('env-param', 'm_p_defaultPortalAction')"/>
- </xsl:when>
- <xsl:when test="/root/cm:queryResponse/*[position()=1]/cm:defaultPortalAction != ''">
- <xsl:value-of select="/root/cm:queryResponse/*[position()=1]/cm:defaultPortalAction"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="'viewOutput'"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <!-- used by ut:propDefaultActionSection template -->
- <xsl:variable name="studioName">
- <xts:string id="IDS_TOOLS_REPORT"/>
- </xsl:variable>
- <lyt:layout style="1">
- <!-- PowerPlay Studio options-->
- <lyt:section>
-
- <!-- prompt -->
- <ut:prompt prefix="m_p" showCheckbox="false"/>
- </lyt:section>
-
- </lyt:layout>
- <xsl:if test="$has_write_permission or $has_policy_permission">
- <script language="javascript">
- <!-- The following script is executed on page load or when the page is refreshed to render the correct view of the dynamic region -->
- <!-- The states that can be set are:
- 0 - The Report options - override the default values checkbox is not checked.
- 1 - The Report options - override the default values checkbox has been checked from being unchecked.
- 3 - The Report options - override the default values checkbox is checked based on queried information.
- -->
- var hro = getSessionValue('hasRO');
- <!-- This portion of the script is executed on refresh -->
- if ( hro != null && hro != "" )
- {
- if ( hro == '0' )
- {
- if (document.pform['override_default_reportOptions']) {
- document.pform['override_default_reportOptions'].checked = false;
- }
- hideDynamicDiv('overrideOptionsDiv');
- showDynamicDiv('defaultOptions');
- }
- else
- {
- if (document.pform['override_default_reportOptions']) {
- document.pform['override_default_reportOptions'].checked = "checked";
- }
- showDynamicDiv('overrideOptionsDiv');
- hideDynamicDiv('defaultOptions');
- }
- }
- else
- {
- <!-- This portion of the script is executed on page load -->
- <xsl:choose>
- <xsl:when test="$reportOptionsExists = 'true'">
- if (document.pform['override_default_reportOptions']) {
- document.pform['override_default_reportOptions'].checked = "checked";
- }
- setStateValue('hasRO','3');
- showDynamicDiv('overrideOptionsDiv');
- hideDynamicDiv('defaultOptions');
- </xsl:when>
- <xsl:otherwise>
- if (document.pform['override_default_reportOptions']) {
- document.pform['override_default_reportOptions'].checked = false;
- }
- setStateValue('hasRO','0');
- hideDynamicDiv('overrideOptionsDiv');
- showDynamicDiv('defaultOptions');
- </xsl:otherwise>
- </xsl:choose>
- }
- </script>
- </xsl:if>
-
-
- <dp:footer>
- <xsl:choose>
- <xsl:when test="$showOKCancel">
- <df:button df:id="IDS_OK" utml:validate="true" df:style="submit" df:nav_op="stack-down"/>
- <xsl:choose>
- <xsl:when test="key('env-param', 'ps_nav_stack') and not(key('env-param', 'ps_nav_stack') = '') ">
- <df:button df:id="IDS_CANCEL" df:style="stack-down" onclick="{$dc-confirm-cancel}"/>
- </xsl:when>
- <xsl:otherwise>
- <df:button df:id="IDS_CANCEL" df:style="back-url" onclick="{$dc-confirm-cancel}"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:otherwise>
- <df:button df:id="IDS_CLOSE" df:style="back-url"/>
- </xsl:otherwise>
- </xsl:choose>
- </dp:footer>
- </utml:form>
- </dp:page>
- </xsl:template>
- <ut:promptTemplate_pp8Titan propertyDialog="true" showCheckbox="false" noParamTest="and not(/root/cm:queryResponse/*/cm:parameters/*)" mname="portal/properties_powerplay_8_run_options.xts"/>
- </xsl:stylesheet>
- </xts:block>
-
-
- <!--
- ===============================================================================================
- renderPage - render the page
- ===============================================================================================
- -->
- <xts:block id="renderPage" mode="output" processor="XSLT" type="exec" mimeType="text/html" condition=".[ ((not(/root/env/param[@name='controller_state']) or /root/env/param[@name='controller_state']='') and (not(/root/env/param[@name='setPrompts']='true'))) ]" mandatory="false" dependency="generateDefaultRunOptions getTabs classNames">
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/dialog/ui-templates.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/presentation/dialog/confirm.xslt"/>
- <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:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- xmlns:xts="http://developer.cognos.com/schemas/xts/"
- 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:ut="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/ui-templates/"
- xmlns:dc="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/confirm/1/"
- 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:utml="http://developer.cognos.com/schemas/xts/logicsheet/xslt/formlogic/"
- xmlns:thm="http://developer.cognos.com/schemas/xts/logicsheets/xslt/theme/"
- exclude-result-prefixes="xsl cf cp df dp dc lyt cm thm utml xtsext ut">
-
- <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no" omit-xml-declaration="yes"/>
- <!-- current file name -->
- <xsl:variable name="mname" select="'properties_powerplay_8_run_options.xts'"/>
- <xsl:variable name="the-object" select="/root/cm:queryResponse/*"/>
- <xsl:variable name="has_write_permission" select="contains(concat(' ', /root/cm:queryResponse/*[position()=1]/cm:permissions, ' '), ' write ')"/>
- <xsl:variable name="has_execute_permission" select="contains(concat(' ', /root/cm:queryResponse/*[position()=1]/cm:permissions, ' '), ' execute ')"/>
- <xsl:variable name="has_policy_permission" select="contains(concat(' ', /root/cm:queryResponse/*[position()=1]//cm:permissions, ' '), ' setPolicy ')"/>
- <xsl:variable name="showOKCancel" select="$has_write_permission or $has_policy_permission"/>
-
- <xsl:variable name="pp_option" select="/root/*[local-name()='queryResponse']/*[contains(local-name(),'powerPlay8Report')]/*[local-name()='options']"/>
- <xsl:variable name="reportOptionsExists">
- <xsl:choose>
- <xsl:when test="string(key('env-param','override_default_reportOptions')) = 'true'">true</xsl:when>
- <xsl:when test="key('env-param','changed_override_default_reportOptions')">false</xsl:when>
- <xsl:when test="string(/root/cm:queryResponse/*/cm:executionLocale) != '' or string(/root/cm:queryResponse/*/cm:executionFormat) != ''">true</xsl:when>
- <xsl:otherwise>false</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <pf:variables/>
- <!-- start the output -->
- <xsl:template match="/root">
- <xsl:variable name="browserTitle">
- <xts:string id="IDS_PROPERTIES_TITLE">
- <xts:param name="objectName">
- <span lang="{$contentLocale}"><xsl:value-of select="xtsext:enforceBTD(key('env-param', 'm_name'), $baseTextDirection, $productLocale, boolean($isBidiEnabled='true'))"/></span>
- </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>
- <!-- get passed in parameters -->
- <dp:script>
- <pf:help context="HID_PP_RUN_OPTIONS"/> <!-- Help system -->
- <xsl:if test="$has_write_permission = true()">
- <script language="javascript">
- function init()
- {
- var frm = document.pform;
- frm.m.value = 'portal/properties_powerplay_8_run_options.xts';
- frm.method.value="";
- }
-
- </script>
- <dc:confirm-cancel/>
- </xsl:if>
- <script language="javascript">
- function togglePageState( item )
- {
- <!-- Change state based on the checkbox selected or dynamic sections expanded -->
- var val = getSessionValue(item);
- if (val != '0') {
- setStateValue(item,'0');
- }
- else
- {
- setStateValue(item,'1');
- }
- }
- </script>
-
- </dp:script>
- <utml:form name="pform" method="post" action="{$gateway}">
- <utml:input type="hidden" name="controller_state" value="" utml:update="false"/>
- <utml:input type="hidden" name="m_storeID">
- <xsl:attribute name="value">
- <xsl:value-of select="/root/cm:queryResponse/*[position()=1]/cm:storeID"/>
- </xsl:attribute>
- </utml:input>
- <utml:read-only>
- <xsl:choose>
- <xsl:when test="$has_write_permission = true()">
- <xsl:text>false</xsl:text>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text>true</xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- </utml:read-only>
- <!--
- add a hidden input for the 'ps_nav_op', doing this will define the default behavior when submitting
- this form, we don't want the operation set when tabing, so set it to empty here. ideally this would
- be done by the tabbing itself, but since it's done in the theme stuff (and can't use utml) we'll just do
- it here.
- -->
- <utml:input type="hidden" name="ps_nav_op" value="" utml:update="false"/>
- <!--
- this defines the form command operation to be performed when all the collected properties are submitted.
- -->
- <utml:input type="hidden" name="ifrmcmd" value="save" utml:update="false"/>
- <!-- dialog header -->
- <dp:header useBackURL="not($showOKCancel)">
- <!-- header titles-->
- <dp:title><xsl:copy-of select="$browserTitle"/></dp:title>
- </dp:header>
- <!-- property tabs -->
- <df:propertiesTabs select="run_options">
- <df:hasSetPolicy><xsl:value-of select="$has_policy_permission"/></df:hasSetPolicy>
- </df:propertiesTabs>
- <!-- description tabs -->
- <dp:description>
- <xts:string id="IDS_PROP_RUN_INTRO"/>
- </dp:description>
-
- <!-- get the format saved in CM. -->
- <xsl:variable name="savedOutputFormat">
- <xsl:value-of select="$pp_option/*/*[name='outputFormat']/value"/>
- </xsl:variable>
- <!-- used by ut:propDefaultActionSection template -->
- <xsl:variable name="defaultAction">
- <xsl:choose>
- <xsl:when test="key('env-param', 'm_p_defaultPortalAction') and key('env-param', 'm_p_defaultPortalAction') != ''">
- <xsl:value-of select="key('env-param', 'm_p_defaultPortalAction')"/>
- </xsl:when>
- <xsl:when test="/root/cm:queryResponse/*[position()=1]/cm:defaultPortalAction != ''">
- <xsl:value-of select="/root/cm:queryResponse/*[position()=1]/cm:defaultPortalAction"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="'viewOutput'"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <!-- used by ut:propDefaultActionSection template -->
- <xsl:variable name="studioName">
- <xts:string id="IDS_TOOLS_REPORT"/>
- </xsl:variable>
- <lyt:layout style="1">
- <!-- default action section -->
- <lyt:section>
- <ut:propDefaultActionSection/>
- <!-- report options -->
- <dp:choice title="IDS_PROP_RUN_REPORT_OPTIONS" width="100%">
- <dp:section1>
- <utml:input type="checkbox" name="override_default_reportOptions" value="true" utml:track="true" onclick="toggledynamicDiv('overrideOptionsDiv');toggledynamicDiv('defaultOptions');togglePageState('hasRO');" id="ctrl_override_default_reportOptions" >
- </utml:input>
- </dp:section1>
- <dp:section2 for="ctrl_override_default_reportOptions">
- <xts:string id="IDS_STEP_RUN_OVERRIDE_DEFAULT_REPORT_OPTIONS"/>
- </dp:section2>
- <dp:section3 width="100%">
- <ut:defaultReportOptionsDiv deliverySection="false" objectClassXPath="$the-object/cm:objectClass"/>
-
- <!-- override options -->
- <cf:dynamicDiv name="overrideOptionsDiv" visible="true">
- <dp:box valign="top" width="100%">
- <dp:boxSection width="100%">
- <!-- format section -->
- <ut:formatSelectList/>
- <!-- language section -->
- <ut:localeSelectList/>
- </dp:boxSection>
- </dp:box>
- </cf:dynamicDiv>
- </dp:section3>
- </dp:choice>
- </lyt:section>
- <!-- deprecated property that needs to be set to blank-->
- <xsl:if test="$savedOutputFormat != ''">
- <utml:input name="m_pp8ro_outputFormat" utml:track="true" value=""/>
- </xsl:if>
- <!-- PowerPlay Studio options-->
- <lyt:section>
- <xsl:if test="key('env-param','m_class') = 'powerPlay8Report'">
- <xsl:variable name="design_checked">
- <xsl:choose>
- <xsl:when test="key('env-param', 'm_pp8ro_data') = 'previewWithNoData'">true</xsl:when>
- <xsl:when test="$pp_option/*/*[name='data']/value = 'previewWithNoData' and not(key('env-param','changed_m_pp8ro_data'))">true</xsl:when>
- <xsl:otherwise>false</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
-
- <dp:choice title="IDS_PROP_RUN_POWERPLAY_STUDIO_OPTION">
- <dp:section1>
- <utml:input type="checkbox" name="m_pp8ro_data" value="previewWithNoData" utml:track="true" utml:default-condition="$design_checked='true'" id="ctrl_m_pp8ro_data">
- </utml:input>
- </dp:section1>
- <dp:section2 for="ctrl_m_pp8ro_data">
- <xts:string id="IDS_PROP_RUN_OPEN_DESIGN"/>
- </dp:section2>
- </dp:choice>
- </xsl:if>
-
- <!-- prompt -->
- <ut:prompt prefix="m_p" showCheckbox="false"/>
- </lyt:section>
-
- </lyt:layout>
- <xsl:if test="$has_write_permission or $has_policy_permission">
- <script language="javascript">
- <!-- The following script is executed on page load or when the page is refreshed to render the correct view of the dynamic region -->
- <!-- The states that can be set are:
- 0 - The Report options - override the default values checkbox is not checked.
- 1 - The Report options - override the default values checkbox has been checked from being unchecked.
- 3 - The Report options - override the default values checkbox is checked based on queried information.
- -->
- var hro = getSessionValue('hasRO');
- <!-- This portion of the script is executed on refresh -->
- if ( hro != null && hro != "" )
- {
- if ( hro == '0' )
- {
- if (document.pform['override_default_reportOptions']) {
- document.pform['override_default_reportOptions'].checked = false;
- }
- hideDynamicDiv('overrideOptionsDiv');
- showDynamicDiv('defaultOptions');
- }
- else
- {
- if (document.pform['override_default_reportOptions']) {
- document.pform['override_default_reportOptions'].checked = "checked";
- }
- showDynamicDiv('overrideOptionsDiv');
- hideDynamicDiv('defaultOptions');
- }
- }
- else
- {
- <!-- This portion of the script is executed on page load -->
- <xsl:choose>
- <xsl:when test="$reportOptionsExists = 'true'">
- if (document.pform['override_default_reportOptions']) {
- document.pform['override_default_reportOptions'].checked = "checked";
- }
- setStateValue('hasRO','3');
- showDynamicDiv('overrideOptionsDiv');
- hideDynamicDiv('defaultOptions');
- </xsl:when>
- <xsl:otherwise>
- if (document.pform['override_default_reportOptions']) {
- document.pform['override_default_reportOptions'].checked = false;
- }
- setStateValue('hasRO','0');
- hideDynamicDiv('overrideOptionsDiv');
- showDynamicDiv('defaultOptions');
- </xsl:otherwise>
- </xsl:choose>
- }
- </script>
- </xsl:if>
-
-
- <dp:footer>
- <xsl:choose>
- <xsl:when test="$showOKCancel">
- <df:button df:id="IDS_OK" utml:validate="true" df:style="submit" df:nav_op="stack-down"/>
- <xsl:choose>
- <xsl:when test="key('env-param', 'ps_nav_stack') and not(key('env-param', 'ps_nav_stack') = '') ">
- <df:button df:id="IDS_CANCEL" df:style="stack-down" onclick="{$dc-confirm-cancel}"/>
- </xsl:when>
- <xsl:otherwise>
- <df:button df:id="IDS_CANCEL" df:style="back-url" onclick="{$dc-confirm-cancel}"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:otherwise>
- <df:button df:id="IDS_CLOSE" df:style="back-url"/>
- </xsl:otherwise>
- </xsl:choose>
- </dp:footer>
- </utml:form>
- </dp:page>
- </xsl:template>
- <ut:promptTemplate propertyDialog="true" showCheckbox="false" noParamTest="and not(/root/cm:queryResponse/*/cm:parameters/*)" mname="portal/properties_powerplay_8_run_options.xts"/>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ===============================================================================================
- debug - display debug information
- ===============================================================================================
- -->
- <xts:block id="debug" dependency="renderPage" condition=".[/root/session/param[@name='debug']='1']" type="exec" mode="output" processor="XSLT" mandatory="false" mimeType="text/html">
- <!-- 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>
|