123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- Licensed Materials - Property of IBM
- IBM Cognos Products: ps
- (C) Copyright IBM Corp. 2005, 2016
- 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" resolverBase="prompting" includeConfig="true" requiredCapability="canUseScheduling">
- <!--
- ===============================================================================================
- formlogic_init
- ===============================================================================================
- -->
- <xts:block id="formlogic_init" type="exec" mode="interpret" processor="XSLT" path="/logicsheets/formlogic_init.xslt" nodelist="env,credential,system,http"/>
- <!--
- ===============================================================================================
- checkParam - change m_name, m_class, m_obj when dealing with shortcut.
- ===============================================================================================
- -->
- <xts:block id="checkParam" path="/portal/ref2target.xml" dependency="formlogic_init" type="exec" mode="interpret" processor="XSLT" condition=".[/root/env/param[starts-with(@name,'sc_target')]!='']" mandatory="false"/>
-
- <!--
- ===============================================================================================
- getContent - get our data from Content Manager
- ===============================================================================================
- -->
- <xts:block id="getContent" processor="XSLT" type="exec" dependency="formlogic_init checkParam">
- <xts:logicsheet path="portal/schedule/logicsheets/request.xslt"/>
- <xts:logicsheet path="logicsheets/cm-logic.xsl"/>
- <xts:logicsheet path="portal/schedule/logicsheets/common.xslt"/>
- <xts:logicsheet path="logicsheets/buslogic.xslt"/>
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- xmlns:rdr="http://developer.cognos.com/schemas/xts/rdr/"
- xmlns:cls="http://developer.cognos.com/schemas/xts/cls/"
- exclude-result-prefixes="xsl xtsext rdr cls">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:key name="env-param" match="/root/env/param" use="@name"/>
- <xsl:template match="/">
- <xts:sequence>
- <rdr:Requests>
- <rdr:Request type="runnable" mode="cmm">
- <rdr:searchPath>
- <xsl:value-of select="key('env-param', 'm_obj')"/>
- </rdr:searchPath>
- </rdr:Request>
- <rdr:Request type="credential"/>
- <xsl:if test="not(key('env-param', 'visited_schedule_properties'))">
- <rdr:Request type="schedule">
- <rdr:searchPath>
- <xsl:value-of select="key('env-param', 'm_obj')"/>
- <xsl:text>/schedule[permission("read")]</xsl:text>
- </rdr:searchPath>
- </rdr:Request>
- </xsl:if>
- </rdr:Requests>
- <!-- if we have a schedule credential blob, then unpack it -->
- <cls:unpackCredentials/>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ===============================================================================================
- generateDefaults
- Produce default form fields under /root/env
- ===============================================================================================
- -->
- <xts:block id="generateDefaults" processor="XSLT" type="exec" dependency="getContent">
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:variable name="the-schedule" select="/root/cm:queryResponse/cm:queryReply[3]/cm:schedule"/>
- <xsl:template match="/">
- <xts:sequence>
- <xts:append select="/root/env">
- <xsl:if test="not(/root/env/param[@name='visited_schedule_properties'])">
- <xts:transform src="/portal/schedule/transforms/generateDefaultParams.xslt" processor="XSLT">
- <root>
- <xsl:copy-of select="/root/user"/>
- <xsl:copy-of select="/root/env"/>
- <xsl:copy-of select="$the-schedule"/>
- </root>
- </xts:transform>
- </xsl:if>
- </xts:append>
- <xts:append select="/root/env">
- <xts:transform src="/portal/schedule/transforms/generateMissingParams.xslt" processor="XSLT">
- <xts:param name="logicsheet">/logicsheets/portal.xsl</xts:param>
- <root>
- <xsl:copy-of select="/root/user"/>
- <xsl:copy-of select="/root/session"/>
- <xts:queryNode select="/root/env"/>
- </root>
- </xts:transform>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
-
- <!--
- ===============================================================================================
- queryCredentialInfo:
- Query CM for the necessary user information (default names required for UI)
- ===============================================================================================
- -->
- <xts:block id="queryCredentialInfo"
- nodelist="env,header,session,http,queryResponse,scheduleCredentials,credential,cookies"
- path="/portal/schedule/logicsheets/query-credential-info.xslt"
- processor="XSLT"
- type="exec"
- dependency="getContent">
- <xts:logicsheet path="logicsheets/buslogic.xslt"/>
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- </xts:block>
-
- <!--
- ===============================================================================================
- Render the HTML page
- ===============================================================================================
- -->
- <xts:block id="renderPage" type="exec" mode="output" dependency="getContent generateDefaults queryCredentialInfo" processor="XSLT" mimeType="text/html"
- xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
- xmlns:cml="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/cml/1/"
- xmlns:ut="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/ui-templates/"
- xmlns:df="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/framework/"
- 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:dc="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/confirm/1/"
- xmlns:dt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/templates/"
- xmlns:mt="http://developer.cognos.com/schemas/xts/logicsheets/presentation/main/mt"
- xmlns:utml="http://developer.cognos.com/schemas/xts/logicsheet/xslt/formlogic/"
- xmlns:rui="http://developer.cognos.com/schemas/xts/logicsheet/xslt/presentation/dialog/recurrenceUI/">
- <!-- logicsheets -->
- <xts:logicsheet path="logicsheets/presentation/dialog/recurrenceUI.xslt"/>
- <!-- portal specific information -->
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- <xts:logicsheet path="logicsheets/cm-logic.xsl"/>
- <!-- Dialog specific logicsheets -->
- <xts:logicsheet path="logicsheets/presentation/dialog/ui-templates.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/dialog/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/main/presentation.xsl"/>
- <xts:logicsheet path="portal/schedule/logicsheets/scheduleVars.xsl"/>
-
- <!-- Generic logicsheets -->
- <xts:logicsheet path="logicsheets/presentation/controls/framework.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/controls/presentation.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/dialog/confirm.xslt"/>
- <!-- apply the form logic -->
- <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:bus="http://developer.cognos.com/schemas/bibus/3/"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
- xmlns:xIE5="http://developer.cognos.com/prompting/xIE5"
- exclude-result-prefixes="pf cml ut df lyt dp cf cp dc utml xts bus xtsext cm xIE5">
- <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no" omit-xml-declaration="yes"/>
- <!-- current file name -->
- <xsl:variable name="mname" select="'schedule/metricsExportTask.xts'"/>
- <xsl:variable name="the-object" select="/root/cm:queryResponse/cm:queryReply[1]/*"/>
- <xsl:variable name="the-credential" select="/root/cm:queryResponse/cm:queryReply[2]/cm:credential"/>
- <xsl:variable name="the-schedule" select="/root/cm:queryResponse/cm:queryReply[3]/cm:schedule"/>
- <xsl:variable name="savedTriggerType" select="'schedule'"/>
- <!-- add any theme variables -->
- <pf:variables/>
- <rui:variables/>
- <xsl:key name="options-item" match="/root/cm:queryResponse/cm:queryReply[1]/*/*[local-name()='options']/*[local-name()='value']/*[local-name()='item']" use="./*[local-name()='name']"/>
- <!-- include prompt control stylesheet and variables -->
- <rui:promptControls form="pform"/>
-
- <xsl:template match="/">
- <xsl:variable name="browserTitle">
- <xts:string id="IDS_PROP_SCHEDULE_TITLE">
- <xts:param name="objectName">
- <span lang="{$contentLocale}"><xsl:value-of select="$the-object/cm:defaultName"/></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/>
- </dp:meta>
- <!-- get the JavaScript needed for the prompt controls -->
- <rui:promptControlsScript/>
-
- <dp:script>
- <pf:help context="HID_SCHEDULE"/>
- <!-- Help system -->
- <dc:confirm-cancel/>
- <script language="javascript">
- <!-- some behavior for when the page loads -->
- function init()
- {
- <!-- m can get clobbered when going to secondary dialogs, so make sure it has the right value -->
- document.pform.m.value = "<xsl:value-of select="xtsext:javascriptencode(string(key('env-param', 'm')))"/>";
- }
-
- function onClickOK()
- {
- var frm = document.pform;
-
- if (validateSchedule())
- {
- frm.ps_nav_op.value = 'submit';
- frm.m.value = 'portal/submit.xts';
- frm.submit();
- }
- }
- </script>
- </dp:script>
-
- <utml:form name="pform" method="post" action="{$gateway}">
- <!-- Since the date control input variables are not utml input, they would be put into Hidden inputs whenever the page is refreshed and cause
- duplicate. So we exclude them from query values. -->
- <utml:exclusion-list>
- <xsl:value-of select="' txtDatedateTo txtDatedateFrom tempPath p_sched_date1 p_sched_date2 p_sched_time1 p_sched_time2 p_intradayRecurrenceStart p_intradayRecurrenceEnd hourstimeTo hourstimeFrom minutestimeTo minutestimeFrom secondstimeFrom secondstimeTo AMPMtimeTo AMPMtimeFrom visited_schedule_properties dateTotxtDate dateFromtxtDate'"/>
- </utml:exclusion-list>
- <utml:read-only>
- <xsl:choose>
- <xsl:when test="contains($the-object/cm:permissions, 'write') and contains($the-object/cm:permissions, 'execute')">
- <xsl:text>false</xsl:text>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text>true</xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- </utml:read-only>
-
- <!-- header -->
- <dp:header>
- <dp:title showName="false">
- <xsl:copy-of select="$browserTitle"/>
- </dp:title>
- <dp:description headerBorder="true">
- <xts:string id="IDS_PROP_SCHED_INTRO2"/>
- </dp:description>
- </dp:header>
-
- <utml:input type="hidden" name="m_timeZoneID">
- <xsl:attribute name="value">
- <xsl:value-of select="/root/cm:queryResponse/cm:queryReply/cm:schedule/cm:timeZoneID"/>
- </xsl:attribute>
- </utml:input>
-
- <utml:input type="hidden" name="ps_nav_op" value="" utml:update="false"/>
- <utml:input type="hidden" name="m_scheduleCredentials">
- <xsl:attribute name="value"><xsl:value-of select="key('env-param','m_scheduleCredentials')"/></xsl:attribute>
- </utml:input>
- <xsl:choose>
- <xsl:when test="$form-read-only='true' and not($the-schedule)">
- <mt:objectNoneFound id="IDS_PROP_SCHED_READ_ONLY_NO_SCHED"/>
- </xsl:when>
- <xsl:otherwise>
- <!-- add this hidden input, its existence allows us to infer that this morphlet has been previously visited -->
- <input name="visited_schedule_properties" type="hidden" value="true"/>
- <utml:input type="hidden" name="ifrmcmd" value="save" utml:update="false"/>
-
- <!-- save the schedule with the user's credentials if the user has chosen to reset them or with a new schedule -->
- <xsl:if test="key('env-param','m_schedule_owner_reset')='true'">
- <xsl:choose>
- <xsl:when test="$userCredentialsExist='true'">
- <utml:input type="hidden" name="m_sp_credential" utml:update="false">
- <utml:value><xsl:value-of select="$userCredentialSearchPathProperty"/></utml:value>
- </utml:input>
- </xsl:when>
- <xsl:otherwise>
- <input type="hidden" name="h_CAM_action" value=""/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:if>
- <!-- Recurrence -->
- <rui:recurrenceUI formName="pform"/>
- </xsl:otherwise>
- </xsl:choose>
- <ut:metricsOtherOptionsSummaryUI class="metricsExportTask"/>
- <rui:footer/>
- </utml:form>
- </dp:page>
- </xsl:template>
- <cp:tabControl/>
- </xsl:stylesheet>
- </xts:block>
- <!-- Debug -->
- <!-- ============================================================================= -->
- <xts:block id="debug" dependency="renderPage" condition=".[ /root/session/param[@name='debug'] = '1' ]" type="exec" mode="output" processor="XSLT" mimeType="text/html">
- <xts:logicsheet path="logicsheets/debuglogic.xslt"/>
- <!-- debug logic sheet -->
- <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>
|