123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- Licensed Materials - Property of IBM
- IBM Cognos Products: ps
- (C) Copyright IBM Corp. 2013, 2016
- 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:out="http://www.w3.org/1999/XSL/Transform"
- 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: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:ctrl="http://developer.cognos.com/schemas/xts/logicsheets/xslt/controls/"
- xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
- xmlns:cp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/presentation/"
- xmlns:mf="http://developer.cognos.com/schemas/xts/logicsheets/presentation/main/mf"
- xmlns:bus="http://developer.cognos.com/schemas/bibus/1/"
- xmlns:dbg="http://developer.cognos.com/schemas/xts/logicsheets/xslt/debug/"
- xmlns:cml="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/cml/1/"
- xmlns:utml="http://developer.cognos.com/schemas/xts/logicsheet/xslt/formlogic/"
- xmlns:xts="http://developer.cognos.com/schemas/xts/"
- xmlns:dpl="http://developer.cognos.com/schemas/xts/logicsheets/deployment/"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- xmlns:x="x"
- exclude-result-prefixes="xsl cm cf cp df dp lyt ctrl cml bus utml xtsext dpl">
- <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_deployment.xts'"/>
- <!-- add any theme variables -->
- <pf:variables/>
- <pf:serialize-xml/>
- <!-- deployment variables -->
- <dpl:variables/>
- <mf:variables/>
- <xsl:key name="deploymentOption" match="/root/cm:deploymentOptionsUI/cm:deploymentOption" use="@name"/>
- <!-- start the output -->
- <xsl:template match="/root">
- <!-- get passed in parameters -->
- <xsl:variable name="parm_id" select="/root/env/param[@name = 'id']"/>
- <cml:single-object/>
- <xsl:variable name="has_write_permission" select="contains(concat(' ', $the-object/cm:permissions, ' '), ' write ')"/>
- <xsl:variable name="has_policy_permission" select="contains(concat(' ', $the-object/cm:permissions, ' '), ' setPolicy ')"/>
- <xsl:variable name="showOKCancel" select="$has_write_permission or $has_policy_permission"/>
- <xsl:variable name="browserTitle">
- <xts:string id="IDS_PROPERTIES_TITLE">
- <xts:param name="objectName">
- <span lang="{$contentLocale}"><xsl:value-of select="/root/env/param[@name = '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>
- <dp:script>
- <pf:help context="HID_DEPLOYMENT_INFO"/>
- <!-- Help system -->
- <script language="JavaScript">
- function init()
- {
- <xsl:if test="/root/cm:deploymentOptionsUI/cm:deploymentOption[@name='entireContentStoreSelect']!='true'">
- if (window.disablePackageOptions)
- disablePackageOptions();
- </xsl:if>
- if ( document.pform.m_packagesOp != null )
- {
- document.pform.m_packagesOp.value = "updateProperties";
- }
- <xsl:if test="$deployment-method='import' and not(/root/*[local-name()='archiveOptions'])">
- alert("<xts:string id="IDS_DEPLOYMENT_MISSING_ARCHIVE" encode="javascript"/>" );
- </xsl:if>
- }
- <xsl:variable name="missingArchiveMessage">
- <xsl:text/><xts:string id="IDS_DEPLOYMENT_SELECT_ANOTHER_ARCHIVE" encode="javascript"><xts:param name="archiveName"><xsl:value-of select="/root/env/param[@name = 'm_archive']"/></xts:param></xts:string><xsl:text/>
- </xsl:variable>
- function validate()
- {
- <xsl:if test="$deployment-method='import' and not(/root/*[local-name()='archiveOptions'])">
- alert("<xsl:value-of select="$missingArchiveMessage"/>");
- return false;
- </xsl:if>
- var name = new String(document.pform.m_archive.value);
- if (name.search(/[\\\/\:\*\?\"<>|!#$%^&]/) != -1)
- {
- alert("<xts:string id="IDS_DEPLOYMENT_INVALID_FILE_NAME" encode="javascript"/>" );
- return false;
- }
- if ((document.pform.m_dataSourceSignonSelect != null) && (document.pform.m_dataSourceSignonSelect.checked == true) && ((document.pform.m_archiveEncryptPword == null) || (document.pform.m_archiveEncryptPword.value =="")))
- {
- alert("<xts:string id="IDS_DEPLOYMENT_PROPERTIES_PASSWORD_WARNING" encode="javascript"/>" );
- return false;
- }
- <xsl:if test="$deployment-method='export' and key('env-param', 'm_exportMethod')='selectTenants'">
- if (!verifyTenantSelection()) {
- return false;
- }
- </xsl:if>
- return true;
- }
- </script>
- <dpl:disableDependentOptionsRadio/>
- <dpl:disableDependentOptions/>
- <dpl:saveLastValueFunction/>
- <dpl:saveLastValueFunctionRadio/>
- <xsl:if test="key('env-param', 'm_exportMethod')='selectTenants'">
- <script language="javascript" src="{$webRoot}/dojo16/dojo/dojo.js"/>
- <dpl:tenantSelectionScript/>
- </xsl:if>
- <dc:confirm-cancel/>
- <script language="javascript" src="{$webcontent}/{$app}/js/list.js"></script>
- </dp:script>
- <utml:form name="pform" method="post" action="{$gateway}">
- <utml:excludes>selectedTenants selectedTenantNames</utml:excludes>
- <utml:read-only>
- <xsl:choose>
- <xsl:when test="contains($the-object/cm:permissions, 'write')">false</xsl:when>
- <xsl:otherwise>true</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="ifrmcmd" value="save" utml:update="false"/>
- <utml:input type="hidden" name="m_packagesOp" utml:update="false" value="updateProperties"/>
- <utml:input type="hidden" name="m_propertiesError" utml:update="false" value="false"/>
- <utml:input type="hidden" name="m_deploymentWizardPage"/>
- <utml:input type="hidden" name="target_rename"/>
- <utml:input type="hidden" name="target_guid"/>
- <utml:input type="hidden" name="target_location"/>
- <utml:input type="hidden" name="target_source_name"/>
- <xsl:if test="$deployment-method='import'">
- <utml:input type="hidden" name="selectedTenants"/>
- </xsl:if>
- <utml:input type="hidden" name="m_targetMorphlet">
- <utml:value>
- <xsl:value-of select="'properties_deployment.xts'"/>
- </utml:value>
- </utml:input>
- <utml:input type="hidden" name="pager_formop"/>
- <xsl:if test="not($has_write_permission)">
- <utml:input type="hidden" name="read_only_page"/>
- <utml:input type="hidden" name="changed_m_p_defaultName" value="0"/>
- <utml:input type="hidden" name="changed_m_p_defaultDescription" value="0"/>
- <utml:input type="hidden" name="changed_m_p_defaultScreenTip" value="0"/>
- </xsl:if>
- <utml:input type="hidden" name="m_selectArchivePageVisited" value="" utml:update="false"/>
- <utml:input type="hidden" name="m_firstrun" utml:update="false">
- <utml:value>
- <xsl:choose>
- <xsl:when test="key('env-param','m_firstrun')">
- <xsl:value-of select="key('env-param','m_firstrun')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="'true'"/>
- </xsl:otherwise>
- </xsl:choose>
- </utml:value>
- </utml:input>
- <!-- dialog header -->
- <dp:header useBackURL="not($showOKCancel)" div="div">
- <dp:title>
- <xsl:copy-of select="$browserTitle"/>
- </dp:title>
- </dp:header>
- <!-- property tabs -->
- <df:propertiesTabs select="deployment">
- <df:hasSetPolicy>
- <xsl:value-of select="$has_policy_permission"/>
- </df:hasSetPolicy>
- </df:propertiesTabs>
- <!-- description tabs -->
- <dp:description>
- <dpl:description dpl:import-id="IDS_DEPLOYMENT_PROPERTIES_IMPORT_DESCR" dpl:export-id="IDS_DEPLOYMENT_PROPERTIES_EXPORT_DESCR"/>
- </dp:description>
- <!--Deployment folder section -->
- <lyt:layout style="1" title="IDS_DEPLOYMENT_DEPLOYMENT_FILE_NAME" border="no">
- <lyt:section>
- <dp:list>
- <dp:section>
- <dp:text>
- <xsl:value-of select="/root/env/param[@name='m_archive']"/>
- </dp:text>
- <dp:text>
- <dp:link>
- <utml:a utml:op="stack-up" utml:hide-when-read-only="true">
- <xsl:attribute name="onClick">
- <xsl:text/>javascript:document.pform.m_deploymentWizardPage.value = 'select-archive';document.pform.m_firstrun.value = 'false';<xsl:text/>
- <xsl:if test="key('env-param', 'm_exportMethod')='selectTenants'">prepareSelectedTenantsForSubmit();</xsl:if>
- </xsl:attribute>
- <utml:target>
- <xsl:value-of select="$app"/>/new_deployment2.xts<xsl:text/>
- </utml:target>
- <xts:string id="IDS_DEPLOYMENT_PROPERTIES_CHANGE_FOLDER"/>
- </utml:a>
- </dp:link>
- </dp:text>
- </dp:section>
- </dp:list>
- </lyt:section>
- </lyt:layout>
- <!--
- <xsl:call-template name="deployment-folder-section">
- <xsl:with-param name="form-read-only" select="$form-read-only"/>
- <xsl:with-param name="utml-form-name" select="$utml-form-name"/>
- </xsl:call-template>
- -->
- <xsl:choose>
- <xsl:when test="key('env-param', 'm_exportMethod')='entireContentStore'">
- <!-- Entire content store section -->
- <xsl:call-template name="deployment-method-section">
- <xsl:with-param name="form-read-only" select="$form-read-only"/>
- <xsl:with-param name="utml-form-name" select="$utml-form-name"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="$deployment-method='export' and key('env-param', 'm_exportMethod')='selectTenants'">
- <dpl:exportSelectTenantUI>
- <dpl:param name="propertyPage">true</dpl:param>
- </dpl:exportSelectTenantUI>
- </xsl:when>
- <xsl:when test="$deployment-method='import' and key('env-param', 'm_exportMethod')='selectTenants'">
- <dpl:deploymentMethodOptions>
- </dpl:deploymentMethodOptions>
- </xsl:when>
- <xsl:otherwise>
- <!-- Packages section -->
- <lyt:layout style="1" title="IDS_DEPLOYMENT_PACKAGES_PACKAGES" border="yes">
- <lyt:section>
- <xsl:choose>
- <xsl:when test="$deployment-method='import' ">
- <dpl:importPackagesAvailableUI dpl:track="true">
- <dpl:param name="item-path">/root/cm:deploymentOptionsUI/cm:deploymentOption[@name='package']/*</dpl:param>
- <dpl:param name="type">importDeployment</dpl:param>
- <dpl:param name="propertyPage">true</dpl:param>
- </dpl:importPackagesAvailableUI>
- </xsl:when>
- <xsl:when test="$deployment-method='export' ">
- <dpl:exportPackagesAvailableUI dpl:track="true">
- <dpl:param name="item-path">/root/cm:deploymentOptionsUI/cm:deploymentOption[@name='package']/*</dpl:param>
- <dpl:param name="type">exportDeployment</dpl:param>
- <dpl:param name="propertyPage">true</dpl:param>
- </dpl:exportPackagesAvailableUI>
- </xsl:when>
- </xsl:choose>
- </lyt:section>
- </lyt:layout>
- <!--
- <xsl:call-template name="packages-section">
- <xsl:with-param name="form-read-only" select="$form-read-only"/>
- <xsl:with-param name="utml-form-name" select="$utml-form-name"/>
- </xsl:call-template>
- -->
- <!-- Option section -->
- <xsl:call-template name="package-options-section">
- <xsl:with-param name="form-read-only" select="$form-read-only"/>
- <xsl:with-param name="utml-form-name" select="$utml-form-name"/>
- </xsl:call-template>
- <!-- Directory section -->
- <xsl:call-template name="directory-options-section">
- <xsl:with-param name="form-read-only" select="$form-read-only"/>
- <xsl:with-param name="utml-form-name" select="$utml-form-name"/>
- </xsl:call-template>
- <!-- Ownership section -->
- <xsl:call-template name="general-options-section">
- <xsl:with-param name="form-read-only" select="$form-read-only"/>
- <xsl:with-param name="utml-form-name" select="$utml-form-name"/>
- </xsl:call-template>
- </xsl:otherwise>
- </xsl:choose>
- <!-- Dialog footer -->
- <dp:footer div="div">
- <xsl:choose>
- <xsl:when test="$showOKCancel">
- <df:button df:id="IDS_OK" df:style="submit" utml:validate="true" df:nav_op="stack-down" onClick="javascript:document.pform.m_packagesOp.value='updateProperties';"/>
- <xsl:choose>
- <xsl:when test="key('env-param', 'ps_nav_stack') and not(key('env-param', 'ps_nav_stack') = '') ">
- <df:button df:id="IDS_CANCEL" df:style="stack-down" onclick="{$dc-confirm-cancel}"/>
- </xsl:when>
- <xsl:otherwise>
- <df:button df:id="IDS_CANCEL" df:style="back-url" onclick="{$dc-confirm-cancel}"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:otherwise>
- <df:button df:id="IDS_CLOSE" df:style="back-url"/>
- </xsl:otherwise>
- </xsl:choose>
- </dp:footer>
- <table width="100%">
- <tr>
- <td align="right">
- <font face="arial" size="0">
- <xsl:value-of select="$parm_id"/>
- </font>
- </td>
- </tr>
- </table>
- </utml:form>
- </dp:page>
- </xsl:template>
- <xsl:template name="deployment-folder-section">
- <xsl:param name="form-read-only"/>
- <xsl:param name="utml-form-name"/>
- <xsl:copy>
- <lyt:layout style="1" title="IDS_DEPLOYMENT_DEPLOYMENT_FILE_NAME" border="no">
- <lyt:section>
- <dp:list>
- <dp:section>
- <dp:text>
- <xsl:value-of select="/root/env/param[@name='m_archive']"/>
- </dp:text>
- <dp:text>
- <dp:link>
- <utml:a utml:op="stack-up" onClick="javascript:document.pform.m_deploymentWizardPage.value = 'select-archive';">
- <utml:target>
- <xsl:value-of select="$app"/>/new_deployment2.xts<xsl:text/>
- </utml:target>
- <xts:string id="IDS_DEPLOYMENT_PROPERTIES_CHANGE_FOLDER"/>
- </utml:a>
- </dp:link>
- </dp:text>
- </dp:section>
- </dp:list>
- </lyt:section>
- </lyt:layout>
- </xsl:copy>
- </xsl:template>
- <xsl:template name="package-options-section">
- <xsl:param name="form-read-only"/>
- <xsl:param name="utml-form-name"/>
- <xsl:copy>
- <dpl:packagesIncludeReportOutput dpl:track="true"/>
- </xsl:copy>
- </xsl:template>
- <xsl:template name="directory-options-section">
- <xsl:param name="form-read-only"/>
- <xsl:param name="utml-form-name"/>
- <xsl:copy>
- <dpl:directoryContentOptions dpl:track="true"/>
- </xsl:copy>
- </xsl:template>
- <xsl:template name="general-options-section">
- <xsl:param name="form-read-only"/>
- <xsl:param name="utml-form-name"/>
- <xsl:copy>
- <dpl:generalOptions dpl:track="true"/>
- </xsl:copy>
- </xsl:template>
- <xsl:template name="deployment-method-section">
- <xsl:param name="form-read-only"/>
- <xsl:param name="utml-form-name"/>
- <xsl:copy>
- <dpl:deploymentMethodOptions dpl:track="true"/>
- </xsl:copy>
- </xsl:template>
- <xsl:template name="packages-section">
- <xsl:param name="form-read-only"/>
- <xsl:param name="utml-form-name"/>
- <xsl:copy>
- <lyt:layout style="1" title="IDS_DEPLOYMENT_PACKAGES_PACKAGES" border="yes">
- <lyt:section>
- <dpl:packagesAvailable dpl:track="true" dpl:propertyPage="true">
- <dpl:param name="item-path">/root/cm:deploymentOptionsUI/cm:deploymentOption[@name='package']/*</dpl:param>
- <dpl:param name="target">
- <xsl:value-of select="concat($app, '/properties_deployment.xts')"/>
- </dpl:param>
- </dpl:packagesAvailable>
- </lyt:section>
- </lyt:layout>
- </xsl:copy>
- </xsl:template>
- <pf:gen-icon/>
- </xsl:stylesheet>
|