123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- *****************************************************************
- ** Licensed Materials - Property of IBM
- **
- ** IBM Cognos Products: drill
- **
- ** (C) Copyright IBM Corp. 2001, 2015
- **
- ** 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/" xmlns:cml="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/cml/1/" xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/" messageBase="messages/portal.xml, messages/portalRL.xml,messages/drill.xml">
- <!--
- ===============================================================================================
- 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"/>
-
- <xts:block id="cleandrill" type="exec" mode="interpret" processor="XSLT" path="/portal/drillthru/common/response/cleandrill.xslt" dependency="formlogic_init" condition=".[/root/env/param[@name='dp_path'] or /root/env/param[@name='selected_path'] or /root/env/param[@name='selected_scope'] or /root/env/param[@name='m_p_target']]" mandatory="false">
- <xts:logicsheet path="logicsheets/cm-logic.xsl"/>
- <xts:logicsheet path="logicsheets/buslogic.xslt"/>
- </xts:block>
- <!--
- ===============================================================================================
- renderPage - render the page
- ===============================================================================================
- -->
- <xts:block id="render_page" mode="output" processor="XSLT" type="exec" mimeType="text/html" dependency="formlogic_init cleandrill">
- <!-- get the presentation theme -->
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- <xts:logicsheet path="portal/drillthru/common/response/target.xslt"/>
- <xts:logicsheet path="logicsheets/presentation/layout.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/dialog/framework.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"/>
-
- <!-- 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:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- xmlns:xtsdrillext="xalan://com.cognos.drill.ext.XTSExt"
- xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
- 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:pf="http://developer.cognos.com/schemas/xts/pf"
- xmlns:cp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/presentation/"
- xmlns:x="x"
- xmlns:utml="http://developer.cognos.com/schemas/xts/logicsheet/xslt/formlogic/"
- xmlns:rdb="http://developer.cognos.com/schemas/xts/rdb"
- exclude-result-prefixes="xsl cm cf cp pf df dp lyt utml x rdb">
- <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no" omit-xml-declaration="yes"/>
- <!-- current file name -->
- <xsl:variable name="mname" select="'new_drillthru_def2.xts'"/>
- <!-- add any theme variables -->
- <pf:variables/>
- <!-- Required for popup menus -->
- <cp:flyoutControl/>
- <!-- start the output -->
- <xsl:template match="/root">
-
-
- <xsl:variable name="backURL" select="key('env-param','backURL')"/>
- <xsl:variable name="wizardTitle">
- <xts:string id="IDS_NEW_DRILLPATH_TITLE"/>
- </xsl:variable>
- <xsl:variable name="browserTitle">
- <xsl:text/><xts:string id="IDS_NEW_TITLE_DRILLPATH_SCOPE">
- <xts:param name="wizardTitle"><xsl:value-of select="$wizardTitle"/></xts:param>
- </xts:string><xsl:text/>
- </xsl:variable>
- <xsl:variable name="pageDescription">
- <xsl:text/>
- <xsl:choose>
- <!-- Messages are different when abacab is installed -->
- <xsl:when test="($userCanUsePPS)">
- <xts:string id="WIZ_NEW_INTRO_DRILLPATH_SCOPE_ABACAB"/>
- </xsl:when>
- <xsl:otherwise>
- <xts:string id="WIZ_NEW_INTRO_DRILLPATH_SCOPE"/>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:text/>
- </xsl:variable>
- <xsl:text disable-output-escaping='yes'><!DOCTYPE html></xsl:text>
- <dp:page longTitle="$browserTitle">
- <dp:meta>
- <!-- Standard meta tags -->
- <pf:meta/>
- </dp:meta>
- <dp:script>
- <script language="javascript"><![CDATA[
- function doCancel()
- {
- window.external.OnClose(1);
- }
- ]]>
- function validate()
- {
- if( !document.pform.m_p_target || document.pform.m_p_target.value == '')
- {
- alert("<xts:string id="IDS_PROP_DRILLPATH_SPECIFY_TARGET"/>");
- return false;
- }
- return true;
- }
- /*
- This function is used to call makeSelection with targetType and submit the page
- This is used by the items on the drop down menu that allows users pick the target type
- */
- function selectDrillTarget(targetType){
- document.pform.ps_nav_op.value = 'maintain';
- makeSelection('target','','',targetType)
- document.pform.submit();
- }
- /*
- This global variable is defined to specify if we are in the wizard page or in the properties page.
- This variable is used in target.xslt page (used by both wizard and properties page) to pass the right value
- to the select dialog page.
- */
- var inWizard = true;
- </script>
- <!--Include the required JS file for implementation of drop down menus -->
- <script language="javascript" src="{$webcontent}/{$app}/js/CCflyoutMenu.js"></script>
- <rdb:scripts/>
-
- <!-- Help system -->
- <pf:help context="HID_SET_DRILL_THROUGH_SCOPE_TARGET"/>
-
- </dp:script>
- <utml:form name="pform" method="post" action="{$gateway}" >
- <rdb:commonInputs/>
- <utml:input type="hidden" name="m_p_scope" value=""/>
- <dp:header>
- <!-- header titles-->
- <dp:title><xsl:value-of select="$browserTitle"/></dp:title>
- <dp:description><xsl:value-of select="$pageDescription"/></dp:description>
- <dp:close>
- <xsl:choose>
- <xsl:when test="key('env-param','from_bmt')">
- <a href="javascript:doCancel()">
- <dp:closeMarker/>
- </a>
- </xsl:when>
- <xsl:otherwise>
- <a href="{$backURL}">
- <dp:closeMarker/>
- </a>
- </xsl:otherwise>
- </xsl:choose>
- </dp:close>
- </dp:header>
- <lyt:layout style="1">
- <lyt:section>
- <dp:list>
- <dp:section>
- <dp:label><xts:string id="IDS_PROP_DRILLPATH_DEF_SCOPE"/></dp:label>
- </dp:section>
- <dp:section>
- <dp:hint wrap="wrap" width="100%"><xts:string id="WIZ_PROP_DRILLPATH_DEF_SCOPE_HINT"/></dp:hint>
- </dp:section>
- <dp:section>
- <img height="3" width="1">
- <xsl:attribute name="src"><xsl:value-of select="$webcontent"/>/images/space.gif</xsl:attribute>
- </img>
- </dp:section>
- <xsl:choose>
- <xsl:when test="contains(string(/root/env/param[@name='m_p_scope']),'].[')">
- <dp:section>
- <span lang="{$contentLocale}"><dp:text nospace="nospace"><xsl:value-of select="xtsdrillext:enforceSTTAndBTDForMUN(/root/env/param[@name='m_p_scope'], $baseTextDirection, $productLocale, boolean($isBidiEnabled='true'))"/></dp:text></span>
- </dp:section>
- </xsl:when>
- <xsl:otherwise>
- <dp:section>
- <dp:text nospace="nospace"><xts:string id="IDS_PROP_DRILLPATH_TREE_PKG"/></dp:text>
- </dp:section>
- </xsl:otherwise>
- </xsl:choose>
- <dp:section>
- <img height="3" width="1">
- <xsl:attribute name="src"><xsl:value-of select="$webcontent"/>/images/space.gif</xsl:attribute>
- </img>
- </dp:section>
- <xsl:if test="$userCanSelectMetadata">
- <dp:section>
- <dp:link>
- <utml:a utml:op="stack-up">
- <utml:href>
- makeSelection('scope')
- </utml:href>
- <xts:string id="IDS_PROP_DRILLPATH_SELECT_SCOPE"/>
- </utml:a>
- </dp:link>
- </dp:section>
- </xsl:if>
- <dp:section>
- <img height="25" width="1">
- <xsl:attribute name="src"><xsl:value-of select="$webcontent"/>/images/space.gif</xsl:attribute>
- </img>
- </dp:section>
- <dp:section>
- <dp:label>
- <xts:string id="IDS_PROP_DRILLPATH_DEF_TARGET"/>
- </dp:label>
- </dp:section>
- <dp:section>
- <img height="3" width="1">
- <xsl:attribute name="src"><xsl:value-of select="$webcontent"/>/images/space.gif</xsl:attribute>
- </img>
- </dp:section>
- <dp:section>
- <xsl:choose>
- <!-- Messages are different when abacab is installed -->
- <xsl:when test="($userCanUsePPS)">
- <dp:hint wrap="wrap" width="100%"><xts:string id="WIZ_NEW_INTRO_DRILLPATH_TARGET_HINT_ABACAB"/></dp:hint>
- </xsl:when>
- <xsl:otherwise>
- <dp:hint wrap="wrap" width="100%"><xts:string id="WIZ_NEW_INTRO_DRILLPATH_TARGET_HINT"/></dp:hint>
- </xsl:otherwise>
- </xsl:choose>
- </dp:section>
- <dp:section>
- <img height="3" width="1">
- <xsl:attribute name="src"><xsl:value-of select="$webcontent"/>/images/space.gif</xsl:attribute>
- </img>
- </dp:section>
- <!--get the target class to be used in the next page of the wizard -->
- <utml:input type="hidden" name="targetClass">
- <xsl:attribute name="value">
- <xsl:value-of select="/root/target/cm:queryResponse/*/cm:objectClass"/>
- </xsl:attribute>
- </utml:input>
- <!--Get the target class to generate the target ICON -->
- <xsl:variable name="targetClassforICON">
- <xsl:choose>
- <xsl:when test="/root/target">
- <xsl:value-of select="string(/root/target/cm:queryResponse/*/cm:objectClass)"/>
- </xsl:when>
- <xsl:otherwise></xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="targetBaseClassforICON">
- <xsl:choose>
- <xsl:when test="/root/target">
- <xsl:value-of select="string(/root/target/cm:queryResponse/*/cm:base/*/cm:objectClass)"/>
- </xsl:when>
- <xsl:otherwise></xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:choose>
- <xsl:when test="/root/target">
- <xsl:variable name="object-start-at-path">
- <xsl:choose>
- <!-- Do not provide a path for contact otherwise invalid path displayed for logged on user -->
- <xsl:when test="starts-with(/root/target/cm:queryResponse/*/cm:searchPath, '~') or starts-with(/root/target/cm:queryResponse/*/cm:searchPath,key('session-param', 'e_hp'))">
- <xsl:value-of select="concat(key('session-param', 'e_hp'), '/folder')"/>
- </xsl:when>
- <xsl:when test="starts-with(/root/target/cm:queryResponse/*/cm:searchPath,'/content')">
- <xsl:value-of select="$defaultContentRoot"/>
- </xsl:when>
- </xsl:choose>
- </xsl:variable>
- <dp:section>
- <div>
- <table role="presentation"><tr><td>
- <xsl:call-template name="gen-icon">
- <xsl:with-param name="class" select="$targetClassforICON"/>
- <xsl:with-param name="baseClass" select="$targetBaseClassforICON"/>
- </xsl:call-template>
- </td><td valign="middle" class="tableText" lang="{$contentLocale}">
- <cf:do-the-path-link>
- <cf:param name="familytree">/root/target/cm:queryResponse/*/cm:ancestors</cf:param>
- <cf:param name="familymember">/root/target/cm:queryResponse/*/cm:defaultName</cf:param>
- <cf:param name="home">
- <xsl:value-of select="$object-start-at-path"/>
- </cf:param>
- </cf:do-the-path-link>
-
- </td></tr></table>
- </div>
- </dp:section>
- </xsl:when>
- <xsl:otherwise>
- <dp:section>
- <dp:text nospace="nospace"><xts:string id="IDS_PROP_DRILLPATH_TARGETNOTSPECIFIED"/></dp:text>
- </dp:section>
- </xsl:otherwise>
- </xsl:choose>
- <dp:section>
- <img height="3" width="1">
- <xsl:attribute name="src"><xsl:value-of select="$webcontent"/>/images/space.gif</xsl:attribute>
- </img>
- </dp:section>
- <!-- Add dropdown menus to allow a user to select a target type
- Reports
- Cubes
- -->
- <!-- Unique ids are required to create multiple menus -->
- <!-- popup menu ids-->
- <xsl:variable name="menuId" select="concat('Menu', generate-id(.))"/>
- <xsl:variable name="menuSpanId" select="concat('MenuSpan', generate-id(.))"/>
- <!-- menu item ids -->
- <xsl:variable name="menuReportId" select="concat('Report', generate-id(.))"/>
- <xsl:variable name="menuCubeId" select="concat('Cube', generate-id(.))"/>
- <dp:section>
- <dp:link>
- <xsl:choose>
- <!-- This condition is used to show the drop down menu for picking the target type
- only when user can use PPS (PPS is installed) -->
- <xsl:when test="($userCanUsePPS)">
- <utml:a>
- <xsl:attribute name="onclick">
- <xsl:text>return CCPopupMenu.dropDown(event,0,0,'</xsl:text>
- <xsl:value-of select="$menuId"/>
- <xsl:text>');</xsl:text>
- </xsl:attribute>
- <xsl:choose>
- <xsl:when test="/root/target">
- <xts:string id="WIZ_PROP_DRILLPATH_CHANGE_TARGET"/>
- </xsl:when>
- <xsl:otherwise>
- <xts:string id="WIZ_PROP_DRILLPATH_SELECT_TARGET"/>
- </xsl:otherwise>
- </xsl:choose>
-
- </utml:a>
- <!-- Define a menu with 2 items Run and debug-->
- <xsl:variable name="contactMenu">
- <flyout id="{$menuId}">
- <items>
- <item id="{$menuReportId}">
- <text><xts:string id="WIZ_TARGET_TYPE_MENU_ITEM_REPORT"/></text>
- <action>selectDrillTarget('drillPathPP8Targets');</action>
- </item>
- <item id="{$menuCubeId}">
- <text><xts:string id="WIZ_TARGET_TYPE_MENU_ITEM_CUBE"/></text>
- <action>selectDrillTarget('powerPlay8Drill.container');
- </action>
- </item>
- </items>
- </flyout>
- </xsl:variable>
- <!-- A dropdown arrow to invoke drill through assistant. It is only available when Abacan is installed-->
- <img align="middle" name="contactMenu_imgFlyControl" src="{$skin_shared_images}dropdown_arrow.gif" title="" alt="">
- <xsl:attribute name="onclick">
- <xsl:text>return CCPopupMenu.dropDown(event,0,0,'</xsl:text>
- <xsl:value-of select="$menuId"/>
- <xsl:text>');</xsl:text>
- </xsl:attribute>
- </img>
-
- <!-- Display menus and add z-index to make sure it is on the top-->
- <div id="{$menuSpanId}" style="z-index:1; position: relative;">
- </div>
- <!--Call to create menus -->
- <xsl:call-template name="renderPopup">
- <xsl:with-param name="flyoutXML">
- <xsl:copy-of select="$contactMenu"/>
- </xsl:with-param>
- <xsl:with-param name="controlID"><xsl:value-of select="$menuSpanId"/></xsl:with-param>
- </xsl:call-template>
- <!-- end dropdown -->
- </xsl:when>
- <!-- When PP8 is not installed we don't show the drop down menu to the user
- and do the same thing that we used to do -->
- <xsl:otherwise>
- <utml:a>
- <utml:href>
- makeSelection('target')
- </utml:href>
- <xsl:choose>
- <xsl:when test="/root/target">
- <xts:string id="WIZ_PROP_DRILLPATH_CHANGE_TARGET"/>
- </xsl:when>
- <xsl:otherwise>
- <xts:string id="WIZ_PROP_DRILLPATH_SELECT_TARGET"/>
- </xsl:otherwise>
- </xsl:choose>
- </utml:a>
- </xsl:otherwise>
- </xsl:choose>
- </dp:link>
- </dp:section>
- </dp:list>
- </lyt:section>
- </lyt:layout>
- <dp:footer>
- <!-- Cancel button -->
- <xsl:choose>
- <xsl:when test="key('env-param','from_bmt')!=''">
- <df:button df:id="IDS_CANCEL" df:style="href" df:href="javascript:doCancel()"/>
- </xsl:when>
- <xsl:otherwise>
- <df:button df:id="IDS_CANCEL" df:style="back-url"/>
- </xsl:otherwise>
- </xsl:choose>
- <!-- Back button -->
- <df:button df:id="IDS_BACK" df:style="maintain" df:label="IDS_BACK_LABEL">
- <df:target>
- <xsl:value-of select="concat($app, '/new_general.xts')"/>
- </df:target>
- </df:button>
- <!-- Next button -->
- <xsl:choose>
- <xsl:when test="not(/root/target) or string(key('env-param','m_p_target'))=''">
- <df:button df:id="IDS_NEXT"/>
- </xsl:when>
- <xsl:otherwise>
- <df:button df:id="IDS_NEXT" df:style="maintain" utml:validate="true" df:label="IDS_NEXT_LABEL">
- <df:target>
- <xsl:value-of select="concat($app, '/new_drillthru_def3.xts')"/>
- </df:target>
- </df:button>
- </xsl:otherwise>
- </xsl:choose>
- <!-- Finish button -->
- <df:button df:id="IDS_FINISH"/>
- </dp:footer>
- </utml:form>
- </dp:page>
- </xsl:template>
- <pf:gen-icon/>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ===============================================================================================
- debug - display debug information
- ===============================================================================================
- -->
- <xts:block id="debug" dependency="render_page" 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"/>
- <xsl:template match="/">
- <dbg:dumpxml select="/root"/>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- </xts:morphlet>
|