123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- Licensed Materials - Property of IBM
- IBM Cognos Products: AGS
- (C) Copyright IBM Corp. 2005, 2014
- US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
- -->
- <xts:morphlet xmlns:xts="http://developer.cognos.com/schemas/xts/" messageBase="messages/AGS.xml,messages/portal.xml, messages/portalRL.xml" resolverBase="prompting" includeConfig="true" requiredCapability="canUseEventStudio,canUseContentStoreTool">
- <!--
- ================================================================================
- decode the agent items (which contain the agentOptions)
- ===============================================================================================
- -->
- <xts:block id="decodeAgentDefinition" processor="XSLT" type="exec" condition=".[/root/*[local-name()='requestParams']/*[local-name()='param' and @name='requestState'] = 'markup']" mandatory="false">
- <xts:logicsheet path="logicsheets/presentation/dialog/templates.xsl"/>
- <xts:logicsheet path="logicsheets/buslogic.xslt"/>
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:xts="http://developer.cognos.com/schemas/xts/"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" exclude-result-prefixes="xsl xtsext xts">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:template match="/">
- <xts:sequence>
- <xsl:if test="/root/env/param[@name = 'agent_definition_blob']">
- <xts:append select="/root">
- <xsl:value-of select="xtsext:web64decode( xtsext:cafaction('sign_unwrap_settemplatename_decodeagentdefinition_settemplateid_addcontmgt001', string( /root/env/param[@name = 'agent_definition_blob'])), true() )" disable-output-escaping="yes"/>
- </xts:append>
- </xsl:if>
- <!-- delete the override flag-->
- <!--xts:delete select="/root/env/param[@name='override_default_content_task_options']"/-->
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ===============================================================================================
- get the information for the content task
- ===============================================================================================
- -->
- <xts:block id="getSelectedPath" type="exec" mode="interpret" processor="XSLT" condition=".[/root/env/param[@name = 'selected_path']!='' and /root/*[local-name()='requestParams']/*[local-name()='param' and @name='requestState'] = 'markup']" mandatory="false" dependency="decodeAgentDefinition">
- <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:cm="http://developer.cognos.com/schemas/xts-cm/1/" xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/">
- <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>
- <xts:transform src="transforms/CM/post-process.xslt" processor="XSLT">
- <send:request provider="cm" requester="AGS:addContMgt">
- <xts:transform src="transforms/CM/pre-process.xslt" processor="XSLT">
- <query xmlns="http://developer.cognos.com/schemas/xts-cm/1/">
- <search>
- <!-- Get the report - we know only it's search path now -->
- <xsl:value-of select="/root/env/param[@name = 'selected_path']"/>
- </search>
- <properties>
- <property name="defaultName"/>
- <property name="searchPath"/>
- <property name="options"/>
- </properties>
- </query>
- </xts:transform>
- </send:request>
- </xts:transform>
- </xts:append>
- </xts:sequence>
- <!-- delete the consistency check -->
- <xts:sequence>
- <xts:delete select="/root/env/param[@name='cto_consistency_check']"/>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
-
- <!--
- ===============================================================================================
- onAgentLoaded - the agent has been loaded and this task visited, unpack the cmOptions if they exist and set the overrideMode
- value to true, the basic rule is that if options exist then the user has overridden the content maintenance options at the task level
- ===============================================================================================
- -->
- <xts:block id="onAgentLoaded" type="exec" mode="interpret" processor="XSLT" condition=".[/root/env/param[@name = 'selected_path']!='' and not(/root/env/param[@name='cm_mode'])]" mandatory="false" dependency="getSelectedPath">
- <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:xts="http://developer.cognos.com/schemas/xts/"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- xmlns:pf="http://developer.cognos.com/schemas/xts/pf" exclude-result-prefixes="xsl xtsext xts pf">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <pf:variables/>
- <xsl:template match="/">
- <!-- set the overridden state-->
- <xsl:variable name="overriddenTaskOptions">
- <xsl:choose>
- <xsl:when test="/root/env/param[@name='cmOptions']"><xsl:text>true</xsl:text></xsl:when>
- <xsl:otherwise><xsl:text>false</xsl:text></xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xts:sequence>
- <!-- unpack the options-->
- <xsl:if test="$overriddenTaskOptions='true'">
- <xsl:variable name="options">
- <xsl:value-of select="/root/env/param[@name='cmOptions']"/>
- </xsl:variable>
- <xts:append select="/root">
- <xts:transform name="XMLDecode">
- <xsl:value-of select="xtsext:web64decode(xtsext:cafaction('sign_unwrap_onagentloaded__settemplateid_addcontmgt001',string($options)), true() )" disable-output-escaping="yes"/>
- </xts:transform>
- </xts:append>
- </xsl:if>
-
- <!-- add cm_mode and overrideMode to the environment-->
- <xts:append select="/root/env">
- <param name="cm_mode">
- <xsl:choose>
- <xsl:when test="$overriddenTaskOptions='true'">
- <xts:queryNode select="/root/cmOptions/*[local-name()='options']/*[local-name()='value']/*[local-name()='item'][name='checkSecurityReferences']/*[local-name()='value']"/>
- </xsl:when>
- <xsl:otherwise><xsl:text>true</xsl:text></xsl:otherwise>
- </xsl:choose>
- </param>
- <!--param name="cm_mode"><xsl:value-of select="$find"/></param-->
- <param name="overrideMode"><xsl:value-of select="$overriddenTaskOptions"/></param>
- </xts:append>
- <!-- tidy -->
- <xts:delete select="/root/env/param[@name='cmOptions']" mandatory="false"/>
- <xts:delete select="/root/cmOptions" mandatory="false"/>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
-
- <!--
- ===============================================================================================
- updateCMMode - update the mode based on whether the agent defaults have been set, the value of cm_mode dictates
- how the UI is rendered
- ===============================================================================================
- -->
- <xts:block id="updateCMMode" type="exec" mode="interpret" processor="XSLT" condition=".[/root/env/param[@name = 'selected_path']!='']" mandatory="false" dependency="onAgentLoaded">
- <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:xts="http://developer.cognos.com/schemas/xts/"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- xmlns:pf="http://developer.cognos.com/schemas/xts/pf" exclude-result-prefixes="xsl xtsext xts pf">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <pf:variables/>
- <xsl:template match="/">
- <xsl:variable name="cmOptions" select="/root/agent_definition/agentOptions/*[local-name()='options']/*[local-name()='value']/*[local-name()='item']"/>
- <!-- cm_mode=false for 'find and fix' and true for 'find only'-->
- <!--******find ******-->
- <xsl:variable name="find">
- <xsl:choose>
- <!-- the user has overridden the mode at the task level-->
- <xsl:when test="/root/env/param[@name='overrideMode']='true'">
- <xsl:value-of select="/root/env/param[@name='cm_mode']"/>
- </xsl:when>
- <!-- the user has overridden the mode at the agent level-->
- <xsl:when test="/root/agent_definition/agentOptions/form-vars/param[@name='override_default_content_task_options']='true'">
- <xsl:value-of select="$cmOptions[name='checkSecurityReferences']/*[local-name()='value']"/>
- </xsl:when>
- <!-- the default setting-->
- <xsl:otherwise><xsl:text>true</xsl:text></xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <!-- content task options-->
- <xsl:variable name="taskOptionItems" select="/root/*[local-name()='queryResponse']/*[local-name()='contentTask']/*[local-name()='options']/*[local-name()='value']/*[local-name()='item']"/>
- <!-- the parameter used to generate the content maintenance options determines internal/external find/repair -->
- <xsl:variable name="consistencyCheck" >
- <xsl:choose>
- <!-- we have switched to an existing content maintenance task, so check for the 'cto_consistency_check' env param and retrieve its value -->
- <xsl:when test="/root/env/param[@name='cto_consistency_check']!=''">
- <xsl:value-of select="/root/env/param[@name='cto_consistency_check']"/>
- </xsl:when>
- <!-- new content maintenance task has been created, get the value from the CM content task options -->
- <xsl:when test="count($taskOptionItems) > 0">
- <xsl:choose>
- <xsl:when test="$taskOptionItems[name='checkSecurityReferences']/value='true'"><xsl:text>externalRef</xsl:text></xsl:when>
- <xsl:when test="$taskOptionItems[name='checkInternalInconsistencies']/value='true'"><xsl:text>internalRef</xsl:text></xsl:when>
- <xsl:when test="$taskOptionItems[name='repairSecurityReferences']/value='true'"><xsl:text>externalRef</xsl:text></xsl:when>
- <xsl:when test="$taskOptionItems[name='repairInternalInconsistencies']/value='true'"><xsl:text>internalRef</xsl:text></xsl:when>
- </xsl:choose>
- </xsl:when>
- </xsl:choose>
- </xsl:variable>
- <xts:sequence>
- <!-- delete and recreate consistency check -->
- <xts:delete select="/root/env/param[@name='cto_consistency_check']"/>
- <xts:append select="/root/env">
- <param name="cto_consistency_check"><xsl:value-of select="$consistencyCheck"/></param>
- </xts:append>
- <!-- tidy -->
- <xts:delete select="/root/env/param[@name='cmOptions']"/>
- <xsl:choose>
- <!-- update -->
- <xsl:when test="/root/env/param[@name='cm_mode']">
- <xts:update select="/root/env/param[@name='cm_mode']">
- <param name="cm_mode">
- <xsl:value-of select="$find"/>
- </param>
- </xts:update>
- </xsl:when>
- <!-- create -->
- <xsl:otherwise>
- <xts:append select="/root/env">
- <param name="cm_mode">
- <xsl:value-of select="$find"/>
- </param>
- </xts:append>
- </xsl:otherwise>
- </xsl:choose>
- </xts:sequence>
- <!-- create the content maintenance options in CM format-->
- <xts:sequence>
- <xts:append select="/root">
- <cmOptions>
- <xts:transform src="transforms/portal/options/buildOptions.xslt" processor="XSLT">
- <root>
- <xts:transform src="transforms/portal/options/buildOptionItems.xslt" processor="XSLT">
- <root>
- <env>
- <param name="ctro_runoption">
- <xsl:choose>
- <xsl:when test="$find='true'">
- <xsl:text>find</xsl:text>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text>fix</xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- </param>
- <!--
- From buildOptionItems.xslt
- <xsl:when test="@name = 'repairInternalInconsistencies' and key('env-param','cto_consistency_check')='internalRef'"><xsl:value-of select="'true'"/></xsl:when>
- <xsl:when test="@name = 'repairSecurityReferences' and key('env-param','cto_consistency_check')='internalRef'"><xsl:value-of select="'false'"/></xsl:when>
- <xsl:when test="@name = 'repairInternalInconsistencies' and key('env-param','cto_consistency_check')='externalRef'"><xsl:value-of select="'false'"/></xsl:when>
- <xsl:when test="@name = 'repairSecurityReferences' and key('env-param','cto_consistency_check')='externalRef'"><xsl:value-of select="'true'"/></xsl:when>
-
- This is what we get passed from the content task
- <options xmlns="" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="bus:optionArrayProp">
- <value xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:option[4]">
- <item xsi:type="bus:contentTaskOptionBoolean">
- <name xsi:type="bus:contentTaskOptionEnum">checkSecurityReferences</name>
- <value xsi:type="xsd:boolean">false</value>
- </item>
- <item xsi:type="bus:contentTaskOptionBoolean">
- <name xsi:type="bus:contentTaskOptionEnum">repairSecurityReferences</name>
- <value xsi:type="xsd:boolean">false</value>
- </item>
- <item xsi:type="bus:contentTaskOptionBoolean">
- <name xsi:type="bus:contentTaskOptionEnum">checkInternalInconsistencies</name>
- <value xsi:type="xsd:boolean">true</value>
- </item>
- <item xsi:type="bus:contentTaskOptionBoolean">
- <name xsi:type="bus:contentTaskOptionEnum">repairInternalInconsistencies</name>
- <value xsi:type="xsd:boolean">false</value>
- </item>
- </value>
- </options>
-
- In the UI we can choose between 'fix' and 'find and fix'. An additional option has been added which we are not catering for. This is the 'internal' or 'external' option
-
- external find = checkSecurityReferences
- external find and fix = repairSecurityReferences
- internal find = checkInternalInconsistencies
- internal find and fix = repairInternalInconsistencies
-
- Since in the UI we cannot choose between internal and external then we must interrogate the content task options and set the options accordingly.
- To do this the env param 'cto_consistency_check' must be present so that buildOptionItems.xslt can create the options with the correct value.
- If this is missing then the option is created without any value and the agent will fail when it is run and also will not load.
- See bug COQCQ00275642
- -->
- <param name="cto_consistency_check"><xsl:value-of select="$consistencyCheck"/></param>
- </env>
- <xts:transform name="XML" src="portal/options.xml"/>
- <contentLocale>
- <xsl:value-of select="$contentLocale"/>
- </contentLocale>
- <optionType>contentTaskOptions</optionType>
- <genDefaults>false</genDefaults>
- </root>
- </xts:transform>
- </root>
- </xts:transform>
- </cmOptions>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
-
- <!--
- ===============================================================================================
- encodeCMOptions
- Serialize the content maintenance options only when we have /root/cmOptions and the user has overridden one of them
- ===============================================================================================
- -->
- <xts:block id="encodeCMOptions" dependency="updateCMMode" type="exec" mode="interpret" processor="XSLT" condition=".[/root/cmOptions and /root/env/param[@name='overrideMode']='true']" mandatory="false">
- <xts:logicsheet path="logicsheets/presentation/dialog/templates.xsl"/>
- <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:cm="http://developer.cognos.com/schemas/xts-cm/1/"
- xmlns:dt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/templates/"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- exclude-result-prefixes="xsl xts pf cm dt xtsext">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <pf:variables/>
- <pf:serialize-xml/>
- <xsl:template match="/">
- <!--xsl:message>****************addContMgt->encodeCMOptions*******************</xsl:message>
- <xsl:message>addContMgt->encodeCMOptions</xsl:message>
- <xsl:for-each select="/root/cmOptions/*[local-name()='options']/*[local-name()='value']/*[local-name()='item']">
- <xsl:message><xsl:value-of select="./name"/>=<xsl:value-of select="./value"/></xsl:message>
- </xsl:for-each-->
- <xts:sequence>
- <xsl:variable name="markup">
- <xsl:call-template name="serialize-xml">
- <xsl:with-param name="node-set" select="/root/cmOptions"/>
- </xsl:call-template>
- </xsl:variable>
- <xts:append select="/root/env">
- <param name="cmOptions">
- <xsl:value-of select="xtsext:cafaction( concat('sign_wrap_setpassportid_', $passport), xtsext:web64encode(string($markup ),true()))"/>
- </param>
- </xts:append>
- <xts:delete select="/root/cmOptions"/>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
-
- <!--
- ===============================================================================================
- returnResult - We're done with the add content maintenance
- ===============================================================================================
- -->
- <xts:block id="returnResult" path="/ags/tabResultTemplate.xslt" type="exec" processor="XSLT" condition=".[/root/*[local-name()='requestParams']/*[local-name()='param' and @name='requestState'] = 'finished']" mandatory="false" dependency="encodeCMOptions">
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- </xts:block>
- <!--
- ===============================================================================================
- genMarkup -
- ===============================================================================================
- -->
- <xts:block id="genMarkup" type="exec" processor="XSLT" dependency="returnResult" condition=".[/root/*[local-name()='requestParams']/*[local-name()='param' and @name='requestState'] = 'markup']">
- <!-- logicsheets -->
- <!-- portal specific information -->
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- <!-- the define condition ui -->
- <xts:logicsheet path="ags/logicsheets/dialogs.xsl"/>
- <!-- Dialog specific logicsheets -->
- <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"/>
- <!-- 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.xslt"/>
- <!-- Prevent the href from appearing in the status bar. -->
- <xts:logicsheet path="logicsheets/presentation/touch_up.xslt"/>
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/" xmlns:pf="http://developer.cognos.com/schemas/xts/pf" xmlns: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:xos="http://developer.cognos.com/schemas/xts/output/" xmlns:utml="http://developer.cognos.com/schemas/xts/logicsheet/xslt/formlogic/" xmlns:xts="http://developer.cognos.com/schemas/xts/" xmlns:agsdlg="http://developer.cognos.com/schemas/xts/logicsheets/xslt/ags/dialog/" exclude-result-prefixes="xts cm pf xtsext lyt dp df cf cp xos utml agsdlg">
- <xsl:output method="xml" encoding="utf-8" indent="no"/>
- <xsl:key name="request-param" match="/root/*[local-name()='requestParams']/*[local-name()='param']" use="@name"/>
- <pf:variables/>
- <xsl:variable name="ags_image_root">../ags/images/summary/</xsl:variable>
- <xsl:variable name="spacer">
- <img height="10" width="10">
- <xsl:attribute name="src"><xsl:value-of select="$webcontent"/>/images/space.gif</xsl:attribute>
- </img>
- </xsl:variable>
- <!-- SEC_INFO hasTask is not javascript encoded, it is always a boolean value true|false-->
- <xsl:variable name="hasTask">
- <xsl:choose>
- <xsl:when test="key('env-param','selected_path') != ''"><xsl:text>true</xsl:text></xsl:when>
- <xsl:otherwise><xsl:text>false</xsl:text></xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:template match="/">
- <xts:sequence>
- <xts:append select="/root/output">
- <xos:part>
- <xos:entityHeader>
- <xos:param name="Content-Type">text/xml; charset=utf-8</xos:param>
- </xos:entityHeader>
- <xos:entityBody>
- <xsl:element name="{key('request-param','resultNode')}" namespace="">
- <markup>
- <xts:transform name="XMLEncode">
- <utml:form name="pform">
- <!-- this defines the form command operation to be performed when all the collected properties are submitted... -->
- <!-- ================================================================ -->
- <!-- H E A D E R -->
- <!-- ================================================================ -->
- <utml:exclusion-list><xsl:value-of select="' pageitem '"/></utml:exclusion-list>
- <agsdlg:header>
- <dp:image>
- <img alt="" border="0">
- <xsl:attribute name="src"><xsl:value-of select="$ags_image_root"/>icon_content_maintenance_24.gif</xsl:attribute>
- </img>
- </dp:image>
- <dp:title>
- <xts:string id="DIALOG_CM_TITLE"/>
- </dp:title>
- <dp:description>
- <xts:string id="DIALOG_CM_DESCRIPTION"/>
- </dp:description>
- </agsdlg:header>
- <utml:input type="hidden" name="report_visited" id="report_visited" value="true"/>
- <utml:input type="hidden" name="overrideMode" id="overrideMode" value="false" utml:update="true"/>
- <utml:input type="hidden" name="taskName" id="taskName" utml:update="false">
- <utml:value>
- <xsl:choose>
- <xsl:when test="$hasTask='true' and /root/cm:queryResponse/cm:contentTask/cm:defaultName != '' ">
- <xsl:value-of select="/root/cm:queryResponse/cm:contentTask/cm:defaultName"/>
- </xsl:when>
- <xsl:when test="key('env-param', 'taskName') and string-length(string(key('env-param', 'taskName'))) > 0">
- <xsl:value-of select="key('env-param', 'taskName')"/>
- </xsl:when>
- </xsl:choose>
- </utml:value>
- </utml:input>
- <!-- ================================================================ -->
- <!-- B O D Y -->
- <!-- ================================================================ -->
- <!-- Define a new layout-->
- <lyt:layout style="2">
- <lyt:section>
- <dp:textarea section3_align="left">
- <!-- the CM name label-->
- <dp:section1>
- <xts:string id="DIALOG_CM_LABEL"/>
- </dp:section1>
- <dp:section2>
- <!-- get the name of the cont mgt -->
- <xsl:choose>
- <xsl:when test="$hasTask='true' and /root/cm:queryResponse/cm:contentTask/cm:defaultName != '' ">
- <!--xsl:copy-of select="$spacer"/-->
- <xsl:value-of select="/root/cm:queryResponse/cm:contentTask/cm:defaultName"/>
- </xsl:when>
- <xsl:otherwise>
- <xts:string id="DIALOG_MESSAGE_NONE"/>
- </xsl:otherwise>
- </xsl:choose>
- </dp:section2>
- <dp:section3>
- <a href="#" onclick="doSelectObject('contentTask.es', '{xtsext:javascriptencode(/root/env/param[@name = 'selected_path'])}')">
- <xts:string id="SELECT_CM"/>
- </a>
- </dp:section3>
- </dp:textarea>
- </lyt:section>
- <lyt:section>
- <xsl:value-of select="key('request-param','suppressionDetails')" disable-output-escaping="yes"/>
- </lyt:section>
- </lyt:layout>
- <lyt:layout style="2">
- <lyt:section>
- <dp:textarea section3_align="left">
- <dp:section1>
- <xts:string id="DIALOG_CM_OPTION"/>
- </dp:section1>
- <dp:section2>
- <utml:radio-group name="cm_mode">
- <utml:default-value>true</utml:default-value>
- <dp:choice>
- <dp:section1>
- <utml:input type="radio" onclick="javascript:overridden(this);">
- <utml:value>true</utml:value>
- </utml:input>
- </dp:section1>
- <dp:section2>
- <xts:string id="DIALOG_CM_OPTION_FIND"/>
- </dp:section2>
- <dp:section1>
- <utml:input type="radio" onclick="javascript:overridden(this);">
- <utml:value>false</utml:value>
- </utml:input>
- </dp:section1>
- <dp:section2>
- <xts:string id="DIALOG_CM_OPTION_FINDFIX"/>
- </dp:section2>
- </dp:choice>
- </utml:radio-group>
- </dp:section2>
- </dp:textarea>
- </lyt:section>
-
- </lyt:layout>
- <dp:emptyFooter/>
- <script type="text/javascript">
- function init() {
- <xsl:if test="not(/root/env/param[@name='report_visited']) and not(/root/env/param[@name='selected_path'])">
- doSelectObject('contentTask.es')
- </xsl:if>
- }
-
- /*
- * the mode has been overridden by the user, insert a hidden variable into the form. This ensures
- that the agent default options(when set) do not interfere with the users chosen mode
- */
- function overridden(radio) {
-
- //check if the mode has already been overridden
- document.pform.overrideMode.value='true';
- }
-
- /*
- * validate the report page and popup an appropriate alert message
- */
- function validate() {
- var hasTask = <xsl:value-of select="string($hasTask)"/>;
- var isValid = true;
-
- if (hasTask==false) {
- isValid = false;
-
- alert("<xts:string id="DIALOG_CM_NO_CM_TASK" encode="javascript"/>");
- }
- return isValid;
- }
- </script>
- </utml:form>
- </xts:transform>
- </markup>
- </xsl:element>
- </xos:entityBody>
- </xos:part>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ===============================================================================================
- debug - special debug block for nested requests
- ===============================================================================================
- -->
- <xts:block id="debug" type="exec" processor="XSLT" mimeType="text/html" dependency="genMarkup" condition=".[/root/session/param[@name='debug']='1']" mandatory="false">
- <!-- 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"/>
- <xsl:template match="/">
- <dbg:dumpxml select="/root"/>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- </xts:morphlet>
|