properties_general_titan.xts 160 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. Licensed Materials - Property of IBM
  4. BI and PM: ps
  5. (C) Copyright IBM Corp. 2015
  6. US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  7. -->
  8. <!--
  9. Copyright (C) 2008 Cognos ULC, an IBM Company. All rights reserved.
  10. Cognos (R) is a trademark of Cognos ULC, (formerly Cognos Incorporated).
  11. -->
  12. <xts:morphlet xmlns:xts="http://developer.cognos.com/schemas/xts/" messageBase="messages/portal.xml, messages/portalRL.xml" includeConfig="true">
  13. <!--
  14. This morphlet (properties_general.xts) consists of the following blocks:
  15. formlogic_init - update various /root/env level parameters based on new or changed /root/env parameters.
  16. getTabs - build the /root/tabs/objects structure.
  17. updateEnv - change environment information as required.
  18. buildMultiLang - build the /root/multiLang structure with /lang and /name leaf nodes.
  19. getMyAccount - build the /root/myInfo structure for the current user account.
  20. classNames - build the /root/objectClass/class structure.
  21. getContent - retrieve CM Information for this page.
  22. renderPage - render the general information properties tab page for an object specified in m_obj.
  23. -->
  24. <!--
  25. ===============================================================================================
  26. formlogic_init - standard form logic initialization
  27. ===============================================================================================
  28. -->
  29. <xts:block id="formlogic_init" type="exec" mode="interpret" processor="XSLT" path="/logicsheets/formlogic_init.xslt" nodelist="env,credential,system,http"/>
  30. <!--
  31. ===============================================================================================
  32. get_advanced_settings - get advanced settings
  33. ===============================================================================================
  34. -->
  35. <xts:block id="get_advanced_settings" type="exec" processor="XSLT" mandatory="false" condition=".[/root/env/param[@name='m_class']='userInterfaceProfile']" mode="interpret">
  36. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  37. <xsl:template match="/">
  38. <xts:sequence>
  39. <xts:append>
  40. <advancedSettings>
  41. <xts:function name="getConfiguration">
  42. <xts:param name="COGADMIN.UIPROFILES.DEVELOPER_MODE"/>
  43. </xts:function>
  44. </advancedSettings>
  45. </xts:append>
  46. </xts:sequence>
  47. </xsl:template>
  48. </xsl:stylesheet>
  49. </xts:block>
  50. <!-- Load object-specific property tabs map ============================================================== -->
  51. <xts:block id="getTabs" dependency="get_advanced_settings" type="exec" mode="interpret" processor="XML" >
  52. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  53. <xsl:template match="/">
  54. <xts:sequence>
  55. <xts:append>
  56. <tabs>
  57. </tabs>
  58. </xts:append>
  59. </xts:sequence>
  60. </xsl:template>
  61. </xsl:stylesheet>
  62. </xts:block>
  63. <!--
  64. ===============================================================================================
  65. get_system_root - get system root from Configuration
  66. ===============================================================================================
  67. -->
  68. <xts:block id="get_system_root" type="exec" processor="XSLT" condition=".[/root/env/param[@name='m_class']='archiveLocation' or /root/env/param[@name='m_class']='URL']" mandatory="false" mode="interpret">
  69. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  70. <xsl:template match="/">
  71. <!-- get file system root from the Configuration -->
  72. <xts:sequence>
  73. <xts:append>
  74. <xts:function name="getConfiguration">
  75. <xts:param name="archiveLocationFileSchemeRoot"/>
  76. <xts:param name="CAF"/>
  77. </xts:function>
  78. </xts:append>
  79. </xts:sequence>
  80. </xsl:template>
  81. </xsl:stylesheet>
  82. </xts:block>
  83. <!-- Update these environment variables -->
  84. <!-- ** Note :
  85. ** 'ackageBase' is correct for the condition; since packageBase and metricsPackageBase have ackageBase in common.
  86. ** 'ViewBase' encompasses both reportViewBase and agentDefinitionViewBase and powerPlay8ReportViewBase.
  87. *** reportDataServiceAgentDefinitionBase - need to add this
  88. -->
  89. <xts:block
  90. id="updateEnv"
  91. type="exec"
  92. dependency="formlogic_init get_system_root"
  93. mode="interpret"
  94. processor="XSLT"
  95. condition=".[/root/env/param[@name='pty_deactivLang'] != '' or /root/env/param[@name='so.select']='contacts' or /root/env/param[@name='so.select']='dataSourceAccessAccount' or contains(/root/env/param[@name='so.select'],'ackageBase') or contains(/root/env/param[@name='so.select'],'ViewBase') or contains(/root/env/param[@name='so.select'],' reportDataServiceAgentDefinitionBase') or contains(/root/env/param[@name='so.select'],' powerPlay8ReportViewBase') or /root/env/param[@name='so.select']='dataMovementTaskAliasBase' or /root/env/param[@name='typeInContact']='true' or /root/env/param[@name='tenantChanged']='true']"
  96. mandatory="false">
  97. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  98. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/" xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" xmlns:x="x" exclude-result-prefixes="xsl cm xtsext xts send x">
  99. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  100. <xsl:key name="env-param" match="/root/env/param" use="@name"/>
  101. <xsl:template match="/">
  102. <!--
  103. Need to remove the fields from the properties_general page so that the updates do not occur here, since the user might
  104. press cancel on the properties page.
  105. -->
  106. <xts:sequence>
  107. <xsl:if test="key('env-param','pty_deactivLang') != ''">
  108. <xsl:variable name="rmLng" select="key('env-param','pty_deactivLang')"/>
  109. <xsl:variable name="nam"><xsl:value-of select="concat('m_t_default_name_',$rmLng)"/></xsl:variable>
  110. <xsl:variable name="sct"><xsl:value-of select="concat('m_t_default_screenTip_',$rmLng)"/></xsl:variable>
  111. <xsl:variable name="dsc"><xsl:value-of select="concat('m_t_default_description_',$rmLng)"/></xsl:variable>
  112. <xts:delete select="/root/env/param[@name='{$nam}']"/>
  113. <xts:delete select="/root/env/param[@name='{$dsc}']"/>
  114. <xts:delete select="/root/env/param[@name='{$sct}']"/>
  115. <xts:delete select="/root/env/param[@name='pty_deactivLang']"/>
  116. </xsl:if>
  117. <!-- ** Note :
  118. ** 'ackageBase' is correct; since packageBase and metricsPackageBase have 'ackageBase' in common.
  119. ** 'ViewBase' encompasses both reportViewBase and agentDefinitionViewBase.
  120. -->
  121. <xsl:if test="contains(string(key('env-param','so.select')),'ackageBase') or contains(string(key('env-param','so.select')),'dataMovementTaskAliasBase') or contains(string(key('env-param','so.select')),'ViewBase') or contains(string(key('env-param','so.select')),'reportDataServiceAgentDefinitionBase') or contains(string(key('env-param','so.select')),'powerPlay8ReportViewBase') or ((string(key('env-param','so.select'))='contacts' or string(key('env-param','so.select'))='dataSourceAccessAccount' ) and string(key('env-param','so.searchPath'))!='')">
  122. <xts:delete select="/root/env/param[@name='changed_genprop']"/>
  123. <xts:append select="/root/env">
  124. <param name="changed_genprop">1</param>
  125. </xts:append>
  126. </xsl:if>
  127. <xsl:choose>
  128. <xsl:when test="string(key('env-param','typeInContact'))='true'">
  129. <xts:delete select="/root/env/param[@name='typeInContact' or @name='typeInEMailAddress' or @name='m_p_contactEMail' or @name='m_p_contact']"/>
  130. <xts:delete select="/root/env/param[starts-with(@name,'contact.so.')]"/>
  131. <xts:append select="/root/env">
  132. <param name="m_p_contactEMail"><xsl:value-of select="string(key('env-param','typeInEMailAddress'))"/></param>
  133. <param name="m_p_contact"/>
  134. </xts:append>
  135. </xsl:when>
  136. <xsl:when test="string(key('env-param','so.select'))='contacts' and string(key('env-param','so.searchPath'))!=''">
  137. <xts:delete select="/root/env/param[@name='typeInEMailAddress' or @name='emailAddress' or @name='m_p_contactEMail' or @name='m_p_contact']"/>
  138. <xts:delete select="/root/env/param[starts-with(@name,'contact.so.')]"/>
  139. <xts:append select="/root/env">
  140. <param name="m_p_contactEMail"/>
  141. <param name="m_p_contact"><xsl:value-of select="key('env-param','so.searchPath')"/></param>
  142. </xts:append>
  143. <xts:append select="/root/env">
  144. <xsl:for-each select="/root/env/param[starts-with(@name,'so.') and string(@name)!='so.select']">
  145. <param name="contact.{@name}"><xsl:value-of select="string(.)"/></param>
  146. </xsl:for-each>
  147. </xts:append>
  148. <xts:delete select="/root/env/param[starts-with(@name,'so.') and string(@name)!='so.select']"/>
  149. </xsl:when>
  150. <xsl:when test="string(key('env-param','so.select'))='dataSourceAccessAccount' and string(key('env-param','so.searchPath'))!=''">
  151. <xts:delete select="/root/env/param[@name='m_p_dataSourceAccessAccount']"/>
  152. <xts:delete select="/root/env/param[starts-with(@name,'accessAccount.so.')]"/>
  153. <xts:append select="/root/env">
  154. <param name="m_p_dataSourceAccessAccount"><xsl:value-of select="key('env-param','so.searchPath')"/></param>
  155. </xts:append>
  156. <xts:append select="/root/env">
  157. <xsl:for-each select="/root/env/param[starts-with(@name,'so.') and string(@name)!='so.select']">
  158. <param name="accessAccount.{@name}"><xsl:value-of select="string(.)"/></param>
  159. </xsl:for-each>
  160. </xts:append>
  161. <xts:delete select="/root/env/param[starts-with(@name,'so.') and string(@name)!='so.select']"/>
  162. </xsl:when>
  163. </xsl:choose>
  164. <xsl:if test="string(key('env-param','tenantChanged'))='true'">
  165. <xts:delete select="/root/env/param[@name='tenantChanged' or @name='newTenantID' or @name='newTenantName' or @name='m_p_tenantID' or @name='changed_m_p_tenantID' or @name='objTenantName']"/>
  166. <xts:append select="/root/env">
  167. <param name="m_p_tenantID"><xsl:value-of select="string(key('env-param','newTenantID'))"/></param>
  168. <param name="objTenantName"><xsl:value-of select="string(key('env-param','newTenantName'))"/></param>
  169. <param name="changed_m_p_tenantID">1</param>
  170. </xts:append>
  171. </xsl:if>
  172. </xts:sequence>
  173. </xsl:template>
  174. </xsl:stylesheet>
  175. </xts:block>
  176. <xts:block id="createDefaultUserAcctProfile" processor="XSLT" type="exec" dependency="updateEnv" condition=".[/root/env/param[@name='m_tenantId'] and /root/env/param[@name='m_class'] = 'account' and starts-with(/root/env/param[@name='m_obj'],'/configuration/account') and (/root/env/param[@name='createDefaultUserAcctProfile'] = 'true') and not(/root/*[local-name()='queryResponse']/*)]" mandatory="false">
  177. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  178. <xts:logicsheet path="logicsheets/portal.xsl"/>
  179. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  180. <xsl:stylesheet version="1.0"
  181. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  182. xmlns:cms="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/cms/1/"
  183. xmlns:xts="http://developer.cognos.com/schemas/xts/"
  184. xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/"
  185. xmlns:form="http://developer.cognos.com/schemas/xts/portal/iFrmCmd/1/"
  186. xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
  187. xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
  188. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  189. exclude-result-prefixes="cms xts send cm pf form xtsext">
  190. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  191. <pf:variables/>
  192. <xsl:template match="/">
  193. <xsl:variable name="targetTenantId" select="/root/env/param[@name='m_tenantId']"/>
  194. <xsl:variable name="tenantDisplayName">
  195. <xsl:choose>
  196. <xsl:when test="$targetTenantId">
  197. <xsl:value-of select="$targetTenantId"/>
  198. </xsl:when>
  199. <xsl:otherwise>
  200. <xsl:value-of select="key('session-param', 'e_tenantDisplayName')"/>
  201. </xsl:otherwise>
  202. </xsl:choose>
  203. </xsl:variable>
  204. <xts:sequence>
  205. <xts:append>
  206. <send:request provider="cm">
  207. <cm1:copy xmlns:cm1="http://developer.cognos.com/schemas/contentManagerService/1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  208. <objects SOAP-ENC:arrayType="bus:baseClass[1]" xsi:type="SOAP-ENC:Array" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
  209. <item xsi:type="bus:account">
  210. <searchPath xsi:type="bus:stringProp">
  211. <value xsi:type="xsd:string">/configuration/account[@tenantID=""]</value>
  212. </searchPath>
  213. </item>
  214. </objects>
  215. <targetPath xsi:type="bus:searchPathSingleObject">/configuration</targetPath>
  216. <options xsi:type="bus:copyOptions">
  217. <recursive xsi:type="xsd:boolean">true</recursive>
  218. <updateAction xsi:type="bus:updateActionEnum">fail</updateAction>
  219. <xsl:if test="$targetTenantId">
  220. <targetTenantID xsi:type="xsd:string"><xsl:value-of select="$targetTenantId"/></targetTenantID>
  221. </xsl:if>
  222. </options>
  223. </cm1:copy>
  224. </send:request>
  225. <xts:delete select="/root/env/param[@name='createDefaultUserAcctProfile']"/>
  226. </xts:append>
  227. </xts:sequence>
  228. </xsl:template>
  229. </xsl:stylesheet>
  230. </xts:block>
  231. <!--
  232. ===============================================================================================
  233. getContent - get our data from Content Manager
  234. ===============================================================================================
  235. -->
  236. <xts:block id="getContent" processor="XSLT" type="exec" dependency="updateEnv createDefaultUserAcctProfile">
  237. <xts:logicsheet path="logicsheets/cm-logic.xsl"/>
  238. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  239. <xts:logicsheet path="logicsheets/portal.xsl"/>
  240. <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
  241. xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
  242. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  243. xmlns:reqhelpers="http://developer.cognos.com/schemas/xts-cm/1/reqhelpers"
  244. 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/"
  245. xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
  246. exclude-result-prefixes="xsl pf xtsext reqhelpers cml send cm">
  247. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  248. <pf:variables/>
  249. <xsl:template match="/">
  250. <xts:sequence>
  251. <xts:append>
  252. <xts:transform src="transforms/CM/post-process.xslt" processor="XSLT">
  253. <send:request provider="cm">
  254. <xts:transform src="transforms/CM/pre-process.xslt" processor="XSLT">
  255. <cm:query xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
  256. <cm:search>
  257. <xsl:value-of select="/root/env/param[@name='m_obj']"/>
  258. </cm:search>
  259. <cm:properties>
  260. <cml:prop-general/>
  261. <cm:property name="owner"/>
  262. <cm:property name="tenantID"/>
  263. <cm:property name="name"/>
  264. <cm:property name="description"/>
  265. <cm:property name="screenTip"/>
  266. <cm:property name="documentType"/>
  267. <cm:property name="metadataModelPackage"/>
  268. <cm:property name="metadataModel"/>
  269. <cm:property name="hasChildren"/>
  270. <cm:property name="defaultPortalAction"/>
  271. <cm:property name="mostRecentEventList"/>
  272. <cm:property name="defaultOutputFormat"/>
  273. <cm:property name="executionFormat"/>
  274. <cm:property name="executionPrompt"/>
  275. <cm:property name="parent"/>
  276. <cm:property name="iconURI"/>
  277. <cm:property name="gateway"/>
  278. <cm:property name="format"/>
  279. <cm:property name="hidden"/>
  280. <xsl:if test="contains(' package role group ', concat(' ', /root/env/param[@name='m_class'], ' ')) and $isAdminUser">
  281. <cm:property name="routingHints"/>
  282. </xsl:if>
  283. <xsl:if test="/root/env/param[@name='m_class'] = 'package'">
  284. <cm:property name="userInterfaces"/>
  285. <cm:property name="effectiveUserCapabilities"/>
  286. </xsl:if>
  287. <xsl:if test="(/root/env/param[@name='m_class'] = 'package') or (/root/env/param[@name='m_class'] = 'folder') or (/root/env/param[@name='m_class'] = 'content') or (/root/env/param[@name='m_class'] = 'namespace') or (/root/env/param[@name='m_class'] = 'namespaceFolder') or (/root/env/param[@name='m_class'] = 'account')">
  288. <cm:property name="repositoryRules"/>
  289. </xsl:if>
  290. <xsl:if test="/root/env/param[@name='m_class'] = 'rolapDataSource'">
  291. <cm:property name="dataSourceAccessAccount"/>
  292. </xsl:if>
  293. <cm:property name="launchableType"/>
  294. </cm:properties>
  295. <cm:options schemaInfo="true">
  296. <cm:refProps>
  297. <cm:refProp refPropName="parent">
  298. <cm:properties>
  299. <cm:property name="searchPath"/>
  300. <cm:property name="permissions"/>
  301. <cm:property name="routingServerGroup"/>
  302. <cm:property name="repositoryRules"/>
  303. <cm:property name="tenantID"/>
  304. </cm:properties>
  305. </cm:refProp>
  306. <cm:refProp refPropName="contact">
  307. <cm:properties>
  308. <cm:property name="searchPath"/>
  309. <cm:property name="defaultName"/>
  310. <cm:property name="ancestors"/>
  311. <cm:property name="email"/>
  312. </cm:properties>
  313. </cm:refProp>
  314. <cm:refProp refPropName="dataSourceAccessAccount">
  315. <cm:properties>
  316. <cm:property name="searchPath"/>
  317. <cm:property name="defaultName"/>
  318. <cm:property name="ancestors"/>
  319. </cm:properties>
  320. </cm:refProp>
  321. <cm:refProp refPropName="owner">
  322. <cm:properties>
  323. <cm:property name="searchPath"/>
  324. <cm:property name="defaultName"/>
  325. <cm:property name="email"/>
  326. </cm:properties>
  327. </cm:refProp>
  328. <cm:refProp refPropName="target">
  329. <cm:properties>
  330. <cm:property name="searchPath"/>
  331. <cm:property name="storeID"/>
  332. <cm:property name="defaultName"/>
  333. <cm:property name="ancestors"/>
  334. <cm:property name="permissions"/>
  335. <cm:property name="parent"/>
  336. <cm:property name="documentType"/>
  337. <cm:property name="defaultPortalAction"/>
  338. <cm:property name="mostRecentEventList"/>
  339. <cm:property name="defaultOutputFormat"/>
  340. <cm:property name="executionFormat"/>
  341. <cm:property name="executionPrompt"/>
  342. <cm:property name="format"/>
  343. <cm:property name="launchableType"/>
  344. </cm:properties>
  345. </cm:refProp>
  346. <cm:refProp refPropName="base">
  347. <cm:properties>
  348. <cm:property name="searchPath"/>
  349. <cm:property name="defaultName"/>
  350. <cm:property name="ancestors"/>
  351. <cm:property name="permissions"/>
  352. <cm:property name="storeID"/>
  353. <cm:property name="defaultPortalAction"/>
  354. <cm:property name="defaultOutputFormat"/>
  355. <cm:property name="mostRecentEventList"/>
  356. </cm:properties>
  357. </cm:refProp>
  358. <cm:refProp refPropName="metadataModel">
  359. <cm:properties>
  360. <cm:property name="searchPath"/>
  361. <cm:property name="defaultName"/>
  362. <cm:property name="ancestors"/>
  363. <cm:property name="permissions"/>
  364. <cm:property name="storeID"/>
  365. </cm:properties>
  366. </cm:refProp>
  367. <cm:refProp refPropName="metadataModelPackage">
  368. <cm:properties>
  369. <cm:property name="searchPath"/>
  370. <cm:property name="defaultName"/>
  371. <cm:property name="userInterfaces"/>
  372. <cm:property name="effectiveUserCapabilities"/>
  373. <cm:property name="ancestors"/>
  374. <cm:property name="permissions"/>
  375. <cm:property name="storeID"/>
  376. </cm:properties>
  377. </cm:refProp>
  378. </cm:refProps>
  379. </cm:options>
  380. </cm:query>
  381. </xts:transform>
  382. </send:request>
  383. </xts:transform>
  384. <xsl:if test="contains(' package role group ', concat(' ', /root/env/param[@name='m_class'], ' ')) and $isAdminUser">
  385. <xsl:variable name="classFilter">[@objectClass='package' or @objectClass='group' or @objectClass='role']</xsl:variable>
  386. <xts:transform src="transforms/CM/post-process.xslt" processor="XSLT">
  387. <send:request provider="cm">
  388. <xts:transform src="transforms/CM/pre-process.xslt" processor="XSLT">
  389. <cm:query xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
  390. <cm:search>
  391. <xsl:value-of select="concat(/root/env/param[@name='m_obj'], '/ancestor::*', $classFilter)"/>
  392. </cm:search>
  393. <cm:properties>
  394. <cm:property name="routingHints"/>
  395. </cm:properties>
  396. </cm:query>
  397. </xts:transform>
  398. </send:request>
  399. </xts:transform>
  400. </xsl:if>
  401. </xts:append>
  402. <xsl:if test="/root/env/param[@name='m_class'] = 'package'">
  403. <xts:append>
  404. <packageModel>
  405. <xts:transform src="transforms/CM/post-process.xslt" processor="XSLT">
  406. <send:request provider="cm">
  407. <xts:transform src="transforms/CM/pre-process.xslt" processor="XSLT">
  408. <cm:query xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
  409. <cm:search><xsl:value-of select="concat(string(/root/env/param[@name='m_obj']),'/model[last()]')"/></cm:search>
  410. <cm:properties>
  411. <cm:property name="permissions"/>
  412. <cm:property name="options"/>
  413. </cm:properties>
  414. </cm:query>
  415. </xts:transform>
  416. </send:request>
  417. </xts:transform>
  418. </packageModel>
  419. </xts:append>
  420. </xsl:if>
  421. <xsl:variable name="useSelected">
  422. <xsl:choose>
  423. <xsl:when test="contains(string(/root/env/param[@name='so.select']),'Base') and string(/root/env/param[@name='so.searchPath'])!=''">
  424. <xsl:value-of select="/root/env/param[@name='so.searchPath']"/>
  425. </xsl:when>
  426. <xsl:when test="contains(string(/root/env/param[@name='so.select']),'reportView') and /root/env/param[@name='m_p_base']"><xsl:value-of select="/root/env/param[@name='m_p_base']"/>
  427. </xsl:when>
  428. <xsl:when test="contains(string(/root/env/param[@name='so.select']),'dataMovementTaskAlias') and /root/env/param[@name='m_p_base']"><xsl:value-of select="/root/env/param[@name='m_p_base']"/>
  429. </xsl:when>
  430. <xsl:when test="contains(string(/root/env/param[@name='so.select']),'powerPlay8ReportView') and /root/env/param[@name='m_p_base']"><xsl:value-of select="/root/env/param[@name='m_p_base']"/>
  431. </xsl:when>
  432. <xsl:when test="contains(string(/root/env/param[@name='so.select']),'reportDataServiceAgentDef') and /root/env/param[@name='m_periodicalProducer']"><xsl:value-of select="/root/env/param[@name='m_periodicalProducer']"/>
  433. </xsl:when>
  434. <xsl:when test="/root/env/param[@name='m_p_metadataModelPackage']"><xsl:value-of select="/root/env/param[@name='m_p_metadataModelPackage']"/></xsl:when>
  435. <xsl:when test="/root/env/param[@name='m_agsr_metadataModelPackage']"><xsl:value-of select="/root/env/param[@name='m_agsr_metadataModelPackage']"/></xsl:when>
  436. </xsl:choose>
  437. </xsl:variable>
  438. <xsl:if test="$useSelected!=''">
  439. <xts:append>
  440. <selected>
  441. <xts:transform src="transforms/CM/post-process.xslt" processor="XSLT">
  442. <send:request provider="cm">
  443. <xts:transform src="transforms/CM/pre-process.xslt" processor="XSLT">
  444. <cm:query xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
  445. <cm:search>
  446. <xsl:value-of select="$useSelected"/>
  447. </cm:search>
  448. <cm:properties>
  449. <cm:property name="searchPath"/>
  450. <cm:property name="defaultName"/>
  451. <cm:property name="ancestors"/>
  452. <cm:property name="permissions"/>
  453. </cm:properties>
  454. </cm:query>
  455. </xts:transform>
  456. </send:request>
  457. </xts:transform>
  458. </selected>
  459. </xts:append>
  460. <xts:delete select="/root/env/param[starts-with(@name,'so.') and @name != 'so.select']"/>
  461. <xsl:if test="not(string(/root/env/param[@name='so.select'])='') and contains(string(/root/env/param[@name='so.select']),'Base') and not(contains(string(/root/env/param[@name='so.select']),'package') or contains(string(/root/env/param[@name='so.select']),'metricspackage'))">
  462. <xts:delete select="/root/env/param[@name='m_p_base' or @name='m_periodicalProducer']"/>
  463. <xts:append select="/root/env">
  464. <xsl:choose>
  465. <xsl:when test="contains(string(/root/env/param[@name='so.select']),'reportView')">
  466. <param name="m_p_base"><xsl:value-of select="/root/env/param[@name='so.searchPath']"/></param>
  467. </xsl:when>
  468. <xsl:when test="contains(string(/root/env/param[@name='so.select']),'dataMovementTaskAlias')">
  469. <param name="m_p_base"><xsl:value-of select="/root/env/param[@name='so.searchPath']"/></param>
  470. </xsl:when>
  471. <xsl:when test="contains(string(/root/env/param[@name='so.select']),'powerPlay8ReportView')">
  472. <param name="m_p_base"><xsl:value-of select="/root/env/param[@name='so.searchPath']"/></param>
  473. </xsl:when>
  474. <xsl:when test="contains(string(/root/env/param[@name='so.select']),'reportDataServiceAgentDef')">
  475. <param name="m_periodicalProducer"><xsl:value-of select="/root/env/param[@name='so.searchPath']"/></param>
  476. </xsl:when>
  477. </xsl:choose>
  478. </xts:append>
  479. </xsl:if>
  480. </xsl:if>
  481. <!-- retrieve the index information -->
  482. <xsl:if test="$userCanUseIndexSearch">
  483. <xts:append>
  484. <indexResult>
  485. <reqhelpers:request faultBlock="ignoreFaultHandler" asText="true" href="bus://dispatcher" protocol="BUS" soapAction="$indexDataService$.session" responseEnvelope="false" outputHeader="false">
  486. <SOAP-ENV:Envelope xmlns:bus="http://developer.cognos.com/schemas/bibus/3/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  487. <SOAP-ENV:Header>
  488. <xsl:copy-of select="/root/header/bus:biBusHeader"/>
  489. </SOAP-ENV:Header>
  490. <SOAP-ENV:Body>
  491. <ns:get xmlns:ns="http://developer.cognos.com/schemas/indexDataService/1/" xmlns:bibus="http://developer.cognos.com/schemas/bibus/3/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  492. <externalGUID xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bibus:guid[1]">
  493. <item>
  494. <xts:queryValue select="/root/*[local-name()='queryResponse']/*/*[local-name()='storeID']"/>
  495. </item>
  496. </externalGUID>
  497. <options xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bibus:option[2]">
  498. <item xsi:type="bibus:asynchOptionInt">
  499. <name xsi:type="bibus:asynchOptionEnum">primaryWaitThreshold</name>
  500. <value xsi:type="xsd:int">0</value>
  501. </item>
  502. </options>
  503. </ns:get>
  504. </SOAP-ENV:Body>
  505. </SOAP-ENV:Envelope>
  506. </reqhelpers:request>
  507. </indexResult>
  508. </xts:append>
  509. </xsl:if>
  510. </xts:sequence>
  511. </xsl:template>
  512. </xsl:stylesheet>
  513. </xts:block>
  514. <!-- Build the multilingual XML structure /root/multiLangs/lang -->
  515. <xts:block id="getAgentContent" dependency="getContent" type="exec" mode="interpret" processor="XSLT" condition=".[not(root/*[local-name()='queryResponse'] = '') and root/*[local-name()='queryResponse']/*/*[local-name()='objectClass']='agentDefinition']" mandatory="false">
  516. <xts:logicsheet path="logicsheets/cm-logic.xsl"/>
  517. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  518. <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/">
  519. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  520. <xsl:template match="/">
  521. <xts:sequence>
  522. <xts:append>
  523. <agentReport>
  524. <xts:transform src="transforms/CM/post-process.xslt" processor="XSLT">
  525. <send:request provider="cm">
  526. <xts:transform src="transforms/CM/pre-process.xslt" processor="XSLT">
  527. <cm:query xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
  528. <cm:search>
  529. <xsl:value-of select="concat(string(/root/env/param[@name='m_obj']),'/report')"/>
  530. </cm:search>
  531. <cm:properties>
  532. <cml:prop-general/>
  533. <cm:property name="metadataModelPackage"/>
  534. <cm:property name="metadataModel"/>
  535. </cm:properties>
  536. <cm:options schemaInfo="true">
  537. <cm:refProps>
  538. <cm:refProp refPropName="metadataModel">
  539. <cm:properties>
  540. <cm:property name="searchPath"/>
  541. <cm:property name="defaultName"/>
  542. <cm:property name="ancestors"/>
  543. <cm:property name="permissions"/>
  544. <cm:property name="storeID"/>
  545. </cm:properties>
  546. </cm:refProp>
  547. <cm:refProp refPropName="metadataModelPackage">
  548. <cm:properties>
  549. <cm:property name="searchPath"/>
  550. <cm:property name="defaultName"/>
  551. <cm:property name="ancestors"/>
  552. <cm:property name="permissions"/>
  553. <cm:property name="storeID"/>
  554. </cm:properties>
  555. </cm:refProp>
  556. </cm:refProps>
  557. </cm:options>
  558. </cm:query>
  559. </xts:transform>
  560. </send:request>
  561. </xts:transform>
  562. </agentReport>
  563. </xts:append>
  564. </xts:sequence>
  565. </xsl:template>
  566. </xsl:stylesheet>
  567. </xts:block>
  568. <!-- Build the XML structure for reportDataServiceAgentDefinition (aka subscription) or get root of subscriptionFolder-->
  569. <xts:block id="getRdsadContent" dependency="getContent" type="exec" mode="interpret" processor="XSLT" condition=".[not(root/*[local-name()='queryResponse'] = '') and (root/*[local-name()='queryResponse']/*/*[local-name()='objectClass']='reportDataServiceAgentDefinition' or root/*[local-name()='queryResponse']/*/*[local-name()='objectClass']='subscriptionFolder')]" mandatory="false">
  570. <xts:logicsheet path="logicsheets/cm-logic.xsl"/>
  571. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  572. <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/">
  573. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  574. <xsl:template match="/">
  575. <xts:sequence>
  576. <xts:append>
  577. <rdsad>
  578. <xts:transform src="transforms/CM/post-process.xslt" processor="XSLT">
  579. <send:request provider="cm">
  580. <xts:transform src="transforms/CM/pre-process.xslt" processor="XSLT">
  581. <cm:query xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
  582. <cm:requests>
  583. <cm:query xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
  584. <cm:search>
  585. <xsl:text/>~/subscriptionFolder<xsl:text/>
  586. </cm:search>
  587. <cm:properties>
  588. <cm:property name="defaultName"/>
  589. <cm:property name="searchPath"/>
  590. </cm:properties>
  591. </cm:query>
  592. <xsl:if test="root/*[local-name()='queryResponse']/*/*[local-name()='objectClass']='reportDataServiceAgentDefinition'">
  593. <cm:query xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
  594. <cm:search>
  595. <xsl:text/><xsl:value-of select="concat(/root/env/param[@name='m_obj'], '/schedule')"/><xsl:text/>
  596. </cm:search>
  597. <cm:properties>
  598. <cm:property name="defaultName"/>
  599. <cm:property name="periodicalProducer"/>
  600. <cm:property name="parent"/>
  601. </cm:properties>
  602. <cm:options schemaInfo="false">
  603. <cm:refProps>
  604. <cm:refProp refPropName="periodicalProducer">
  605. <cm:properties>
  606. <cm:property name="defaultName"/>
  607. <cm:property name="searchPath"/>
  608. <cm:property name="ancestors"/>
  609. </cm:properties>
  610. </cm:refProp>
  611. </cm:refProps>
  612. </cm:options>
  613. </cm:query>
  614. </xsl:if>
  615. </cm:requests>
  616. </cm:query>
  617. </xts:transform>
  618. </send:request>
  619. </xts:transform>
  620. </rdsad>
  621. </xts:append>
  622. </xts:sequence>
  623. </xsl:template>
  624. </xsl:stylesheet>
  625. </xts:block>
  626. <!-- Build the multilingual XML structure /root/multiLangs/lang -->
  627. <xts:block id="buildMultiLang" dependency="getContent getAgentContent getRdsadContent" type="exec" mode="interpret" processor="XSLT" path="/portal/multilingual.xml" condition=".[not(root/*[local-name()='queryResponse'][1] = '')]" mandatory="false"/>
  628. <!--
  629. ===============================================================================================
  630. getMyInfo - Personal stuff.
  631. ===============================================================================================
  632. -->
  633. <xts:block id="getMyAccount" processor="XSLT" type="exec" condition=".[/root/env/param[@name='changed_m_p_owner']='1' and /root/env/param[@name='m_email']='' and /root/env/param[@name='m_defaultName']='']" mandatory="false">
  634. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  635. <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/">
  636. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  637. <xsl:key name="session-param" match="/root/session/param" use="@name"/>
  638. <xsl:template match="/">
  639. <xts:sequence>
  640. <xts:append>
  641. <myInfo>
  642. <xts:transform src="transforms/CM/post-process.xslt" processor="XSLT">
  643. <send:request provider="cm">
  644. <xts:transform src="transforms/CM/pre-process.xslt" processor="XSLT">
  645. <cm:query xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
  646. <cm:search>
  647. <xsl:choose>
  648. <xsl:when test="key('session-param', 'e_hp') and key('session-param', 'e_hp') !=''">
  649. <xsl:value-of select="key('session-param', 'e_hp')"/>
  650. </xsl:when>
  651. <xsl:otherwise>
  652. <xsl:value-of select="'~'"/>
  653. </xsl:otherwise>
  654. </xsl:choose>
  655. </cm:search>
  656. <cm:properties>
  657. <cm:property name="defaultName"/>
  658. <cm:property name="email"/>
  659. </cm:properties>
  660. <cm:options schemaInfo="true"/>
  661. </cm:query>
  662. </xts:transform>
  663. </send:request>
  664. </xts:transform>
  665. </myInfo>
  666. </xts:append>
  667. </xts:sequence>
  668. </xsl:template>
  669. </xsl:stylesheet>
  670. </xts:block>
  671. <!--
  672. ===============================================================================================
  673. getObjTenantInfo - TenantID & DefaultName from tenant object.
  674. ===============================================================================================
  675. -->
  676. <xts:block id="getObjTenantInfo" path="/portal/tenants/getObjTenantInfo.xsl" mode="interpret" processor="XSLT" type="exec" mandatory="false" dependency="getContent" condition=".[not(/root/env/param[@name='m_new_class'] = 'tenant')]">
  677. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  678. </xts:block>
  679. <xts:block id="missingObject" mode="output" processor="XSLT" type="exec" mimeType="text/html" dependency="formlogic_init getTabs updateEnv getContent getAgentContent getRdsadContent buildMultiLang getMyAccount classNames createDefaultUserAcctProfile getObjTenantInfo" condition=".[not(/root/*[local-name()='queryResponse']/*)]" mandatory="false" path="/portal/missing_object.xml">
  680. <xts:logicsheet path="logicsheets/portal.xsl"/>
  681. <xts:logicsheet path="logicsheets/presentation/dialog/framework.xsl"/>
  682. <xts:logicsheet path="logicsheets/presentation/dialog/presentation.xsl"/>
  683. <xts:logicsheet path="logicsheets/presentation/layout.xsl"/>
  684. </xts:block>
  685. <!--
  686. ===============================================================================================
  687. getObjects - get object class names
  688. ===============================================================================================
  689. -->
  690. <xts:block id="classNames" type="exec" mode="input" processor="XML" path="/portal/uiExtensions.xml">
  691. <xts:logicsheet path="/logicsheets/uiobjects/uiobjects_names.xslt"/>
  692. </xts:block>
  693. <!--
  694. ===============================================================================================
  695. renderPage - render the page
  696. ===============================================================================================
  697. -->
  698. <xts:block id="renderPage" mode="output" processor="XSLT" type="exec" mimeType="text/html" dependency="formlogic_init getTabs updateEnv getContent getAgentContent getRdsadContent buildMultiLang getMyAccount classNames getObjTenantInfo" condition=".[/root/*[local-name()='queryResponse']/*]" mandatory="false">
  699. <xts:logicsheet path="logicsheets/portal.xsl"/>
  700. <xts:logicsheet path="logicsheets/cm-logic.xsl"/>
  701. <xts:logicsheet path="logicsheets/presentation/dialog/templates.xsl"/>
  702. <xts:logicsheet path="logicsheets/presentation/dialog/framework.xsl"/>
  703. <xts:logicsheet path="logicsheets/presentation/layout.xsl"/>
  704. <xts:logicsheet path="logicsheets/presentation/dialog/presentation.xsl"/>
  705. <xts:logicsheet path="logicsheets/presentation/controls/framework.xsl"/>
  706. <xts:logicsheet path="logicsheets/presentation/controls/presentation.xsl"/>
  707. <xts:logicsheet path="logicsheets/permissions.xsl"/>
  708. <xts:logicsheet path="logicsheets/formlogic_lite.xslt"/>
  709. <xts:logicsheet path="logicsheets/validation.xslt"/>
  710. <xts:logicsheet path="logicsheets/presentation/touch_up.xslt"/>
  711. <xsl:stylesheet version="1.0"
  712. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  713. xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
  714. xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
  715. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  716. xmlns:xts="http://developer.cognos.com/schemas/xts/"
  717. xmlns:lyt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/layout/"
  718. xmlns:dt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/templates/"
  719. xmlns:dp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/presentation/"
  720. xmlns:df="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/framework/"
  721. xmlns:cf="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/framework/"
  722. xmlns:cp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/presentation/"
  723. xmlns:utml="http://developer.cognos.com/schemas/xts/logicsheet/xslt/formlogic/"
  724. xmlns:bus="http://developer.cognos.com/schemas/bibus/3/"
  725. xmlns:pm="http://developer.cognos.com/schemas/xts/pm"
  726. exclude-result-prefixes="bus pf xts dt xsl cf cp df dp lyt cm utml pm xtsext">
  727. <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no" omit-xml-declaration="yes"/>
  728. <xsl:variable name="mname" select="'properties_general_titan.xts'"/>
  729. <pf:variables/>
  730. <pf:common-bidi-templates/>
  731. <pf:documentFormats/>
  732. <pf:gen-icon/>
  733. <xsl:variable name="the-object" select="/root/cm:queryResponse/*"/>
  734. <!-- we're looking at a subscriptionFolder or reportDataServiceAgentDefinition -->
  735. <xsl:variable name="isRDSAD" select="/root/rdsad"/>
  736. <!-- path to reportDataServiceAGentDefinition (subscription) namely periodicalProducer-->
  737. <xsl:variable name="rdsad-path" select="/root/rdsad/*/*/cm:schedule"/>
  738. <!-- variable used for reportCache values -->
  739. <xsl:variable name="maxDurationReportCache" select="$the-object/*[local-name()='retentions']/*[local-name()='retentionRule'][@objectClass='reportCache']/@maxDuration"/>
  740. <xsl:variable name="start-at-path">
  741. <xsl:choose>
  742. <xsl:when test="$isRDSAD">
  743. <xsl:value-of select="/root/rdsad/*/*/cm:subscriptionFolder/cm:searchPath"/>
  744. </xsl:when>
  745. <xsl:when test="starts-with($the-object/cm:searchPath, concat(key('session-param', 'e_hp'),'/folder')) or (starts-with($the-object/cm:searchPath, concat('~','/folder')))">
  746. <xsl:value-of select="concat(key('session-param', 'e_hp'),'/folder')"/>
  747. </xsl:when>
  748. <xsl:when test="starts-with($the-object/cm:searchPath, concat(key('session-param', 'e_hp'),'/dataSetFolder')) or (starts-with($the-object/cm:searchPath, concat('~','/dataSetFolder')))">
  749. <xsl:value-of select="concat(key('session-param', 'e_hp'),'/dataSetFolder')"/>
  750. </xsl:when>
  751. <xsl:when test="starts-with($the-object/cm:searchPath,'/content')">
  752. <xsl:value-of select="$defaultContentRoot"/>
  753. </xsl:when>
  754. </xsl:choose>
  755. </xsl:variable>
  756. <cp:flyoutControl/>
  757. <xsl:variable name="has_write_permission" select="contains(/root/cm:queryResponse/*/cm:permissions, 'write')"/>
  758. <xsl:variable name="has_write_permission_to_agentReport" select="contains(/root/agentReport/cm:queryResponse/*/cm:permissions, 'write')"/>
  759. <xsl:variable name="has_read_permission" select="contains(/root/cm:queryResponse/*/cm:permissions, 'read')"/>
  760. <xsl:variable name="has_policy_permission" select="contains(/root/cm:queryResponse/*/cm:permissions, 'setPolicy')"/>
  761. <xsl:variable name="has_traverse_permission" select="contains(/root/cm:queryResponse/*/cm:permissions, 'traverse')"/>
  762. <xsl:variable name="parent_is_public" select="$the-object/cm:parent/*/cm:tenantID=''"/>
  763. <xsl:variable name="theObjectName" select="string($the-object/cm:defaultName)"/>
  764. <xsl:variable name="noUserProfile" select="key('env-param','m_class')='account' and not(starts-with($the-object/cm:searchPath,'/configuration/account')) and $the-object/cm:modificationTime=''"/>
  765. <xsl:variable name="browserTitle">
  766. <xts:string id="IDS_PROPERTIES_TITLE">
  767. <xts:param name="objectName">
  768. <span lang="{$contentLocale}"><xsl:value-of select="xtsext:enforceBTD($theObjectName, $baseTextDirection, $productLocale, boolean($isBidiEnabled='true'))"/></span>
  769. </xts:param>
  770. </xts:string>
  771. </xsl:variable>
  772. <xsl:variable name="default-product-locale">
  773. <!-- TODO: IS IT CORRECT TO GET THIS FROM THE HTTP HEADER... -->
  774. <!--xsl:value-of select="translate(string($contentLocale), 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz' )"/-->
  775. <xsl:value-of select="$contentLocale"/>
  776. </xsl:variable>
  777. <!-- isReadOnly is set up for A11y, so all the tables can be setup for document for read-only so once user gets to conent he will arrow through (traverse permission does not matter)-->
  778. <xsl:variable name="isReadOnly">
  779. <xsl:choose>
  780. <xsl:when test="$has_write_permission and $noUserProfile!=true()">false</xsl:when>
  781. <xsl:otherwise>true</xsl:otherwise>
  782. </xsl:choose>
  783. </xsl:variable>
  784. <xsl:variable name="rootFolder" select="key('session-param','e_proot')='' and key('session-param','e_mroot')=''"/>
  785. <xsl:variable name="compareField">
  786. <xsl:choose>
  787. <xsl:when test="/root/cm:queryResponse/*/cm:defaultName[@modifiable = 'true']">m_t_default_name_</xsl:when>
  788. <xsl:when test="/root/cm:queryResponse/*/cm:defaultDescription[@modifiable = 'true']">m_t_default_description_</xsl:when>
  789. <xsl:when test="/root/cm:queryResponse/*/cm:defaultScreenTip[@modifiable = 'true']">m_t_default_screenTip_</xsl:when>
  790. <xsl:otherwise>noDefaultField</xsl:otherwise>
  791. </xsl:choose>
  792. </xsl:variable>
  793. <xsl:variable name="lg" select="/root/env/param[starts-with(@name,$compareField)]"/>
  794. <xsl:variable name="rootDefault" select="/root/multiLangs/useLangAsDefault"/>
  795. <xsl:variable name="lang">
  796. <xsl:choose>
  797. <xsl:when test="key('env-param','pty_activeLang')!=''"><xsl:value-of select="key('env-param','pty_activeLang')"/></xsl:when>
  798. <xsl:when test="$rootDefault != 'NOMATCH'"><xsl:value-of select="$rootDefault"/></xsl:when>
  799. <xsl:otherwise><xsl:value-of select="/root/multiLangs/name[position()=1]"/></xsl:otherwise>
  800. </xsl:choose>
  801. </xsl:variable>
  802. <xsl:variable name="activeLang">
  803. <xsl:choose>
  804. <xsl:when test="string(key('env-param','pty_activeLang'))!=''"><xsl:value-of select="key('env-param','pty_activeLang')"/></xsl:when>
  805. <xsl:when test="string(key('env-param','pty_del')) != ''"><xsl:value-of select="$lang"/></xsl:when>
  806. </xsl:choose>
  807. </xsl:variable>
  808. <xsl:variable name="showOKCancel" select="($has_write_permission or $has_policy_permission) and $noUserProfile!=true()"/>
  809. <!-- The objects (eg., reportView) base object -->
  810. <xsl:variable name="base" select="$the-object/cm:base/*"/>
  811. <!-- The objects (eg., shortcut) target object -->
  812. <xsl:variable name="target" select="$the-object/cm:target/*"/>
  813. <xsl:variable name="objectHiddenProperty" select="$the-object/cm:hidden"/>
  814. <xsl:variable name="uiClass" select="$the-object/cm:objectClass"/>
  815. <xsl:variable name="objClass">
  816. <xsl:choose>
  817. <xsl:when test="$target and $target/cm:objectClass!='nil'">
  818. <xsl:value-of select="$target/cm:objectClass"/>
  819. </xsl:when>
  820. <xsl:otherwise>
  821. <xsl:value-of select="$uiClass"/>
  822. </xsl:otherwise>
  823. </xsl:choose>
  824. </xsl:variable>
  825. <xsl:variable name="launchableType">
  826. <xsl:choose>
  827. <xsl:when test="$target and $target/cm:launchableType!='nil'">
  828. <xsl:value-of select="$target/cm:launchableType"/>
  829. </xsl:when>
  830. <xsl:otherwise>
  831. <xsl:value-of select="$the-object/cm:launchableType"/>
  832. </xsl:otherwise>
  833. </xsl:choose>
  834. </xsl:variable>
  835. <xsl:variable name="showHideEntry" select="$userCanUseShowHiddenObjectsPreferenceCapability='true' and $objectHiddenProperty and /root/objectClass/class[@name=$objClass and string(@canHide)!='false'] and $has_read_permission"/>
  836. <xsl:variable name="chkSpaceEnterKeyEvent">if (event.keyCode==13 || event.keyCode==32 || event.charCode==32)</xsl:variable>
  837. <!-- start the output -->
  838. <xsl:template match="/root">
  839. <xsl:text disable-output-escaping='yes'>&lt;!DOCTYPE html></xsl:text><dp:page longTitle="$browserTitle" class="tundra">
  840. <dp:meta>
  841. <pf:meta/>
  842. </dp:meta>
  843. <pf:script/>
  844. <dp:script>
  845. <script src="{$webRoot}/dojo16/dojo/dojo.js"/>
  846. <link id="themeStyles" rel="stylesheet" href="{$webcontent}/../dojo16/dijit/themes/tundra/tundra.css"/>
  847. <script language="javascript" src="{$webcontent}/{$app}/js/CCflyoutMenu.js"/>
  848. <script language="javascript" src="{$webcontent}/{$app}/js/utilities.js"/>
  849. <script language="javascript">
  850. function removeUCCFromStr(str)
  851. {
  852. if (typeof bidi != "undefined" &amp;&amp; typeof bidi["removeUCCFromStr"] != "undefined")
  853. {
  854. return bidi.removeUCCFromStr(str);
  855. }
  856. else
  857. {
  858. return str;
  859. }
  860. }
  861. </script>
  862. <pf:help context="HID_PROPERTIES"/>
  863. <xsl:if test="($has_write_permission or $has_policy_permission) and (not(key('env-param','ps_nav_stack')) or key('env-param','ps_nav_stack') = '')">
  864. <script language="javascript">
  865. <!-- cwb - Cancel When Back - there are no stack pages. -->
  866. function cwb()
  867. {
  868. <!-- Reset the hHints before cancelling the page -->
  869. clearSessionEntry('hHints');
  870. location.href = "<xsl:value-of select="xtsext:javascriptencode(string(/root/env/param[@name='backURL']))"/>";
  871. }
  872. </script>
  873. </xsl:if>
  874. <xsl:if test="($has_read_permission or $has_write_permission) and $noUserProfile!=true()">
  875. <script language="javascript">
  876. function getPropertiesChanged()
  877. {
  878. return ((document.pform['changed_genprop'] &amp;&amp; document.pform['changed_genprop'].value=='1') || '<xsl:value-of select="string(/root/env/param[starts-with(string(@name),'changed_') and string(.)='1'])"/>' == '1') ? true : false;
  879. }
  880. function redirect(cmd)
  881. {
  882. if (window.resetPageState)
  883. {
  884. resetPageState();
  885. }
  886. if( cmd == 'undefined' || cmd == null )
  887. {
  888. <xsl:choose>
  889. <xsl:when test="$the-object/cm:base">
  890. document.location.href="<xsl:value-of select="$gateway"/>?b_action=xts.run&amp;m=<xsl:value-of select="$app"/>/<xsl:value-of select="$mname"/>&amp;m_name=<xsl:value-of select="xtsext:protect(xtsext:urlencode(string($base/cm:defaultName)),'url','userData','getdata')"/>&amp;m_class=<xsl:value-of select="$base/cm:objectClass"/>&amp;m_obj=<xsl:value-of select="xtsext:protect(xtsext:urlencode(string($base/cm:searchPath)),'url','searchPath','getdata')"/>&amp;backURL=<xsl:value-of select="xtsext:protect(xtsext:urlencode(string(key('env-param', 'backURL'))),'url','url','getdata')"/>";
  891. </xsl:when>
  892. <xsl:when test="$the-object/cm:target and ($the-object/cm:target/*/cm:objectClass='output' or $the-object/cm:target/*/cm:objectClass='documentContent')">
  893. document.location.href="<xsl:value-of select="$gateway"/>?b_action=xts.run&amp;m=<xsl:value-of select="$app"/>/properties_basic.xts&amp;m_name=<xsl:value-of select="xtsext:protect(xtsext:urlencode(string(cm:queryResponse/*/cm:target/*/cm:defaultName)),'url','userData','getdata')"/>&amp;m_obj=<xsl:value-of select="xtsext:protect(xtsext:urlencode(string(cm:queryResponse/*/cm:target/*/cm:searchPath)),'url','searchPath','getdata')"/>&amp;m_path=<xsl:value-of select="xtsext:protect(xtsext:urlencode(string(cm:queryResponse/*/cm:target/*/cm:parent/*/cm:searchPath)),'url','searchPath','getdata')"/>&amp;m_class=<xsl:value-of select="cm:queryResponse/*/cm:target/*/cm:objectClass"/>&amp;backURL=<xsl:value-of select="xtsext:protect(xtsext:urlencode(string(key('env-param', 'backURL'))),'url','url','getdata')"/>";
  894. </xsl:when>
  895. <xsl:when test="$the-object/cm:target">
  896. document.location.href="<xsl:value-of select="$gateway"/>?b_action=xts.run&amp;m=<xsl:value-of select="$app"/>/<xsl:value-of select="$mname"/>&amp;m_name=<xsl:value-of select="xtsext:protect(xtsext:urlencode(string(cm:queryResponse/*/cm:target/*/cm:defaultName)),'url','userData','getdata')"/>&amp;m_obj=<xsl:value-of select="xtsext:protect(xtsext:urlencode(string(cm:queryResponse/*/cm:target/*/cm:searchPath)),'url','searchPath','getdata')"/>&amp;m_path=<xsl:value-of select="xtsext:protect(xtsext:urlencode(string(cm:queryResponse/*/cm:target/*/cm:parent/*/cm:searchPath)),'url','searchPath','getdata')"/>&amp;m_class=<xsl:value-of select="cm:queryResponse/*/cm:target/*/cm:objectClass"/>&amp;backURL=<xsl:value-of select="xtsext:protect(xtsext:urlencode(string(key('env-param', 'backURL'))),'url','url','getdata')"/>";
  897. </xsl:when>
  898. </xsl:choose>
  899. }
  900. <xsl:if test="$has_write_permission">
  901. else if( cmd == 'save' )
  902. {
  903. setFormInputElement("m","<xsl:value-of select="xtsext:javascriptencode($app)"/>/submit.xts");
  904. setFormInputElement("ps-nav-op","maintain");
  905. setFormInputElement("redirect.m","<xsl:value-of select="xtsext:javascriptencode($app)"/>/<xsl:value-of select="$mname"/>");
  906. setFormInputElement("redirect.b_action","xts.run");
  907. <xsl:choose>
  908. <xsl:when test="$the-object/cm:base">
  909. <xsl:choose>
  910. <xsl:when test="string(key('env-param','m_p_base'))=''">
  911. setFormInputElement("redirect.m_name","<xsl:value-of select="xtsext:javascriptencode(string($base/cm:defaultName))"/>");
  912. setFormInputElement("redirect.m_class","<xsl:value-of select="xtsext:javascriptencode(string($base/cm:objectClass))"/>");
  913. setFormInputElement("redirect.m_obj","<xsl:value-of select="xtsext:javascriptencode(string($base/cm:searchPath))"/>");
  914. </xsl:when>
  915. <xsl:otherwise>
  916. setFormInputElement("redirect.m_name","<xsl:value-of select="xtsext:javascriptencode(string(/root/selected/cm:queryResponse/*/cm:defaultName))"/>");
  917. setFormInputElement("redirect.m_class","<xsl:value-of select="xtsext:javascriptencode(string(/root/selected/cm:queryResponse/*/cm:objectClass))"/>");
  918. setFormInputElement("redirect.m_obj","<xsl:value-of select="xtsext:javascriptencode(string(/root/selected/cm:queryResponse/*/cm:searchPath))"/>");
  919. </xsl:otherwise>
  920. </xsl:choose>
  921. </xsl:when>
  922. <xsl:when test="$the-object/cm:target">
  923. setFormInputElement("redirect.m_name","<xsl:value-of select="xtsext:javascriptencode(string($target/cm:defaultName))"/>");
  924. setFormInputElement("redirect.m_class","<xsl:value-of select="xtsext:javascriptencode(string($target/cm:objectClass))"/>");
  925. setFormInputElement("redirect.m_obj","<xsl:value-of select="xtsext:javascriptencode(string($target/cm:searchPath))"/>");
  926. </xsl:when>
  927. </xsl:choose>
  928. setFormInputElement("redirect.backURL","<xsl:value-of select="xtsext:javascriptencode(string(key('env-param', 'backURL')))"/>");
  929. document.pform.submit();
  930. }
  931. </xsl:if>
  932. }
  933. </script>
  934. </xsl:if>
  935. <xsl:if test="$has_write_permission and $noUserProfile!=true()">
  936. <script language="javascript">
  937. var MSG_NEED_ONE_NAME = "<xts:string id="IDS_PROP_NEED_ONE_NAME" encode="javascript"/>";
  938. var MSG_NEED_ONE_NAME_CANT_REMOVE = "<xts:string id="IDS_PROP_NEED_ONE_NAME_CANT_REMOVE" encode="javascript"/>";
  939. var curLang = "<xsl:text/><xsl:value-of select="xtsext:javascriptencode(string($lang))"/>";
  940. function removeLang()
  941. {
  942. if( !validate() )
  943. return;
  944. if( hasAName(null,true) == true )
  945. {
  946. if( document.pform['ro_name'].value == 'true' &amp;&amp; document.pform['pty_keep'] &amp;&amp; document.pform['pty_keep'].value == document.pform['m_transloc'].options[document.pform['m_transloc'].selectedIndex].value)
  947. {
  948. if( document.pform['pty_desc'] )
  949. document.pform['pty_desc'].value = "";
  950. if( document.pform['pty_scrt'] )
  951. document.pform['pty_scrt'].value = "";
  952. }
  953. else
  954. {
  955. document.pform['pty_deactivLang'].value = document.pform['m_transloc'].options[document.pform['m_transloc'].selectedIndex].value;
  956. document.body.style.cursor = "wait";
  957. clearView();
  958. if( document.pform['m_transloc'] )
  959. document.pform['m_transloc'].disabled = true;
  960. if( document.pform['pty_name'] )
  961. document.pform['pty_name'].disabled=true;
  962. if( document.pform['pty_desc'] )
  963. document.pform['pty_desc'].disabled=true;
  964. if( document.pform['pty_scrt'] )
  965. document.pform['pty_scrt'].disabled=true;
  966. setPropertiesChanged();
  967. document.pform['pty_del'].value = "1";
  968. document.pform['pty_add'].value = "";
  969. document.pform['pty_activeLang'].value = "";
  970. document.pform.ps_nav_op.value = "maintain";
  971. document.pform.m.value = "<xsl:value-of select="concat($app,'/',$mname)"/>";
  972. document.pform.submit();
  973. }
  974. }
  975. else
  976. {
  977. alert(MSG_NEED_ONE_NAME_CANT_REMOVE);
  978. }
  979. }
  980. function anyNames(namVal)
  981. {
  982. if( hasAName(namVal,false) == false )
  983. {
  984. alert(MSG_NEED_ONE_NAME);
  985. }
  986. if (document.pform['m_t_default_name_'+curLang] != null) {
  987. document.pform['m_t_default_name_'+curLang].value = namVal;
  988. }
  989. if(namVal!="")
  990. setPropertiesChanged();
  991. }
  992. function hasAName(namVal, remove)
  993. {
  994. <!--
  995. This javascript function checks to make sure that there are values for the name entry
  996. for all the currently active languages.
  997. -->
  998. if (document.pform['m_transloc'] === undefined) {
  999. return true;
  1000. }
  1001. if (document.pform['ro_name'].value == 'true')
  1002. {
  1003. if (remove) {
  1004. if( document.pform['origDefLang'].value != "" &amp;&amp; document.pform['origDefLang'].value == document.pform['m_transloc'].options[document.pform['m_transloc'].selectedIndex].value)
  1005. {
  1006. if ( document.pform['pty_keep'] )
  1007. {
  1008. return true;
  1009. }
  1010. return false;
  1011. }
  1012. }
  1013. return true;
  1014. }
  1015. var valCnt = 0;
  1016. var entCnt = 0;
  1017. for( i=0; i &lt; document.pform['m_transloc'].options.length; i++ )
  1018. {
  1019. if( document.pform['m_t_default_name_'+document.pform['m_transloc'].options[i].value])
  1020. {
  1021. entCnt += 1;
  1022. if( document.pform['m_t_default_name_'+document.pform['m_transloc'].options[i].value].value != '' )
  1023. valCnt += 1;
  1024. }
  1025. }
  1026. if( valCnt > 1)
  1027. {
  1028. return true;
  1029. }
  1030. else
  1031. {
  1032. if( entCnt == 1)
  1033. {
  1034. <!-- Only 1 entry so cannot be blank -->
  1035. if( namVal )
  1036. {
  1037. if( namVal == "")
  1038. return false;
  1039. }
  1040. else
  1041. { <!-- Should never have this condition... but leave it here for good measure!!! -->
  1042. if( document.pform['pty_name'] &amp;&amp; document.pform['pty_name'].value == "" )
  1043. {
  1044. return false;
  1045. }
  1046. }
  1047. return true;
  1048. }
  1049. else
  1050. {
  1051. var optVal = document.pform['m_transloc'].options[document.pform['m_transloc'].selectedIndex].value;
  1052. <!-- Condition when user has changed the contents of the Name: field -->
  1053. if( namVal )
  1054. {
  1055. if( namVal == "" )
  1056. {
  1057. if( (valCnt == 0) || (valCnt == 1 &amp;&amp; document.pform['m_t_default_name_'+optVal].value != ""))
  1058. {
  1059. return false;
  1060. }
  1061. }
  1062. }
  1063. else
  1064. {
  1065. <!-- multiple entries but none of which has a value! -->
  1066. if (valCnt == 0 ) {
  1067. return false;
  1068. }
  1069. <!-- Condition when removing a language from the dropdown list and it is the only one with a value -->
  1070. if (remove &amp;&amp; valCnt == 1 &amp;&amp; document.pform['m_t_default_name_'+optVal].value != "")
  1071. {
  1072. return false;
  1073. }
  1074. }
  1075. return true;
  1076. }
  1077. }
  1078. }
  1079. function checkLang(x)
  1080. {
  1081. <!--
  1082. This javascript function checks to see if the language exists in the top part of the list (entries before the
  1083. delimiter line) or if we need to do a reload to create m_t_default* hidden input entries for the new value.
  1084. -->
  1085. <!-- What is the current selected language. -->
  1086. var selectedLang = x.options[x.selectedIndex].value;
  1087. <!-- The value, "not", is for the delimiter line. If it is selected, then force the view back to the top of the list -->
  1088. if (selectedLang == "not")
  1089. {
  1090. x.options[x.selectedIndex].selected = false;
  1091. x.options[0].selected = true;
  1092. selectedLang = x.options[0].value;
  1093. }
  1094. <!-- set focus to the name so that the user cannot use the scroll wheel on a mouse and screw stuff up -->
  1095. if( document.pform['pty_name'] )
  1096. {
  1097. document.pform['pty_name'].focus();
  1098. }
  1099. else
  1100. {
  1101. if( document.pform['pty_scrt'] )
  1102. {
  1103. document.pform['pty_scrt'].focus();
  1104. }
  1105. else
  1106. {
  1107. if( document.pform['pty_desc'] )
  1108. document.pform['pty_desc'].focus();
  1109. }
  1110. }
  1111. <xsl:if test="$compareField != 'noDefaultField'">
  1112. setForm();
  1113. <!-- We have a language that is available in the top of the list, so use what's available locally. -->
  1114. if( document.pform['<xsl:value-of select="xtsext:javascriptencode(string($compareField))"/>'+ selectedLang])
  1115. {
  1116. setView();
  1117. document.pform['pty_del'].value = "";
  1118. document.pform['pty_add'].value = "";
  1119. document.pform['pty_activeLang'].value = selectedLang;
  1120. curLang = selectedLang;
  1121. }
  1122. else
  1123. {
  1124. <!-- There is no locally available language entry, so go off and create the new one-->
  1125. <!-- Visual indicator that something is going on -->
  1126. document.body.style.cursor = "wait";
  1127. clearView();
  1128. if( document.pform['m_transloc'] )
  1129. document.pform['m_transloc'].disabled = true;
  1130. if( document.pform['pty_name'] )
  1131. document.pform['pty_name'].disabled = true;
  1132. if( document.pform['pty_desc'] )
  1133. document.pform['pty_desc'].disabled = true;
  1134. if( document.pform['pty_scrt'] )
  1135. document.pform['pty_scrt'].disabled = true;
  1136. document.pform['pty_del'].value = "";
  1137. document.pform['pty_add'].value = "1";
  1138. document.pform['pty_activeLang'].value = selectedLang;
  1139. document.pform.ps_nav_op.value = "maintain";
  1140. document.pform.m.value = "<xsl:value-of select="concat($app,'/',$mname)"/>";
  1141. document.pform.submit();
  1142. }
  1143. </xsl:if>
  1144. }
  1145. function chgD(val)
  1146. {
  1147. document.pform['m_t_default_description_'+curLang].value = val;
  1148. setPropertiesChanged();
  1149. }
  1150. function chgST(val)
  1151. {
  1152. document.pform['m_t_default_screenTip_'+curLang].value = val;
  1153. setPropertiesChanged();
  1154. }
  1155. function setPropertiesChanged()
  1156. {
  1157. document.pform['changed_genprop'].value='1';
  1158. }
  1159. function clearView()
  1160. {
  1161. <!-- Clear out the display fields. -->
  1162. var updateBTD = isBidiEnabled &amp;&amp; (bidi.baseTextDirection == 'auto');
  1163. if( document.pform['pty_name'] ){
  1164. document.pform['pty_name'].value = "";
  1165. if (updateBTD){
  1166. document.pform['pty_name'].dir = bidi.resolveStrBtd("");
  1167. }
  1168. }
  1169. if( document.pform['pty_desc'] ){
  1170. document.pform['pty_desc'].value = "";
  1171. if (updateBTD){
  1172. document.pform['pty_desc'].dir = bidi.resolveStrBtd("");
  1173. }
  1174. }
  1175. if( document.pform['pty_scrt'] ){
  1176. document.pform['pty_scrt'].value = "";
  1177. if (updateBTD){
  1178. document.pform['pty_scrt'].dir = bidi.resolveStrBtd("");
  1179. }
  1180. }
  1181. }
  1182. function setForm()
  1183. {
  1184. <!-- Load what is currently displayed in the fields into the appropriate hidden fields. -->
  1185. if( document.pform['pty_name'] )
  1186. document.pform['m_t_default_name_'+curLang].value = document.pform['pty_name'].value;
  1187. if( document.pform['pty_desc'] )
  1188. document.pform['m_t_default_description_'+curLang].value = document.pform['pty_desc'].value;
  1189. if( document.pform['pty_scrt'] )
  1190. document.pform['m_t_default_screenTip_'+curLang].value = document.pform['pty_scrt'].value;
  1191. }
  1192. function setView()
  1193. {
  1194. <!-- Load what is currently in the hidden selected languages fields into the appropriate display fields. -->
  1195. var updateBTD = isBidiEnabled &amp;&amp; (bidi.baseTextDirection == 'auto');
  1196. var selectedLang = document.pform['m_transloc'].options[document.pform['m_transloc'].selectedIndex].value;
  1197. if( document.pform['pty_name'] ){
  1198. document.pform['pty_name'].value = document.pform['m_t_default_name_'+ selectedLang].value;
  1199. if (updateBTD){
  1200. document.pform['pty_name'].dir = bidi.resolveStrBtd(document.pform['pty_name'].value);
  1201. }
  1202. }
  1203. if( document.pform['pty_desc'] ){
  1204. document.pform['pty_desc'].value = document.pform['m_t_default_description_'+ selectedLang].value;
  1205. if (updateBTD){
  1206. document.pform['pty_desc'].dir = bidi.resolveStrBtd(document.pform['pty_desc'].value);
  1207. }
  1208. }
  1209. if( document.pform['pty_scrt'] ){
  1210. document.pform['pty_scrt'].value = document.pform['m_t_default_screenTip_'+ selectedLang].value;
  1211. if (updateBTD){
  1212. document.pform['pty_scrt'].dir = bidi.resolveStrBtd(document.pform['pty_scrt'].value);
  1213. }
  1214. }
  1215. }
  1216. function init()
  1217. {
  1218. <!-- Load up the display language -->
  1219. <!-- alert(document.pform['pty_activeLang'].value); -->
  1220. if( document.pform['pty_activeLang'] &amp;&amp; document.pform['pty_activeLang'].value == "")
  1221. {
  1222. document.pform['pty_activeLang'].value = document.pform['m_transloc'].options[document.pform['m_transloc'].selectedIndex].value;
  1223. setView();
  1224. }
  1225. else
  1226. {
  1227. <!-- Do not load the values for display if the fields is currently being deleted -->
  1228. <xsl:if test="string(key('env-param','pty_del'))!=''">
  1229. setView();
  1230. </xsl:if>
  1231. }
  1232. if( document.pform['pty_name'] &amp;&amp; document.pform['pty_name'].value == '' )
  1233. {
  1234. try{
  1235. document.pform['pty_name'].focus();
  1236. }catch(e){
  1237. //it is possible the when this control is rendered in a modal dialog that the control
  1238. //is not yet visible...hence we get here...just try again in a few moments
  1239. setTimeout("try{document.pform['pty_name'].focus()}catch(e){}", 11);
  1240. }
  1241. }
  1242. if (document.pform['pty_add'] !== undefined) {
  1243. document.pform['pty_add'].value="";
  1244. }
  1245. if (document.pform['pty_del'] !== undefined) {
  1246. document.pform['pty_del'].value="";
  1247. }
  1248. if (document.pform.maxNumber_history)
  1249. {
  1250. if (document.pform.rg_retention_history[0].checked)
  1251. {
  1252. document.pform.maxNumber_history.disabled = false;
  1253. }
  1254. else
  1255. {
  1256. document.pform.duration_history.disabled = false;
  1257. }
  1258. }
  1259. if (document.pform.maxNumber_reportVersion)
  1260. {
  1261. if (document.pform.rg_retention_reportVersion[0].checked)
  1262. {
  1263. document.pform.maxNumber_reportVersion.disabled = false;
  1264. }
  1265. else
  1266. {
  1267. document.pform.duration_reportVersion.disabled = false;
  1268. }
  1269. }
  1270. //Report any save errors
  1271. if (document.pform.cmdErrorMessage)
  1272. {
  1273. if (document.pform.cmdErrorMessage.value != '')
  1274. {
  1275. alert(document.pform.cmdErrorMessage.value);
  1276. document.pform.cmdErrorMessage.value='';
  1277. }
  1278. }
  1279. }
  1280. <xsl:if test="$has_write_permission">
  1281. function settrans()
  1282. {
  1283. <!--
  1284. Used by this morphlet in the block (updateEnv) to remove the m_p_default... entries, so that on
  1285. return from properties_multilingual the cm:query is executed to retrieve the latest information.
  1286. -->
  1287. document.pform.toMultilingual.value = '1';
  1288. }
  1289. </xsl:if>
  1290. function validate()
  1291. {
  1292. if( hasAName(null,false) == false ){
  1293. alert(MSG_NEED_ONE_NAME);
  1294. return false;
  1295. }
  1296. if(document.pform.h_CAM_action)
  1297. document.pform.h_CAM_action.value='generateTC';
  1298. if (document.pform.m_p_uri)
  1299. {
  1300. if ( trim(document.pform.m_p_uri.value) == "" )
  1301. {
  1302. document.pform.m_p_uri.focus();
  1303. alert("<xts:string id="IDS_PROP_ERR_NO_URI" encode="javascript"/>");
  1304. return false;
  1305. }
  1306. }
  1307. if (document.pform.m_p_archiveLocation_uri)
  1308. {
  1309. if ( trim(document.pform.m_p_archiveLocation_uri.value) == "" )
  1310. {
  1311. document.pform.m_p_archiveLocation_uri.focus();
  1312. alert("<xts:string id="IDS_PROP_ERR_NO_URI" encode="javascript"/>");
  1313. return false;
  1314. }
  1315. }
  1316. // if retention for runHistory is present on the page validate the values
  1317. if (document.pform.maxNumber_history)
  1318. {
  1319. if (document.pform.rg_retention_history[0].checked)
  1320. {
  1321. document.pform.maxNumber_history.value = trim(document.pform.maxNumber_history.value);
  1322. if(validate_positiveIntegerOrZeroProp(document.pform.maxNumber_history)==false)
  1323. return false;
  1324. }
  1325. else
  1326. {
  1327. document.pform.duration_history.value = trim(document.pform.duration_history.value);
  1328. if(validate_positiveIntegerProp(document.pform.duration_history)==false)
  1329. return false;
  1330. }
  1331. }
  1332. // if retention for reportVersion is present on the page then validate the values
  1333. if (document.pform.maxNumber_reportVersion)
  1334. {
  1335. if (document.pform.rg_retention_reportVersion[0].checked)
  1336. {
  1337. document.pform.maxNumber_reportVersion.value = trim(document.pform.maxNumber_reportVersion.value);
  1338. if(validate_positiveIntegerOrZeroProp(document.pform.maxNumber_reportVersion)==false)
  1339. return false;
  1340. }
  1341. else
  1342. {
  1343. document.pform.duration_reportVersion.value = trim(document.pform.duration_reportVersion.value);
  1344. if(validate_positiveIntegerProp(document.pform.duration_reportVersion)==false)
  1345. return false;
  1346. }
  1347. }
  1348. // if retention for documentVersion is present on the page then validate the values
  1349. if (document.pform.maxNumber_documentVersion)
  1350. {
  1351. if (document.pform.rg_retention_documentVersion[0].checked)
  1352. {
  1353. document.pform.maxNumber_documentVersion.value = trim(document.pform.maxNumber_documentVersion.value);
  1354. if(validate_positiveIntegerOrZeroProp(document.pform.maxNumber_documentVersion)==false)
  1355. return false;
  1356. }
  1357. else
  1358. {
  1359. document.pform.duration_documentVersion.value = trim(document.pform.duration_documentVersion.value);
  1360. if(validate_positiveIntegerProp(document.pform.duration_documentVersion)==false)
  1361. return false;
  1362. }
  1363. }
  1364. return true;
  1365. }
  1366. function makeOwner()
  1367. {
  1368. if( !validate() )
  1369. return;
  1370. document.pform.m_p_owner.value = '<xsl:value-of select="xtsext:javascriptencode(string(key('session-param', 'e_hp')))"/>';
  1371. document.pform.changed_m_p_owner.value = '1';
  1372. document.pform.m.value = '<xsl:value-of select="concat($app,'/',$mname)"/>';
  1373. document.pform.ps_nav_op.value= 'maintain';
  1374. document.pform.m_class.value = '<xsl:value-of select="xtsext:javascriptencode(string(key('env-param','m_class')))"/>';
  1375. document.pform.submit();
  1376. }
  1377. <!-- Make sure the value is a positive integer (1,2,...) -->
  1378. function validate_positiveIntegerProp(e)
  1379. {
  1380. if (e.value &lt; 1 || isNaN(e.value) || parseInt(e.value, 10) != e.value)
  1381. {
  1382. window.alert("<xts:string id="IDS_ERR_POSITIVE" encode="javascript"/>");
  1383. e.focus();
  1384. return false;
  1385. }
  1386. }
  1387. <!-- Make sure the value is a positive integer or 0 (0,1,2,...) -->
  1388. function validate_positiveIntegerOrZeroProp(e)
  1389. {
  1390. if (e.value &lt; 0 || isNaN(e.value) || parseInt(e.value, 10) != e.value)
  1391. {
  1392. window.alert("<xts:string id="IDS_ERR_NON_NEGATIVE" encode="javascript"/>");
  1393. e.focus();
  1394. return false;
  1395. }
  1396. }
  1397. </script>
  1398. </xsl:if>
  1399. </dp:script>
  1400. <utml:form id="theForm" name="pform" method="post" action="{$gateway}">
  1401. <utml:exclude-prefix>m_t_default_</utml:exclude-prefix>
  1402. <utml:excludes>m_p_metadataModel</utml:excludes>
  1403. <utml:excludes>m_p_metadataModelPackage</utml:excludes>
  1404. <utml:excludes>m_agsr_metadataModelPackage</utml:excludes>
  1405. <utml:excludes>emailAddress</utml:excludes>
  1406. <utml:excludes>selectedTenantName</utml:excludes>
  1407. <utml:read-only>
  1408. <xsl:value-of select="$isReadOnly"/>
  1409. </utml:read-only>
  1410. <xsl:if test="not($has_write_permission)">
  1411. <utml:input type="hidden" name="m_return" value=""/>
  1412. </xsl:if>
  1413. <!--
  1414. The following hidden variables need only be defined when user has write permission.
  1415. -->
  1416. <xsl:if test="$has_write_permission and $noUserProfile!=true()">
  1417. <!--
  1418. owner processing variables.
  1419. -->
  1420. <xsl:if test="contains(' analysis interactiveReport report reportView query ', concat(' ', $the-object/cm:objectClass, ' '))">
  1421. <utml:input type="hidden" name="rg_retention_reportCache">
  1422. <xsl:attribute name="value">
  1423. <xsl:value-of select="$maxDurationReportCache"/>
  1424. </xsl:attribute>
  1425. </utml:input>
  1426. <utml:input type="hidden" name="duration_reportCache">
  1427. <xsl:attribute name="value">
  1428. <xsl:choose>
  1429. <xsl:when test="contains($maxDurationReportCache, 'D')">
  1430. <xsl:value-of select="substring-before(substring-after($maxDurationReportCache,'P'),'D')"/>
  1431. </xsl:when>
  1432. <xsl:when test="contains($maxDurationReportCache, 'M')">
  1433. <xsl:value-of select="substring-before(substring-after($maxDurationReportCache,'P'),'M')"/>
  1434. </xsl:when>
  1435. </xsl:choose>
  1436. </xsl:attribute>
  1437. </utml:input>
  1438. <utml:input type="hidden" name="durationSelect_reportCache">
  1439. <xsl:attribute name="value">
  1440. <xsl:choose>
  1441. <xsl:when test="contains($maxDurationReportCache, 'D')">
  1442. <xsl:value-of select="'days'"/>
  1443. </xsl:when>
  1444. <xsl:when test="contains($maxDurationReportCache, 'M')">
  1445. <xsl:value-of select="'months'"/>
  1446. </xsl:when>
  1447. </xsl:choose>
  1448. </xsl:attribute>
  1449. </utml:input>
  1450. </xsl:if>
  1451. <utml:input type="hidden" name="m_p_owner" value=""/>
  1452. <utml:input type="hidden" name="changed_m_p_owner" value="0"/>
  1453. <utml:input type="hidden" name="changed_genprop" value="0"/>
  1454. <utml:input type="hidden" name="so.select" value="" utml:update="false"/>
  1455. <utml:input id="soReturnM" type="hidden" name="so.return.m" utml:update="false">
  1456. <xsl:attribute name="value">
  1457. <xsl:value-of select="concat($app,'/',$mname)"/>
  1458. </xsl:attribute>
  1459. </utml:input>
  1460. <utml:input type="hidden" name="so.defaultLocation" value="" utml:update="false"/>
  1461. <utml:input type="hidden" name="so.defaultObject" value="" utml:update="false"/>
  1462. <utml:input type="hidden" name="ro_name">
  1463. <xsl:attribute name="value">
  1464. <xsl:choose>
  1465. <xsl:when test="$the-object/cm:defaultName[@modifiable = 'false']">true</xsl:when>
  1466. <xsl:otherwise>false</xsl:otherwise>
  1467. </xsl:choose>
  1468. </xsl:attribute>
  1469. </utml:input>
  1470. <utml:input type="hidden" name="origDefLang">
  1471. <xsl:attribute name="value">
  1472. <xsl:if test="string(/root/multiLangs/useLangAsDefault) != 'NOMATCH'">
  1473. <xsl:value-of select="/root/multiLangs/useLangAsDefault"/>
  1474. </xsl:if>
  1475. </xsl:attribute>
  1476. </utml:input>
  1477. <utml:input type="hidden" name="m_email">
  1478. <xsl:attribute name="value">
  1479. <xsl:choose>
  1480. <xsl:when test="key('env-param','changed_m_p_owner')='1' and key('env-param','m_email')='' and key('env-param','m_defaultName')=''"><xsl:value-of select="/root/myInfo//cm:email"/></xsl:when>
  1481. <xsl:when test="key('env-param','m_email')"><xsl:value-of select="key('env-param','m_email')"/></xsl:when>
  1482. </xsl:choose>
  1483. </xsl:attribute>
  1484. </utml:input>
  1485. <utml:input type="hidden" name="m_defaultName">
  1486. <xsl:attribute name="value">
  1487. <xsl:choose>
  1488. <xsl:when test="key('env-param','changed_m_p_owner')='1' and key('env-param','m_email')='' and key('env-param','m_defaultName')=''"><xsl:value-of select="/root/myInfo//cm:defaultName"/></xsl:when>
  1489. <xsl:when test="key('env-param','m_defaultName')"><xsl:value-of select="key('env-param','m_defaultName')"/></xsl:when>
  1490. </xsl:choose>
  1491. </xsl:attribute>
  1492. </utml:input>
  1493. <xsl:choose>
  1494. <xsl:when test="not(/root/env/param[starts-with(@name,'m_t_default')])">
  1495. <xsl:for-each select="/root/multiLangs/name">
  1496. <xsl:variable name="langName" select="."/>
  1497. <xsl:if test="not(preceding-sibling::name = $langName)">
  1498. <!-- Cannot use $the-object here because of context within for-each -->
  1499. <xsl:if test="/root/cm:queryResponse/*/cm:defaultName[@modifiable = 'true']">
  1500. <utml:input type="hidden" utml:update="false">
  1501. <xsl:attribute name="name"><xsl:value-of select="concat('m_t_default_name_',string($langName))"/></xsl:attribute>
  1502. <xsl:attribute name="value"><xsl:value-of select="/root/cm:queryResponse/child::node()/cm:name/*[@xml:lang=string($langName)]"/></xsl:attribute>
  1503. </utml:input>
  1504. </xsl:if>
  1505. <utml:input type="hidden" utml:update="false">
  1506. <xsl:attribute name="name"><xsl:value-of select="concat('m_t_default_description_',string($langName))"/></xsl:attribute>
  1507. <xsl:attribute name="value"><xsl:value-of select="/root/cm:queryResponse/child::node()/cm:description/*[@xml:lang=string($langName)]"/></xsl:attribute>
  1508. </utml:input>
  1509. <utml:input type="hidden" utml:update="false">
  1510. <xsl:attribute name="name"><xsl:value-of select="concat('m_t_default_screenTip_',string($langName))"/></xsl:attribute>
  1511. <xsl:attribute name="value"><xsl:value-of select="/root/cm:queryResponse/child::node()/cm:screenTip/*[@xml:lang=string($langName)]"/></xsl:attribute>
  1512. </utml:input>
  1513. </xsl:if>
  1514. </xsl:for-each>
  1515. </xsl:when>
  1516. <xsl:otherwise>
  1517. <xsl:if test="$activeLang!=''">
  1518. <xsl:if test="not(/root/env/param[@name=concat('m_t_default_name_',$activeLang)]) and not(/root/env/param[@name=concat('m_t_default_description_',$activeLang)]) and not(/root/env/param[@name=concat('m_t_default_screenTip_',$activeLang)])">
  1519. <xsl:if test="$the-object/cm:defaultName[@modifiable = 'true']">
  1520. <utml:input type="hidden" utml:update="false">
  1521. <xsl:attribute name="name"><xsl:value-of select="concat('m_t_default_name_',$activeLang)"/></xsl:attribute>
  1522. </utml:input>
  1523. </xsl:if>
  1524. <utml:input type="hidden" utml:update="false">
  1525. <xsl:attribute name="name"><xsl:value-of select="concat('m_t_default_description_',$activeLang)"/></xsl:attribute>
  1526. </utml:input>
  1527. <utml:input type="hidden" utml:update="false">
  1528. <xsl:attribute name="name"><xsl:value-of select="concat('m_t_default_screenTip_',$activeLang)"/></xsl:attribute>
  1529. </utml:input>
  1530. </xsl:if>
  1531. </xsl:if>
  1532. <xsl:for-each select="/root/env/param[starts-with(@name,'m_t_default')]">
  1533. <utml:input type="hidden" utml:update="false">
  1534. <xsl:attribute name="name"><xsl:value-of select="@name"/></xsl:attribute>
  1535. <xsl:attribute name="value"><xsl:value-of select="."/></xsl:attribute>
  1536. </utml:input>
  1537. </xsl:for-each>
  1538. </xsl:otherwise>
  1539. </xsl:choose>
  1540. <xsl:if test="key('env-param', 'm_class') = 'drillPath' and string(/root/cm:queryResponse/*/cm:parent/*/cm:routingServerGroup)!=''">
  1541. <utml:input type="hidden" name="ui.routingServerGroup" utml:update="false">
  1542. <xsl:attribute name="value">
  1543. <xsl:value-of select="/root/cm:queryResponse/*/cm:parent/*/cm:routingServerGroup"/>
  1544. </xsl:attribute>
  1545. </utml:input>
  1546. </xsl:if>
  1547. </xsl:if>
  1548. <utml:input type="hidden" name="ifrmcmd" value="save" utml:update="false"/>
  1549. <!-- if the user doesn't have a credentail then add the h_CAM_action to create one -->
  1550. <xsl:if test="($has_write_permission = true) and not( key('env-param', 'm_sp_credential')) and key('env-param', 'visited_job_properties')">
  1551. <input type="hidden" name="h_CAM_action" value=""/>
  1552. </xsl:if>
  1553. <dp:header useBackURL="not($showOKCancel)" dp:kbA11y="true">
  1554. <dp:title><xsl:copy-of select="$browserTitle"/></dp:title>
  1555. </dp:header>
  1556. <iframe name="dialogWindow" id="dialogWindow" style="display:none; z-index:50; position: absolute;" src="" title="Dialog Window"/>
  1557. <div id="dialogWindowContainer" style="cursor:default;display:none; position: absolute; z-index:50; overflow:none; padding-top:10px;">
  1558. <iframe name="dialogWindow2" id="dialogWindow2" style="width:600px; height:345px; position: relative;" class="visible" src="" title="repository_select"/>
  1559. </div>
  1560. <div id="windowMask" style="z-index:49; display:none; position: absolute; width:100%; height:100%; left:0px; top:0px;">
  1561. <table width="100%" height="100%" role="presentation">
  1562. <tr>
  1563. <td/>
  1564. </tr>
  1565. </table>
  1566. </div>
  1567. <!-- property tabs -->
  1568. <df:propertiesTabsTitan select="general">
  1569. <df:hasRead><xsl:value-of select="$has_read_permission"/></df:hasRead>
  1570. <df:hasTraverse><xsl:value-of select="$has_traverse_permission"/></df:hasTraverse>
  1571. <df:hasUserProfile>
  1572. <xsl:if test="$noUserProfile"><xsl:value-of select="'false'"/></xsl:if>
  1573. </df:hasUserProfile>
  1574. <df:hasSetPolicy>
  1575. <xsl:choose>
  1576. <xsl:when test="key('env-param','m_class')='dataSet'">false</xsl:when>
  1577. <xsl:when test="$noUserProfile"><xsl:value-of select="'false'"/></xsl:when>
  1578. <xsl:otherwise><xsl:value-of select="$has_policy_permission"/></xsl:otherwise>
  1579. </xsl:choose>
  1580. </df:hasSetPolicy>
  1581. </df:propertiesTabsTitan>
  1582. <!-- description tabs -->
  1583. <dp:description dp:kbA11y="true">
  1584. <xts:string id="IDS_PROP_GEN_INTRO"/>
  1585. </dp:description>
  1586. <xsl:variable name="launchableType">
  1587. <xsl:choose>
  1588. <xsl:when test="$the-object/cm:objectClass = 'shortcut'"><xsl:value-of select="$target/cm:launchableType"/></xsl:when>
  1589. <xsl:otherwise><xsl:value-of select="$the-object/cm:launchableType"/></xsl:otherwise>
  1590. </xsl:choose>
  1591. </xsl:variable>
  1592. <table border="0" cellspacing="0" cellpadding="0" width="100%" summary="" role="presentation"><tr>
  1593. <td width="50%" valign="top">
  1594. <lyt:layout style="1" width="100%" lyt:kbA11y="true">
  1595. </lyt:layout>
  1596. </td>
  1597. <td width="50%" valign="top">
  1598. <xsl:variable name="propLocation">
  1599. <xsl:choose>
  1600. <xsl:when test="$rootFolder">
  1601. <xts:string id="IDS_ROOT"/>
  1602. </xsl:when>
  1603. <xsl:otherwise>
  1604. <cf:do-the-path-link>
  1605. <cf:param name="familytree">$the-object/cm:ancestors</cf:param>
  1606. <cf:param name="familymember">$the-object/cm:defaultName</cf:param>
  1607. <cf:param name="home"><xsl:value-of select="$start-at-path"/></cf:param>
  1608. <cf:param name="onlyAncestors">true</cf:param>
  1609. </cf:do-the-path-link>
  1610. </xsl:otherwise>
  1611. </xsl:choose>
  1612. </xsl:variable>
  1613. <lyt:layout style="1" width="100%" lyt:kbA11y="true">
  1614. </lyt:layout>
  1615. </td>
  1616. </tr><tr><td></td><td></td></tr>
  1617. </table>
  1618. <xsl:if test="string(/root/*[local-name()='queryResponse'])!=''">
  1619. <!-- Horizontal line -->
  1620. <xsl:if test="string(key('env-param','titanAction'))='languages'">
  1621. <xsl:call-template name="renderLanguages"/>
  1622. </xsl:if>
  1623. <!-- this section was the largest in a small section so i eliminated it -->
  1624. <xsl:if test="string(key('env-param','titanAction'))='document'">
  1625. <xsl:call-template name="render-retention"/>
  1626. </xsl:if>
  1627. </xsl:if>
  1628. <xsl:if test="starts-with(string($the-object/cm:objectClass),'reportDataServiceAgentDefinition')">
  1629. <!-- add source report info when subscription -->
  1630. <xsl:variable name="rdsadName">
  1631. <xsl:choose>
  1632. <xsl:when test="string(key('env-param','m_periodicalProducer'))=''">
  1633. <cf:do-the-path-link>
  1634. <cf:param name="familytree">$rdsad-path/cm:periodicalProducer/*/cm:ancestors</cf:param>
  1635. <cf:param name="familymember">$rdsad-path/cm:periodicalProducer/*/cm:defaultName</cf:param>
  1636. <cf:param name="home"><xsl:value-of select="'/content'"/></cf:param>
  1637. </cf:do-the-path-link>
  1638. </xsl:when>
  1639. <xsl:otherwise>
  1640. <cf:do-the-path-link>
  1641. <cf:param name="familytree">/root/selected/cm:queryResponse/*/cm:ancestors</cf:param>
  1642. <cf:param name="familymember">/root/selected/cm:queryResponse/*/cm:defaultName</cf:param>
  1643. <cf:param name="home"><xsl:value-of select="'/content'"/></cf:param>
  1644. </cf:do-the-path-link>
  1645. </xsl:otherwise>
  1646. </xsl:choose>
  1647. </xsl:variable>
  1648. <lyt:layout style="2" border="yes" width="100%" lyt:kbA11y="true">
  1649. <lyt:section>
  1650. <dp:list>
  1651. <dp:section>
  1652. <dp:label valign="top" width="15%"><xts:string id="IDS_PROP_SOURCE_RPT"/></dp:label>
  1653. <dp:text valign="top" width="100%">
  1654. <xsl:value-of select="$rdsadName"/>
  1655. </dp:text>
  1656. <dp:text></dp:text>
  1657. <xsl:if test="$hasCondSubscriptionsCapability">
  1658. <dp:text valign="top"><utml:a utml:op="maintain" utml:formName="pform">
  1659. <xsl:attribute name="onclick">setSelectParams('so.select','<xsl:value-of select="$the-object/cm:objectClass"/>Base',<xsl:text/>
  1660. <xsl:choose>
  1661. <xsl:when test="string($rdsad-path/cm:periodicalProducer/*/cm:searchPath)!='' or string(key('env-param','m_periodicalProducer'))!=''">
  1662. <xsl:text/>'so.defaultObject','<xsl:text/>
  1663. <xsl:choose>
  1664. <xsl:when test="string(key('env-param','m_periodicalProducer'))!=''"><xsl:value-of select="xtsext:javascriptencode(string(key('env-param','m_periodicalProducer')))"/></xsl:when>
  1665. <xsl:otherwise><xsl:value-of select="xtsext:javascriptencode(string($rdsad-path/cm:periodicalProducer/*/cm:searchPath))"/></xsl:otherwise>
  1666. </xsl:choose>
  1667. </xsl:when>
  1668. <xsl:otherwise>
  1669. <xsl:text/>'so.defaultLocation','<xsl:text/>
  1670. <xsl:if test="string(key('env-param','m_path'))!=''"><xsl:text/><xsl:value-of select="xtsext:javascriptencode(string(key('env-param','m_path')))"/><xsl:text/></xsl:if>
  1671. </xsl:otherwise>
  1672. </xsl:choose>
  1673. <xsl:text/>');<xsl:text/>
  1674. </xsl:attribute>
  1675. <utml:target><xsl:value-of select="$app"/>/select/select.xts</utml:target>
  1676. <utml:validate>validate</utml:validate>
  1677. <xsl:text/><xts:string id="IDS_PROP_LINK_TO_REPORT"/><xsl:text/></utml:a>
  1678. </dp:text>
  1679. </xsl:if>
  1680. </dp:section>
  1681. </dp:list>
  1682. </lyt:section>
  1683. </lyt:layout>
  1684. </xsl:if>
  1685. <!-- show PP series7 gateway -->
  1686. <xsl:if test="($the-object/cm:objectClass ='powerPlayCube' or $the-object/cm:objectClass ='powerPlayReport') and (string(key('env-param','titanAction'))='powerplay')">
  1687. <lyt:layout style="1" border="yes" lyt:kbA11y="true">
  1688. <lyt:section>
  1689. <dp:section>
  1690. <dp:input>
  1691. <dp:section1>
  1692. <xts:string id="IDS_PROP_PP_GATEWAY"/>
  1693. </dp:section1>
  1694. <dp:section2>
  1695. <utml:input type="text" class="pInput" size="30" name="m_p_gateway">
  1696. <utml:read-only>
  1697. <xsl:choose>
  1698. <xsl:when test="$the-object/cm:gateway[@modifiable = 'false']">true</xsl:when>
  1699. <xsl:otherwise>false</xsl:otherwise>
  1700. </xsl:choose>
  1701. </utml:read-only>
  1702. <utml:value>
  1703. <xsl:value-of select="$the-object/cm:gateway"/>
  1704. </utml:value>
  1705. </utml:input>
  1706. </dp:section2>
  1707. </dp:input>
  1708. </dp:section>
  1709. </lyt:section>
  1710. </lyt:layout>
  1711. </xsl:if>
  1712. <!-- only show the "URL" or "File System Location settings" if user has read permission -->
  1713. <xsl:if test="$has_read_permission and (string(key('env-param','titanAction'))='url')">
  1714. <!-- URL -->
  1715. <xsl:if test="key('env-param', 'm_class') = 'URL'">
  1716. <!-- Check to see if url is safe (e.g.: domain-valid) -->
  1717. <xsl:variable name="is-url-validated" select="xtsext:cafaction('issafeurl_null', normalize-space($the-object/cm:uri)) = 'true'"/>
  1718. <xsl:variable name="urlValue">
  1719. <xsl:if test="$is-url-validated or $isAdminUser">
  1720. <xsl:value-of select="$the-object/cm:uri"/>
  1721. </xsl:if>
  1722. </xsl:variable>
  1723. <dt:domainListPopup/>
  1724. <lyt:layout style="1" border="yes" lyt:kbA11y="true">
  1725. <lyt:section>
  1726. <dp:input>
  1727. <dp:section1>
  1728. <xts:string id="IDS_PROP_URL"/>
  1729. <dp:list>
  1730. <dp:section>
  1731. <div>
  1732. <xsl:text/><xts:string id="IDS_NEW_URL_HINT"/>&#160;&#160;<xsl:text/>
  1733. <a href="#">
  1734. <xsl:attribute name="onclick">javascript:validDomains.show();return false;</xsl:attribute>
  1735. <xsl:attribute name="onkeypress">javascript:<xsl:value-of select="$chkSpaceEnterKeyEvent"/>{ return this.onclick(); }return true;</xsl:attribute>
  1736. <xsl:text/><xts:string id="IDS_NEW_URL_VIEW_VALID_DOMAINS"/><xsl:text/>
  1737. </a>
  1738. </div>
  1739. </dp:section>
  1740. </dp:list>
  1741. </dp:section1>
  1742. <dp:section2>
  1743. <dp:list>
  1744. <dp:section>
  1745. <utml:input type="text" name="m_p_uri" maxlength="2048" size="30" class="pInput" onchange="setPropertiesChanged()" aria-labelledby="urlInEdit" stttype="url">
  1746. <utml:read-only>
  1747. <xsl:choose>
  1748. <xsl:when test="$the-object/cm:uri/@modifiable = 'false'">true</xsl:when>
  1749. <xsl:otherwise>false</xsl:otherwise>
  1750. </xsl:choose>
  1751. </utml:read-only>
  1752. <utml:value>
  1753. <xsl:value-of select="$urlValue"/>
  1754. </utml:value>
  1755. </utml:input>
  1756. <span style="position: absolute;margin-left: -9999px; margin-top: -9999px;" id="urlInEdit"><xsl:value-of select="$urlValue"/></span>
  1757. </dp:section>
  1758. <dp:section>
  1759. <xsl:if test="not($is-url-validated)">
  1760. <xsl:choose>
  1761. <xsl:when test="$isAdminUser">
  1762. <xts:string id="IDS_NEW_URL_NOT_VALID_URL"/>
  1763. </xsl:when>
  1764. <xsl:otherwise>
  1765. <xts:string id="IDS_NEW_URL_NOT_ALLOWED_TO_VIEW"/>
  1766. </xsl:otherwise>
  1767. </xsl:choose>
  1768. </xsl:if>
  1769. </dp:section>
  1770. </dp:list>
  1771. </dp:section2>
  1772. </dp:input>
  1773. </lyt:section>
  1774. </lyt:layout>
  1775. </xsl:if>
  1776. </xsl:if>
  1777. <!-- repository options and package info -->
  1778. <xsl:variable name="renderRepositoryOverride" select="((/root/env/param[@name='m_class'] = 'package') or (/root/env/param[@name='m_class'] = 'folder') or (/root/env/param[@name='m_class'] = 'content') or (/root/env/param[@name='m_class'] = 'namespace') or (/root/env/param[@name='m_class'] = 'namespaceFolder') or (/root/env/param[@name='m_class'] = 'account')) and $userCanUpdateRepositoryRules='true'"/>
  1779. <xsl:if test="(/root/env/param[@name='m_class'] = 'package' or $renderRepositoryOverride) and (string(key('env-param','titanAction'))='repository')">
  1780. <lyt:layout style="1" border="yes" width="100%" lyt:kbA11y="true">
  1781. <lyt:section>
  1782. <xsl:if test="$renderRepositoryOverride='true'">
  1783. <xsl:variable name="hasRepositoryRules" select="count(/root/cm:queryResponse[1]/*/cm:repositoryRules/cm:repositoryRule) > 0"/>
  1784. <xsl:variable name="isRepositoryRulesNotAcquired" select="/root/cm:queryResponse[1]/*/cm:repositoryRules/@acquired = 'false'"/>
  1785. <xsl:variable name="isRepositoryRulesOverriden" select="$isRepositoryRulesNotAcquired and $hasRepositoryRules"/>
  1786. <xsl:variable name="reportVerRepDataSource" select="/root/cm:queryResponse[1]/*/cm:repositoryRules/cm:repositoryRule[cm:objectClass='reportVersion']/cm:dataSourceName"/>
  1787. <xsl:variable name="documentVerRepDataSource" select="/root/cm:queryResponse[1]/*/cm:repositoryRules/cm:repositoryRule[cm:objectClass='documentVersion']/cm:dataSourceName"/>
  1788. <script language="javascript">
  1789. function toggleRepositoryRulesOverride(){
  1790. var controlsEl = document.getElementById("repositoryRulesEdit");
  1791. var docForm = document.pform;
  1792. if (docForm.overrideRepositoryRules.checked){
  1793. controlsEl.style.visibility = "visible";
  1794. }else{
  1795. //hide the selection controls and set the selection to the parents selection
  1796. controlsEl.style.visibility = "hidden";
  1797. }
  1798. setRepositoryDataSourceName(docForm.parent_reportRepositoryDataSource.value, docForm.parent_documentRepositoryDataSource.value);
  1799. var clearEl = document.getElementById("rdsClear");
  1800. if (docForm.parent_reportRepositoryDataSource.value == ""){
  1801. clearEl.style.display = "none";
  1802. } else{
  1803. clearEl.style.display = "inline";
  1804. }
  1805. }
  1806. function setRepositoryDataSourceName(report_repoName, doc_repoName){
  1807. var docForm = document.pform;
  1808. docForm.m_reportRepositoryDataSource.value = report_repoName;
  1809. docForm.m_documentRepositoryDataSource.value = doc_repoName;
  1810. var dataSourceSpanEl = document.getElementById("repRulesText");
  1811. dataSourceSpanEl.innerHTML = "";
  1812. dataSourceSpanEl.appendChild(document.createTextNode(createDataSourceString()));
  1813. }
  1814. function clearRepositoryRules(){
  1815. setRepositoryDataSourceName("","");
  1816. document.getElementById("rdsClear").style.display = "none";
  1817. setPropertiesChanged();
  1818. }
  1819. function createDataSourceString(){
  1820. var returnString = "";
  1821. var docForm = document.pform;
  1822. if (docForm.m_reportRepositoryDataSource.value == docForm.m_documentRepositoryDataSource.value){
  1823. if (docForm.m_reportRepositoryDataSource.value == ""){
  1824. returnString = "<xts:string encode="javascript" id="IDS_NONE"/>";
  1825. } else{
  1826. returnString = docForm.m_reportRepositoryDataSource.value;
  1827. }
  1828. } else{
  1829. if (docForm.m_reportRepositoryDataSource.value == ""){
  1830. returnString = docForm.m_documentRepositoryDataSource.value;
  1831. } else if (docForm.m_documentRepositoryDataSource.value == ""){
  1832. returnString = docForm.m_reportRepositoryDataSource.value;
  1833. } else {
  1834. returnString = docForm.m_reportRepositoryDataSource.value + "," + docForm.m_documentRepositoryDataSource.value;
  1835. }
  1836. }
  1837. return returnString;
  1838. }
  1839. function maskWindow() {
  1840. var d = document.getElementById("windowMask");
  1841. d.style.display = "block";
  1842. }
  1843. var currentSOReturnValue;
  1844. function openDialog() {
  1845. var i = document.getElementById("dialogWindowContainer");
  1846. if(i.style.display == "block") closeDialog();
  1847. //currrentSOReturnValue = document.pform["so.return.m"].value;
  1848. var soRetEl = document.getElementById("soReturnM");
  1849. currrentSOReturnValue = soRetEl.getAttribute("value");
  1850. soRetEl.parentNode.removeChild(soRetEl);
  1851. setDialogContainer();
  1852. var formEl = document.getElementById("theForm");
  1853. var input = document.createElement("input");
  1854. input.setAttribute("id","modalnput");
  1855. input.setAttribute("type", "hidden");
  1856. input.setAttribute("name", "md.callBack");
  1857. input.setAttribute("value", "xml");
  1858. formEl.appendChild(input);
  1859. document.pform.m.value = "portal/select/select.xts";
  1860. document.pform["so.select"].value = "repositoryDataSource";
  1861. var dsName = "";
  1862. if (document.pform.m_reportRepositoryDataSource.value != ""){
  1863. dsName = document.pform.m_reportRepositoryDataSource.value;
  1864. } else if (document.pform.m_documentRepositoryDataSource.value != ""){
  1865. dsName = document.pform.m_documentRepositoryDataSource.value;
  1866. }
  1867. document.pform["so.defaultLocation"].value = "CAMID(\":\")";
  1868. document.pform["so.defaultObject"].value = dsName!='' ? "CAMID(\":\")/dataSource[@name='" + dsName.replace(/'/g,"''") + "']" : "";
  1869. document.pform.target = "dialogWindow2";
  1870. document.pform.submit();
  1871. }
  1872. function setDialogContainer() {
  1873. // Get ready to show a modal dialog
  1874. maskWindow();
  1875. var i = document.getElementById("dialogWindowContainer");
  1876. i.style.display = "block";
  1877. // Size it
  1878. i.style.height = "325px";
  1879. i.style.width = "600px";
  1880. // Position it
  1881. i.style.position="absolute";
  1882. i.style.top = ((document.body.clientHeight - i.scrollHeight) / 2) + document.body.scrollTop + "px";
  1883. i.style.left = ((document.body.clientWidth - i.scrollWidth) / 2) + document.body.scrollLeft + "px";
  1884. console.log("top: " + i.style.top + " left: " + i.style.left);
  1885. }
  1886. //-- Closes a simple dialog
  1887. function closeDialog() {
  1888. var inputEl = document.getElementById("modalnput");
  1889. inputEl.parentNode.removeChild(inputEl);
  1890. var soRetEl = document.createElement("input");
  1891. soRetEl.setAttribute("id","soReturnM");
  1892. soRetEl.setAttribute("type", "hidden");
  1893. soRetEl.setAttribute("name", "so.return.m");
  1894. soRetEl.setAttribute("value", currrentSOReturnValue);
  1895. var formEl = document.getElementById("theForm");
  1896. formEl.appendChild(soRetEl);
  1897. document.pform.target = "_self";
  1898. document.pform.m.value ="<xsl:value-of select="$app"/>/properties_general_titan.xts";
  1899. document.getElementById("windowMask").style.display = "none";
  1900. document.getElementById("dialogWindowContainer").style.display = "none";
  1901. document.getElementById("dialogWindow2").src = "../ps/images/space.gif";
  1902. document.getElementById("repositoryRulesEditLink").focus();
  1903. }
  1904. //-- Handle Call back
  1905. //------------------------------------------------------------------------------------------
  1906. function ccModalCmdTarget(cmd) {
  1907. var result = "";
  1908. if (cmd == 'error')
  1909. result = document.getElementById(dialogWindow()).document.enterdfaultact();
  1910. else
  1911. result = cmd;
  1912. closeDialog();
  1913. }
  1914. function ccModalCallBack(cmd,sResponse) {
  1915. var result = "";
  1916. if (cmd == 'error')
  1917. result = cmd;
  1918. else
  1919. result = cmd;
  1920. closeDialog();
  1921. if(sResponse!='') {
  1922. var xmlDoc = null;
  1923. var decodedResponse = xmlDecodeResponse(sResponse);
  1924. if (window.DOMParser) {
  1925. xmlDoc=new DOMParser().parseFromString(decodedResponse,"text/xml");
  1926. }
  1927. else { // Internet Explorer (less than IE 7)
  1928. xmlDoc=new ActiveXObject("Microsoft.XMLDOM");
  1929. xmlDoc.async="false";
  1930. xmlDoc.loadXML(decodedResponse);
  1931. }
  1932. var items = xmlDoc.getElementsByTagName("item")[0];
  1933. var dataSourceName = items.getElementsByTagName("value")[0];
  1934. var dataSourceNameValue= dataSourceName.firstChild.nodeValue;
  1935. setRepositoryDataSourceName(dataSourceNameValue, dataSourceNameValue);
  1936. document.getElementById("rdsClear").style.display = "inline";
  1937. setPropertiesChanged();
  1938. }
  1939. }
  1940. </script>
  1941. <utml:input type="hidden" name="m_reportRepositoryDataSource">
  1942. <utml:value><xsl:value-of select="$reportVerRepDataSource"/></utml:value>
  1943. </utml:input>
  1944. <utml:input type="hidden" name="m_documentRepositoryDataSource" >
  1945. <utml:value><xsl:value-of select="$documentVerRepDataSource"/></utml:value>
  1946. </utml:input>
  1947. <utml:input type="hidden" name="parent_reportRepositoryDataSource">
  1948. <utml:value><xsl:value-of select="/root/cm:queryResponse[1]/*/cm:parent/*/cm:repositoryRules/cm:repositoryRule[cm:objectClass='reportVersion']/cm:dataSourceName"/></utml:value>
  1949. </utml:input>
  1950. <utml:input type="hidden" name="parent_documentRepositoryDataSource" >
  1951. <utml:value><xsl:value-of select="/root/cm:queryResponse[1]/*/cm:parent/*/cm:repositoryRules/cm:repositoryRule[cm:objectClass='documentVersion']/cm:dataSourceName"/></utml:value>
  1952. </utml:input>
  1953. <span style="position: absolute;margin-left: -9999px; margin-top: -9999px;" id="reposTitle"><xts:string id="IDS_PROP_OBJ_REPORT_REPOSITORY"/></span>
  1954. <xsl:variable name="has-no-parent" select="/root/cm:queryResponse/*/cm:parent/cm:root"/>
  1955. <dp:input dp:kbA11y="true" tabindex="0">
  1956. <dp:section1 aria-labelledby="reposTitle">
  1957. <label><xts:string id="IDS_PROP_OBJ_REPORT_REPOSITORY"/></label>
  1958. </dp:section1>
  1959. <dp:section2>
  1960. <dp:choice>
  1961. <dp:section1>
  1962. <table border="0" cellpadding="1" cellspacing="0" style="padding-left: 2px;" role="presentation">
  1963. <tr role="checkbox" id="overrideRepositoryRulesTable" summary="" aria-labelledby="labelForOverrideRepositoryRules" tabindex="0">
  1964. <xsl:attribute name="onclick">javascript:if(document.getElementById('overrideRepositoryRules')!=null){if(document.getElementById('overrideRepositoryRules').checked) document.getElementById('overrideRepositoryRules').checked=false; else document.getElementById('overrideRepositoryRules').checked=true; toggleRepositoryRulesOverride();} return false;</xsl:attribute>
  1965. <xsl:attribute name="onkeypress">javascript:<xsl:value-of select="$chkSpaceEnterKeyEvent"/>{ return this.onclick(); } return true;</xsl:attribute>
  1966. <xsl:choose>
  1967. <xsl:when test="$isRepositoryRulesOverriden">
  1968. <xsl:attribute name="aria-checked">true</xsl:attribute>
  1969. </xsl:when>
  1970. <xsl:otherwise>
  1971. <xsl:attribute name="aria-checked">false</xsl:attribute>
  1972. </xsl:otherwise>
  1973. </xsl:choose>
  1974. <td class="formText" nowrap="">
  1975. <xsl:choose>
  1976. <xsl:when test="$has-no-parent">
  1977. <utml:input type="checkbox" name="dummyOverrideRepositoryRules" value="true" disabled="true"/>
  1978. <utml:input type="hidden" name="overrideRepositoryRules" value="true"/>
  1979. </xsl:when>
  1980. <xsl:otherwise>
  1981. <utml:input type="checkbox" name="overrideRepositoryRules" id="overrideRepositoryRules" value="true" utml:track="true" onclick="toggleRepositoryRulesOverride();event.cancelBubble='true';if(event.stopPropogation)event.stopPropagation();" tabindex="-1">
  1982. <utml:default-value>
  1983. <xsl:choose>
  1984. <xsl:when test="$isRepositoryRulesOverriden">true</xsl:when>
  1985. <xsl:otherwise>false</xsl:otherwise>
  1986. </xsl:choose>
  1987. </utml:default-value>
  1988. </utml:input>
  1989. </xsl:otherwise>
  1990. </xsl:choose>
  1991. </td>
  1992. <td id="labelForOverrideRepositoryRules" class="formText" nowrap="">
  1993. <label for="overrideRepositoryRules">
  1994. <xsl:text/><xts:string id="IDS_PROP_ADVANCED_REPOSITORY_OVERRIDE"/><xsl:text/>
  1995. </label>
  1996. </td>
  1997. </tr>
  1998. <tr>
  1999. <td><img src="{$webcontent}/images/space.gif" width="1" height="1" border="0"/></td>
  2000. <td>
  2001. <dp:list>
  2002. <dp:section>
  2003. <dp:label>
  2004. <xsl:text/><xts:string id="IDS_PROP_ADVANCED_REPOSITORY_RULES_CONNECT_LABEL"/><xsl:text/>
  2005. </dp:label>
  2006. </dp:section>
  2007. <dp:section>
  2008. <div id="repositoryRules">
  2009. <xsl:variable name="reposConnectName">
  2010. <xsl:choose>
  2011. <xsl:when test="$hasRepositoryRules">
  2012. <xsl:choose>
  2013. <xsl:when test="$reportVerRepDataSource = $documentVerRepDataSource and $documentVerRepDataSource = ''">
  2014. <xsl:text><xts:string id="IDS_NONE"/></xsl:text>
  2015. </xsl:when>
  2016. <xsl:when test="$reportVerRepDataSource = $documentVerRepDataSource">
  2017. <xsl:text/><xsl:value-of select="$reportVerRepDataSource"/><xsl:text/>
  2018. </xsl:when>
  2019. <xsl:when test="$reportVerRepDataSource = ''"><xsl:value-of select="$documentVerRepDataSource"/></xsl:when>
  2020. <xsl:when test="$documentVerRepDataSource = ''"><xsl:value-of select="$reportVerRepDataSource"/></xsl:when>
  2021. <xsl:otherwise>
  2022. <xsl:text/><xsl:value-of select="$reportVerRepDataSource"/><xsl:text/>
  2023. <xsl:text>, </xsl:text>
  2024. <xsl:text/><xsl:value-of select="$documentVerRepDataSource"/><xsl:text/>
  2025. </xsl:otherwise>
  2026. </xsl:choose>
  2027. </xsl:when>
  2028. <xsl:otherwise><xts:string id="IDS_NONE"/></xsl:otherwise>
  2029. </xsl:choose>
  2030. </xsl:variable>
  2031. <dp:text wrap="true">
  2032. <span id="repRulesText">
  2033. <xsl:value-of select="$reposConnectName"/>
  2034. </span>
  2035. </dp:text>
  2036. <!-- aria-labelledby="reposConnect" Tried this everywhere, list, div, secion not same as others -->
  2037. </div>
  2038. <div id="repositoryRulesEdit">
  2039. <xsl:if test="not($has-no-parent) and (not($isRepositoryRulesOverriden) or not($has_write_permission or $has_policy_permission))">
  2040. <xsl:attribute name="style">visibility: hidden</xsl:attribute>
  2041. </xsl:if>
  2042. <dp:link>
  2043. <xsl:variable name="ancTitleSet"><xts:string id="IDS_PROP_REPOSITORY_DATASOURCE_SET"/></xsl:variable>
  2044. <a href="#" title="" alt="" id="repositoryRulesEditLink" role="button">
  2045. <xsl:attribute name="onclick">javascript:openDialog();</xsl:attribute>
  2046. <xsl:attribute name="onkeypress">javascript:<xsl:value-of select="$chkSpaceEnterKeyEvent"/>{ this.onclick(); return false;}return true;</xsl:attribute>
  2047. <xsl:text/><xsl:value-of select="$ancTitleSet"/>
  2048. </a>
  2049. </dp:link>
  2050. <xsl:text>&#160;&#160;</xsl:text>
  2051. <dp:link>
  2052. <xsl:variable name="ancTitleClr"><xts:string id="IDS_PROP_REPOSITORY_DATASOURCE_CLEAR"/></xsl:variable>
  2053. <a href="#" title="" alt="" id="rdsClear">
  2054. <xsl:variable name="hasSelectedDataSource" select="not($reportVerRepDataSource = '') or not($documentVerRepDataSource = '')"/>
  2055. <xsl:if test="not($isRepositoryRulesOverriden and $hasSelectedDataSource)">
  2056. <xsl:attribute name="style">display: none</xsl:attribute>
  2057. </xsl:if>
  2058. <xsl:attribute name="onclick">javascript:clearRepositoryRules();</xsl:attribute>
  2059. <xsl:attribute name="onkeypress">javascript:<xsl:value-of select="$chkSpaceEnterKeyEvent"/>{ this.onclick(); return false;} return true;</xsl:attribute>
  2060. <xsl:text/><xsl:value-of select="$ancTitleClr"/>
  2061. </a>
  2062. </dp:link>
  2063. </div>
  2064. </dp:section>
  2065. </dp:list>
  2066. </td>
  2067. </tr>
  2068. </table>
  2069. </dp:section1>
  2070. </dp:choice>
  2071. </dp:section2>
  2072. </dp:input>
  2073. </xsl:if>
  2074. </lyt:section>
  2075. </lyt:layout>
  2076. </xsl:if>
  2077. <!-- dataSourceAccessAccount prop of rolapDataSource -->
  2078. <xsl:if test="/root/env/param[@name='m_class'] = 'rolapDataSource'">
  2079. <xsl:variable name="accessAccountProp">
  2080. <xsl:choose>
  2081. <!-- A dataSourceAccessAccount object has just been selected -->
  2082. <xsl:when test="string(key('env-param','accessAccount.so.searchPath')) != '' and key('env-param','accessAccount.so.defaultName')">
  2083. <xsl:value-of select="/root/env/param[@name='accessAccount.so.defaultName']"/>
  2084. </xsl:when>
  2085. <!-- A dataSourceAccessAccount is specified on the entry -->
  2086. <xsl:when test="$the-object/cm:dataSourceAccessAccount/*/cm:objectClass">
  2087. <xsl:choose>
  2088. <xsl:when test="not(string($the-object/cm:dataSourceAccessAccount/*/cm:defaultName)='')">
  2089. <xsl:value-of select="$the-object/cm:dataSourceAccessAccount/*/cm:defaultName"/>
  2090. </xsl:when>
  2091. <xsl:when test="not(string($the-object/cm:dataSourceAccessAccount/*/cm:searchPath)='')">
  2092. <xts:string id="IDS_PROP_UNKNOWN_OWNER"/>
  2093. </xsl:when>
  2094. <xsl:otherwise>
  2095. <xts:string id="IDS_NONE"/>
  2096. </xsl:otherwise>
  2097. </xsl:choose>
  2098. </xsl:when>
  2099. <!-- There is no dataSourceAccessAccount specified -->
  2100. <xsl:otherwise>
  2101. <xts:string id="IDS_NONE"/>
  2102. </xsl:otherwise>
  2103. </xsl:choose>
  2104. </xsl:variable>
  2105. <lyt:layout style="2" width="100%" border="yes" lyt:kbA11y="true">
  2106. <lyt:section>
  2107. <dp:list width="100%">
  2108. <!-- Datasource Access Account -->
  2109. <!-- ============================================================ -->
  2110. <xsl:if test="$the-object/cm:dataSourceAccessAccount/@modifiable = 'true'">
  2111. <dp:section>
  2112. <dp:label valign="top" width="15%" aria-labelledby="labelForDataSourceAccessAccount" tabindex="0"><xts:string id="IDS_PROP_ACCESS_ACCOUNT"/></dp:label>
  2113. </dp:section>
  2114. <dp:section>
  2115. <dp:text><xsl:value-of select="$accessAccountProp"/></dp:text>
  2116. <script language="javascript">
  2117. function selectAccessAccount()
  2118. {
  2119. <!-- m_p_dataSourceAccessAccount -->
  2120. setSelectParams('form', 'pform','so.select','dataSourceAccessAccount','so.defaultObject','<xsl:text/>
  2121. <xsl:choose>
  2122. <xsl:when test="key('env-param','accessAccount.so.searchPath')"><xsl:value-of select="xtsext:javascriptencode(string(key('env-param','accessAccount.so.searchPath')))"/></xsl:when>
  2123. <xsl:otherwise><xsl:value-of select="xtsext:javascriptencode(string($the-object/cm:dataSourceAccessAccount/*/cm:searchPath))"/></xsl:otherwise>
  2124. </xsl:choose>
  2125. <xsl:text/>');<xsl:text/>
  2126. utmlSubmitForm(document.pform,'<xsl:value-of select="xtsext:javascriptencode(string($app))"/>/select/select.xts','maintain','validate');
  2127. }
  2128. </script>
  2129. <dp:link>
  2130. <dp:text>
  2131. <a href="javascript:selectAccessAccount();">
  2132. <xsl:text/><xts:string id="IDS_PROP_SELECT_ACCESS_ACCOUNT"/><xsl:text/>
  2133. </a>
  2134. </dp:text>
  2135. </dp:link>
  2136. </dp:section>
  2137. </xsl:if>
  2138. </dp:list>
  2139. </lyt:section>
  2140. </lyt:layout>
  2141. </xsl:if>
  2142. <!-- advanced routing -->
  2143. <xsl:if test="contains(' package role group ', concat(' ',$the-object/cm:objectClass, ' ')) and $isAdminUser and (string(key('env-param','titanAction'))='routing')">
  2144. <script language="javascript">
  2145. <!-- Page State must be managed so that dynamic area behaves when refreshing page -->
  2146. function validate()
  2147. {
  2148. <!-- Reset the hasHints state tag -->
  2149. resetPageState();
  2150. return true;
  2151. }
  2152. function resetPageState()
  2153. {
  2154. <!-- Clear the cookie value hasHints -->
  2155. clearSessionEntry('hHints');
  2156. }
  2157. function toggleHintsOverride( item )
  2158. {
  2159. var frm = document.pform;
  2160. <!-- Change state based on the checkbox selected -->
  2161. var val = getSessionValue(item);
  2162. if (val != '0') {
  2163. var msg = "<xts:string id="IDS_PROP_ADVANCED_ROUTING_INHERIT_CONFIRM" encode="javascript"/>";
  2164. if (!confirm(msg))
  2165. {
  2166. frm.overrideRoutingHints.checked = "checked";
  2167. return;
  2168. }
  2169. setStateValue(item,'0');
  2170. resetHintsToParent();
  2171. }
  2172. else
  2173. {
  2174. setStateValue(item,'1');
  2175. }
  2176. toggledynamicDiv('overrideHintsDiv');
  2177. toggledynamicDiv('defaultHintsDiv');
  2178. frm.routingHintsChanged.value = 'true';
  2179. setPropertiesChanged();
  2180. }
  2181. function resetHintsToOrig ()
  2182. {
  2183. }
  2184. function resetHintsToParent()
  2185. {
  2186. // Start by removing all the hidden 'm_routingHints' fields
  2187. var hints = document.getElementsByName("m_routingHints");
  2188. for(var i=0; i &lt; hints.length; i++) {
  2189. var obj = hints[i];
  2190. if (obj.parentNode.removeChild ) {
  2191. obj.parentNode.removeChild(obj);
  2192. i--;
  2193. }
  2194. }
  2195. // Next replace them with copies of the defaultRoutingHints
  2196. var frm = document.pform;
  2197. var newHints = document.getElementsByName("defaultRoutingHints");
  2198. for (var i=0; i &lt; newHints.length; i++) {
  2199. var obj = newHints[i];
  2200. var hiddenElement = document.createElement("input");
  2201. hiddenElement.setAttribute("type","hidden");
  2202. hiddenElement.setAttribute("name","m_routingHints");
  2203. hiddenElement.setAttribute("value", obj.value);
  2204. frm.appendChild(hiddenElement);
  2205. }
  2206. // Finally replace the summary text for the overrideHintsDiv
  2207. document.getElementById("overrideHintsSummary").innerHTML = document.getElementById("defaultHintsSummary").innerHTML;
  2208. }
  2209. </script>
  2210. <xsl:variable name="overrideRoutinghints">
  2211. <xsl:choose>
  2212. <xsl:when test="key('session-param', 'hHints')='1'">true</xsl:when>
  2213. <xsl:when test="key('session-param', 'hHints')='0'">false</xsl:when>
  2214. <xsl:when test="key('env-param', 'routingHintsChanged') and key('env-param', 'overrideRoutingHints')">true</xsl:when>
  2215. <xsl:when test="key('env-param', 'routingHintsChanged')">false</xsl:when>
  2216. <xsl:otherwise>
  2217. <xsl:choose>
  2218. <xsl:when test="/root/cm:queryResponse[1]/*/cm:routingHints/@acquired = 'false'">true</xsl:when>
  2219. <xsl:otherwise>false</xsl:otherwise>
  2220. </xsl:choose>
  2221. </xsl:otherwise>
  2222. </xsl:choose>
  2223. </xsl:variable>
  2224. <utml:input type="hidden" name="routingHintsChanged" value="false"/>
  2225. <lyt:layout style="1" title="IDS_PROP_ADVANCED_ROUTING" border="yes" width="100%" lyt:kbA11y="true">
  2226. <lyt:section>
  2227. <dp:choice width="100%">
  2228. <dp:section1>
  2229. <table border="0" cellpadding="1" cellspacing="0" style="padding-left: 2px;" role="presentation">
  2230. <tr role="checkbox" id="overrideRouting" summary="" tabindex="0" aria-labelledby="lbl_overrideRoutingHints">
  2231. <xsl:attribute name="onclick">javascript:if(document.getElementById('overrideRoutingHints')!=null){if(document.getElementById('overrideRoutingHints').checked) document.getElementById('overrideRoutingHints').checked=false; else document.getElementById('overrideRoutingHints').checked=true; toggleHintsOverride('hHints');} return false;</xsl:attribute>
  2232. <xsl:attribute name="onkeypress">javascript:<xsl:value-of select="$chkSpaceEnterKeyEvent"/>{ return this.onclick(); } return true;</xsl:attribute>
  2233. <xsl:choose>
  2234. <xsl:when test="$overrideRoutinghints = 'true'">
  2235. <xsl:attribute name="aria-checked">true</xsl:attribute>
  2236. </xsl:when>
  2237. <xsl:otherwise>
  2238. <xsl:attribute name="aria-checked">false</xsl:attribute>
  2239. </xsl:otherwise>
  2240. </xsl:choose>
  2241. <td class="formText" nowrap="">
  2242. <xsl:choose>
  2243. <xsl:when test="$the-object/cm:objectClass='package'">
  2244. <utml:input type="checkbox" name="overrideRoutingHints" id="overrideRoutingHints" value="true" utml:track="true" onclick="toggleHintsOverride('hHints');event.cancelBubble='true';if(event.stopPropogation)event.stopPropagation();" tabindex="-1" aria-labelledby="lbl_overrideRoutingHints">
  2245. <utml:default-value>
  2246. <xsl:value-of select="$overrideRoutinghints"/>
  2247. </utml:default-value>
  2248. </utml:input>
  2249. </xsl:when>
  2250. <xsl:otherwise>
  2251. <utml:input type="hidden" name="overrideRoutingHints">
  2252. <utml:default-value>
  2253. <xsl:value-of select="$overrideRoutinghints"/>
  2254. </utml:default-value>
  2255. </utml:input>
  2256. </xsl:otherwise>
  2257. </xsl:choose>
  2258. </td>
  2259. </tr>
  2260. </table>
  2261. </dp:section1>
  2262. <dp:section2>
  2263. <xsl:if test="$the-object/cm:objectClass='package'">
  2264. <span id="lbl_overrideRoutingHints"><xts:string id="IDS_PROP_ADVANCED_ROUTING_OVERRIDE"/></span>
  2265. </xsl:if>
  2266. </dp:section2>
  2267. <dp:section3 width="100%">
  2268. <cf:dynamicDiv name="defaultHintsDiv" runTimeVisibleCheck="$overrideRoutinghints='false'">
  2269. <xsl:for-each select="/root/cm:queryResponse[2]/*[last()]/cm:routingHints/cm:string">
  2270. <utml:input type="hidden" name="defaultRoutingHints" utml:update="false">
  2271. <utml:value><xsl:value-of select="."/></utml:value>
  2272. </utml:input>
  2273. </xsl:for-each>
  2274. <dp:list>
  2275. <dp:section>
  2276. <div>
  2277. <dp:label>
  2278. <xts:string id="IDS_PROP_ADVANCED_ROUTING_SETS_LABEL"/>
  2279. </dp:label>
  2280. </div>
  2281. </dp:section>
  2282. <xsl:variable name="routingValue">
  2283. <xsl:choose>
  2284. <xsl:when test="/root/cm:queryResponse[2]/*[last()]/cm:routingHints/cm:string != ''">
  2285. <xsl:for-each select="/root/cm:queryResponse[2]/*[last()]/cm:routingHints/cm:string">
  2286. <xsl:if test="position() != '1'"><xsl:value-of select="', '"/></xsl:if>
  2287. <xsl:value-of select="."/>
  2288. </xsl:for-each>
  2289. </xsl:when>
  2290. <xsl:otherwise>
  2291. <xts:string id="IDS_PROP_ADVANCED_ROUTING_NO_VALUES"/>
  2292. </xsl:otherwise>
  2293. </xsl:choose>
  2294. </xsl:variable>
  2295. <dp:section>
  2296. <dp:text wrap="true">
  2297. <div tabindex="0">
  2298. <span id="defaultHintsSummary">
  2299. <xsl:value-of select="$routingValue"/>
  2300. </span>
  2301. </div>
  2302. </dp:text>
  2303. </dp:section>
  2304. </dp:list>
  2305. </cf:dynamicDiv>
  2306. <cf:dynamicDiv name="overrideHintsDiv" runTimeVisibleCheck="$overrideRoutinghints='true'">
  2307. <xsl:variable name="routingHints">
  2308. <xsl:choose>
  2309. <xsl:when test="key('env-param','m_routingHints')!=''">
  2310. <xsl:for-each select="key('env-param','m_routingHints')">
  2311. <xsl:if test="position() != '1'"><xsl:value-of select="', '"/></xsl:if>
  2312. <xsl:value-of select="."/>
  2313. </xsl:for-each>
  2314. </xsl:when>
  2315. <xsl:when test="not(key('env-param', 'routingHintsChanged')) and /root/cm:queryResponse[1]/*/cm:routingHints/cm:string != ''">
  2316. <xsl:for-each select="/root/cm:queryResponse[1]/*/cm:routingHints/cm:string">
  2317. <xsl:if test="position() != '1'"><xsl:value-of select="', '"/></xsl:if>
  2318. <xsl:value-of select="."/>
  2319. </xsl:for-each>
  2320. </xsl:when>
  2321. <xsl:otherwise>
  2322. <xts:string id="IDS_PROP_ADVANCED_ROUTING_NO_VALUES"/>
  2323. </xsl:otherwise>
  2324. </xsl:choose>
  2325. </xsl:variable>
  2326. <dp:list>
  2327. <dp:section>
  2328. <dp:label>
  2329. <xts:string id="IDS_PROP_ADVANCED_ROUTING_SETS_LABEL"/>
  2330. </dp:label>
  2331. </dp:section>
  2332. <xsl:choose>
  2333. <xsl:when test="key('env-param','m_routingHints')!=''">
  2334. <xsl:for-each select="key('env-param','m_routingHints')">
  2335. <utml:input type="hidden" name="m_routingHints" utml:update="false">
  2336. <utml:value><xsl:value-of select="."/></utml:value>
  2337. </utml:input>
  2338. </xsl:for-each>
  2339. <dp:section>
  2340. <dp:text wrap="true">
  2341. <span id="overrideHintsSummary">
  2342. <xsl:value-of select="$routingHints"/>
  2343. </span>
  2344. </dp:text>
  2345. </dp:section>
  2346. <xsl:if test="$has_write_permission">
  2347. <dp:section>
  2348. <dp:link>
  2349. <utml:a utml:op="stack-up" utml:formName="pform" utml:kbA11y="true">
  2350. <utml:target><xsl:value-of select="$app"/>/specify_advanced_routing.xts</utml:target>
  2351. <utml:validate>validate</utml:validate>
  2352. <xts:string id="IDS_PROP_ADVANCED_ROUTING_EDIT"/>
  2353. </utml:a>
  2354. </dp:link>
  2355. </dp:section>
  2356. </xsl:if>
  2357. </xsl:when>
  2358. <!-- if this is the first time we visit the general dialog, and there are hints stored in CM, then show them. -->
  2359. <xsl:when test="not(key('env-param', 'routingHintsChanged')) and /root/cm:queryResponse[1]/*/cm:routingHints/cm:string != ''">
  2360. <xsl:for-each select="/root/cm:queryResponse[1]/*/cm:routingHints/cm:string">
  2361. <utml:input type="hidden" name="m_routingHints" utml:update="false">
  2362. <utml:value><xsl:value-of select="."/></utml:value>
  2363. </utml:input>
  2364. </xsl:for-each>
  2365. <dp:section wrap="true">
  2366. <dp:text wrap="true">
  2367. <span id="overrideHintsSummary">
  2368. <xsl:value-of select="$routingHints"/>
  2369. </span>
  2370. </dp:text>
  2371. </dp:section>
  2372. <xsl:if test="$has_write_permission">
  2373. <dp:section>
  2374. <dp:link>
  2375. <utml:a utml:op="stack-up" utml:formName="pform" utml:kbA11y="true">
  2376. <utml:target><xsl:value-of select="$app"/>/specify_advanced_routing.xts</utml:target>
  2377. <utml:validate>validate</utml:validate>
  2378. <xts:string id="IDS_PROP_ADVANCED_ROUTING_EDIT"/>
  2379. </utml:a>
  2380. </dp:link>
  2381. </dp:section>
  2382. </xsl:if>
  2383. </xsl:when>
  2384. <xsl:otherwise>
  2385. <dp:section>
  2386. <dp:text>
  2387. <span id="overrideHintsSummary">
  2388. <xsl:value-of select="$routingHints"/>
  2389. </span>
  2390. </dp:text>
  2391. </dp:section>
  2392. <xsl:if test="$has_write_permission">
  2393. <dp:section>
  2394. <dp:link>
  2395. <utml:a utml:op="stack-up" utml:formName="pform" utml:kbA11y="true">
  2396. <utml:target><xsl:value-of select="$app"/>/specify_advanced_routing.xts</utml:target>
  2397. <utml:validate>validate</utml:validate>
  2398. <xts:string id="IDS_PROP_ADVANCED_ROUTING_SET"/>
  2399. </utml:a>
  2400. </dp:link>
  2401. </dp:section>
  2402. </xsl:if>
  2403. </xsl:otherwise>
  2404. </xsl:choose>
  2405. </dp:list>
  2406. </cf:dynamicDiv>
  2407. </dp:section3>
  2408. </dp:choice>
  2409. </lyt:section>
  2410. </lyt:layout>
  2411. <xsl:if test="$has_write_permission">
  2412. <script language="javascript">
  2413. <!-- The following script is executed on page load or when the page is refreshed to render the correct view of the dynamic region -->
  2414. <!-- The states that can be set are:
  2415. 0 - hasHints - override the default routing sets checkbox is not checked.
  2416. 1 - hasHints - override the default routing sets checkbox is checked.
  2417. information.
  2418. -->
  2419. var hHints = getSessionValue('hHints');
  2420. <!-- This portion of the script is executed on refresh -->
  2421. if ( hHints != null &amp;&amp; hHints != "" )
  2422. {
  2423. if ( hHints == '0' )
  2424. {
  2425. if (document.pform['overrideRoutingHints']) {
  2426. document.pform['overrideRoutingHints'].checked = false;
  2427. }
  2428. hideDynamicDiv('overrideHintsDiv');
  2429. showDynamicDiv('defaultHintsDiv');
  2430. }
  2431. else
  2432. {
  2433. if (document.pform['overrideRoutingHints']) {
  2434. document.pform['overrideRoutingHints'].checked = "checked";
  2435. }
  2436. showDynamicDiv('overrideHintsDiv');
  2437. hideDynamicDiv('defaultHintsDiv');
  2438. }
  2439. }
  2440. else
  2441. {
  2442. <!-- This portion of the script is executed on page load -->
  2443. <xsl:choose>
  2444. <xsl:when test="$overrideRoutinghints = 'true'">
  2445. if (document.pform['overrideRoutingHints']) {
  2446. document.pform['overrideRoutingHints'].checked = "checked";
  2447. }
  2448. setStateValue('hHints','1');
  2449. showDynamicDiv('overrideHintsDiv');
  2450. hideDynamicDiv('defaultHintsDiv');
  2451. </xsl:when>
  2452. <xsl:otherwise>
  2453. if (document.pform['overrideRoutingHints']) {
  2454. document.pform['overrideRoutingHints'].checked = false;
  2455. }
  2456. setStateValue('hHints','0');
  2457. hideDynamicDiv('overrideHintsDiv');
  2458. showDynamicDiv('defaultHintsDiv');
  2459. </xsl:otherwise>
  2460. </xsl:choose>
  2461. }
  2462. </script>
  2463. </xsl:if>
  2464. </xsl:if>
  2465. <!-- Base Report -->
  2466. <xsl:if test="$the-object/cm:base">
  2467. <xsl:call-template name="renderBase"/>
  2468. </xsl:if>
  2469. <xsl:if test="$the-object/cm:metadataModelPackage and (contains(' report interactiveReport powerPlay8Report query analysis metricsDataSourceETLTask metricsExportTask metricsFileImportTask metricsMaintenanceTask ', concat(' ',$the-object/cm:objectClass,' ')))">
  2470. <xsl:call-template name="renderPackage"/>
  2471. </xsl:if>
  2472. <xsl:if test="/root/agentReport/cm:queryResponse">
  2473. <xsl:call-template name="renderPackage">
  2474. <xsl:with-param name="nodeObject" select="/root/agentReport/cm:queryResponse/*"/>
  2475. <xsl:with-param name="entryNameIndicator" select="'agsr'"/>
  2476. </xsl:call-template>
  2477. </xsl:if>
  2478. <dp:footer>
  2479. <xsl:choose>
  2480. <xsl:when test="$showOKCancel">
  2481. <!-- The following is needed to get prevent an issue with a zero width OK buttom on IE8 only -->
  2482. <div/>
  2483. <df:button df:id="IDS_OK" utml:validate="true" df:style="submit" df:nav_op="stack-down" df:kbA11y="true"/>
  2484. <xsl:choose>
  2485. <xsl:when test="key('env-param','ps_nav_stack') and not(key('env-param','ps_nav_stack') = '') ">
  2486. <!-- The following is needed to get around some issues with formlogic_lite (needs more investigation) -->
  2487. <df:button df:id="IDS_CANCEL" df:idPrefix="dialogButton" df:style="stack-down" df:kbA11y="true"/>
  2488. </xsl:when>
  2489. <xsl:otherwise>
  2490. <!-- The following is needed to get around some issues with formlogic_lite (needs more investigation) -->
  2491. <df:button df:id="IDS_CANCEL" df:idPrefix="dialogButton" df:href="javascript:cwb();" df:style="href" df:kbA11y="true"/>
  2492. </xsl:otherwise>
  2493. </xsl:choose>
  2494. </xsl:when>
  2495. <xsl:otherwise>
  2496. <df:button df:id="IDS_CLOSE" df:style="back-url" df:kbA11y="true"/>
  2497. </xsl:otherwise>
  2498. </xsl:choose>
  2499. </dp:footer>
  2500. </utml:form>
  2501. </dp:page>
  2502. </xsl:template>
  2503. <xsl:template name="renderBase">
  2504. <xsl:variable name="start-at-reportbase-path">
  2505. <xsl:choose>
  2506. <xsl:when test="string(key('env-param','m_p_base'))!=''">
  2507. <xsl:choose>
  2508. <xsl:when test="starts-with(/root/selected/cm:queryResponse/*/cm:searchPath, key('session-param', 'e_hp'))">
  2509. <xsl:value-of select="concat(key('session-param', 'e_hp'),'/folder')"/>
  2510. </xsl:when>
  2511. <xsl:when test="starts-with(/root/selected/cm:queryResponse/*/cm:searchPath,'/content')">
  2512. <xsl:value-of select="$defaultContentRoot"/>
  2513. </xsl:when>
  2514. </xsl:choose>
  2515. </xsl:when>
  2516. <xsl:when test="starts-with($base/cm:searchPath, key('session-param', 'e_hp'))">
  2517. <xsl:value-of select="concat(key('session-param', 'e_hp'),'/folder')"/>
  2518. </xsl:when>
  2519. <xsl:when test="starts-with($base/cm:searchPath,'/content')">
  2520. <xsl:value-of select="$defaultContentRoot"/>
  2521. </xsl:when>
  2522. </xsl:choose>
  2523. </xsl:variable>
  2524. <xsl:variable name="canReadOnSource" select="contains($base/cm:permissions, 'read')"/>
  2525. <xsl:variable name="canWriteOnSource" select="contains($base/cm:permissions, 'write')"/>
  2526. <xsl:variable name="canSPOnSource" select="contains($base/cm:permissions, 'setPolicy')"/>
  2527. <xsl:variable name="baselabel">
  2528. <xsl:choose>
  2529. <xsl:when test="/root/selected/cm:queryResponse">
  2530. <xsl:choose>
  2531. <xsl:when test="/root/selected/cm:queryResponse/*/cm:objectClass != 'agentDefinition' and /root/selected/cm:queryResponse/*/cm:objectClass != 'dataMovementTask'"><xts:string id="IDS_PROP_SOURCE_REPORT"/></xsl:when>
  2532. <xsl:when test="/root/selected/cm:queryResponse/*/cm:objectClass = 'dataMovementTask'"><xts:string id="IDS_PROP_SOURCE_DATAMOVEMENT"/></xsl:when>
  2533. <xsl:otherwise><xts:string id="IDS_PROP_SOURCE_AGENT"/></xsl:otherwise>
  2534. </xsl:choose>
  2535. </xsl:when>
  2536. <xsl:when test="string($the-object/cm:objectClass) = 'reportView' or string($the-object/cm:objectClass) = 'powerPlay8ReportView'"><xts:string id="IDS_PROP_SOURCE_REPORT"/></xsl:when>
  2537. <xsl:when test="string($the-object/cm:objectClass) = 'dataMovementTaskAlias'"><xts:string id="IDS_PROP_SOURCE_DATAMOVEMENT"/></xsl:when>
  2538. <xsl:when test="string($the-object/cm:objectClass) = 'portalSkin'"><xts:string id="IDS_PROP_BASE_SKIN"/></xsl:when>
  2539. <xsl:otherwise><xts:string id="IDS_PROP_SOURCE_AGENT"/></xsl:otherwise>
  2540. </xsl:choose>
  2541. </xsl:variable>
  2542. <xsl:variable name="baselinktext">
  2543. <xsl:choose>
  2544. <xsl:when test="/root/selected/cm:queryResponse">
  2545. <xsl:choose>
  2546. <xsl:when test="/root/selected/cm:queryResponse/*/cm:objectClass != 'agentDefinition' and /root/selected/cm:queryResponse/*/cm:objectClass != 'dataMovementTask'"><xts:string id="IDS_PROP_REPORT_PROPERTIES"/></xsl:when>
  2547. <xsl:when test="/root/selected/cm:queryResponse/*/cm:objectClass = 'dataMovementTask'"><xts:string id="IDS_PROP_DATAMOVEMENT_PROPERTIES"/></xsl:when>
  2548. <xsl:otherwise><xts:string id="IDS_PROP_AGENT_PROPERTIES"/></xsl:otherwise>
  2549. </xsl:choose>
  2550. </xsl:when>
  2551. <xsl:when test="$base/cm:objectClass != 'agentDefinition' and $base/cm:objectClass != 'dataMovementTask'"><xts:string id="IDS_PROP_REPORT_PROPERTIES"/></xsl:when>
  2552. <xsl:when test="$base/cm:objectClass = 'dataMovementTask'"><xts:string id="IDS_PROP_DATAMOVEMENT_PROPERTIES"/></xsl:when>
  2553. <xsl:otherwise><xts:string id="IDS_PROP_AGENT_PROPERTIES"/></xsl:otherwise>
  2554. </xsl:choose>
  2555. </xsl:variable>
  2556. <xsl:variable name="linktotext">
  2557. <xsl:choose>
  2558. <xsl:when test="$the-object/cm:objectClass = 'reportView' or $the-object/cm:objectClass = 'powerPlay8ReportView'"><xts:string id="IDS_PROP_LINK_TO_REPORT"/></xsl:when>
  2559. <xsl:when test="$the-object/cm:objectClass = 'dataMovementTaskAlias'"><xts:string id="IDS_PROP_LINK_TO_DATAMOVEMENT"/></xsl:when>
  2560. <xsl:when test="$the-object/cm:objectClass = 'agentDefinitionView'"><xts:string id="IDS_PROP_LINK_TO_AGENT"/></xsl:when>
  2561. </xsl:choose>
  2562. </xsl:variable>
  2563. <xsl:variable name="baseLabelPath">
  2564. <xsl:choose>
  2565. <xsl:when test="( string($base/cm:objectClass)='' or string($base/cm:objectClass) = 'nil') and string(/root/env/param[@name='m_p_base'])=''">
  2566. <xts:string id="IDS_PROP_BASE_UNAVAILABLE"/>
  2567. </xsl:when>
  2568. <xsl:otherwise>
  2569. <xsl:choose>
  2570. <xsl:when test="string(/root/env/param[@name='m_p_base'])=''">
  2571. <cf:do-the-path-link>
  2572. <cf:param name="familytree">$base/cm:ancestors</cf:param>
  2573. <cf:param name="familymember">$base/cm:defaultName</cf:param>
  2574. <cf:param name="home"><xsl:value-of select="$start-at-reportbase-path"/></cf:param>
  2575. </cf:do-the-path-link>
  2576. </xsl:when>
  2577. <xsl:otherwise>
  2578. <cf:do-the-path-link>
  2579. <cf:param name="familytree">/root/selected/cm:queryResponse/*/cm:ancestors</cf:param>
  2580. <cf:param name="familymember">/root/selected/cm:queryResponse/*/cm:defaultName</cf:param>
  2581. <cf:param name="home"><xsl:value-of select="$start-at-reportbase-path"/></cf:param>
  2582. </cf:do-the-path-link>
  2583. </xsl:otherwise>
  2584. </xsl:choose>
  2585. </xsl:otherwise>
  2586. </xsl:choose>
  2587. </xsl:variable>
  2588. <lyt:layout style="1" border="yes" lyt:kbA11y="true">
  2589. <lyt:section>
  2590. <dp:list>
  2591. <dp:section>
  2592. <dp:label valign="top"><xsl:value-of select="$baselabel"/></dp:label>
  2593. <dp:text valign="top"><xsl:value-of select="$baseLabelPath"/></dp:text>
  2594. <dp:link valign="top">
  2595. <xsl:choose>
  2596. <xsl:when test="string(/root/env/param[@name='m_p_base'])=''">
  2597. <xsl:if test="$canReadOnSource or $canWriteOnSource or $canSPOnSource">
  2598. <a href="#">
  2599. <xsl:attribute name="onclick">javascript:if(!getPropertiesChanged()){redirect();} else {decision.show();}</xsl:attribute>
  2600. <xsl:attribute name="onkeypress">javascript:<xsl:value-of select="$chkSpaceEnterKeyEvent"/>{ this.onclick(); return false; } return true;</xsl:attribute>
  2601. <xsl:value-of select="$baselinktext"/>
  2602. </a>
  2603. </xsl:if>
  2604. </xsl:when>
  2605. <xsl:otherwise>
  2606. <xsl:variable name="permis" select="/root/selected/cm:queryResponse/*/cm:permissions"/>
  2607. <xsl:if test="contains(string($permis),'read') or contains(string($permis),'write') or contains(string($permis),'setPolicy')">
  2608. <a href="#">
  2609. <xsl:attribute name="onclick">javascript:if(!getPropertiesChanged()){redirect();} else {decision.show();}</xsl:attribute>
  2610. <xsl:attribute name="onkeypress">javascript:<xsl:value-of select="$chkSpaceEnterKeyEvent"/>{this.onclick(); return false;}return true;</xsl:attribute>
  2611. <xsl:value-of select="$baselinktext"/>
  2612. </a>
  2613. </xsl:if>
  2614. </xsl:otherwise>
  2615. </xsl:choose>
  2616. </dp:link>
  2617. <dp:text></dp:text>
  2618. <xsl:if test="$has_write_permission and $noUserProfile!=true()">
  2619. <dp:text><utml:a utml:op="maintain" utml:formName="pform">
  2620. <xsl:attribute name="onclick">setSelectParams('so.select','<xsl:value-of select="$the-object/cm:objectClass"/>Base',<xsl:text/>
  2621. <xsl:choose>
  2622. <xsl:when test="string($base/cm:searchPath)!='' or string(key('env-param','m_p_base'))!=''">
  2623. <xsl:text/>'so.defaultObject','<xsl:text/>
  2624. <xsl:choose>
  2625. <xsl:when test="string(key('env-param','m_p_base'))!=''"><xsl:value-of select="xtsext:javascriptencode(string(key('env-param','m_p_base')))"/></xsl:when>
  2626. <xsl:otherwise><xsl:value-of select="xtsext:javascriptencode(string($base/cm:searchPath))"/></xsl:otherwise>
  2627. </xsl:choose>
  2628. </xsl:when>
  2629. <xsl:otherwise>
  2630. <xsl:text/>'so.defaultLocation','<xsl:text/>
  2631. <xsl:if test="string(key('env-param','m_path'))!=''"><xsl:text/><xsl:value-of select="xtsext:javascriptencode(string(key('env-param','m_path')))"/><xsl:text/></xsl:if>
  2632. </xsl:otherwise>
  2633. </xsl:choose>
  2634. <xsl:text/>');<xsl:text/>
  2635. </xsl:attribute>
  2636. <utml:target><xsl:value-of select="$app"/>/select/select.xts</utml:target>
  2637. <utml:validate>validate</utml:validate>
  2638. <xsl:text/><xsl:value-of select="$linktotext"/><xsl:text/>
  2639. </utml:a></dp:text>
  2640. </xsl:if>
  2641. </dp:section>
  2642. </dp:list>
  2643. </lyt:section>
  2644. </lyt:layout>
  2645. </xsl:template>
  2646. <!-- kludge!: if you introduce a new 'entryNameIndicator', remember to delete it to the 'updateEnv' block -->
  2647. <!-- that is, add this: <xts:delete select="/root/env/param[@name='{$entryNameIndicator}']"/>, otherwise you'll run into problem /w duplicates -->
  2648. <!-- note: utml:exclusion-list would work nicely here but it's not available in formlogic-lite! -->
  2649. <xsl:template name="renderPackage">
  2650. <xsl:param name="nodeObject" select="$the-object"/>
  2651. <xsl:param name="entryNameIndicator" select="'p'"/>
  2652. <xsl:variable name="modelPackage" select="$nodeObject/cm:metadataModelPackage/*"/>
  2653. <xsl:variable name="mdmp" select="key('env-param',concat('m_',$entryNameIndicator,'__metadataModelPackage'))"/>
  2654. <xsl:variable name="isMMS" select="(contains(string($nodeObject/cm:objectClass),'metrics') and ($nodeObject/cm:metadataModelPackage/*/cm:userInterfaces/cm:uiComponentEnum='metricStudio' or $nodeObject/cm:metadataModelPackage/*/cm:userInterfaces/cm:uiComponentEnum='')) or $nodeObject/cm:metadataModelPackage/*/cm:userInterfaces/cm:uiComponentEnum='metricStudio'"/>
  2655. <xsl:variable name="selectedPackageValue">
  2656. <xsl:choose>
  2657. <xsl:when test="(key('env-param','so.select')='packageBase' or key('env-param','so.select')='metricspackageBase') and key('env-param','so.searchPath')!=''"><xsl:value-of select="key('env-param','so.searchPath')"/></xsl:when>
  2658. </xsl:choose>
  2659. </xsl:variable>
  2660. <xsl:variable name="packageName">
  2661. <xsl:choose>
  2662. <xsl:when test="string($modelPackage/cm:defaultName)!='' and not(/root/selected)">
  2663. <xsl:value-of select="$modelPackage/cm:defaultName"/>
  2664. </xsl:when>
  2665. <xsl:when test="not(/root/selected)">
  2666. <xts:string id="IDS_PROP_BASE_UNAVAILABLE"/>
  2667. </xsl:when>
  2668. <xsl:otherwise>
  2669. <xsl:choose>
  2670. <xsl:when test="/root/selected">
  2671. <xsl:value-of select="/root/selected/cm:queryResponse/*/cm:defaultName"/>
  2672. </xsl:when>
  2673. <xsl:when test="/root/env/param[@name=concat('m_',$entryNameIndicator,'_metadataModelPackage')]">
  2674. <xsl:value-of select="/root/env/param[@name=concat('m_',$entryNameIndicator,'_metadataModelPackage')]"/>
  2675. </xsl:when>
  2676. <xsl:otherwise>
  2677. <xsl:text/><xts:string id="IDS_PROP_BASE_UNAVAILABLE"/><xsl:text/>
  2678. </xsl:otherwise>
  2679. </xsl:choose>
  2680. </xsl:otherwise>
  2681. </xsl:choose>
  2682. </xsl:variable>
  2683. <xsl:variable name="packageNameDisplay">
  2684. <xsl:value-of select="xtsext:enforceBTD($packageName, $baseTextDirection, $productLocale, boolean($isBidiEnabled='true'))"/>
  2685. </xsl:variable>
  2686. <lyt:layout style="1" border="yes">
  2687. </lyt:layout>
  2688. </xsl:template>
  2689. <xsl:template name="renderLanguages">
  2690. <lyt:layout style="2" width="100%" border="yes" intro="IDS_PROP_SET_LANG_HINT">
  2691. <lyt:section>
  2692. <span style="position: absolute;margin-left: -9999px; margin-top: -9999px;" id="intro"><xts:string id="IDS_PROP_SET_LANG_HINT"/></span>
  2693. <dp:group>
  2694. <dp:groupItem>
  2695. <dp:list>
  2696. <dp:section>
  2697. <dp:input dp:kbA11y="true">
  2698. <dp:section1>
  2699. <label for="selLang"><xts:string id="IDS_PROP_LANGUAGE"/></label>
  2700. </dp:section1>
  2701. <dp:section2>
  2702. <!-- Build up the values that the user has currently defined -->
  2703. <xsl:variable name="vals">
  2704. <xsl:for-each select="/root/multiLangs/name">
  2705. <xsl:if test="not(preceding-sibling::name = .)">
  2706. <xsl:choose>
  2707. <xsl:when test="position()!=last"><xsl:value-of select="concat(' ',string(.))"/></xsl:when>
  2708. <xsl:otherwise><xsl:value-of select="concat(' ',string(.),' ')"/></xsl:otherwise>
  2709. </xsl:choose>
  2710. </xsl:if>
  2711. </xsl:for-each>
  2712. </xsl:variable>
  2713. <xsl:choose>
  2714. <xsl:when test="$has_write_permission and $noUserProfile!=true()">
  2715. <utml:select name="m_transloc" onchange="javascript:checkLang(this)" id="selLang">
  2716. <!-- Loop through the content locales to display the entries (in alpha order) that the user currently has defined -->
  2717. <xsl:for-each select="/root/multiLangs/name">
  2718. <xsl:if test="not(preceding-sibling::name= .)">
  2719. <xsl:variable name="locnam"><xsl:value-of select="."/></xsl:variable>
  2720. <xsl:variable name="displayName">
  2721. <xsl:choose>
  2722. <xsl:when test="/root/config/param[@name='locale']/locale[@type='contentLocale' and string(id) = $locnam]"><xsl:value-of select="/root/config/param[@name='locale']/locale[@type='contentLocale' and string(id) = $locnam]/displayName"/></xsl:when>
  2723. <xsl:otherwise><xsl:value-of select="$locnam"/>(<xts:string id="IDS_PROP_BASE_UNAVAILABLE"/>)</xsl:otherwise>
  2724. </xsl:choose>
  2725. </xsl:variable>
  2726. <utml:option value="{$locnam}">
  2727. <xsl:attribute name="id"><xsl:value-of select="$displayName"/></xsl:attribute>
  2728. <xsl:choose>
  2729. <xsl:when test="string(key('env-param','pty_add'))!='' and $locnam = $activeLang">
  2730. <xsl:attribute name="selected"><xsl:value-of select="'true'"/></xsl:attribute>
  2731. </xsl:when>
  2732. <xsl:when test="string(key('env-param','pty_add'))='' and $locnam = $lang">
  2733. <xsl:attribute name="selected"><xsl:value-of select="'true'"/></xsl:attribute>
  2734. </xsl:when>
  2735. </xsl:choose>
  2736. <xsl:value-of select="$displayName"/>
  2737. </utml:option>
  2738. </xsl:if>
  2739. </xsl:for-each>
  2740. <!-- This is the separator bar between what languages are defined and what languages are available to define -->
  2741. <utml:option value="not" role="separator"><xsl:value-of select="'-----------------------'"/></utml:option>
  2742. <!-- Loop through the content locales to display the entries (in alpha order) that the user has available to define -->
  2743. <xsl:for-each select="/root/config/param[@name='locale']/locale[@type='contentLocale']">
  2744. <xsl:if test="not(contains($vals,concat(' ',id,' ')))">
  2745. <utml:option value="{id}" >
  2746. <xsl:attribute name="id"><xsl:value-of select="./displayName"/></xsl:attribute>
  2747. <xsl:value-of select="./displayName"/>
  2748. </utml:option>
  2749. </xsl:if>
  2750. </xsl:for-each>
  2751. </utml:select>
  2752. <!-- Hidden fields to process the add, remove capabilities of this page -->
  2753. <utml:input value="" type="hidden" name="pty_activeLang"/>
  2754. <utml:input value="" type="hidden" name="pty_deactivLang"/>
  2755. <utml:input value="" type="hidden" name="pty_del"/>
  2756. <utml:input value="" type="hidden" name="pty_add"/>
  2757. <xsl:if test="$the-object/cm:defaultName[@modifiable = 'false']
  2758. and $the-object/cm:objectClass='namespace'">
  2759. <utml:input type="hidden" name="pty_keep"><utml:value><xsl:value-of select="$the-object/cm:name/*/@xml:lang"/></utml:value></utml:input>
  2760. </xsl:if>
  2761. </xsl:when>
  2762. <xsl:otherwise>
  2763. <utml:select name="m_transloc" onchange="checkLang(this)" role="listbox" aria-readonly="true">
  2764. <utml:read-only>true</utml:read-only>
  2765. <xsl:variable name="actval">
  2766. <xsl:value-of select="/root/config/param[@name='locale']/locale[@type='contentLocale' and string(id)=$lang]/displayName"/>
  2767. </xsl:variable>
  2768. <xsl:choose>
  2769. <xsl:when test="$actval=''">
  2770. <xsl:variable name="actval2"><xsl:value-of select="substring-before(substring-after($vals,' '),' ')"/></xsl:variable>
  2771. <xsl:value-of select="/root/config/param[@name='locale']/locale[@type='contentLocale' and string(id)=$actval2]/displayName"/>
  2772. </xsl:when>
  2773. <xsl:otherwise>
  2774. <xsl:value-of select="$actval"/>
  2775. </xsl:otherwise>
  2776. </xsl:choose>
  2777. </utml:select>
  2778. </xsl:otherwise>
  2779. </xsl:choose>
  2780. </dp:section2>
  2781. </dp:input>
  2782. </dp:section>
  2783. </dp:list>
  2784. </dp:groupItem>
  2785. <xsl:choose>
  2786. <xsl:when test="$has_write_permission and $noUserProfile!=true()">
  2787. <xsl:choose>
  2788. <!-- Output the remove languages link when there is more than one entry and at least one of them has a modifiable value -->
  2789. <xsl:when test="$activeLang=''">
  2790. <xsl:if test="$compareField != 'noDefaultField' and count(/root/multiLangs/name[not(preceding-sibling::name = .)]) > 1">
  2791. <dp:groupItem><dp:text/><dp:text/></dp:groupItem>
  2792. <dp:groupItem>
  2793. <dp:text>
  2794. <a href="#" role="link">
  2795. <xsl:attribute name="onclick">javascript:removeLang()</xsl:attribute>
  2796. <xsl:attribute name="onkeypress">javascript:<xsl:value-of select="$chkSpaceEnterKeyEvent"/>{this.onclick();return false;}return true;</xsl:attribute>
  2797. <xsl:text/><xts:string id="IDS_PROP_REMOVE_MULTILINGUAL"/><xsl:text/>
  2798. </a>
  2799. </dp:text>
  2800. </dp:groupItem>
  2801. </xsl:if>
  2802. </xsl:when>
  2803. <xsl:otherwise>
  2804. <xsl:variable name="cnt" select="count(/root/env/param[starts-with(@name,$compareField)])"/>
  2805. <xsl:if test="$cnt > 1 or ($cnt = 1 and string(key('env-param','pty_add'))!='')">
  2806. <dp:groupItem><dp:text/><dp:text/></dp:groupItem>
  2807. <dp:groupItem>
  2808. <dp:text>
  2809. <a href="#" role="link">
  2810. <xsl:attribute name="onclick">javascript:removeLang()</xsl:attribute>
  2811. <xsl:attribute name="onkeypress">javascript:<xsl:value-of select="$chkSpaceEnterKeyEvent"/>{this.onclick(); return false;}return true;</xsl:attribute>
  2812. <xsl:text/><xts:string id="IDS_PROP_REMOVE_MULTILINGUAL"/><xsl:text/>
  2813. </a>
  2814. </dp:text>
  2815. </dp:groupItem>
  2816. </xsl:if>
  2817. </xsl:otherwise>
  2818. </xsl:choose>
  2819. </xsl:when>
  2820. <xsl:otherwise>
  2821. <xsl:if test="count(/root/multiLangs/name[not(preceding-sibling::name = .)]) > 1">
  2822. <dp:groupItem><dp:text/><dp:text/></dp:groupItem>
  2823. <dp:groupItem>
  2824. <dp:text>
  2825. <dp:link>
  2826. <utml:a utml:op="stack-up" utml:formName="pform" utml:kbA11y="true" role="link">
  2827. <utml:href><xsl:text/>
  2828. <xsl:text/>document.pform.m_return.value='<xsl:value-of select="concat($app,'/',$mname)"/>';</utml:href>
  2829. <utml:target><xsl:value-of select="$app"/>/properties_multilingual.xts</utml:target>
  2830. <utml:validate>validate</utml:validate>
  2831. <xts:string id="IDS_PROP_TRANSLATION_RO"/><xsl:text/>
  2832. </utml:a>
  2833. </dp:link>
  2834. </dp:text>
  2835. </dp:groupItem>
  2836. </xsl:if>
  2837. </xsl:otherwise>
  2838. </xsl:choose>
  2839. </dp:group>
  2840. </lyt:section>
  2841. <lyt:section/>
  2842. <!-- Name -->
  2843. <lyt:section>
  2844. <dp:list dp:kbA11y="true">
  2845. <xsl:if test="$the-object/cm:defaultName">
  2846. <dp:section>
  2847. <dp:input dp:kbA11y="true">
  2848. <dp:section1>
  2849. <label for="ptyName"><xts:string id="IDS_PROP_NAME"/></label>
  2850. </dp:section1>
  2851. <dp:section2>
  2852. <utml:input type="text" class="pInput" size="30" name="pty_name" onchange="anyNames(this.value)" maxlength="256" id="ptyName" role="textbox" >
  2853. <utml:read-only>
  2854. <xsl:choose>
  2855. <xsl:when test="$the-object/cm:defaultName[@modifiable = 'false'] or $noUserProfile">true</xsl:when>
  2856. <xsl:otherwise>false</xsl:otherwise>
  2857. </xsl:choose>
  2858. </utml:read-only>
  2859. <utml:value>
  2860. <xsl:choose>
  2861. <xsl:when test="$the-object/cm:defaultName[@modifiable = 'false'] and $the-object/cm:objectClass='namespace'">
  2862. <xsl:value-of select="$the-object/cm:defaultName"/>
  2863. </xsl:when>
  2864. <xsl:when test="not(/root/env/param[starts-with(@name,'m_t_default_name_')])">
  2865. <xsl:value-of select="$the-object/cm:name/*[@xml:lang=$lang]"/>
  2866. </xsl:when>
  2867. <xsl:when test="/root/env/param[@name= concat('m_t_default_name_',$lang)]">
  2868. <xsl:value-of select="/root/env/param[@name = concat('m_t_default_name_',$lang)]"/>
  2869. </xsl:when>
  2870. </xsl:choose>
  2871. </utml:value>
  2872. </utml:input>
  2873. </dp:section2>
  2874. </dp:input>
  2875. </dp:section>
  2876. </xsl:if>
  2877. </dp:list>
  2878. </lyt:section>
  2879. <!-- Description -->
  2880. <lyt:section>
  2881. <xsl:if test="$the-object/cm:defaultDescription and not($the-object/cm:shortcut != '')">
  2882. <dp:input>
  2883. <dp:section1>
  2884. <label for="ptyDesc"><xts:string id="IDS_PROP_DESCRIPTION"/></label>
  2885. </dp:section1>
  2886. <dp:section2>
  2887. <utml:textarea class="pTextarea" rows="4" cols="30" name="pty_desc" onchange="chgD(this.value)" id="ptyDesc" role="textbox" aria-multiline="true">
  2888. <utml:read-only>
  2889. <xsl:choose>
  2890. <xsl:when test="$the-object/cm:defaultDescription[@modifiable = 'false'] or $noUserProfile">true</xsl:when>
  2891. <xsl:otherwise>false</xsl:otherwise>
  2892. </xsl:choose>
  2893. </utml:read-only>
  2894. <utml:value>
  2895. <xsl:choose>
  2896. <xsl:when test="not(/root/env/param[starts-with(@name,'m_t_default_description_')])">
  2897. <xsl:value-of select="$the-object/cm:description/*[@xml:lang=$lang]"/>
  2898. </xsl:when>
  2899. <xsl:when test="/root/env/param[@name= concat('m_t_default_description_',$lang)]">
  2900. <xsl:value-of select="/root/env/param[@name= concat('m_t_default_description_',$lang)]"/>
  2901. </xsl:when>
  2902. </xsl:choose>
  2903. </utml:value>
  2904. </utml:textarea>
  2905. </dp:section2>
  2906. </dp:input>
  2907. </xsl:if>
  2908. </lyt:section>
  2909. </lyt:layout>
  2910. </xsl:template>
  2911. <!-- template for the floating disabled entry -->
  2912. <xsl:template name="render-disabled">
  2913. </xsl:template>
  2914. <xsl:template name="render-hideobject">
  2915. </xsl:template>
  2916. <!-- template for the notification and retention sections -->
  2917. <xsl:template name="render-retention">
  2918. <utml:group>
  2919. <!-- only show the retention if we have read permission -->
  2920. <xsl:if test="$has_read_permission">
  2921. <utml:read-only>
  2922. <xsl:choose>
  2923. <xsl:when test="$has_write_permission and $the-object/cm:retentions/@modifiable = 'true'">false</xsl:when>
  2924. <xsl:otherwise>true</xsl:otherwise>
  2925. </xsl:choose>
  2926. </utml:read-only>
  2927. <!-- Notification and Retention settings -->
  2928. <xsl:if test="(/root/system/param[@name='ui_objects']/object[@class=string($the-object/cm:objectClass) and @runnable='T']) or ($the-object/cm:objectClass = 'document')">
  2929. <lyt:layout style="2" border="yes" width="100%">
  2930. <lyt:section>
  2931. <xsl:choose>
  2932. <xsl:when test="$the-object/cm:objectClass = 'document'"><dt:retention class="documentVersion" title="IDS_PROP_DOCUMENT_RETENTION_EXECUTION" trackchange="setPropertiesChanged()" label="IDS_PROP_DOCUMENT_RETENTION_EXECUTION_LABEL"/></xsl:when>
  2933. <xsl:otherwise><dt:retention class="history" title="IDS_PROP_RETENTION_EXECUTION" trackchange="setPropertiesChanged()" label="IDS_PROP_RETENTION_EXECUTION_LABEL"/></xsl:otherwise>
  2934. </xsl:choose>
  2935. </lyt:section>
  2936. <lyt:section>
  2937. <xsl:if test="contains(' analysis report interactiveReport reportView query powerPlay8Report powerPlay8ReportView ', concat(' ', $the-object/cm:objectClass, ' '))">
  2938. <dt:retention class="reportVersion" title="IDS_PROP_RETENTION_OUTPUTS" trackchange="setPropertiesChanged()" label="IDS_PROP_RETENTION_OUTPUTS_LABEL"/>
  2939. </xsl:if>
  2940. </lyt:section>
  2941. </lyt:layout>
  2942. </xsl:if>
  2943. </xsl:if>
  2944. <!-- only show the "URL" or "File System Location settings" if user has read permission -->
  2945. <xsl:if test="$has_read_permission">
  2946. <!-- URL -->
  2947. <xsl:if test="key('env-param', 'm_class') = 'URL'">
  2948. <!-- Check to see if url is safe (e.g.: domain-valid) -->
  2949. <xsl:variable name="is-url-validated" select="xtsext:cafaction('issafeurl_null', normalize-space($the-object/cm:uri)) = 'true'"/>
  2950. <xsl:variable name="urlValue">
  2951. <xsl:if test="$is-url-validated or $isAdminUser">
  2952. <xsl:value-of select="$the-object/cm:uri"/>
  2953. </xsl:if>
  2954. </xsl:variable>
  2955. <dt:domainListPopup/>
  2956. <lyt:layout style="1" border="yes" lyt:kbA11y="true">
  2957. <lyt:section>
  2958. <dp:input>
  2959. <dp:section1>
  2960. <xts:string id="IDS_PROP_URL"/>
  2961. <dp:list>
  2962. <dp:section>
  2963. <div>
  2964. <xsl:text/><xts:string id="IDS_NEW_URL_HINT"/>&#160;&#160;<xsl:text/>
  2965. <a href="#">
  2966. <xsl:attribute name="onclick">javascript:validDomains.show();return false;</xsl:attribute>
  2967. <xsl:attribute name="onkeypress">javascript:<xsl:value-of select="$chkSpaceEnterKeyEvent"/>{ return this.onclick(); }return true;</xsl:attribute>
  2968. <xsl:text/><xts:string id="IDS_NEW_URL_VIEW_VALID_DOMAINS"/><xsl:text/>
  2969. </a>
  2970. </div>
  2971. </dp:section>
  2972. </dp:list>
  2973. </dp:section1>
  2974. <dp:section2>
  2975. <dp:list>
  2976. <dp:section>
  2977. <utml:input type="text" name="m_p_uri" maxlength="2048" size="30" class="pInput" onchange="setPropertiesChanged()" aria-labelledby="urlInEdit" stttype="url">
  2978. <utml:read-only>
  2979. <xsl:choose>
  2980. <xsl:when test="$the-object/cm:uri/@modifiable = 'false'">true</xsl:when>
  2981. <xsl:otherwise>false</xsl:otherwise>
  2982. </xsl:choose>
  2983. </utml:read-only>
  2984. <utml:value>
  2985. <xsl:value-of select="$urlValue"/>
  2986. </utml:value>
  2987. </utml:input>
  2988. <span style="position: absolute;margin-left: -9999px; margin-top: -9999px;" id="urlInEdit"><xsl:value-of select="$urlValue"/></span>
  2989. </dp:section>
  2990. <dp:section>
  2991. <xsl:if test="not($is-url-validated)">
  2992. <xsl:choose>
  2993. <xsl:when test="$isAdminUser">
  2994. <xts:string id="IDS_NEW_URL_NOT_VALID_URL"/>
  2995. </xsl:when>
  2996. <xsl:otherwise>
  2997. <xts:string id="IDS_NEW_URL_NOT_ALLOWED_TO_VIEW"/>
  2998. </xsl:otherwise>
  2999. </xsl:choose>
  3000. </xsl:if>
  3001. </dp:section>
  3002. </dp:list>
  3003. </dp:section2>
  3004. </dp:input>
  3005. </lyt:section>
  3006. </lyt:layout>
  3007. </xsl:if>
  3008. <!-- File System Location settings -->
  3009. <xsl:if test="key('env-param', 'm_class') = 'archiveLocation'">
  3010. <!-- get ROOT value from configuration -->
  3011. <xsl:variable name="fileSystemRoot" select="string(/root/configuration/property[@name='archiveLocationFileSchemeRoot'])"/>
  3012. <xsl:variable name="sysRootValue">
  3013. <xsl:choose>
  3014. <xsl:when test="$fileSystemRoot=''">
  3015. <xts:string id="IDS_PROP_FILE_SYSTEM_ROOT_LOCATION_MISSING"/>
  3016. </xsl:when>
  3017. <xsl:otherwise>
  3018. <xsl:value-of select="$fileSystemRoot"/>
  3019. </xsl:otherwise>
  3020. </xsl:choose>
  3021. </xsl:variable>
  3022. <lyt:layout style="1" border="yes" lyt:kbA11y="true">
  3023. <lyt:section>
  3024. <dp:input>
  3025. <dp:section1>
  3026. <xts:string id="IDS_PROP_FILE_SYSTEM_ROOT_LOCATION_LABEL"/>
  3027. <dp:list>
  3028. <dp:section>
  3029. <dp:hint>
  3030. <xts:string id="IDS_PROP_FILE_SYSTEM_ROOT_LOCATION_INTRO"/>
  3031. </dp:hint>
  3032. </dp:section>
  3033. </dp:list>
  3034. </dp:section1>
  3035. <dp:section2>
  3036. <xsl:value-of select="$sysRootValue"/>
  3037. </dp:section2>
  3038. </dp:input>
  3039. <dp:input>
  3040. <dp:section1>
  3041. <label for="ctrl_m_p_archiveLocation_uri"><xts:string id="IDS_PROP_FILE_SYSTEM_LOCATION_LABEL"/></label>
  3042. <dp:list>
  3043. <dp:section>
  3044. <dp:hint>
  3045. <xts:string id="IDS_PROP_FILE_SYSTEM_LOCATION_INTRO"/>
  3046. </dp:hint>
  3047. </dp:section>
  3048. </dp:list>
  3049. </dp:section1>
  3050. <dp:section2>
  3051. <utml:input type="text" name="m_p_archiveLocation_uri" maxlength="2048" size="30" class="pInput" onchange="setPropertiesChanged()" id="ctrl_m_p_archiveLocation_uri">
  3052. <utml:read-only>
  3053. <xsl:choose>
  3054. <xsl:when test="$the-object/cm:uri/@modifiable = 'false'">true</xsl:when>
  3055. <xsl:otherwise>false</xsl:otherwise>
  3056. </xsl:choose>
  3057. </utml:read-only>
  3058. <utml:value>
  3059. <xsl:value-of select="$the-object/cm:uri"/>
  3060. </utml:value>
  3061. </utml:input>
  3062. </dp:section2>
  3063. </dp:input>
  3064. </lyt:section>
  3065. </lyt:layout>
  3066. </xsl:if>
  3067. </xsl:if>
  3068. </utml:group>
  3069. </xsl:template>
  3070. <!-- Variables needed for pf:gen-url -->
  3071. <xsl:variable name="location" select="''"/>
  3072. <xsl:variable name="request-url-params">
  3073. <xsl:if test="/root/env/param[@name='rui']">
  3074. <xsl:text/>&amp;rui=<xsl:value-of select="xtsext:protect(xtsext:urlencode(string(/root/env/param[@name='rui'])),'url','rui','getdata')"/>
  3075. </xsl:if>
  3076. </xsl:variable>
  3077. <!-- Back URLs will be stripped from the final URL, so these variables may be blank. -->
  3078. <xsl:variable name="back-url" select="''"/>
  3079. <xsl:variable name="encodedPPBack" select="''"/>
  3080. <xsl:variable name="encodedPP8Back" select="''"/>
  3081. <xsl:variable name="javascript-encodedPP8Back" select="''"/>
  3082. <xsl:variable name="encoded-back-url" select="''"/>
  3083. <xsl:variable name="encoded-s7-back-url" select="''"/>
  3084. <pf:gen-action/>
  3085. <pf:gen-action-string/>
  3086. <pf:gen-url/>
  3087. </xsl:stylesheet>
  3088. </xts:block>
  3089. <xts:block id="ignoreFaultHandler" type="fault" processor="XSLT">
  3090. <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" exclude-result-prefixes="xsl">
  3091. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  3092. <xsl:template match="/">
  3093. <ignoreFault/>
  3094. </xsl:template>
  3095. </xsl:stylesheet>
  3096. </xts:block>
  3097. <!--
  3098. ===============================================================================================
  3099. debug - display debug information
  3100. ===============================================================================================
  3101. -->
  3102. <xts:block id="debug" dependency="renderPage missingObject" condition=".[/root/session/param[@name='debug']='1']" type="exec" mode="output" processor="XSLT" mandatory="false" mimeType="text/html">
  3103. <!-- get the debug logic sheet -->
  3104. <xts:logicsheet path="logicsheets/debuglogic.xslt"/>
  3105. <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">
  3106. <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no"/>
  3107. <xsl:template match="/">
  3108. <dbg:dumpxml select="/root"/>
  3109. </xsl:template>
  3110. </xsl:stylesheet>
  3111. </xts:block>
  3112. </xts:morphlet>