123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- Licensed Materials - Property of IBM
- IBM Cognos Products: cogadmin
- (C) Copyright IBM Corp. 2005, 2013
- 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/cogadminuimsgs.xml" >
- <xts:block id="decode" processor="XSLT" type="exec" mandatory="false" mode="interpret"
- condition=".[/root/env/param[@name = 'toolName']]"
- nodelist="env">
- <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="xts xtsext">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:template match="/">
- <xts:sequence>
- <xts:replace select="/root/env/param[@name = 'toolName']">
- <param name="toolName">
- <xsl:value-of select="xtsext:base64decode(/root/env/param[@name = 'toolName'], true())" disable-output-escaping="yes"/>
- </param>
- </xts:replace>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <xts:block id="response" dependency="decode" processor="XSLT" type="exec" mode="interpret"
- nodelist="http, env, header">
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:xts="http://developer.cognos.com/schemas/xts/"
- xmlns:xos="http://developer.cognos.com/schemas/xts/output/"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- xmlns:exsl="http://exslt.org/common"
- extension-element-prefixes="exsl"
- exclude-result-prefixes="xts xos exsl 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:key name="http-param" match="/root/http/param" use="@name"/>
- <xsl:variable name="base-url" select="concat(/root/configProps/param[@name = 'cps']/property[@name ='gateway']/., '?b_action=xts.run')"/>
- <xsl:variable name="tool-name" select="key('env-param', 'toolName')"/>
- <!-- parameters not to be passed into assembler call -->
- <xsl:variable name="params-excluded" select="' encoding m b_action '"/>
- <xsl:variable name="interaction-params" select="/root/env/param[not(contains($params-excluded, concat(' ', @name, ' ')))]"/>
- <xsl:template match="/">
- <xts:sequence>
- <xts:append select="/root/output">
- <xos:part>
- <xos:entityHeader>
- <xos:param name="Content-type">text/xml</xos:param>
- </xos:entityHeader>
- <xos:entityBody>
- <fragment>
- <info>
- <title>Need to hide this</title>
- </info>
- <meta>
- <customProperties name="toolName">
- <title xml:lang="en">Tool name</title>
- <hint xml:lang="en">This is the name of the legacy tool that should be displayed.</hint>
- <default>
- <value>administrativetasks</value>
- <enum value="administrativetasks"/>
- <enum value="usersgroupsandroles"/>
- <enum value="monitor"/>
- <enum value="dispatchersandservices"/>
- <enum value="portletimports"/>
- <enum value="datasourceconnections"/>
- <enum value="distributionlistandcontacts"/>
- <enum value="printers"/>
- </default>
- </customProperties>
- </meta>
- <markup>
- <mimeType>text/html</mimeType>
- <markupXml>
- <script>
- _THIS_.setOnloadHandler( function() {
- _THIS_.onresize = function() {
- var iFrameID = "_THIS_iFrame<xsl:value-of select="$tool-name"/>";
- if (($(iFrameID)) && ($(_THIS_.parent)) && ($(_THIS_.parent.parent)))
- {
- xHeight(iFrameID, xHeight($(_THIS_.parent.parent.div)) - ui_calcAvailableHeight($(iFrameID), $(_THIS_.parent.div), true));
- } else {
- xHeight(iFrameID,300);
- }
- return true;
- }
- _THIS_.onresize();
- _THIS_onRefresh = function(evt) {
- evt.preventDefault(); //cancel the fragment default: We don't want it to reload, we just want to refresh the iFrame contents.
- var f = document.getElementById('_THIS_iFrame<xsl:value-of select="$tool-name"/>');
- f.contentWindow.location.reload(true);
- }
- regFragEvent(_THIS_,"fragment.refresh",_THIS_onRefresh);
- });
- </script>
- <iFrame id="_THIS_iFrame{$tool-name}" frameborder="0" marginheight="0" width="100%" marginwidth="0" style="margin:0px">
- <xsl:choose>
- <xsl:when test="$tool-name = 'administrativetasks'">
- <xsl:attribute name="src">
- <xsl:value-of select="concat($base-url, '&m=portal/legacy_tools/tools_cs_administration.xts')"/>
- </xsl:attribute>
- <xsl:attribute name="title"><xts:string id="IDS_TITLE_CONTENT_ADMINISTRATION"/></xsl:attribute>
- </xsl:when>
- <xsl:when test="$tool-name = 'usersgroupsandroles'">
- <xsl:attribute name="src">
- <xsl:value-of select="concat($base-url, '&m=portal/legacy_tools/tools_directory.xts')"/>
- </xsl:attribute>
- <xsl:attribute name="title"><xts:string id="IDS_TITLE_USERS_GROUPS_ROLES"/></xsl:attribute>
- </xsl:when>
- <xsl:when test="$tool-name = 'capabilities'">
- <xsl:attribute name="src">
- <xsl:value-of select="concat($base-url, '&m=portal/legacy_tools/tools_capabilities.xts')"/>
- </xsl:attribute>
- <xsl:attribute name="title"><xts:string id="IDS_TITLE_CAPABILITIES"/></xsl:attribute>
- </xsl:when>
- <xsl:when test="$tool-name = 'drillthroughdefinitions'">
- <xsl:attribute name="src">
- <xsl:value-of select="concat($base-url, '&m=portal/legacy_tools/tools_drillthru.xts')"/>
- </xsl:attribute>
- <xsl:attribute name="title"><xts:string id="IDS_TITLE_DRILLTHROUGH_DEFINITIONS"/></xsl:attribute>
- </xsl:when>
- <xsl:when test="$tool-name = 'styles'">
- <xsl:attribute name="src">
- <xsl:value-of select="concat($base-url, '&m=portal/legacy_tools/tools_skinadmin.xts')"/>
- </xsl:attribute>
- <xsl:attribute name="title"><xts:string id="IDS_TITLE_STYLES"/></xsl:attribute>
- </xsl:when>
- <xsl:when test="$tool-name = 'monitor'">
- <xsl:attribute name="src">
- <xsl:value-of select="concat($base-url, '&m=portal/legacy_tools/tools_service_monitor.xts')"/>
- </xsl:attribute>
- <xsl:attribute name="title"><xts:string id="IDS_TITLE_SERVICE_MONITOR"/></xsl:attribute>
- </xsl:when>
- <xsl:when test="$tool-name = 'dispatchersandservices'">
- <xsl:attribute name="src">
- <xsl:value-of select="concat($base-url, '&m=portal/legacy_tools/tools_service_config.xts')"/>
- </xsl:attribute>
- <xsl:attribute name="title"><xts:string id="IDS_TITLE_DISPATCHERS_AND_SERVICES"/></xsl:attribute>
- </xsl:when>
- <xsl:when test="$tool-name = 'portletimports'">
- <xsl:attribute name="src">
- <xsl:value-of select="concat($base-url, '&m=portal/legacy_tools/tools_portaladmin.xts')"/>
- </xsl:attribute>
- <xsl:attribute name="title"><xts:string id="IDS_TITLE_PORTAL_ADMIN"/></xsl:attribute>
- </xsl:when>
- <xsl:when test="$tool-name = 'datasourceconnections'">
- <xsl:attribute name="src">
- <xsl:value-of select="concat($base-url, '&m=portal/legacy_tools/tools_directory.xts&tool_tab=d')"/>
- </xsl:attribute>
- <xsl:attribute name="title"><xts:string id="IDS_TITLE_DATASOURCES"/></xsl:attribute>
- </xsl:when>
- <xsl:when test="$tool-name = 'distributionlistandcontacts'">
- <xsl:attribute name="src">
- <xsl:value-of select="concat($base-url, '&m=portal/legacy_tools/tools_directory.xts&tool_tab=l')"/>
- </xsl:attribute>
- <xsl:attribute name="title"><xts:string id="IDS_TITLE_DISTRIBUTION_LISTS_AND_CONTACTS"/></xsl:attribute>
- </xsl:when>
- <xsl:when test="$tool-name = 'printers'">
- <xsl:attribute name="src">
- <xsl:value-of select="concat($base-url, '&m=portal/legacy_tools/tools_directory.xts&tool_tab=p')"/>
- </xsl:attribute>
- <xsl:attribute name="title"><xts:string id="IDS_TITLE_PRINTERS"/></xsl:attribute>
- </xsl:when>
- </xsl:choose>
- </iFrame>
- </markupXml>
- </markup>
- </fragment>
- </xos:entityBody>
- </xos:part>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- </xts:morphlet>
|