12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- Licensed Materials - Property of IBM
- IBM Cognos Products: ASV
- (C) Copyright IBM Corp. 2005, 2010
- US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
- -->
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:dlgctrl="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/controller-templates/"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- xmlns:req-params="http://developer.cognos.com/schemas/request/params"
- xmlns:rdsad="http://developer.cognos.com/schemas/xts/rdsad/"
- xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
- xmlns:xts="http://developer.cognos.com/schemas/xts/"
- exclude-result-prefixes="xsl dlgctrl xtsext req-params xts rdsad pf">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
-
- <pf:variables/>
- <xsl:template match="/">
- <!-- variables for each of the parameters for the subject -->
- <xsl:variable name="reportName">
- <xsl:value-of select="/root/env/param[@name='m_subData_periodical_producer_defaultName']"/>
- </xsl:variable>
- <!-- -->
- <xsl:variable name="measureName">
- <xsl:value-of select="/root/env/param[@name='m_subData_measure_name']"/>
- </xsl:variable>
- <!-- -->
- <xsl:variable name="operator">
- <xsl:call-template name="conditionEnumShortValue">
- <xsl:with-param name="conditionEnum">
- <xsl:value-of select="/root/env/param[@name='m_sub_operation']"/>
- </xsl:with-param>
- </xsl:call-template>
- </xsl:variable>
- <!-- -->
- <xsl:variable name="value1">
- <xsl:value-of select="/root/env/param[@name='m_sub_measure_value']"/>
- </xsl:variable>
- <!-- -->
- <xsl:variable name="value2">
- <xsl:value-of select="/root/env/param[@name='m_sub_measure_value1']"/>
- </xsl:variable>
- <!-- -->
- <xsl:variable name="s" select="concat(' ', key('system-param', 'ui_hide')/CC_RUN_OPTIONS_email_attachment/@show, ' ')"/>
- <xsl:variable name="run_with_options_allowEmailAsAttachment">
- <xsl:choose>
- <xsl:when test="
- not(key('system-param', 'ui_hide')/CC_RUN_OPTIONS_email_attachment)
- or
- (
- key('system-param', 'ui_hide')/CC_RUN_OPTIONS_email_attachment
- and
- (
- (contains($s, 'Administrators') and $hasAdminCapability) or
- (contains($s, 'QSUsers') and $hasFullQSCapability) or
- (contains($s, 'RSUsers') and $hasFullRSCapability) or
- (contains($s, 'Consumers') and $is-named='1') or
- (contains($s, 'Anonymous') and $is-named='0') or
- (key('system-param', 'ui_groups')/group[contains($s, concat(' ', @id, ' ')) and contains( key('session-param', 'uig'), concat(' ', @id, ' '))])
- )
- )">
- <xsl:text>true</xsl:text>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text>false</xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <!-- -->
- <xts:sequence>
- <dlgctrl:XTS2Request>
- <dlgctrl:target>/portal/emailOptions/email_options.xts</dlgctrl:target>
- <dlgctrl:stackName>email_options</dlgctrl:stackName>
- <dlgctrl:requestState>email|genDefault</dlgctrl:requestState>
- <dlgctrl:param name="defaultEmailAsAttachment">
- <xsl:value-of select="$run_with_options_allowEmailAsAttachment"/>
- </dlgctrl:param>
- <dlgctrl:param name="defaultSubject">
- <xsl:choose>
- <xsl:when test="/root/env/param[@name='m_sub_type']='nonMetric' and /root/env/param[@name='m_sub_operation']='between' "><xts:string id="IDS_CUSTSUB_DEFAULT_SUBJECT2"><xts:param name="reportName"><xsl:value-of select="$reportName"/></xts:param><xts:param name="measureName"><xsl:value-of select="$measureName"/></xts:param><xts:param name="operator"><xsl:value-of select="$operator"/></xts:param><xts:param name="value1"><xsl:value-of select="$value1"/></xts:param><xts:param name="value2"><xsl:value-of select="$value2"/></xts:param></xts:string></xsl:when>
- <xsl:when test="/root/env/param[@name='m_sub_type']='nonMetric' and not(/root/env/param[@name='m_sub_operation']='between')"><xts:string id="IDS_CUSTSUB_DEFAULT_SUBJECT"><xts:param name="reportName"><xsl:value-of select="$reportName"/></xts:param><xts:param name="measureName"><xsl:value-of select="$measureName"/></xts:param><xts:param name="operator"><xsl:value-of select="$operator"/></xts:param><xts:param name="value1"><xsl:value-of select="$value1"/></xts:param></xts:string></xsl:when>
- <xsl:when test="/root/env/param[@name='m_sub_type']='metric' "><xts:string id="IDS_CUSTSUB_DEFAULT_SUBJECT_METRIC"><xts:param name="measureName"><xsl:value-of select="$measureName"/></xts:param></xts:string></xsl:when>
- </xsl:choose>
- </dlgctrl:param>
- <req-params:param name="subscription">
- <xsl:text>true</xsl:text>
- </req-params:param>
- </dlgctrl:XTS2Request>
- </xts:sequence>
- </xsl:template>
- <rdsad:enumTemplates/>
- </xsl:stylesheet>
|