123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- Licensed Materials - Property of IBM
- IBM Cognos Products: AGS
- (C) Copyright IBM Corp. 2005, 2014
- US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
- -->
- <!--
- =================================================================================================================================
- add url.xts
- create a url news item to be dropped into the portal
- =================================================================================================================================
- -->
- <xts:morphlet xmlns:xts="http://developer.cognos.com/schemas/xts/" messageBase="messages/AGS.xml,messages/portal.xml, messages/portalRL.xml" requiredCapability="canUseEventStudio">
- <!-- If the CM roots (personal/public) have not been determined (i.e. exist in the session) then get them. ======================= -->
- <xts:block id="getRootNames" path="portal/cmroots.xml" condition=".[not(/root/session/param[@name = 'e_proot']) and /root/*[local-name()='requestParams']/*[local-name()='param' and @name='requestState'] = 'markup']" processor="XSLT" type="exec" mandatory="false">
- <xts:logicsheet path="logicsheets/buslogic.xslt"/>
- </xts:block>
-
- <!--
- ===============================================================================================
- returnResult - We're done with the email options morphlet, so return the appropriate response
- ===============================================================================================
- -->
- <xts:block id="returnResult" path="/ags/tabResultTemplate.xslt" dependency="getRootNames" type="exec" processor="XSLT" condition=".[/root/*[local-name()='requestParams']/*[local-name()='param' and @name='requestState'] = 'finished']" mandatory="false">
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- </xts:block>
-
- <!--
- ===============================================================================================
- getContent - get our data from Content Manager
- ===============================================================================================
- -->
- <xts:block id="getContent" processor="XSLT" type="exec" dependency="returnResult" condition=".[/root/*[local-name()='requestParams']/*[local-name()='param' and @name='requestState'] = 'markup']">
- <xts:logicsheet path="logicsheets/buslogic.xslt"/>
- <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:variable name="url_location">
- <xsl:choose>
- <xsl:when test="/root/env/param[@name = 'selected_path'] and /root/env/param[@name = 'url_request_mode'] = 'url_location'">
- <xsl:value-of select="/root/env/param[@name = 'selected_path']"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="/root/env/param[@name = 'url_location']"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="url_entry">
- <xsl:choose>
- <xsl:when test="/root/env/param[@name = 'selected_path'] and /root/env/param[@name = 'url_request_mode'] = 'url_entry'">
- <xsl:value-of select="/root/env/param[@name = 'selected_path']"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="/root/env/param[@name = 'url_entry']"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:template match="/">
- <xts:sequence>
- <xsl:if test="$url_location != '' ">
- <xts:append>
- <url_location>
- <xts:transform src="transforms/CM/post-process.xslt" processor="XSLT">
- <send:request provider="cm" requester="AGS:addNewsItem">
- <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="$url_location"/>
- </cm:search>
- <cm:properties>
- <cm:property name="defaultName"/>
- <cm:property name="searchPath"/>
- <cm:property name="permissions"/>
- <cm:property name="ancestors"/>
- </cm:properties>
- </cm:query>
- </xts:transform>
- </send:request>
- </xts:transform>
- </url_location>
- </xts:append>
- </xsl:if>
- <xsl:if test="$url_entry != '' ">
- <xts:append>
- <url_entry>
- <xts:transform src="transforms/CM/post-process.xslt" processor="XSLT">
- <send:request provider="cm" requester="AGS:addNewsItem">
- <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="$url_entry"/>
- </cm:search>
- <cm:properties>
- <cm:property name="defaultName"/>
- <cm:property name="searchPath"/>
- <cm:property name="permissions"/>
- <cm:property name="ancestors"/>
- </cm:properties>
- </cm:query>
- </xts:transform>
- </send:request>
- </xts:transform>
- </url_entry>
- </xts:append>
- </xsl:if>
- <!--stop these malingerers free loading -->
- <xts:delete select="/root/env/param[@name='selected_path' or @name='m_path']"/>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ===============================================================================================
- update names with the fresh value from cm
- ===============================================================================================
- -->
- <xts:block id="updatePaths" processor="XSLT" type="exec" dependency="getContent" condition=".[/root/*[local-name()='requestParams']/*[local-name()='param' and @name='requestState'] = 'markup'] ">
- <xts:logicsheet path="logicsheets/buslogic.xslt"/>
- <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
- <xsl:template match="/">
- <xts:sequence>
- <xsl:if test="/root/url_location">
- <xts:delete select="/root/env/param[@name='url_location']"/>
- <xts:append select="/root/env">
- <param name="url_location">
- <xsl:value-of select="/root/url_location/cm:queryResponse/*/cm:searchPath"/>
- </param>
- </xts:append>
- </xsl:if>
- <xsl:if test="/root/url_entry">
- <xts:delete select="/root/env/param[@name='url_entry']"/>
- <xts:delete select="/root/env/param[@name='url_entry_name']"/>
- <xts:append select="/root/env">
- <param name="url_entry">
- <xsl:value-of select="/root/url_entry/cm:queryResponse/*/cm:searchPath"/>
- </param>
- <param name="url_entry_name">
- <xsl:value-of select="/root/url_entry/cm:queryResponse/*/cm:defaultName"/>
- </param>
- </xts:append>
- </xsl:if>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ===============================================================================================
- genMarkup -
- ===============================================================================================
- -->
- <xts:block id="genMarkup" type="exec" dependency="updatePaths" processor="XSLT" condition=".[/root/*[local-name()='requestParams']/*[local-name()='param' and @name='requestState'] = 'markup' or /root/*[local-name()='morphletResponse']]">
- <!-- logicsheets -->
- <!-- portal specific information -->
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- <xts:logicsheet path="ags/logicsheets/dialogs.xsl"/>
- <!-- Dialog specific logicsheets -->
- <xts:logicsheet path="logicsheets/presentation/dialog/controller-templates.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/formlogic.xslt"/>
- <!-- Generic logicsheets -->
- <xts:logicsheet path="logicsheets/presentation/controls/framework.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/controls/presentation.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/touch_up.xslt"/>
- <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:pf="http://developer.cognos.com/schemas/xts/pf" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" xmlns:lyt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/layout/" xmlns:agsdlg="http://developer.cognos.com/schemas/xts/logicsheets/xslt/ags/dialog/" xmlns:dp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/presentation/" xmlns:utml="http://developer.cognos.com/schemas/xts/logicsheet/xslt/formlogic/" 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:xos="http://developer.cognos.com/schemas/xts/output/" xmlns:cp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/presentation/" xmlns:req-params="http://developer.cognos.com/schemas/request/params" exclude-result-prefixes="agsdlg xts xsl cm pf xtsext lyt dp df cf cp xos">
- <xsl:output method="xml" encoding="utf-8" indent="no"/>
- <xsl:key name="request-param" match="/root/*[local-name()='requestParams']/*[local-name()='param']" use="@name"/>
- <pf:variables/>
- <pf:gen-icon/>
- <xsl:template match="/">
- <xts:sequence>
- <xts:append select="/root/output">
- <xos:part>
- <xos:entityHeader>
- <xos:param name="Content-Type">text/xml; charset=utf-8</xos:param>
- </xos:entityHeader>
- <xos:entityBody>
- <xsl:element name="{key('request-param','resultNode')}" namespace="">
- <markup>
- <xts:transform name="XMLEncode">
- <utml:form name="pform">
- <!--in order to use utml transforms -->
- <xsl:variable name="input-size" select="'45'"/>
- <xsl:variable name="textarea-size" select="'120'"/>
- <xsl:variable name="headline-size" select="'60'"/>
- <utml:input type="hidden" name="url_entry" id="url_entry">
- <utml:value>
- <xsl:value-of select="/root/env/param[@name='url_entry']"/>
- </utml:value>
- </utml:input>
- <utml:input type="hidden" name="m_path" id="m_path" value=""/>
- <utml:input type="hidden" name="taskName" id="taskName" utml:update="false" >
- <utml:value>
- <xsl:if test="key('env-param', 'taskName') and string-length(string(key('env-param', 'taskName'))) > 0">
- <xsl:value-of select="key('env-param', 'taskName')"/>
- </xsl:if>
- </utml:value>
- </utml:input>
- <!--enum of url_none, url_location, url_entry used to eyeball the m.o. of the specify_location usageage-->
- <utml:input type="hidden" name="url_request_mode" id="url_request_mode" value="url_none"/>
- <xsl:variable name="ags_image_root">../ags/images/summary/</xsl:variable>
- <!-- ================================================================ -->
- <!-- H E A D E R -->
- <!-- ================================================================ -->
- <agsdlg:header>
- <dp:image>
- <img alt="" border="0">
- <xsl:attribute name="src"><xsl:value-of select="$ags_image_root"/>icon_newsitem_24.gif</xsl:attribute>
- </img>
- </dp:image>
- <dp:title>
- <xts:string id="DIALOG_URL_TITLE"/>
- </dp:title>
- <dp:description>
- <xts:string id="DIALOG_URL_DESCRIPTION"/>
- </dp:description>
- </agsdlg:header>
- <!-- need this to be included by default -->
- <script type="text/javascript" src="../ags/dragDropHandler.js"/>
- <script language="javascript">
- function init()
- {
- droppy.registerDropZone("url_name","","",'true',"<xsl:value-of select="xtsext:javascriptencode(string(/root/req-params:requestParams/req-params:param[@name='tabSelectedID']))"/>");
- droppy.registerDropZone("url_screentip","","",'true',"<xsl:value-of select="xtsext:javascriptencode(string(/root/req-params:requestParams/req-params:param[@name='tabSelectedID']))"/>");
- droppy.registerDropZone("url_description","","",'true',"<xsl:value-of select="xtsext:javascriptencode(string(/root/req-params:requestParams/req-params:param[@name='tabSelectedID']))"/>");
-
- }
-
- /**
- function that does a screen scrape after the entry text box is exited
- to update the form variable that holds the entry
- */
- function setUriRadio(uri){
- //array of labels in the same order they appear on the page
- var label_index = new Array("url_eventList", "url_entry", "url_url");
-
- for(var i = 0; i < label_index.length; i++){
- if(label_index[i] == uri){
- //this is our baby
- document.pform.url_uri[i].checked = true;
- }else{
- document.pform.url_uri[i].checked = false;
- }
- }
- }
- <xsl:variable name="entry_start_path">
-
- <xsl:if test="/root/url_entry/cm:queryResponse/*/cm:ancestors/cm:ancestorInfo[last()]/cm:searchPath != ''">
- <xsl:value-of select="/root/url_entry/cm:queryResponse/*/cm:ancestors/cm:ancestorInfo[last()]/cm:searchPath"/>
- </xsl:if>
-
- </xsl:variable>
-
- /**
- a flaggette to discern whether we are recently come from an entry select or a url location select
- */
- function setRequestMode(mode){
-
- //so we know what to do on return to this page
- document.pform.url_request_mode.value = mode;
- var cf=parent.getConfigFrame?parent.getConfigFrame():getConfigFrame();
-
- var location_start_path = '<xsl:value-of select="xtsext:javascriptencode(string(/root/env/param[@name='url_location']))"/>';
-
- location_start_path = location_start_path != '' ? location_start_path : decodeURIComponent(cf.cfgGet('PackageRoot'));
- //adjust m_class to represent the start point of the appropriate property
- if(mode == "url_location"){
- document.pform.m_path.value = location_start_path;
- }else if( mode == "url_entry"){
- document.pform.m_path.value = '<xsl:value-of select="xtsext:javascriptencode(string($entry_start_path))"/>';
- }
- }
-
- /*
- this method will shortly be removed..... as validation is to be moved to a server call
- */
- function validate(){
- var handler = new ErrorHandler();
- handler.check(!document.pform.taskName.value, "<xts:string id="DIALOG_URL_NO_ACTION_NAME" encode="javascript"/>");
- handler.check(!document.pform.url_name.value, "<xts:string id="DIALOG_URL_NO_HEADLINE" encode="javascript"/>");
- //if entry is checked, there must be an entry or if url is checked, there must be a url
- //var valid_uri = (document.pform.url_uri[1].checked && document.pform.url_entry.value) || (document.pform.url_uri[2].checked && document.pform.url_url.value) || (document.pform.url_uri[0].checked);
- var valid_uri = (document.pform.url_uri[0].checked && document.pform.url_entry.value) || (document.pform.url_uri[1].checked && document.pform.url_url.value);
-
- handler.check(!valid_uri, dialogNoLinkWarning);
- handler.check(!document.pform.url_location, agentItemsNoLocationWarning);
-
- if(!handler.isValid()){
- alert(handler.getMessage());
- }
- return handler.isValid();
- }
-
- function ErrorHandler(){
- this.error_message = '';
- }
-
- ErrorHandler.prototype.check = function(expression, message){
- if(expression){
- this.addToMessage(message);
- }
- }
-
- ErrorHandler.prototype.isValid = function(){
- return this.error_message == '';
- }
-
- ErrorHandler.prototype.getMessage = function(){
- return this.error_message;
- }
-
- ErrorHandler.prototype.addToMessage = function(messagePart){
- if (messagePart){
-
- if(this.error_message != ''){
- this.error_message += "\n";
- }
-
- this.error_message += messagePart;
- }
- }
-
- // submit the operation and service name
- function leavingDialog(){
-
- if(window.argumentsLeavingDialog){
- argumentsLeavingDialog();
- }
- var headLine = document.pform.url_name.value;
- if(headLine){
- document.pform.taskName.value = headLine;
- }
-
- if (document.pform.url_url.value) {
- // Trim spaces from the url.
- //
- var s=document.pform.url_url.value;
- s=s.replace(/^\s*(.*)/, "$1");
- s=s.replace(/(.*?)\s*$/, "$1");
- document.pform.url_url.value = s;
- }
- }
-
- function selectLocation() {
- var cf = parent.getConfigFrame();
-
- if (!cf.checkCAF()) {
- setRequestMode('url_entry');
- setUriRadio('url_entry');
- doSelectObject('rss_content.es', '<xsl:value-of select="xtsext:javascriptencode(string(/root/env/param[@name='url_entry']))"/>')
- }
- }
-
- function selectNewsList() {
- var cf = parent.getConfigFrame();
-
- if (!cf.checkCAF()) {
- setRequestMode('url_location');
- doSelectObject('folder.es', '<xsl:value-of select="xtsext:javascriptencode(string(/root/env/param[@name='url_location']))"/>')
- }
- }
-
- </script>
- <!-- ================================================================ -->
- <!-- B O D Y -->
- <!-- ================================================================ -->
- <!-- Define a new layout-->
- <lyt:layout style="2">
- <lyt:section>
- <dp:textarea section3_align="left">
- <!-- the agent name label-->
- <dp:section1>
- <xts:string id="DIALOG_URL_NAME_LABEL"/>
- </dp:section1>
- <!-- the agent name input-->
- <dp:section2>
- <agsdlg:insertButton targetId="url_name">
- <utml:textarea rows="4" cols="{$headline-size}" name="url_name" onKeydown="parent.getConfigFrame().checkMaxLength(this)" maxlength="255"/>
- </agsdlg:insertButton>
- </dp:section2>
- </dp:textarea>
- </lyt:section>
- <lyt:section>
- <xsl:value-of select="key('request-param','suppressionDetails')" disable-output-escaping="yes"/>
- </lyt:section>
- </lyt:layout>
- <lyt:layout style="2">
- <lyt:section>
- <dp:textarea section3_align="left">
- <!-- the agent name label-->
- <dp:section1>
- <xts:string id="DIALOG_URL_SCREENTIP_LABEL"/>
- </dp:section1>
- <!-- the agent url_screentip input-->
- <dp:section2>
- <agsdlg:insertButton targetId="url_screentip">
- <utml:textarea rows="3" cols="{$textarea-size}" name="url_screentip" onChange="parent.getConfigFrame().checkMaxLength(this)" maxlength="255"/>
- <!-- <utml:input type="text" name="url_screentip" id="url_screentip" size="{$input-size}"/>-->
- </agsdlg:insertButton>
- </dp:section2>
- </dp:textarea>
- </lyt:section>
- <!-- <lyt:section>
- <xsl:if test="key('request-param','eventList') != ''">
- <dp:textarea>
- <dp:section1>
- <xsl:variable name="taskName">
- <xts:string id="AGS_URL_TASK"/>
- </xsl:variable>
- <xts:string id="DIALOG_SUPPRESSION_SUMMARY_TEXT_HEADING">
- <xts:param name="taskType">
- <xsl:value-of select="$taskName"/>
- </xts:param>
- </xts:string>
- </dp:section1>
- <dp:section2>
- <xsl:value-of select="key('request-param','eventList')"/>
- </dp:section2>
- </dp:textarea>
- </xsl:if>
- </lyt:section> -->
- </lyt:layout>
- <lyt:layout style="1">
- <lyt:section>
- <dp:textarea>
- <!-- the url description label-->
- <dp:section1>
- <xts:string id="DIALOG_URL_DESCRIPTION_LABEL"/>
- </dp:section1>
- <!-- the description input-->
- <dp:section2>
- <agsdlg:insertButton targetId="url_description">
- <utml:textarea rows="3" cols="{$textarea-size}" name="url_description" onChange="parent.getConfigFrame().checkMaxLength(this)" maxlength="1024"/>
- </agsdlg:insertButton>
- </dp:section2>
- </dp:textarea>
- </lyt:section>
- </lyt:layout>
- <lyt:layout style="2">
- <lyt:section>
- <xsl:variable name="url_url" select="/root/env/param[@name='url_url']"/>
- <xsl:variable name="url_entry" select="/root/env/param[@name='url_entry']"/>
- <xsl:variable name="url_uri" select="/root/env/param[@name='url_uri']"/>
- <utml:radio-group name="url_uri">
- <utml:default-value>
- <xsl:value-of select="$url_uri"/>
- </utml:default-value>
- <dp:textarea section3_align="left" width="{$textarea-size}">
- <dp:section1>
- <xts:string id="DIALOG_URL_LINK_LABEL"/>
- </dp:section1>
- <dp:section2>
- <xts:string id="DIALOG_URL_LINK_DESCRIPTION"/>
- </dp:section2>
- </dp:textarea>
- <dp:section>
- <dp:choice>
- <dp:section1>
- <utml:input type="radio">
- <utml:value>url_eventList</utml:value>
- </utml:input>
- </dp:section1>
- <dp:section2 onclick="setUriRadio('url_eventList')">
- <xts:string id="DIALOG_URL_EVENT_LIST"/>
- </dp:section2>
- </dp:choice>
- </dp:section>
- <dp:section>
- <dp:choice>
- <dp:section1>
- <utml:input type="radio">
- <utml:value>url_entry</utml:value>
- </utml:input>
- </dp:section1>
- <dp:section2>
- <dp:list>
- <dp:section>
- <xts:string id="DIALOG_URL_ENTRY_LABEL"/>
- </dp:section>
- <dp:section>
- <dp:box>
- <xsl:choose>
- <xsl:when test="/root/env/param[@name='url_entry_name']">
- <dp:boxSection>
- <xsl:text>...></xsl:text>
- </dp:boxSection>
- <dp:boxSection hgap="5"/>
- <dp:boxSection type="label">
- <xsl:value-of select="/root/env/param[@name='url_entry_name']"/>
- </dp:boxSection>
- </xsl:when>
- <xsl:otherwise>
- <dp:boxSection>
- <xts:string id="IDS_NONE"/>
- <!--xts:string id="IDS_PROP_CONN_COMMAND_NONE"/> -->
- </dp:boxSection>
- </xsl:otherwise>
- </xsl:choose>
- <dp:boxSection hgap="5"/>
- <dp:boxSection>
- <a href="#" onclick="selectLocation();">
- <xts:string id="DIALOG_URL_ENTRY_SELECT_LABEL"/>
- </a>
- </dp:boxSection>
- </dp:box>
- </dp:section>
- </dp:list>
- </dp:section2>
- </dp:choice>
- </dp:section>
- <dp:section>
- <dp:choice valign="top">
- <dp:section1>
- <utml:input type="radio">
- <utml:value>url_url</utml:value>
- </utml:input>
- </dp:section1>
- <dp:section2>
- <dp:list>
- <dp:section>
- <xts:string id="IDS_NEW_URL_HINT"/>
- </dp:section>
- <dp:section>
- <utml:input type="text" name="url_url" id="url_url" size="{$input-size}" onclick="setUriRadio('url_url')">
- <utml:value>
- <xsl:value-of select="$url_url"/>
- </utml:value>
- </utml:input>
- </dp:section>
- </dp:list>
- </dp:section2>
- </dp:choice>
- </dp:section>
- </utml:radio-group>
- </lyt:section>
- <lyt:section>
- <!-- Path / Destination folder -->
- <!-- =============================================================================== -->
- <!-- Path to the container where we want to place this new entry. Leave this empty if the user does not have write access. -->
- <xsl:variable name="path">
- <xsl:if test="contains(/root/url_location/cm:queryResponse/*/cm:permissions, 'write')">
- <xsl:value-of select="/root/url_location/cm:queryResponse/*/cm:searchPath"/>
- </xsl:if>
- </xsl:variable>
- <xsl:variable name="new-class" select="folder"/>
- <!-- Determine if the current path points to the personal folder space (We need a session element to make this determination) -->
- <xsl:variable name="isPersonalPath" select="starts-with($path, '~') or ( key('session-param', 'e_hp') and starts-with($path, key('session-param', 'e_hp')) )"/>
- <xsl:variable name="showMyFoldersChoice" select="not($isPersonalPath)"/>
- <utml:default-value>
- <xsl:value-of select="$path"/>
- </utml:default-value>
- <dp:list>
- <dp:section>
- <xsl:text>   </xsl:text>
- </dp:section>
- <dp:section>
- <dp:list title="DIALOG_URL_NEWS_LOCATION_LABEL">
- <dp:section>
- <xsl:choose>
- <xsl:when test=" $path != '' ">
- <dp:text valign="top" wrap="wrap">
- <!-- For personal folder destinations, render the path starting at the
- directory/namespace/account/folder ancestor. -->
- <xsl:variable name="rootPath">
- <xsl:choose>
- <xsl:when test="$isPersonalPath">
- <xsl:value-of select="concat(key('session-param', 'e_hp'), '/folder')"/>
- </xsl:when>
- <xsl:when test="starts-with($path, '/content')">
- <xsl:value-of select="$defaultContentRoot"/>
- </xsl:when>
- </xsl:choose>
- </xsl:variable>
- <cf:do-the-path-link>
- <cf:param name="familytree">/root/url_location/cm:queryResponse/*/cm:ancestors</cf:param>
- <cf:param name="familymember">/root/url_location/cm:queryResponse/*/cm:defaultName</cf:param>
- <cf:param name="home">
- <xsl:value-of select="$rootPath"/>
- </cf:param>
- </cf:do-the-path-link>
- </dp:text>
- </xsl:when>
- <xsl:otherwise>
- <!--<dp:inactiveText> -->
- <xts:string id="IDS_NONE"/>
-   
- <!-- </dp:inactiveText> -->
- </xsl:otherwise>
- </xsl:choose>
- </dp:section>
- </dp:list>
- </dp:section>
- <dp:section>
- <dp:lastSection>
- <!-- Select a folder link -->
- <dp:group>
- <!-- is there a reason for this img other than cosmetic?? -->
- <!-- <dp:groupItem>
- <img height="1" width="5" border="0">
- <xsl:attribute name="src"><xsl:value-of select="$webcontent"/>/images/space.gif</xsl:attribute>
- </img>
- </dp:groupItem> -->
- <dp:groupItem valign="top">
- <xsl:if test="not(contains(' package printer pageDefinition dataSource portlet portalSkin ', concat(' ', $new-class, ' ')))">
- <a href="#" onclick="selectNewsList();">
- <xts:string id="DIALOG_URL_LOCATION_SELECT_LABEL"/>
- </a>
- <utml:input type="hidden" name="qssave" id="qssave" value="true"/>
- </xsl:if>
- </dp:groupItem>
- </dp:group>
- </dp:lastSection>
- </dp:section>
- </dp:list>
- </lyt:section>
- </lyt:layout>
- <!-- footer -->
- <dp:emptyFooter/>
- </utml:form>
- </xts:transform>
- </markup>
- </xsl:element>
- </xos:entityBody>
- </xos:part>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ===============================================================================================
- debug - special debug block for nested requests
- ===============================================================================================
- -->
- <xts:block id="debug" type="exec" processor="XSLT" mimeType="text/html" dependency="genMarkup" condition=".[/root/session/param[@name='debug']='1']" mandatory="false">
- <!-- get the debug logic sheet -->
- <xts:logicsheet path="logicsheets/debuglogic.xslt"/>
- <xsl:stylesheet version="1.0" xmlns:xos="http://developer.cognos.com/schemas/xts/output/" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:dbg="http://developer.cognos.com/schemas/xts/logicsheets/xslt/debug/" exclude-result-prefixes="dbg xos">
- <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:template match="/">
- <xts:sequence>
- <xsl:variable name="resultNode" select="/root/*[local-name()='requestParams']/*[local-name()='param' and @name='resultNode']"/>
- <xts:append select="/root/output/*[local-name()='part']/*[local-name()='entityBody']/*[local-name()='{$resultNode}']">
- <debugDump>
- <xts:transform name="XMLEncode">
- <dbg:dumpxml select="/root/*[local-name()!='header' and local-name()!='output' and local-name()!='system' and local-name()!='http' and local-name()!='session']">
- <dbg:title>addNewsItem.xts</dbg:title>
- </dbg:dumpxml>
- </xts:transform>
- </debugDump>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- </xts:morphlet>
|