123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666 |
- <?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" requiredCapability="canUseAdministrationPortal">
- <!--
- This morphlet (add_multilingual.xts) consists of the following blocks:
- formlogic_init - update various /root/env level parameters based on new or changed /root/env parameters.
- doParam - build the /root/env/param structure with language specific names beginning with m_add_, m_delete_locale, and m_transLocale.
- doEntriesContent - build the /root/entries/entry structure and remove the /root/env/param with names beginning with m_add_ and m_transloc.
- doEncode - build the /root/env/addlocales structure.
- getContent - retrieve CM Information for this page.
- renderPage - render the multilingual properties page for adding language specific objects.
- -->
- <!--
- ===============================================================================================
- 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="getLocales" type="exec" mode="interpret" processor="XSLT" path="/portal/locales.xml"/ -->
-
- <xts:block id="doParam" type="exec" mode="interpret" processor="XSLT" condition=".[/root/env/param[@name='m_add_name' or @name='m_add_screenTip' or @name='m_add_description']]" mandatory="false" dependency="formlogic_init">
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xtsext="xalan://com.cognos.xts.ext.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:variable name="nam"><xsl:value-of select="key('env-param','m_add_name')"/></xsl:variable>
- <xsl:variable name="dsc"><xsl:value-of select="key('env-param','m_add_description')"/></xsl:variable>
- <xsl:variable name="sct"><xsl:value-of select="key('env-param','m_add_screenTip')"/></xsl:variable>
- <xsl:variable name="lcle"><xsl:value-of select="key('env-param','m_transLocale')"/></xsl:variable>
- <xsl:variable name="fndname"><xsl:value-of select="concat('m_add_name_',$lcle)"/></xsl:variable>
- <xsl:variable name="fnddesc"><xsl:value-of select="concat('m_add_description_',$lcle)"/></xsl:variable>
- <xsl:variable name="fndscrt"><xsl:value-of select="concat('m_add_screenTip_',$lcle)"/></xsl:variable>
- <xsl:variable name="fnddelt"><xsl:value-of select="concat('m_delete_locale_',$lcle)"/></xsl:variable>
- <xsl:variable name="sections"><xsl:value-of select="key('env-param','m_sectioning')"/></xsl:variable>
- <xsl:template match="/">
- <xts:sequence>
- <xts:append select="/root/env">
- <xsl:if test="not($sections = '1')">
- <xsl:element name="param">
- <xsl:attribute name="name"><xsl:value-of select="$fndname"/></xsl:attribute>
- <xsl:value-of select="$nam"/>
- </xsl:element>
- <xsl:element name="param">
- <xsl:attribute name="name"><xsl:value-of select="$fnddesc"/></xsl:attribute>
- <xsl:value-of select="$dsc"/>
- </xsl:element>
- <xsl:element name="param">
- <xsl:attribute name="name"><xsl:value-of select="$fndscrt"/></xsl:attribute>
- <xsl:value-of select="$sct"/>
- </xsl:element>
- <xsl:element name="param">
- <xsl:attribute name="name"><xsl:value-of select="$fnddelt"/></xsl:attribute>
- </xsl:element>
- </xsl:if>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ===============================================================================================
- get_list_content
-
- Unpacks the bottom list (web64encoded) in /root/entries.
- ===============================================================================================
- -->
- <xts:block id="doEntriesContent" type="exec" mode="interpret" processor="XSLT" dependency="doParam">
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xtsext="xalan://com.cognos.xts.ext.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:variable name="sections"><xsl:value-of select="key('env-param','m_sectioning')"/></xsl:variable>
- <xsl:variable name="passport" select="/root/credential/param[@name='CAM']/*[local-name() ='CAM']/*[local-name() = 'CAMPassport']/*[local-name() = 'id']"/>
- <xsl:template match="/">
- <xts:sequence>
- <xts:append select="/root">
- <entries>
- <xsl:value-of select="xtsext:web64decode(xtsext:cafaction('sign_unwrap', string(key('env-param','addlocales'))), true())" disable-output-escaping="yes"/>
- </entries>
- </xts:append>
- <xts:append select="/root/entries">
- <xsl:if test="key('env-param','m_add_name') and key('env-param','m_add_name') != '' and not($sections='1')">
- <entry>
- <xsl:element name="mlName"><xsl:value-of select="key('env-param','m_add_name')"/></xsl:element>
- <!-- This can be uncommented if they decide to see the entry added -->
- <!--xsl:element name="mlScreenTip">
- <xsl:choose>
- <xsl:when test="string-length(key('env-param','m_add_screenTip'))>15">
- <xsl:value-of select="concat(substring(key('env-param','m_add_screenTip'),1,15),$elip)"/>
- </xsl:when>
- <xsl:otherwise><xsl:value-of select="key('env-param','m_add_screenTip')"/></xsl:otherwise>
- </xsl:choose>
- </xsl:element>
- <xsl:element name="mlDescription">
- <xsl:choose>
- <xsl:when test="string-length(key('env-param','m_add_description'))>25">
- <xsl:value-of select="concat(substring(key('env-param','m_add_description'),1,25),$elip)"/>
- </xsl:when>
- <xsl:otherwise><xsl:value-of select="key('env-param','m_add_description')"/></xsl:otherwise>
- </xsl:choose>
- </xsl:element-->
- <xsl:element name="mlLanguage"><xsl:value-of select="key('env-param','m_add_language_display')"/></xsl:element>
- </entry>
- </xsl:if>
- </xts:append>
- <xsl:if test="key('env-param','m_add_name')">
- <xts:delete select="/root/env/param[@name='m_add_name']"/>
- <xts:delete select="/root/env/param[@name='m_add_description']"/>
- <xts:delete select="/root/env/param[@name='m_add_screenTip']"/>
- <xts:delete select="/root/env/param[@name='m_transLocale']"/>
- <xts:delete select="/root/env/param[@name='m_add_language_display']"/>
- </xsl:if>
- <xsl:if test="$sections='1'"><xts:delete select="/root/env/param[@name='m_sectioning']"/></xsl:if>
-
- <xts:delete select="/root/env/param[@name='pagerfromlistpager']"/>
- <xts:delete select="/root/env/param[@name='pagertolistpager']"/>
- <xts:delete select="/root/env/param[@name='pagerfrom_dlistpager']"/>
- <xts:delete select="/root/env/param[@name='pagerto_dlistpager']"/>
-
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ===============================================================================================
- encode_lists
-
- Encodes the entries in /root/entries into the addlocales parameter in /root/env/param.
- ===============================================================================================
- -->
- <xts:block id="doEncode" mode="interpret" processor="XSLT" type="exec" dependency="doEntriesContent">
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:pf="http://developer.cognos.com/schemas/xts/pf" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:template match="/">
- <xsl:variable name="passport" select="/root/credential/param[@name='CAM']/*[local-name() ='CAM']/*[local-name() = 'CAMPassport']/*[local-name() = 'id']"/>
- <xts:sequence>
- <xts:delete select="/root/env/param[@name='addlocales']"/>
- <xts:append select="/root/env">
- <xsl:variable name="entries-markup">
- <xsl:apply-templates select="/root/entries/*" mode="markup"/>
- </xsl:variable>
- <param name="addlocales">
- <xsl:value-of select="xtsext:cafaction( concat('sign_wrap_setpassportid_', $passport), xtsext:web64encode(string($entries-markup), true()))"/>
- </param>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- <pf:serialize-xml/>
- </xsl:stylesheet>
- </xts:block>
-
-
- <!--
- ===============================================================================================
- getContent - get our data from Content Manager
- ===============================================================================================
- -->
- <xts:block id="getContent" processor="XSLT" type="exec" condition=".[(/root/env/param[@name='m_class'] != 'exportDeployment') and (/root/env/param[@name='m_class'] != 'importDeployment')] " mandatory="false" dependency="doEncode">
- <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="/">
- <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="/root/env/param[@name='m_obj']"/>
- </cm:search>
- <cm:properties>
- <cml:prop-general/>
- <cm:property name="name"/>
- <cm:property name="description"/>
- <cm:property name="screenTip"/>
- <cm:property name="position"/>
- </cm:properties>
- <cm:options schemaInfo="true"/>
- </cm:query>
- </xts:transform>
- </send:request>
- </xts:transform>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ===============================================================================================
- renderPage - render the page
- ===============================================================================================
- -->
- <xts:block id="renderPage" mode="output" processor="XSLT" type="exec" mimeType="text/html" dependency="formlogic_init doEntriesContent doEncode getContent">
- <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/formlogic.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:dc="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/confirm/1/"
- 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:utml="http://developer.cognos.com/schemas/xts/logicsheet/xslt/formlogic/"
- exclude-result-prefixes="xsl cf cp df dp dc lyt cm cml utml xtsext pf send xts">
- <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no" omit-xml-declaration="yes"/>
- <!-- current file name -->
- <xsl:variable name="mname" select="'add_multilingual.xts'"/>
- <pf:variables/>
- <!-- start the output -->
- <xsl:template match="/root">
- <xsl:variable name="section_path"><xsl:value-of select="key('env-param','m_obj')"/></xsl:variable>
- <cml:single-object/>
- <!-- basically create a list of what values have not been used and put their position in the variable notUsed.-->
- <xsl:variable name="notUsed">
- <xsl:for-each select="/root/config/param[@name='locale']/locale[@type='contentLocale']">
- <xsl:variable name="cL"><xsl:value-of select="./id"/></xsl:variable>
- <xsl:variable name="haveMatch">
- <xsl:for-each select="/root/env/param[starts-with( @name, 'm_delete_locale_' )]">
- <xsl:if test="translate(substring-after(./@name,'m_delete_locale_'),'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz') = $cL">
- <xsl:value-of select="$cL"/>
- </xsl:if>
- </xsl:for-each>
- </xsl:variable>
- <xsl:if test="$haveMatch=''">
- <xsl:value-of select="concat(position(),' ,')"/>
- </xsl:if>
- </xsl:for-each>
- </xsl:variable>
- <xsl:variable name="firstpos" select="substring-before(string($notUsed), ' ,')"/>
- <xsl:variable name="posnum" select="number($firstpos)"/>
- <xsl:variable name="firsttouse">
- <xsl:value-of select="/root/config/param[@name='locale']/locale[@type='contentLocale' and position()=$posnum]/id"/>
- </xsl:variable>
- <!-- default product variable used with the product local select -->
- <xsl:variable name="default-product-locale">
- <xsl:choose>
- <xsl:when test="key('env-param','m_transLocale') and key('env-param','m_transLocale') != ''">
- <!-- we know this guy is in lower case...it comes from us! -->
- <xsl:value-of select="key('env-param','m_transLocale')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:choose>
- <xsl:when test="$firsttouse != ''">
- <xsl:value-of select="$firsttouse"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="translate( string($contentLocale), 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz' )"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <!-- this will represent the root with the given label -->
- <xsl:variable name="report-title">
- <xsl:choose>
- <xsl:when test="starts-with(string($section_path),string( /root/path//cm:content/cm:searchPath))">
- <xts:string id="IDS_ALL_FILES"/>
- </xsl:when>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="isDeployment">
- <xsl:choose>
- <xsl:when test="(/root/env/param[@name='m_class'] = 'exportDeployment') or (/root/env/param[@name='m_class'] = 'importDeployment')">
- <xsl:value-of select="'true'"/>
- </xsl:when>
- <xsl:otherwise><xsl:value-of select="'false'"/></xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="has_write_permission" select="contains(concat(' ', string($the-object/cm:permissions), ' '), ' write ')"/>
- <xsl:variable name="browserTitle">
- <xts:string id="IDS_DEPLOYMENT_ADD_TARGET_NAME_TITLE">
- <xts:param name="specName">
- <span lang="{$contentLocale}"><xsl:value-of select="/root/env/param[@name = 'm_p_defaultName']"/></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="HID_DEPLOY"/> <!-- Help system -->
- <xsl:if test="$has_write_permission = true() or $isDeployment='true'">
- <script language="javascript">
- var MSG_ERR_NO_NAME = "<xts:string id="IDS_PROP_ERR_NO_NAME" encode="javascript"/>";
- function cancelit()
- {
- <xsl:for-each select="/root/env/param[starts-with(@name,'m_add_name_')]">
- <xsl:variable name="deloc" select="xtsext:javascriptencode(substring-after(./@name,'m_add_name_'))"/>
- document.pform['m_delete_locale_<xsl:value-of select="$deloc"/>'].value='<xsl:value-of select="$deloc"/>';
- </xsl:for-each>
- <!-- even on Cancel - reset the section information -->
- resetSection();
- }
- function resetSection()
- {
- <!--
- This function resets the listpagersection (for main-pager-section) to 1 and the sectioning to 0,
- so that the next time to this page from properties_multilingual will handle processing correctly.
- -->
- document.pform.m_listpagersection.value = '1';
- document.pform.m_sectioning.value='0';
- }
- function validate()
- {
- <!--
- This function is here only for main-pager-section. It allows moving through the sections without
- affecting the main functioning of add-multilingual.
- -->
- <xsl:if test="key('env-param','m_return') and key('env-param','m_return')!=''">
- document.pform.m_return.value = '<xsl:value-of select="xtsext:javascriptencode(string(key('env-param','m_return')))"/>';
- </xsl:if>
- document.pform.m.value = '<xsl:value-of select="$app"/>/<xsl:value-of select="$mname"/>';
- document.pform.ps_nav_op.value='maintain';
- document.pform.m_sectioning.value='1';
- return true;
- }
-
- function addLocale()
- {
- document.pform.m_add_language_display.value = document.pform.m_transLocale.options[document.pform.m_transLocale.selectedIndex].text;
- if (document.pform['m_add_name'] && document.pform['m_add_name'].type != "hidden")
- {
- if (trim(document.pform['m_add_name'].value) == '')
- {
- document.pform['m_add_name'].focus();
- alert( MSG_ERR_NO_NAME );
- return;
- }
- }
- <xsl:if test="key('env-param','m_return') and key('env-param','m_return')!=''">
- document.pform.m_return.value = '<xsl:value-of select="xtsext:javascriptencode(string(key('env-param','m_return')))"/>';
- </xsl:if>
- document.pform.m.value = '<xsl:value-of select="$app"/>/<xsl:value-of select="$mname"/>';
- document.pform.ps_nav_op.value='maintain';
- if (document.layers)
- {
- if( document.layers['m_add_name'] != null && document.layers['m_add_name'].type != "hidden")
- document.layers['m_add_name'].color = 'silver';
- }
- else if (document.all)
- {
- if( document.all['m_add_name'] != null && document.all['m_add_name'].type != "hidden")
- document.all['m_add_name'].style.color = 'silver';
- }
- document.pform.m_newtrans.value = '1';
- document.pform.submit();
- }
- function langChange(idx)
- {
- document.pform.m_add_language_display.value = document.pform.m_transLocale.options[idx].text;
- }
- </script>
- <script language="javascript" src="{$webcontent}/{$app}/js/utilities.js"></script>
- </xsl:if>
- </dp:script>
- <utml:form name="pform" method="post" action="{$gateway}">
- <utml:read-only>
- <xsl:choose>
- <xsl:when test="$has_write_permission = true() or $isDeployment='true'">
- <xsl:text>false</xsl:text>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text>true</xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- </utml:read-only>
- <!--
- 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="m" value="" utml:update="false"/>
- <utml:input type="hidden" name="m_newtrans" value="0"/>
- <utml:input type="hidden" name="m_sectioning" value="0"/>
- <utml:input type="hidden" name="m_add_language_display" value="" utml:update="false"/>
- <xsl:choose>
- <xsl:when test="$isDeployment='true'">
- <dp:header>
- <dp:title>
- <xsl:copy-of select="$browserTitle"/>
- </dp:title>
- <dp:description>
- <xts:string id="IDS_DEPLOYMENT_ADD_TARGET_NAME_DESCRIPTION"/>
- </dp:description>
- </dp:header>
- </xsl:when>
- <xsl:otherwise>
- <dp:header>
- <dp:title><xsl:copy-of select="$browserTitle"/></dp:title>
- <dp:description>
- <xts:string id="IDS_PROP_ADD_MULTILINGUAL_INTRO"/>
- </dp:description>
- </dp:header>
- </xsl:otherwise>
- </xsl:choose>
-
- <lyt:layout style="1">
- <lyt:section>
- <dp:list>
- <dp:section>
- <dp:input>
- <dp:section1 id="lbl_m_transLocale">
- <xts:string id="IDS_PROP_LANGUAGE"/>
- </dp:section1>
- <dp:section2>
- <utml:select name="m_transLocale" aria-labelledby="lbl_m_transLocale">
- <!-- Hard-coded language values for 0.1 release -->
- <xsl:for-each select="/root/config/param[@name='locale']/locale[@type='contentLocale']">
- <xsl:variable name="cL"><xsl:value-of select="id"/></xsl:variable>
- <xsl:variable name="haveMatch">
- <xsl:for-each select="/root/env/param[starts-with( @name, 'm_delete_locale_' )]">
- <xsl:if test="translate(substring-after(./@name,'m_delete_locale_'),'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz') = $cL">
- <xsl:value-of select="$cL"/>
- </xsl:if>
- </xsl:for-each>
- </xsl:variable>
- <xsl:variable name="haveMatch2">
- <xsl:for-each select="/root/env/param[starts-with( @name, 'm_d_default_name_' )]">
- <xsl:if test="translate(substring-after(./@name,'m_d_default_name_'),'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz') = $cL">
- <xsl:value-of select="$cL"/>
- </xsl:if>
- </xsl:for-each>
- </xsl:variable>
- <xsl:if test="$haveMatch='' and $haveMatch2=''">
- <utml:option>
- <xsl:if test="$cL = $default-product-locale"><xsl:attribute name="selected"/></xsl:if>
- <utml:value><xsl:value-of select="id"/></utml:value>
- <xsl:attribute name="id"><xsl:value-of select="displayName"/></xsl:attribute>
- <xsl:value-of select="displayName"/>
- </utml:option>
- </xsl:if>
- </xsl:for-each>
- </utml:select>
- </dp:section2>
- </dp:input>
- </dp:section>
- </dp:list>
- </lyt:section>
- </lyt:layout>
- <xsl:variable name="inputTitle">
- <xsl:choose>
- <xsl:when test="$isDeployment='true'">
- <xts:string id="IDS_DEPLOYMENT_TARGET_NAME_TARGET"/>
- </xsl:when>
- <xsl:otherwise>
- <xts:string id="IDS_PROP_NAME"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <lyt:layout style="2">
- <lyt:section>
- <dp:input>
- <dp:section1 id="lbl_m_add_name">
- <xsl:value-of select="$inputTitle"/>
- </dp:section1>
- <dp:section2>
- <utml:input type="text" class="pInput" size="30" maxlength="256" aria-labelledby="lbl_m_add_name">
- <utml:name>m_add_name</utml:name>
- <utml:read-only>
- <xsl:choose>
- <xsl:when test="$the-object/cm:defaultName[@modifiable = 'false']"><xsl:text>true</xsl:text></xsl:when>
- <xsl:otherwise>
- <xsl:text>false</xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- </utml:read-only>
- <utml:value>
- <xsl:if test="$the-object/cm:defaultName[@modifiable = 'false']">
- <xsl:value-of select="$the-object/cm:defaultName"/>
- </xsl:if>
- </utml:value>
- </utml:input>
- <xsl:if test="$the-object/cm:defaultName[@modifiable = 'false']">
- <utml:input type="hidden" name="m_add_name">
- <utml:value><xsl:value-of select="$the-object/cm:defaultName"/></utml:value>
- </utml:input>
- </xsl:if>
- </dp:section2>
- </dp:input>
- <xsl:if test="$the-object/cm:defaultScreenTip and not(key('session-param','e_proot')='' and key('session-param','e_mroot')='')">
- <dp:input>
- <dp:section1 id="lbl_m_add_screenTip">
- <xts:string id="IDS_PROP_SCREENTIP"/>
- </dp:section1>
- <dp:section2>
- <utml:input type="text" class="pInput" maxlength="100" size="30" aria-labelledby="lbl_m_add_screenTip">
- <utml:name>m_add_screenTip</utml:name>
- <utml:read-only><xsl:value-of select="$the-object/cm:defaultScreenTip[@modifiable = 'false']"/></utml:read-only>
- <utml:value>
- <xsl:if test="$the-object/cm:screenTip[@modifiable = 'false']">
- <xsl:value-of select="$the-object/cm:screenTip"/>
- </xsl:if>
- </utml:value>
- </utml:input>
- <xsl:if test="$the-object/cm:screenTip[@modifiable = 'false']">
- <utml:input type="hidden" name="m_add_screenTip">
- <utml:value><xsl:value-of select="$the-object/cm:screenTip"/></utml:value>
- </utml:input>
- </xsl:if>
- </dp:section2>
- </dp:input>
- </xsl:if>
- </lyt:section>
- <lyt:section>
- <xsl:if test="$the-object/cm:defaultDescription and not($the-object/cm:shortcut != '')">
- <dp:input>
- <dp:section1 id="lbl_m_add_description">
- <xts:string id="IDS_PROP_DESCRIPTION"/>
- </dp:section1>
- <dp:section2>
- <utml:textarea rows="4" class="pTextarea" cols="32" aria-labelledby="lbl_m_add_description">
- <utml:name>m_add_description</utml:name>
- <utml:read-only><xsl:value-of select="$the-object/cm:defaultDescription[@modifiable='false']"/></utml:read-only>
- <utml:value>
- <xsl:if test="$the-object/cm:description[@modifiable = 'false']">
- <xsl:value-of select="$the-object/cm:description"/>
- </xsl:if>
- </utml:value>
- </utml:textarea>
- <xsl:if test="$the-object/cm:description[@modifiable = 'false']">
- <utml:input type="hidden" name="m_add_description">
- <utml:value><xsl:value-of select="$the-object/cm:description"/></utml:value>
- </utml:input>
- </xsl:if>
- </dp:section2>
- </dp:input>
- </xsl:if>
- </lyt:section>
- </lyt:layout>
- <lyt:layout style="1" border="no">
- <lyt:section align="center" width="100%">
- <dp:buttonGroup>
- <dp:button id="btn_addLocale">
- <a role="button">
- <xsl:attribute name="href">javascript:addLocale()</xsl:attribute>
- <dp:buttonText>
- <xsl:text/><xts:string id="IDS_ADD"/> <xsl:text/>
- <img border="0" align="absMiddle" alt="">
- <xsl:attribute name="src"><xsl:value-of select="$image_root"/>move_down.gif</xsl:attribute>
- </img>
- </dp:buttonText>
- </a>
- </dp:button>
- </dp:buttonGroup>
- </lyt:section>
- </lyt:layout>
- <lyt:layout style="1" title="IDS_ADDENTRIES_ADDENTRIES" border="yes">
- <lyt:section>
- <cf:main-pager-section name="listpager" form="pform" width="100%" validate="true">
- <cf:param name="item-path">/root/entries/*</cf:param>
- <cf:param name="target">concat(concat($app,'/'),$mname)</cf:param>
- <cf:param name="lines-per-page">
- <xsl:choose>
- <xsl:when test="key('session-param','linesPerPage')!=''">
- <xsl:value-of select="key('session-param','linesPerPage')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="/root/system/param[@name='defaultPortalPreferences']/pref[@name='lines']"/>
- </xsl:otherwise>
- </xsl:choose>
- </cf:param>
- <cf:param name="rows">
- <cp:tableHeader>
- <cp:columnHeader width="25%">
- <xts:string id="IDS_PROP_MULTILINGUAL_LANGUAGE_COLUMN"/>
- </cp:columnHeader>
- <cp:columnHeader width="75%">
- <xsl:choose>
- <xsl:when test="$isDeployment='true'">
- <xts:string id="IDS_DEPLOYMENT_PACKAGES_TARGET_NAME"/>
- </xsl:when>
- <xsl:otherwise>
- <xts:string id="IDS_NAME"/>
- </xsl:otherwise>
- </xsl:choose>
- </cp:columnHeader>
- </cp:tableHeader>
- <cp:tableContent>
- <cp:columnContent><xsl:value-of select="mlLanguage"/></cp:columnContent>
- <cp:columnContent lang="{$contentLocale}"><xsl:value-of select="mlName"/></cp:columnContent>
- </cp:tableContent>
- <cf:row/>
- </cf:param>
- </cf:main-pager-section>
- </lyt:section>
- </lyt:layout>
- <xsl:choose>
- <xsl:when test="$isDeployment='true'">
- <dp:footer>
- <df:button df:id="IDS_OK" df:style="stack-down-save">
- <df:target><xsl:value-of select="$app"/>/deployment_target_name.xts</df:target>
- </df:button>
- <df:button df:id="IDS_CANCEL" df:style="stack-down" onclick="javascript:cancelit()">
- <df:target><xsl:value-of select="$app"/>/deployment_target_name.xts</df:target>
- </df:button>
- </dp:footer>
- </xsl:when>
- <xsl:otherwise>
- <dp:footer>
- <df:button df:id="IDS_OK" df:style="maintain" onclick="javascript:resetSection()">
- <df:target><xsl:value-of select="$app"/>/properties_multilingual.xts</df:target>
- </df:button>
- <df:button df:id="IDS_CANCEL" df:style="maintain" onclick="javascript:cancelit()">
- <df:target><xsl:value-of select="$app"/>/properties_multilingual.xts</df:target>
- </df:button>
- </dp:footer>
- </xsl:otherwise>
- </xsl:choose>
- </utml:form>
- </dp:page>
- </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"/>
- <xsl:template match="/">
- <dbg:dumpxml select="/root"/>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- </xts:morphlet>
|