123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- Licensed Materials - Property of IBM
- IBM Cognos Products: ps
- (C) Copyright IBM Corp. 2005, 2011
- 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" requiredCapability="canUseScheduling">
- <!-- form logic stuff ============================================================== -->
- <xts:block id="formlogic_init" type="exec" mode="interpret" processor="XSLT" path="/logicsheets/formlogic_init.xslt" nodelist="env,credential,system,http"/>
- <!--
- ===============================================================================================
- Load object actions map
- ===============================================================================================
- -->
- <xts:block id="getActions" type="exec" mode="input" processor="XML" path="/portal/uiExtensions.xml">
- <xts:logicsheet path="/logicsheets/uiobjects/uiobjects_actions.xslt"/>
- </xts:block>
- <!--
- ===============================================================================================
- doActions - Perform the cancel, release and suspend actions
- ===============================================================================================
- -->
- <xts:block id="doActions" processor="XSLT" type="exec" dependency="formlogic_init" mandatory="false" condition=".[/root/env/param[@name='action']!='']">
- <xts:logicsheet path="logicsheets/buslogic.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:es="http://developer.cognos.com/schemas/eventManagementService/1"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
- xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt">
- <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>
- <xts:append>
- <actionResponse>
- <send:request provider="eventManagementService">
- <xsl:choose>
- <xsl:when test="key('env-param','action')='cancel'">
- <es:cancelEvents>
- <xsl:call-template name="requestBody"/>
- </es:cancelEvents>
- </xsl:when>
- <xsl:when test="key('env-param','action')='schedule'">
- <es:scheduleEvents>
- <xsl:call-template name="requestBody"/>
- </es:scheduleEvents>
- </xsl:when>
- </xsl:choose>
- </send:request>
- </actionResponse>
- </xts:append>
- <xts:delete select="/root/env/param[@name='action' or starts-with(@name,'checkbox_')]"/>
- </xts:sequence>
- </xsl:template>
- <xsl:template name="requestBody">
- <eventIDs xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="xsd:string[{count(/root/env/param[starts-with(@name,'checkbox_')])}]">
- <xsl:for-each select="/root/env/param[starts-with(@name,'checkbox_')]">
- <item xsi:type="xsd:string"><xsl:value-of select="."/></item>
- </xsl:for-each>
- </eventIDs>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ===============================================================================================
- ckFilterChange:
- When the filter changes, the 'm_page' vpa variables must be deleted before recalculating maxObjects and skipObjects.
- ===============================================================================================
- -->
- <xts:block id="ckFilterChange" processor="XSLT" type="exec" dependency="doActions" mandatory="false" condition=".[/root/env/param[@name = 'm_vpaFilterChange'] and .[/root/env/param[@name = 'm_vpaFilterChange'] ='true']]">
- <xsl:stylesheet xmlns:adm="http://developer.cognos.com/schemas/xts/logicsheets/contentadmin/" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:cml="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/cml/1/" xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/" xmlns:bus="http://developer.cognos.com/schemas/bibus/3/" xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
- <xsl:key name="env-param" match="/root/env/param" use="@name"/>
- <xsl:template match="/">
- <xts:sequence>
- <xts:delete select="/root/env/param[@name='m_pagerfromvpa_pager' or @name='m_pagertovpa_pager' or @name='m_pagerfrom_dvpa_pager' or @name='m_pagerto_dvpa_pager' or @name='m_vpa_pagersection' or @name='m_pg_evpa_pager' or @name='m_vpaFilterChange']"/>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ===============================================================================================
- getContent
- ===============================================================================================
- -->
- <xts:block id="getContent" type="exec" mode="interpret" processor="XSLT" dependency="doActions ckFilterChange"
- xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/"
- xmlns:pf="http://developer.cognos.com/schemas/xts/pf">
- <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:cm="http://developer.cognos.com/schemas/xts-cm/1/"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt">
-
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <pf:variables/>
-
- <xsl:variable name="selectDate">
- <xsl:choose>
- <xsl:when test="key('env-param','p_selectDay')">
- <xsl:value-of select="key('env-param', 'p_selectDay')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="substring-before(xtsext:getCurrentDateTime(string($timeZone)), 'T')"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <!-- Beginning of the selected day.-->
- <xsl:variable name="from">
- <xsl:value-of select="xtsext:formatDateToUTC(string(concat($selectDate, 'T', '00:00:00')), string($timeZone))"/>
- </xsl:variable>
- <!-- End of the selected day.-->
- <xsl:variable name="to">
- <xsl:value-of select="xtsext:formatDateToUTC(string(concat($selectDate, 'T', '23:59:59')), string($timeZone))"/>
- </xsl:variable>
- <!-- TODO: Implement support for sorting -->
- <xsl:variable name="sort_order">
- <xsl:choose>
- <xsl:when test="key('env-param', 's_vpa') = 'rd'">descending</xsl:when>
- <xsl:otherwise>ascending</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="userPrefs" select="/root/session/param"/>
- <xsl:variable name="userPrefsDefault" select="/root/system/param[@name='defaultPortalPreferences']"/>
- <xsl:variable name="maxObjects">
- <xsl:choose>
- <xsl:when test="string(/root/env/param[@name = 'm_pagertovpa_pager']) !='' and string(/root/env/param[@name = 'm_pagerfromvpa_pager']) !=''"><xsl:value-of select="(/root/env/param[@name = 'm_pagertovpa_pager'] - /root/env/param[@name = 'm_pagerfromvpa_pager']) + 1"/></xsl:when>
- <xsl:when test="$userPrefs[@name='linesPerPage']!=''">
- <xsl:value-of select="$userPrefs[@name='linesPerPage']"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$userPrefsDefault/pref[@name='lines']"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="skipObjects">
- <xsl:choose>
- <xsl:when test="/root/env/param[@name = 'm_pagerfromvpa_pager'] and /root/env/param[@name = 'm_pagerfromvpa_pager']!=''">
- <xsl:value-of select="(/root/env/param[@name = 'm_pagerfromvpa_pager'])-1"/>
- </xsl:when>
- <xsl:when test="/root/env/param[@name='m_vpa_pagersection']!=''">
- <xsl:value-of select="((/root/env/param[@name='m_vpa_pagersection']) - 1)"/>
- </xsl:when>
- <xsl:otherwise>0</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:template match="/">
- <xts:sequence>
- <xts:append>
- <send:request provider="eventManagementService">
- <bus:queryEvents xmlns:bus="http://developer.cognos.com/schemas/bibus/3/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <options xsi:type="bus:queryEventsOptions">
- <startTime xsi:type="xsd:dateTime"><xsl:value-of select="$from"/></startTime>
- <endTime xsi:type="xsd:dateTime"><xsl:value-of select="$to"/></endTime>
- <order xsi:type="bus:orderEnum"><xsl:value-of select="$sort_order"/></order>
- <xsl:choose>
- <xsl:when test="not(key('env-param', 'queryEventsStatus')) or key('env-param', 'queryEventsStatus')='allStatuses'">
- <status xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="xsd:string[2]">
- <item xsi:type="xsd:string">cancelled</item>
- <item xsi:type="xsd:string">scheduled</item>
- </status>
- </xsl:when>
- <xsl:otherwise>
- <status xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="xsd:string[1]">
- <item xsi:type="xsd:string"><xsl:value-of select="key('env-param', 'queryEventsStatus')"/></item>
- </status>
- </xsl:otherwise>
- </xsl:choose>
- <refProps xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:eventRefProp[1]">
- <item xsi:type="bus:eventRefProp">
- <refPropName xsi:type="bus:eventRefPropEnum">runnable</refPropName>
- <properties xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:propEnum[5]">
- <item xsi:type="bus:propEnum">searchPath</item>
- <item xsi:type="bus:propEnum">ancestors</item>
- <item xsi:type="bus:propEnum">defaultName</item>
- <item xsi:type="bus:propEnum">defaultOutputFormat</item>
- <item xsi:type="bus:propEnum">objectClass</item>
- <item xsi:type="bus:propEnum">defaultScreenTip</item>
- <item xsi:type="bus:propEnum">base</item>
- </properties>
- </item>
- </refProps>
- <skipObjects xsi:type="xsd:int"><xsl:value-of select="$skipObjects"/></skipObjects>
- <maxObjects xsi:type="xsd:int"><xsl:value-of select="$maxObjects+1"/></maxObjects>
- </options>
- </bus:queryEvents>
- </send:request>
- </xts:append>
- <xts:delete select="/root/env/param[@name='pagerfromvpa_pager']"/>
- <xts:delete select="/root/env/param[@name='pagertovpa_pager']"/>
- <xts:delete select="/root/env/param[@name='pagerfrom_dvpa_pager']"/>
- <xts:delete select="/root/env/param[@name='pagerto_dvpa_pager']"/>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ===============================================================================================
- transformAncestor - This is needed since do-the-path-link expects the structure produced by our post-process. We only need
- to process the ancestor element, so simply copy the output of the transform into the DOM
- ===============================================================================================
- -->
- <xts:block id="transformAncestor" dependency="getContent" mode="interpret" processor="XSLT" type="exec">
- <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:pf="http://developer.cognos.com/schemas/xts/pf"
- xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/"
- xmlns:bus="http://developer.cognos.com/schemas/bibus/3/">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:key name="env-param" match="/root/env/param" use="@name"/>
- <pf:variables/>
- <xsl:template match="/">
- <xts:sequence>
- <xts:append>
- <ancestors>
- <xsl:for-each select="/root/bus:queryEventsResponse/*/item">
- <ancestor>
- <xsl:if test="runnable/item/ancestors">
- <xts:transform src="transforms/CM/post-process.xslt" processor="XSLT">
- <xsl:copy-of select="runnable/item/ancestors"/>
- </xts:transform>
- </xsl:if>
- </ancestor>
- </xsl:for-each>
- </ancestors>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ===============================================================================================
- format - Render the page. It's a dialog page with Close button.
- ===============================================================================================
- -->
- <xts:block id="format" mode="output" processor="XSLT" type="exec" dependency=" transformAncestor getActions " mimeType="text/html"
- xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
- 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:utml="http://developer.cognos.com/schemas/xts/logicsheet/xslt/formlogic/"
- xmlns:mt="http://developer.cognos.com/schemas/xts/logicsheets/presentation/main/mt"
- xmlns:mf="http://developer.cognos.com/schemas/xts/logicsheets/presentation/main/mf"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:cp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/presentation/">
- <!-- logicsheets -->
- <!-- portal specific information -->
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- <!-- Dialog specific logicsheets -->
- <xts:logicsheet path="logicsheets/presentation/main/framework.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/main/presentation.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/dialog/framework.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/layout.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/dialog/presentation.xsl"/>
- <!-- Generic logicsheets -->
- <xts:logicsheet path="logicsheets/presentation/controls/framework.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/controls/presentation.xsl"/>
- <!-- apply the form logic -->
- <xts:logicsheet path="logicsheets/formlogic_lite.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:cm="http://developer.cognos.com/schemas/xts-cm/1/"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- exclude-result-prefixes="bus xts xsl pf xtsext lyt dp df cf cp utml">
- <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no" omit-xml-declaration="yes"/>
- <!-- Global template variables -->
- <pf:variables/>
- <mf:variables stateParams="p_selectDay backURL"/>
- <xsl:variable name="mname" select="'view_events.xts'"/>
- <xsl:variable name="cmd-form" select="'cform'"/> <!-- Required -->
- <xsl:variable name="edit-form" select="'pform'"/>
-
- <xsl:variable name="promptLocale" select="$productLocale"/>
- <xsl:variable name="promptFormName" select="$edit-form"/>
- <xsl:variable name="promptBrowserMode">
- <xsl:choose>
- <xsl:when test="$browser = 'ie' ">IE5</xsl:when>
- <xsl:when test="$browser = 'moz' ">NS6</xsl:when>
- <xsl:when test="$browser = 'safari' ">safari</xsl:when>
- <xsl:otherwise>NS4</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="skin" select="key('user-param', 'skin')"/>
- <!-- Prompt Control XSL include -->
- <xsl:include href="p_include.xsl"/>
- <xsl:variable name="today">
- <xsl:value-of select="substring-before(xtsext:getCurrentDateTime(string($timeZone)), 'T')"/>
- </xsl:variable>
- <xsl:variable name="selectDate">
- <xsl:choose>
- <xsl:when test="key('env-param','p_selectDay')">
- <xsl:value-of select="key('env-param', 'p_selectDay')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$today"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:template match="/root">
- <xsl:variable name="browserTitle">
- <xts:string id="IDS_VPA_TITLE"/>
- </xsl:variable>
-
- <xsl:text disable-output-escaping='yes'><!DOCTYPE html></xsl:text><dp:page longTitle="$browserTitle">
- <mf:head/>
- <dp:meta>
- <pf:meta/>
- <!-- Standard meta tags -->
- </dp:meta>
- <dp:script>
- <pf:help context=""/>
- <!-- Help system -->
- <script language="javascript">
- function doApplyFilter()
- {
- var form = document.pform;
- <!-- reset the pager to the first page -->
- if(form.m_vpa_pagersection)
- {
- form.m_vpa_pagersection.value = '';
- }
- if(form.m_vpaFilterChange)
- form.m_vpaFilterChange.value = 'true';
- form.m.value = "<xsl:value-of select="$app"/>/<xsl:value-of select="$mname"/>";
- form.submit();
- }
- function doAction( action )
- {
- var frm = document.pform;
- var items = frm.elements.length;
- var selected = 'false';
- for (var i=0; i<items; i++)
- {
- if (frm.elements[i].name)
- {
- if (frm.elements[i].name.substring(0,9) == "checkbox_" && frm.elements[i].checked)
- {
- selected = 'true';
- }
- }
- }
-
- if (selected == 'false')
- {
- alert("<xts:string id="IDS_ERR_NO_SELECTION" encode="javascript"/>");
- return;
- }
-
-
- <!-- Perform the action -->
- frm.action.value = action;
- frm.m.value = "<xsl:value-of select="$app"/>/<xsl:value-of select="$mname"/>";
- frm.backURL.value = "<xsl:value-of select="xtsext:javascriptencode(string(key('env-param', 'backURL')))"/>";
- frm.submit();
- }
-
- </script>
- <script language="javascript">
- <xsl:attribute name="src">
- <xsl:value-of select="$webcontent"/>/<xsl:value-of select="$app"/>/js/list.js<xsl:text/>
- </xsl:attribute>
- </script>
- </dp:script>
- <!-- Get date control includes -->
- <xsl:call-template name="getPromptCommonIncludes">
- <xsl:with-param name="promptBrowserMode" select="$promptBrowserMode"/>
- </xsl:call-template>
- <xsl:call-template name="getselectDateTimeIncludes">
- <xsl:with-param name="promptLocale" select="$promptLocale"/>
- <xsl:with-param name="promptContentLocale" select="$contentLocale"/>
- <xsl:with-param name="promptBrowserMode" select="$promptBrowserMode"/>
- </xsl:call-template>
- <utml:form name="pform" method="post" action="{$gateway}">
- <utml:excludes>p_selectDay queryEventsStatus</utml:excludes>
- <utml:excludes>txtDatedateFrom</utml:excludes>
-
- <!-- To track filter change so we can delete 'm_pager' values -->
- <utml:input type="hidden" name="m_vpaFilterChange" utml:update="false">
- <utml:value>
- <xsl:value-of select="'false'"/>
- </utml:value>
- </utml:input>
-
- <utml:input type="hidden" name="action" value="" utml:update="false"/>
- <!-- dialog header -->
- <dp:header>
- <!-- header titles-->
- <dp:title showName="false">
- <xsl:value-of select="$browserTitle"/>
- </dp:title>
- <dp:description>
- <xts:string id="IDS_VPA_DESCRIPTION"/>
- </dp:description>
- </dp:header>
- <lyt:layout style="2" border="no">
- <lyt:section>
- <!-- Filter section -->
- <dp:input>
- <dp:section1>
- <dp:text>
- <xts:string id="IDS_VPA_FILTER_DAY"/>
- </dp:text>
- </dp:section1>
- <dp:section2>
- <dp:field width="200">
- <!-- Render a select date prompt-->
- <xsl:call-template name="getSelectDate">
- <xsl:with-param name="promptLocale" select="$promptLocale"/>
- <xsl:with-param name="promptTimeZone" select="$timeZone"/>
- <xsl:with-param name="promptFormName" select="$promptFormName"/>
- <xsl:with-param name="promptRequired" select="'false'"/>
- <xsl:with-param name="promptStartOfWeek" select="'Sunday'"/>
- <xsl:with-param name="promptCalendar" select="'Gregorian'"/>
- <xsl:with-param name="promptParameter" select="'selectDay'"/>
- <xsl:with-param name="promptSelectDateUI" select="'editBox'"/>
- <xsl:with-param name="promptInputOrder" select="'YMD'"/>
- <xsl:with-param name="promptFirstDate" select="$today"/>
- <xsl:with-param name="promptDefaultDate" select="$selectDate"/>
- <xsl:with-param name="promptDateTime" select="'false'"/>
- <xsl:with-param name="promptMultiSelect" select="'false'"/>
- <xsl:with-param name="promptId" select="'dateFrom'"/>
- <xsl:with-param name="promptBrowserMode" select="$promptBrowserMode"/>
- <xsl:with-param name="suppressDisabled" select="'true'"/>
- <xsl:with-param name="promptSelectUI" select="'editBox'"/> <xsl:with-param name="promptHideAdornments" select="'true'"/>
- </xsl:call-template>
- </dp:field>
- </dp:section2>
- </dp:input>
- </lyt:section>
- <lyt:section>
- <xsl:variable name="filterStatus" select="key('env-param', 'queryEventsStatus')"/>
- <dp:input>
- <!-- status filder -->
- <dp:section1>
- <dp:text>
- <xts:string id="IDS_FILTER_STATUS"/>
- </dp:text>
- </dp:section1>
- <dp:section2>
- <dp:field>
- <utml:select name="queryEventsStatus" size="1">
- <utml:option value="allStatuses">
- <xsl:if test="not($filterStatus) or ($filterStatus = 'allStatuses')">
- <xsl:attribute name="selected">selected</xsl:attribute>
- </xsl:if>
- <xts:string id="IDS_JOB_STATUS_ALL"/>
- </utml:option>
- <utml:option value="cancelled">
- <xsl:if test="$filterStatus = 'cancelled'">
- <xsl:attribute name="selected">selected</xsl:attribute>
- </xsl:if>
- <xts:string id="IDS_JOB_STATUS_CANCELLED"/>
- </utml:option>
- <utml:option value="scheduled">
- <xsl:if test="$filterStatus = 'scheduled'">
- <xsl:attribute name="selected">selected</xsl:attribute>
- </xsl:if>
- <xts:string id="IDS_JOB_STATUS_SCHEDULED"/>
- </utml:option>
- </utml:select>
- </dp:field>
- </dp:section2>
- </dp:input>
- </lyt:section>
- </lyt:layout>
- <lyt:layout style="1" border="no">
- <lyt:section align="center" width="100%">
- <dp:buttonGroup>
- <dp:button>
- <a href="javascript:doApplyFilter();">
- <dp:buttonText>
- <xsl:text/><xts:string id="IDS_APPLY"/> <xsl:text/>
- <img height="16" width="16" border="0" align="absMiddle">
- <xsl:attribute name="src"><xsl:value-of select="$image_root"/>move_down.gif</xsl:attribute>
- <xsl:attribute name="alt"><xts:string id="IDS_APPLY"/></xsl:attribute>
- </img>
- </dp:buttonText>
- </a>
- </dp:button>
- </dp:buttonGroup>
- </lyt:section>
- <!-- Results section -->
- <lyt:section>
- <utml:input type="hidden" name="s_vpa"/>
- <!-- noPosition attribute is required for proper pager functionality when it is a virtual page and request does not contain position property -->
- <cf:main-pager-section name="vpa_pager" form="pform" virtualPage="true" width="100%" noPosition="true" noEntriesMsgID="IDS_VPA_NO_RESULTS">
- <cf:param name="item-path">/root/bus:queryEventsResponse/*/item</cf:param>
- <cf:param name="target">concat(concat($app,'/'),$mname)</cf:param>
- <cf:param name="lines-per-page">
- <xsl:value-of select="key('session-param', 'linesPerPage')"/>
- </cf:param>
- <cf:param name="actions">
- <cp:action>
- <a href="#" onclick="javascript:doAction('cancel')"><xts:string id="IDS_CANCEL"/></a>
- </cp:action>
- <cp:action>
- <a href="#" onclick="javascript:doAction('schedule')"><xts:string id="IDS_ACT_SCHEDULE"/></a>
- </cp:action>
- </cf:param>
- <cf:param name="rows">
- <cp:tableHeader session-name="s_vpa" sort_track_type="page">
- <!-- Checkbox column -->
- <cp:columnHeader width="16" toggleName="checkbox_"/>
- <!-- Icon Column -->
- <cp:columnHeader width="20"/>
- <!-- Path-Name Column -->
- <cp:columnHeader width="200">
- <!-- All of this is to align the header (...> Name) with the contents of the table-->
- <img height="5" width="1" border="0" src="{$webcontent}/images/space.gif"/>
- <xsl:text/><xts:string id="IDS_PATH_INDICATOR"/><xsl:text> </xsl:text>
- <img height="5" width="1" border="0" src="{$webcontent}/images/space.gif"/>
- <xsl:text/><xts:string id="IDS_NAME"/><xsl:text/>
- </cp:columnHeader>
- <!-- Task Requested Column -->
- <cp:columnHeader width="200" sort="r">
- <cp:sortHref>
- <xsl:text>javascript:document.pform.s_vpa.value=</xsl:text>
- <xsl:choose>
- <xsl:when test="key('env-param', 's_vpa') = 'rd' ">"ra"</xsl:when>
- <xsl:otherwise>"rd"</xsl:otherwise>
- </xsl:choose>
- <xsl:text>;document.pform.submit();</xsl:text>
- </cp:sortHref>
- <xts:string id="IDS_HEADING_REQEXECTIME"/>
- </cp:columnHeader>
- <!-- Status Column -->
- <cp:columnHeader width="100%">
- <xts:string id="IDS_HEADING_STATUS"/>
- </cp:columnHeader>
- </cp:tableHeader>
- <cp:tableContent>
- <!-- a couple of useful variables to point to the runnable -->
- <xsl:variable name="runnable" select="runnable/item"/>
- <xsl:variable name="position" select="position()"/>
- <!-- Determine if the current path points to the personal folder space (We need a session element to make this determination) -->
- <xsl:variable name="path" select="$runnable/searchPath/value"/>
- <!-- For personal folder destinations, render the path starting at the directory/namespace/account/folder ancestor. -->
- <xsl:variable name="rootPath">
- <xsl:if test="starts-with($path, '~') or (/root/session/param[@name='e_hp'] and starts-with($path, /root/session/param[@name='e_hp']) )">
- <xsl:value-of select="concat(/root/session/param[@name='e_hp'], '/folder')"/>
- </xsl:if>
- </xsl:variable>
- <!-- Create tooltip using defaultName and defaultScreenTip. -->
- <xsl:variable name="toolTip">
- <xsl:choose>
- <xsl:when test="$runnable/defaultScreenTip/value=''">
- <xsl:value-of select="$runnable/defaultName/value"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="concat($runnable/defaultName/value,' - ',$runnable/defaultScreenTip/value )"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <!-- checkbox column -->
- <cp:columnContent position="start">
- <input type="checkbox" value="{xtsext:urlencode(string(*[local-name()='eventID']))}" name="checkbox_{position()}"/>
- </cp:columnContent>
- <!-- Icon Column -->
- <cp:columnContent>
- <xsl:variable name="baseClass">
- <xsl:choose>
- <xsl:when test="contains(string($runnable/base/value/item/@xsi:type),':')">
- <xsl:value-of select="substring-after($runnable/base/value/item/@xsi:type, ':')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="string($runnable/base/value/item/@xsi:type)"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:call-template name="gen-icon">
- <xsl:with-param name="showAction" select="false()"/>
- <xsl:with-param name="class" select="$runnable/objectClass/value"/>
- <xsl:with-param name="isDangling" select="not($runnable/base/*) and ($runnable/base)"/>
- <xsl:with-param name="tooltipOverride" select="$toolTip"/>
- <xsl:with-param name="baseClass" select="$baseClass"/>
- </xsl:call-template>
- </cp:columnContent>
- <!-- Path-Name Column -->
- <cp:columnContent>
- <img height="16" width="20" align="absmiddle" src="{$skin_images}path.gif">
- <xsl:attribute name="alt">
- <cf:do-the-path-link>
- <cf:param name="familytree">/root/ancestors/ancestor[position()=$position]/cm:ancestors</cf:param>
- <cf:param name="familymember">$runnable/defaultName/value</cf:param>
- <cf:param name="home"><xsl:value-of select="$rootPath"/></cf:param>
- <cf:param name="onlyAncestors">true</cf:param>
- </cf:do-the-path-link> </xsl:attribute>
- </img>
- <xsl:text> </xsl:text>
- <xsl:value-of select="$runnable/defaultName"/>
- </cp:columnContent>
- <!-- Task Requested Column -->
- <cp:columnContent>
- <xsl:choose>
- <xsl:when test="string-length(requestedStartTime)=0">
- <xsl:text/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="xtsext:formatDateFromUTC( string( normalize-space(requestedStartTime)), number( '2' ), number( '3' ), string( $timeZone ), string( $contentLocale ) )"/>
- </xsl:otherwise>
- </xsl:choose>
- </cp:columnContent>
- <!-- Status Column -->
- <cp:columnContent>
- <xsl:choose>
- <xsl:when test="*[local-name()='status']='cancelled'">
- <xts:string id="IDS_JOB_STATUS_CANCELLED"/>
- </xsl:when>
- <xsl:otherwise>
- <xts:string id="IDS_JOB_STATUS_SCHEDULED"/>
- </xsl:otherwise>
- </xsl:choose>
- </cp:columnContent>
- </cp:tableContent>
- </cf:param>
- </cf:main-pager-section>
- </lyt:section>
- </lyt:layout>
- <dp:footer>
- <df:button df:id="IDS_CLOSE" df:style="back-url"/>
- </dp:footer>
-
- </utml:form>
- <form name="cform" method="post" action="{$gateway}">
- <mf:cmd-vars/>
- </form>
-
-
- </dp:page>
- </xsl:template>
- <!-- Insert common templates -->
- <mt:actions mode="tools"/>
- <pf:gen-icon/>
- </xsl:stylesheet>
- </xts:block>
- <!--======================================================================
- Name: debug
- Comments: display the debug info.
- ======================================================================-->
- <xts:block id="debug" dependency="format" 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>
|