123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- Licensed Materials - Property of IBM
- IBM Cognos Products: ps
- (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/portal.xml, messages/portalRL.xml" includeConfig="true">
- <!--
- This morphlet (properties_multilingual.xts) consists of the following blocks:
- formlogic_init - update various /root/env level parameters based on new or changed /root/env parameters.
- getTabs - build the /root/tabs/objects structure.
- getContent - retrieve CM Information for this page.
- buildMultiLang - build the /root/multiLang structure with /lang and /name leaf nodes.
- renderPage - render the multilingual information properties page (READ-ONLY view) for the object specified by m_obj or m_id.
- -->
- <!--
- ===============================================================================================
- 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"/>
-
- <!-- Load object-specific property tabs map ============================================================== -->
- <xts:block id="getTabs" type="exec" mode="interpret" processor="XML" path="/portal/uiobjects_tabs.xml"/>
- <!--
- ===============================================================================================
- getContent - get our data from Content Manager
- ===============================================================================================
- -->
- <xts:block id="getContent" processor="XSLT" type="exec">
- <xts:logicsheet path="logicsheets/cm-logic.xsl"/>
- <xts:logicsheet path="logicsheets/buslogic.xslt"/>
- <xsl:stylesheet 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/">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
-
-
- <xsl:template match="/">
- <xsl:variable name="path">
- <xsl:choose>
- <xsl:when test="/root/env/param[@name='m_id']!=''"><xsl:value-of select="/root/env/param[@name='m_id']"/></xsl:when>
- <xsl:otherwise><xsl:value-of select="/root/env/param[@name='m_obj']"/></xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xts:sequence>
- <xts:append>
- <xts:transform src="transforms/CM/post-process.xslt" processor="XSLT">
- <send:request provider="cm">
- <xts:transform src="transforms/CM/pre-process.xslt" processor="XSLT">
- <cm:query xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
- <cm:search>
- <xsl:value-of select="$path"/>
- </cm:search>
- <cm:properties>
- <cml:prop-general/>
- <cm:property name="name"/>
- <cm:property name="description"/>
- <cm:property name="screenTip"/>
- </cm:properties>
- <cm:options schemaInfo="true"/>
- </cm:query>
- </xts:transform>
- </send:request>
- </xts:transform>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <xts:block id="buildMultiLang" dependency="getContent" type="exec" mode="interpret" processor="XSLT" path="/portal/multilingual.xml"/>
- <!--
- ===============================================================================================
- renderPage - render the page
- ===============================================================================================
- -->
- <xts:block id="renderPage" mode="output" processor="XSLT" type="exec" mimeType="text/html" dependency="getContent buildMultiLang formlogic_init getTabs">
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- <xts:logicsheet path="logicsheets/cm-logic.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/dialog/framework.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/layout.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"/>
- <xts:logicsheet path="logicsheets/presentation/dialog/confirm.xslt"/>
- <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:pf="http://developer.cognos.com/schemas/xts/pf"
- xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
- 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:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- xmlns:xts="http://developer.cognos.com/schemas/xts/"
- 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:dc="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/confirm/1/"
- 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:thm="http://developer.cognos.com/schemas/xts/logicsheets/xslt/theme/"
- xmlns:utml="http://developer.cognos.com/schemas/xts/logicsheet/xslt/formlogic/"
- exclude-result-prefixes="xsl cf cp df dp dc lyt cm cml thm utml xtsext xts send pf">
- <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no" omit-xml-declaration="yes"/>
- <!-- current file name -->
- <xsl:variable name="mname" select="'properties_multilingual.xts'"/>
- <pf:variables/>
- <!-- start the output -->
- <xsl:template match="/root">
- <cml:single-object/>
- <xsl:variable name="section_path"><xsl:value-of select="key('env-param','m_obj')"/></xsl:variable>
- <!-- default product variable used with the product local select -->
- <xsl:variable name="default-product-locale">
- <!-- TODO: IS IT CORRECT TO GET THIS FROM THE HTTP HEADER... -->
- <xsl:value-of select="$contentLocale"/>
- <!-- xsl:value-of select="translate(string($contentLocale), 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz' )"/ -->
- </xsl:variable>
- <xsl:variable name="has_write_permission" select="contains(concat(' ', $the-object/cm:permissions, ' '), ' write ')"/>
- <xsl:variable name="has_screenTip" select="$the-object/cm:screenTip"/>
- <!-- this will represent the root with the given label -->
- <xsl:variable name="report-title">
- <xts:string id="IDS_ALL_FILES"/>
- </xsl:variable>
- <xsl:variable name="browserTitle"><xts:string id="IDS_PROP_VIEW_MULTILINGUAL_TITLE"><xts:param name="objectName"><span lang="{$contentLocale}"><xsl:value-of select="key('env-param', 'm_name')"/></span></xts:param></xts:string></xsl:variable>
- <xsl:text disable-output-escaping='yes'><!DOCTYPE html></xsl:text><dp:page longTitle="$browserTitle">
- <dp:meta>
- <pf:meta/> <!-- Standard meta tags -->
- </dp:meta>
- <!-- get passed in parameters -->
- <dp:script>
- <pf:help context=""/> <!-- Help system -->
- </dp:script>
- <utml:form name="pform" method="post" action="{$gateway}">
- <!--
- add a hidden input for the 'ps_nav_op', doing this will define the default behavior when submitting
- this form, we don't want the operation set when tabing, so set it to empty here. ideally this would
- be done by the tabbing itself, but since it's done in the theme stuff (and can't use utml) we'll just do
- it here.
- -->
- <utml:input type="hidden" name="ps_nav_op" value="" utml:update="false"/>
- <!--
- this defines the form command operation to be performed when all the collected properties are submitted.
- -->
- <utml:input type="hidden" name="ifrmcmd" value="" utml:update="false"/>
- <utml:input type="hidden" name="m" value="" utml:update="false"/>
- <xsl:if test="key('env-param','m_transLocale')">
- <utml:input type="hidden" name="m_transLocale" value="" utml:update="false"/>
- </xsl:if>
- <utml:input type="hidden" name="m_newtrans" utml:update="false">
- <xsl:attribute name="value">
- <xsl:choose>
- <xsl:when test="key('env-param','m_newtrans')">
- <xsl:value-of select="key('env-param','m_newtrans')"/>
- </xsl:when>
- <xsl:otherwise><xsl:value-of select="'0'"/></xsl:otherwise>
- </xsl:choose>
- </xsl:attribute>
- </utml:input>
- <!-- dialog header -->
- <dp:header>
- <!-- header titles-->
- <dp:title><xsl:copy-of select="$browserTitle"/></dp:title>
- <dp:description>
- <xts:string id="IDS_PROP_MULTILINGUAL_VIEW_INTRO"/>
- </dp:description>
- </dp:header>
- <xsl:call-template name="initial-render">
- <xsl:with-param name="form-read-only" select="$form-read-only"/>
- <xsl:with-param name="default-product-locale" select="$default-product-locale"/>
- <xsl:with-param name="has_write_permission" select="$has_write_permission"/>
- <xsl:with-param name="has_screenTip" select="$has_screenTip"/>
- </xsl:call-template>
- <dp:footer>
- <xsl:choose>
- <xsl:when test="key('env-param', 'ps_nav_stack') and not(key('env-param', 'ps_nav_stack') = '') ">
- <df:button df:id="IDS_CLOSE" df:style="stack-down"/>
- </xsl:when>
- <xsl:otherwise>
- <df:button df:id="IDS_CLOSE" df:style="back-url"/>
- </xsl:otherwise>
- </xsl:choose>
- </dp:footer>
- </utml:form>
- </dp:page>
- </xsl:template>
-
- <xsl:template name="initial-render">
- <xsl:param name="form-read-only"/>
- <xsl:param name="default-product-locale"/>
- <xsl:param name="has_write_permission"/>
- <xsl:param name="has_screenTip"/>
- <xsl:variable name="transCnt" select="count(/root/multiLangs/name)"/>
- <xsl:for-each select="/root/multiLangs/name">
- <xsl:if test="not(preceding-sibling::name = .)">
- <xsl:variable name="cL"><xsl:value-of select="."/></xsl:variable>
- <xsl:variable name="cLT">
- <xsl:value-of select="translate( $cL, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz' )"/>
- </xsl:variable>
- <xsl:variable name="cFL">
- <xsl:value-of select="/root/config/param[@name='locale']/locale[@type='contentLocale' and id=string($cLT)]/displayName"/>
- </xsl:variable>
- <xsl:variable name="cDN">
- <xsl:value-of select="/root/cm:queryResponse/child::node()/cm:name/*[@xml:lang=$cL]"/>
- </xsl:variable>
- <xsl:variable name="cDST">
- <xsl:value-of select="/root/cm:queryResponse/child::node()/cm:screenTip/*[@xml:lang=$cL]"/>
- </xsl:variable>
- <xsl:variable name="cDD">
- <xsl:value-of select="/root/cm:queryResponse/child::node()/cm:description/*[@xml:lang=$cL]"/>
- </xsl:variable>
- <xsl:if test="position() > 1">
- <lyt:layout style="1" border="yes"/>
- </xsl:if>
- <xsl:call-template name="render-out">
- <xsl:with-param name="cL" select="$cL"/>
- <xsl:with-param name="cFL" select="$cFL"/>
- <xsl:with-param name="cLT" select="$cLT"/>
- <xsl:with-param name="cDST" select="$cDST"/>
- <xsl:with-param name="cDD" select="$cDD"/>
- <xsl:with-param name="cDN" select="$cDN"/>
- <xsl:with-param name="transCnt" select="$transCnt"/>
- <xsl:with-param name="form-read-only" select="$form-read-only"/>
- <xsl:with-param name="default-product-locale" select="$default-product-locale"/>
- <xsl:with-param name="has_write_permission" select="$has_write_permission"/>
- <xsl:with-param name="has_screenTip" select="$has_screenTip"/>
- <xsl:with-param name="initialRender" select="true()"/>
- </xsl:call-template>
- </xsl:if>
- </xsl:for-each>
- <!--/xsl:if>
- </xsl:for-each-->
- </xsl:template>
-
- <xsl:template name="render-out">
- <xsl:param name="cL"/>
- <xsl:param name="cFL"/>
- <xsl:param name="cLT"/>
- <xsl:param name="cDST"/>
- <xsl:param name="cDD"/>
- <xsl:param name="cDN"/>
- <xsl:param name="transCnt"/>
- <xsl:param name="form-read-only"/>
- <xsl:param name="default-product-locale"/>
- <xsl:param name="has_write_permission"/>
- <xsl:param name="has_screenTip"/>
- <xsl:param name="utml-form-name"/>
- <xsl:param name="initialRender" select="false()"/>
- <lyt:layout style="2">
- <lyt:section>
- <dp:list width="100%">
- <dp:section>
- <dp:text tdClass="formLabel" width="60%"><xts:string id="IDS_PROP_LANGUAGE"/></dp:text><dp:text width="40%"></dp:text>
- </dp:section>
- <dp:section>
- <dp:text width="60%"><xsl:value-of select="$cFL"/></dp:text>
- </dp:section>
- </dp:list>
- </lyt:section>
- <lyt:section></lyt:section>
- </lyt:layout>
- <lyt:layout style="2">
- <lyt:section>
- <dp:group>
- <dp:groupItem>
- <dp:group>
- <dp:groupItem width="100%">
- <dp:input>
- <dp:section1><xts:string id="IDS_PROP_NAME"/></dp:section1>
- <dp:section2>
- <utml:input type="text" size="45" utml:update="false" maxlength="256">
- <utml:name><xsl:value-of select="concat('l_defaultName',position())"/></utml:name>
- <utml:value><xsl:value-of select="$cDN"/></utml:value>
- <utml:read-only>true</utml:read-only>
- </utml:input>
- </dp:section2>
- </dp:input>
- </dp:groupItem>
- </dp:group>
- <dp:group>
- <dp:groupItem width="100%">
- <xsl:if test="$has_screenTip and not(key('session-param','e_proot')='' and key('session-param','e_mroot')='')">
- <dp:input>
- <dp:section1><xts:string id="IDS_PROP_SCREENTIP"/></dp:section1>
- <dp:section2>
- <utml:input type="text" class="pInput" size="30" maxlength="100">
- <utml:name><xsl:value-of select="concat('l_defaultScreenTip',position())"/></utml:name>
- <utml:value><xsl:value-of select="$cDST"/></utml:value>
- <utml:read-only>true</utml:read-only>
- </utml:input>
- </dp:section2>
- </dp:input>
- </xsl:if>
- </dp:groupItem>
- </dp:group>
- </dp:groupItem>
- </dp:group>
- </lyt:section>
- <lyt:section>
- <dp:group>
- <dp:groupItem>
- <dp:group>
- <dp:groupItem width="100%">
- <dp:textarea wrap="true">
- <dp:section1><xts:string id="IDS_PROP_DESCRIPTION"/></dp:section1>
- <dp:section2>
- <utml:textarea rows="4" cols="32" class="pTextarea">
- <utml:name><xsl:value-of select="concat('l_defaultDescription',position())"/></utml:name>
- <utml:value><xsl:value-of select="$cDD"/></utml:value>
- <utml:read-only>true</utml:read-only>
- </utml:textarea>
- </dp:section2>
- </dp:textarea>
- </dp:groupItem>
- </dp:group>
- <dp:group>
- <dp:groupItem width="100%"><dp:text/></dp:groupItem>
- </dp:group>
- </dp:groupItem>
- </dp:group>
- </lyt:section>
- </lyt:layout>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ===============================================================================================
- debug - display debug information
- ===============================================================================================
- -->
- <xts:block id="debug" dependency="renderPage" 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>
|