properties_general.xts 252 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681
  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. 2005, 2016
  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" path="/portal/uiobjects_tabs.xml"/>
  52. <!--
  53. ===============================================================================================
  54. get_system_root - get system root from Configuration
  55. ===============================================================================================
  56. -->
  57. <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">
  58. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  59. <xsl:template match="/">
  60. <!-- get file system root from the Configuration -->
  61. <xts:sequence>
  62. <xts:append>
  63. <xts:function name="getConfiguration">
  64. <xts:param name="archiveLocationFileSchemeRoot"/>
  65. <xts:param name="CAF"/>
  66. </xts:function>
  67. </xts:append>
  68. </xts:sequence>
  69. </xsl:template>
  70. </xsl:stylesheet>
  71. </xts:block>
  72. <!-- Update these environment variables -->
  73. <!-- ** Note :
  74. ** 'ackageBase' is correct for the condition; since packageBase and metricsPackageBase have ackageBase in common.
  75. ** 'ViewBase' encompasses both reportViewBase and agentDefinitionViewBase and powerPlay8ReportViewBase.
  76. *** reportDataServiceAgentDefinitionBase - need to add this
  77. -->
  78. <xts:block
  79. id="updateEnv"
  80. type="exec"
  81. dependency="formlogic_init get_system_root"
  82. mode="interpret"
  83. processor="XSLT"
  84. 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']"
  85. mandatory="false">
  86. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  87. <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">
  88. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  89. <xsl:key name="env-param" match="/root/env/param" use="@name"/>
  90. <xsl:template match="/">
  91. <!--
  92. Need to remove the fields from the properties_general page so that the updates do not occur here, since the user might
  93. press cancel on the properties page.
  94. -->
  95. <xts:sequence>
  96. <xsl:if test="key('env-param','pty_deactivLang') != ''">
  97. <xsl:variable name="rmLng" select="key('env-param','pty_deactivLang')"/>
  98. <xsl:variable name="nam"><xsl:value-of select="concat('m_t_default_name_',$rmLng)"/></xsl:variable>
  99. <xsl:variable name="sct"><xsl:value-of select="concat('m_t_default_screenTip_',$rmLng)"/></xsl:variable>
  100. <xsl:variable name="dsc"><xsl:value-of select="concat('m_t_default_description_',$rmLng)"/></xsl:variable>
  101. <xts:delete select="/root/env/param[@name='{$nam}']"/>
  102. <xts:delete select="/root/env/param[@name='{$dsc}']"/>
  103. <xts:delete select="/root/env/param[@name='{$sct}']"/>
  104. <xts:delete select="/root/env/param[@name='pty_deactivLang']"/>
  105. </xsl:if>
  106. <!-- ** Note :
  107. ** 'ackageBase' is correct; since packageBase and metricsPackageBase have 'ackageBase' in common.
  108. ** 'ViewBase' encompasses both reportViewBase and agentDefinitionViewBase.
  109. -->
  110. <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'))!='')">
  111. <xts:delete select="/root/env/param[@name='changed_genprop']"/>
  112. <xts:append select="/root/env">
  113. <param name="changed_genprop">1</param>
  114. </xts:append>
  115. </xsl:if>
  116. <xsl:choose>
  117. <xsl:when test="string(key('env-param','typeInContact'))='true'">
  118. <xts:delete select="/root/env/param[@name='typeInContact' or @name='typeInEMailAddress' or @name='m_p_contactEMail' or @name='m_p_contact']"/>
  119. <xts:delete select="/root/env/param[starts-with(@name,'contact.so.')]"/>
  120. <xts:append select="/root/env">
  121. <param name="m_p_contactEMail"><xsl:value-of select="string(key('env-param','typeInEMailAddress'))"/></param>
  122. <param name="m_p_contact"/>
  123. </xts:append>
  124. </xsl:when>
  125. <xsl:when test="string(key('env-param','so.select'))='contacts' and string(key('env-param','so.searchPath'))!=''">
  126. <xts:delete select="/root/env/param[@name='typeInEMailAddress' or @name='emailAddress' or @name='m_p_contactEMail' or @name='m_p_contact']"/>
  127. <xts:delete select="/root/env/param[starts-with(@name,'contact.so.')]"/>
  128. <xts:append select="/root/env">
  129. <param name="m_p_contactEMail"/>
  130. <param name="m_p_contact"><xsl:value-of select="key('env-param','so.searchPath')"/></param>
  131. </xts:append>
  132. <xts:append select="/root/env">
  133. <xsl:for-each select="/root/env/param[starts-with(@name,'so.') and string(@name)!='so.select']">
  134. <param name="contact.{@name}"><xsl:value-of select="string(.)"/></param>
  135. </xsl:for-each>
  136. </xts:append>
  137. <xts:delete select="/root/env/param[starts-with(@name,'so.') and string(@name)!='so.select']"/>
  138. </xsl:when>
  139. <xsl:when test="string(key('env-param','so.select'))='dataSourceAccessAccount' and string(key('env-param','so.searchPath'))!=''">
  140. <xts:delete select="/root/env/param[@name='m_p_dataSourceAccessAccount']"/>
  141. <xts:delete select="/root/env/param[starts-with(@name,'accessAccount.so.')]"/>
  142. <xts:append select="/root/env">
  143. <param name="m_p_dataSourceAccessAccount"><xsl:value-of select="key('env-param','so.searchPath')"/></param>
  144. </xts:append>
  145. <xts:append select="/root/env">
  146. <xsl:for-each select="/root/env/param[starts-with(@name,'so.') and string(@name)!='so.select']">
  147. <param name="accessAccount.{@name}"><xsl:value-of select="string(.)"/></param>
  148. </xsl:for-each>
  149. </xts:append>
  150. <xts:delete select="/root/env/param[starts-with(@name,'so.') and string(@name)!='so.select']"/>
  151. </xsl:when>
  152. </xsl:choose>
  153. <xsl:if test="string(key('env-param','tenantChanged'))='true'">
  154. <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']"/>
  155. <xts:append select="/root/env">
  156. <param name="m_p_tenantID"><xsl:value-of select="string(key('env-param','newTenantID'))"/></param>
  157. <param name="objTenantName"><xsl:value-of select="string(key('env-param','newTenantName'))"/></param>
  158. <param name="changed_m_p_tenantID">1</param>
  159. </xts:append>
  160. </xsl:if>
  161. </xts:sequence>
  162. </xsl:template>
  163. </xsl:stylesheet>
  164. </xts:block>
  165. <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">
  166. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  167. <xts:logicsheet path="logicsheets/portal.xsl"/>
  168. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  169. <xsl:stylesheet version="1.0"
  170. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  171. xmlns:cms="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/cms/1/"
  172. xmlns:xts="http://developer.cognos.com/schemas/xts/"
  173. xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/"
  174. xmlns:form="http://developer.cognos.com/schemas/xts/portal/iFrmCmd/1/"
  175. xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
  176. xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
  177. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  178. exclude-result-prefixes="cms xts send cm pf form xtsext">
  179. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  180. <pf:variables/>
  181. <xsl:template match="/">
  182. <xsl:variable name="targetTenantId" select="/root/env/param[@name='m_tenantId']"/>
  183. <xsl:variable name="tenantDisplayName">
  184. <xsl:choose>
  185. <xsl:when test="$targetTenantId">
  186. <xsl:value-of select="$targetTenantId"/>
  187. </xsl:when>
  188. <xsl:otherwise>
  189. <xsl:value-of select="key('session-param', 'e_tenantDisplayName')"/>
  190. </xsl:otherwise>
  191. </xsl:choose>
  192. </xsl:variable>
  193. <xts:sequence>
  194. <xts:append>
  195. <send:request provider="cm">
  196. <cm1:copy xmlns:cm1="http://developer.cognos.com/schemas/contentManagerService/1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  197. <objects SOAP-ENC:arrayType="bus:baseClass[1]" xsi:type="SOAP-ENC:Array" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
  198. <item xsi:type="bus:account">
  199. <searchPath xsi:type="bus:stringProp">
  200. <value xsi:type="xsd:string">/configuration/account[@tenantID=""]</value>
  201. </searchPath>
  202. </item>
  203. </objects>
  204. <targetPath xsi:type="bus:searchPathSingleObject">/configuration</targetPath>
  205. <options xsi:type="bus:copyOptions">
  206. <recursive xsi:type="xsd:boolean">true</recursive>
  207. <updateAction xsi:type="bus:updateActionEnum">fail</updateAction>
  208. <xsl:if test="$targetTenantId">
  209. <targetTenantID xsi:type="xsd:string"><xsl:value-of select="$targetTenantId"/></targetTenantID>
  210. </xsl:if>
  211. </options>
  212. </cm1:copy>
  213. </send:request>
  214. <xts:delete select="/root/env/param[@name='createDefaultUserAcctProfile']"/>
  215. </xts:append>
  216. </xts:sequence>
  217. </xsl:template>
  218. </xsl:stylesheet>
  219. </xts:block>
  220. <!--
  221. ===============================================================================================
  222. getContent - get our data from Content Manager
  223. ===============================================================================================
  224. -->
  225. <xts:block id="getContent" processor="XSLT" type="exec" dependency="updateEnv createDefaultUserAcctProfile">
  226. <xts:logicsheet path="logicsheets/cm-logic.xsl"/>
  227. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  228. <xts:logicsheet path="logicsheets/portal.xsl"/>
  229. <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
  230. xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
  231. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  232. xmlns:reqhelpers="http://developer.cognos.com/schemas/xts-cm/1/reqhelpers"
  233. 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/"
  234. xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
  235. exclude-result-prefixes="xsl pf xtsext reqhelpers cml send cm">
  236. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  237. <pf:variables/>
  238. <xsl:template match="/">
  239. <xts:sequence>
  240. <xts:append>
  241. <xts:transform src="transforms/CM/post-process.xslt" processor="XSLT">
  242. <send:request provider="cm">
  243. <xts:transform src="transforms/CM/pre-process.xslt" processor="XSLT">
  244. <cm:query xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
  245. <cm:search>
  246. <xsl:value-of select="/root/env/param[@name='m_obj']"/>
  247. </cm:search>
  248. <cm:properties>
  249. <cml:prop-general/>
  250. <cm:property name="owner"/>
  251. <cm:property name="tenantID"/>
  252. <cm:property name="name"/>
  253. <cm:property name="description"/>
  254. <cm:property name="screenTip"/>
  255. <cm:property name="documentType"/>
  256. <cm:property name="metadataModelPackage"/>
  257. <cm:property name="metadataModel"/>
  258. <cm:property name="hasChildren"/>
  259. <cm:property name="defaultPortalAction"/>
  260. <cm:property name="mostRecentEventList"/>
  261. <cm:property name="defaultOutputFormat"/>
  262. <cm:property name="executionFormat"/>
  263. <cm:property name="executionPrompt"/>
  264. <cm:property name="parent"/>
  265. <cm:property name="iconURI"/>
  266. <cm:property name="gateway"/>
  267. <cm:property name="format"/>
  268. <cm:property name="hidden"/>
  269. <xsl:if test="contains(' package role group ', concat(' ', /root/env/param[@name='m_class'], ' ')) and $isAdminUser">
  270. <cm:property name="routingHints"/>
  271. </xsl:if>
  272. <xsl:if test="/root/env/param[@name='m_class'] = 'package'">
  273. <cm:property name="userInterfaces"/>
  274. <cm:property name="effectiveUserCapabilities"/>
  275. </xsl:if>
  276. <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')">
  277. <cm:property name="repositoryRules"/>
  278. </xsl:if>
  279. <xsl:if test="/root/env/param[@name='m_class'] = 'rolapDataSource'">
  280. <cm:property name="dataSourceAccessAccount"/>
  281. </xsl:if>
  282. <cm:property name="launchableType"/>
  283. </cm:properties>
  284. <cm:options schemaInfo="true">
  285. <cm:refProps>
  286. <cm:refProp refPropName="parent">
  287. <cm:properties>
  288. <cm:property name="searchPath"/>
  289. <cm:property name="permissions"/>
  290. <cm:property name="routingServerGroup"/>
  291. <cm:property name="repositoryRules"/>
  292. <cm:property name="tenantID"/>
  293. </cm:properties>
  294. </cm:refProp>
  295. <cm:refProp refPropName="contact">
  296. <cm:properties>
  297. <cm:property name="searchPath"/>
  298. <cm:property name="defaultName"/>
  299. <cm:property name="ancestors"/>
  300. <cm:property name="email"/>
  301. </cm:properties>
  302. </cm:refProp>
  303. <cm:refProp refPropName="dataSourceAccessAccount">
  304. <cm:properties>
  305. <cm:property name="searchPath"/>
  306. <cm:property name="defaultName"/>
  307. <cm:property name="ancestors"/>
  308. </cm:properties>
  309. </cm:refProp>
  310. <cm:refProp refPropName="owner">
  311. <cm:properties>
  312. <cm:property name="searchPath"/>
  313. <cm:property name="defaultName"/>
  314. <cm:property name="email"/>
  315. </cm:properties>
  316. </cm:refProp>
  317. <cm:refProp refPropName="target">
  318. <cm:properties>
  319. <cm:property name="searchPath"/>
  320. <cm:property name="storeID"/>
  321. <cm:property name="defaultName"/>
  322. <cm:property name="ancestors"/>
  323. <cm:property name="permissions"/>
  324. <cm:property name="parent"/>
  325. <cm:property name="documentType"/>
  326. <cm:property name="defaultPortalAction"/>
  327. <cm:property name="mostRecentEventList"/>
  328. <cm:property name="defaultOutputFormat"/>
  329. <cm:property name="executionFormat"/>
  330. <cm:property name="executionPrompt"/>
  331. <cm:property name="format"/>
  332. <cm:property name="launchableType"/>
  333. </cm:properties>
  334. </cm:refProp>
  335. <cm:refProp refPropName="base">
  336. <cm:properties>
  337. <cm:property name="searchPath"/>
  338. <cm:property name="defaultName"/>
  339. <cm:property name="ancestors"/>
  340. <cm:property name="permissions"/>
  341. <cm:property name="storeID"/>
  342. <cm:property name="defaultPortalAction"/>
  343. <cm:property name="defaultOutputFormat"/>
  344. <cm:property name="mostRecentEventList"/>
  345. </cm:properties>
  346. </cm:refProp>
  347. <cm:refProp refPropName="metadataModel">
  348. <cm:properties>
  349. <cm:property name="searchPath"/>
  350. <cm:property name="defaultName"/>
  351. <cm:property name="ancestors"/>
  352. <cm:property name="permissions"/>
  353. <cm:property name="storeID"/>
  354. </cm:properties>
  355. </cm:refProp>
  356. <cm:refProp refPropName="metadataModelPackage">
  357. <cm:properties>
  358. <cm:property name="searchPath"/>
  359. <cm:property name="defaultName"/>
  360. <cm:property name="userInterfaces"/>
  361. <cm:property name="effectiveUserCapabilities"/>
  362. <cm:property name="ancestors"/>
  363. <cm:property name="permissions"/>
  364. <cm:property name="storeID"/>
  365. </cm:properties>
  366. </cm:refProp>
  367. </cm:refProps>
  368. </cm:options>
  369. </cm:query>
  370. </xts:transform>
  371. </send:request>
  372. </xts:transform>
  373. <xsl:if test="contains(' package role group ', concat(' ', /root/env/param[@name='m_class'], ' ')) and $isAdminUser">
  374. <xsl:variable name="classFilter">[@objectClass='package' or @objectClass='group' or @objectClass='role']</xsl:variable>
  375. <xts:transform src="transforms/CM/post-process.xslt" processor="XSLT">
  376. <send:request provider="cm">
  377. <xts:transform src="transforms/CM/pre-process.xslt" processor="XSLT">
  378. <cm:query xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
  379. <cm:search>
  380. <xsl:value-of select="concat(/root/env/param[@name='m_obj'], '/ancestor::*', $classFilter)"/>
  381. </cm:search>
  382. <cm:properties>
  383. <cm:property name="routingHints"/>
  384. </cm:properties>
  385. </cm:query>
  386. </xts:transform>
  387. </send:request>
  388. </xts:transform>
  389. </xsl:if>
  390. </xts:append>
  391. <xsl:if test="/root/env/param[@name='m_class'] = 'package'">
  392. <xts:append>
  393. <packageModel>
  394. <xts:transform src="transforms/CM/post-process.xslt" processor="XSLT">
  395. <send:request provider="cm">
  396. <xts:transform src="transforms/CM/pre-process.xslt" processor="XSLT">
  397. <cm:query xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
  398. <cm:search><xsl:value-of select="concat(string(/root/env/param[@name='m_obj']),'/model[last()]')"/></cm:search>
  399. <cm:properties>
  400. <cm:property name="permissions"/>
  401. <cm:property name="options"/>
  402. </cm:properties>
  403. </cm:query>
  404. </xts:transform>
  405. </send:request>
  406. </xts:transform>
  407. </packageModel>
  408. </xts:append>
  409. </xsl:if>
  410. <xsl:variable name="useSelected">
  411. <xsl:choose>
  412. <xsl:when test="contains(string(/root/env/param[@name='so.select']),'Base') and string(/root/env/param[@name='so.searchPath'])!=''">
  413. <xsl:value-of select="/root/env/param[@name='so.searchPath']"/>
  414. </xsl:when>
  415. <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']"/>
  416. </xsl:when>
  417. <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']"/>
  418. </xsl:when>
  419. <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']"/>
  420. </xsl:when>
  421. <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']"/>
  422. </xsl:when>
  423. <xsl:when test="/root/env/param[@name='m_p_metadataModelPackage']"><xsl:value-of select="/root/env/param[@name='m_p_metadataModelPackage']"/></xsl:when>
  424. <xsl:when test="/root/env/param[@name='m_agsr_metadataModelPackage']"><xsl:value-of select="/root/env/param[@name='m_agsr_metadataModelPackage']"/></xsl:when>
  425. </xsl:choose>
  426. </xsl:variable>
  427. <xsl:if test="$useSelected!=''">
  428. <xts:append>
  429. <selected>
  430. <xts:transform src="transforms/CM/post-process.xslt" processor="XSLT">
  431. <send:request provider="cm">
  432. <xts:transform src="transforms/CM/pre-process.xslt" processor="XSLT">
  433. <cm:query xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
  434. <cm:search>
  435. <xsl:value-of select="$useSelected"/>
  436. </cm:search>
  437. <cm:properties>
  438. <cm:property name="searchPath"/>
  439. <cm:property name="defaultName"/>
  440. <cm:property name="ancestors"/>
  441. <cm:property name="permissions"/>
  442. </cm:properties>
  443. </cm:query>
  444. </xts:transform>
  445. </send:request>
  446. </xts:transform>
  447. </selected>
  448. </xts:append>
  449. <xts:delete select="/root/env/param[starts-with(@name,'so.') and @name != 'so.select']"/>
  450. <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'))">
  451. <xts:delete select="/root/env/param[@name='m_p_base' or @name='m_periodicalProducer']"/>
  452. <xts:append select="/root/env">
  453. <xsl:choose>
  454. <xsl:when test="contains(string(/root/env/param[@name='so.select']),'reportView')">
  455. <param name="m_p_base"><xsl:value-of select="/root/env/param[@name='so.searchPath']"/></param>
  456. </xsl:when>
  457. <xsl:when test="contains(string(/root/env/param[@name='so.select']),'dataMovementTaskAlias')">
  458. <param name="m_p_base"><xsl:value-of select="/root/env/param[@name='so.searchPath']"/></param>
  459. </xsl:when>
  460. <xsl:when test="contains(string(/root/env/param[@name='so.select']),'powerPlay8ReportView')">
  461. <param name="m_p_base"><xsl:value-of select="/root/env/param[@name='so.searchPath']"/></param>
  462. </xsl:when>
  463. <xsl:when test="contains(string(/root/env/param[@name='so.select']),'reportDataServiceAgentDef')">
  464. <param name="m_periodicalProducer"><xsl:value-of select="/root/env/param[@name='so.searchPath']"/></param>
  465. </xsl:when>
  466. </xsl:choose>
  467. </xts:append>
  468. </xsl:if>
  469. </xsl:if>
  470. <!-- retrieve the index information -->
  471. <xsl:if test="$userCanUseIndexSearch">
  472. <xts:append>
  473. <indexResult>
  474. <reqhelpers:request faultBlock="ignoreFaultHandler" asText="true" href="bus://dispatcher" protocol="BUS" soapAction="$indexDataService$.session" responseEnvelope="false" outputHeader="false">
  475. <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">
  476. <SOAP-ENV:Header>
  477. <xsl:copy-of select="/root/header/bus:biBusHeader"/>
  478. </SOAP-ENV:Header>
  479. <SOAP-ENV:Body>
  480. <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">
  481. <externalGUID xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bibus:guid[1]">
  482. <item>
  483. <xts:queryValue select="/root/*[local-name()='queryResponse']/*/*[local-name()='storeID']"/>
  484. </item>
  485. </externalGUID>
  486. <options xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bibus:option[2]">
  487. <item xsi:type="bibus:asynchOptionInt">
  488. <name xsi:type="bibus:asynchOptionEnum">primaryWaitThreshold</name>
  489. <value xsi:type="xsd:int">0</value>
  490. </item>
  491. </options>
  492. </ns:get>
  493. </SOAP-ENV:Body>
  494. </SOAP-ENV:Envelope>
  495. </reqhelpers:request>
  496. </indexResult>
  497. </xts:append>
  498. </xsl:if>
  499. </xts:sequence>
  500. </xsl:template>
  501. </xsl:stylesheet>
  502. </xts:block>
  503. <!-- Build the multilingual XML structure /root/multiLangs/lang -->
  504. <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">
  505. <xts:logicsheet path="logicsheets/cm-logic.xsl"/>
  506. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  507. <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/">
  508. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  509. <xsl:template match="/">
  510. <xts:sequence>
  511. <xts:append>
  512. <agentReport>
  513. <xts:transform src="transforms/CM/post-process.xslt" processor="XSLT">
  514. <send:request provider="cm">
  515. <xts:transform src="transforms/CM/pre-process.xslt" processor="XSLT">
  516. <cm:query xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
  517. <cm:search>
  518. <xsl:value-of select="concat(string(/root/env/param[@name='m_obj']),'/report')"/>
  519. </cm:search>
  520. <cm:properties>
  521. <cml:prop-general/>
  522. <cm:property name="metadataModelPackage"/>
  523. <cm:property name="metadataModel"/>
  524. </cm:properties>
  525. <cm:options schemaInfo="true">
  526. <cm:refProps>
  527. <cm:refProp refPropName="metadataModel">
  528. <cm:properties>
  529. <cm:property name="searchPath"/>
  530. <cm:property name="defaultName"/>
  531. <cm:property name="ancestors"/>
  532. <cm:property name="permissions"/>
  533. <cm:property name="storeID"/>
  534. </cm:properties>
  535. </cm:refProp>
  536. <cm:refProp refPropName="metadataModelPackage">
  537. <cm:properties>
  538. <cm:property name="searchPath"/>
  539. <cm:property name="defaultName"/>
  540. <cm:property name="ancestors"/>
  541. <cm:property name="permissions"/>
  542. <cm:property name="storeID"/>
  543. </cm:properties>
  544. </cm:refProp>
  545. </cm:refProps>
  546. </cm:options>
  547. </cm:query>
  548. </xts:transform>
  549. </send:request>
  550. </xts:transform>
  551. </agentReport>
  552. </xts:append>
  553. </xts:sequence>
  554. </xsl:template>
  555. </xsl:stylesheet>
  556. </xts:block>
  557. <!-- Build the XML structure for reportDataServiceAgentDefinition (aka subscription) or get root of subscriptionFolder-->
  558. <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">
  559. <xts:logicsheet path="logicsheets/cm-logic.xsl"/>
  560. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  561. <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/">
  562. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  563. <xsl:template match="/">
  564. <xts:sequence>
  565. <xts:append>
  566. <rdsad>
  567. <xts:transform src="transforms/CM/post-process.xslt" processor="XSLT">
  568. <send:request provider="cm">
  569. <xts:transform src="transforms/CM/pre-process.xslt" processor="XSLT">
  570. <cm:query xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
  571. <cm:requests>
  572. <cm:query xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
  573. <cm:search>
  574. <xsl:text/>~/subscriptionFolder<xsl:text/>
  575. </cm:search>
  576. <cm:properties>
  577. <cm:property name="defaultName"/>
  578. <cm:property name="searchPath"/>
  579. </cm:properties>
  580. </cm:query>
  581. <xsl:if test="root/*[local-name()='queryResponse']/*/*[local-name()='objectClass']='reportDataServiceAgentDefinition'">
  582. <cm:query xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
  583. <cm:search>
  584. <xsl:text/><xsl:value-of select="concat(/root/env/param[@name='m_obj'], '/schedule')"/><xsl:text/>
  585. </cm:search>
  586. <cm:properties>
  587. <cm:property name="defaultName"/>
  588. <cm:property name="periodicalProducer"/>
  589. <cm:property name="parent"/>
  590. </cm:properties>
  591. <cm:options schemaInfo="false">
  592. <cm:refProps>
  593. <cm:refProp refPropName="periodicalProducer">
  594. <cm:properties>
  595. <cm:property name="defaultName"/>
  596. <cm:property name="searchPath"/>
  597. <cm:property name="ancestors"/>
  598. </cm:properties>
  599. </cm:refProp>
  600. </cm:refProps>
  601. </cm:options>
  602. </cm:query>
  603. </xsl:if>
  604. </cm:requests>
  605. </cm:query>
  606. </xts:transform>
  607. </send:request>
  608. </xts:transform>
  609. </rdsad>
  610. </xts:append>
  611. </xts:sequence>
  612. </xsl:template>
  613. </xsl:stylesheet>
  614. </xts:block>
  615. <!-- Build the multilingual XML structure /root/multiLangs/lang -->
  616. <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"/>
  617. <!--
  618. ===============================================================================================
  619. getMyInfo - Personal stuff.
  620. ===============================================================================================
  621. -->
  622. <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">
  623. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  624. <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/">
  625. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  626. <xsl:key name="session-param" match="/root/session/param" use="@name"/>
  627. <xsl:template match="/">
  628. <xts:sequence>
  629. <xts:append>
  630. <myInfo>
  631. <xts:transform src="transforms/CM/post-process.xslt" processor="XSLT">
  632. <send:request provider="cm">
  633. <xts:transform src="transforms/CM/pre-process.xslt" processor="XSLT">
  634. <cm:query xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
  635. <cm:search>
  636. <xsl:choose>
  637. <xsl:when test="key('session-param', 'e_hp') and key('session-param', 'e_hp') !=''">
  638. <xsl:value-of select="key('session-param', 'e_hp')"/>
  639. </xsl:when>
  640. <xsl:otherwise>
  641. <xsl:value-of select="'~'"/>
  642. </xsl:otherwise>
  643. </xsl:choose>
  644. </cm:search>
  645. <cm:properties>
  646. <cm:property name="defaultName"/>
  647. <cm:property name="email"/>
  648. </cm:properties>
  649. <cm:options schemaInfo="true"/>
  650. </cm:query>
  651. </xts:transform>
  652. </send:request>
  653. </xts:transform>
  654. </myInfo>
  655. </xts:append>
  656. </xts:sequence>
  657. </xsl:template>
  658. </xsl:stylesheet>
  659. </xts:block>
  660. <!--
  661. ===============================================================================================
  662. getObjTenantInfo - TenantID & DefaultName from tenant object.
  663. ===============================================================================================
  664. -->
  665. <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')]">
  666. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  667. </xts:block>
  668. <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">
  669. <xts:logicsheet path="logicsheets/portal.xsl"/>
  670. <xts:logicsheet path="logicsheets/presentation/dialog/framework.xsl"/>
  671. <xts:logicsheet path="logicsheets/presentation/dialog/presentation.xsl"/>
  672. <xts:logicsheet path="logicsheets/presentation/layout.xsl"/>
  673. </xts:block>
  674. <!--
  675. ===============================================================================================
  676. getObjects - get object class names
  677. ===============================================================================================
  678. -->
  679. <xts:block id="classNames" type="exec" mode="input" processor="XML" path="/portal/uiExtensions.xml">
  680. <xts:logicsheet path="/logicsheets/uiobjects/uiobjects_names.xslt"/>
  681. </xts:block>
  682. <!--
  683. ===============================================================================================
  684. renderPage - render the page
  685. ===============================================================================================
  686. -->
  687. <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">
  688. <xts:logicsheet path="logicsheets/portal.xsl"/>
  689. <xts:logicsheet path="logicsheets/cm-logic.xsl"/>
  690. <xts:logicsheet path="logicsheets/presentation/dialog/templates.xsl"/>
  691. <xts:logicsheet path="logicsheets/presentation/dialog/framework.xsl"/>
  692. <xts:logicsheet path="logicsheets/presentation/layout.xsl"/>
  693. <xts:logicsheet path="logicsheets/presentation/dialog/presentation.xsl"/>
  694. <xts:logicsheet path="logicsheets/presentation/controls/framework.xsl"/>
  695. <xts:logicsheet path="logicsheets/presentation/controls/presentation.xsl"/>
  696. <xts:logicsheet path="logicsheets/permissions.xsl"/>
  697. <xts:logicsheet path="logicsheets/formlogic_lite.xslt"/>
  698. <xts:logicsheet path="logicsheets/validation.xslt"/>
  699. <xts:logicsheet path="logicsheets/presentation/touch_up.xslt"/>
  700. <xsl:stylesheet version="1.0"
  701. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  702. xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
  703. xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
  704. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  705. xmlns:xts="http://developer.cognos.com/schemas/xts/"
  706. xmlns:lyt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/layout/"
  707. xmlns:dt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/templates/"
  708. xmlns:dp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/presentation/"
  709. xmlns:df="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/framework/"
  710. xmlns:cf="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/framework/"
  711. xmlns:cp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/presentation/"
  712. xmlns:utml="http://developer.cognos.com/schemas/xts/logicsheet/xslt/formlogic/"
  713. xmlns:bus="http://developer.cognos.com/schemas/bibus/3/"
  714. xmlns:pm="http://developer.cognos.com/schemas/xts/pm"
  715. exclude-result-prefixes="bus pf xts dt xsl cf cp df dp lyt cm utml pm xtsext">
  716. <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no" omit-xml-declaration="yes"/>
  717. <xsl:variable name="mname" select="'properties_general.xts'"/>
  718. <pf:variables/>
  719. <pf:common-bidi-templates/>
  720. <pf:documentFormats/>
  721. <pf:gen-icon/>
  722. <xsl:variable name="the-object" select="/root/cm:queryResponse/*"/>
  723. <!-- we're looking at a subscriptionFolder or reportDataServiceAgentDefinition -->
  724. <xsl:variable name="isRDSAD" select="/root/rdsad"/>
  725. <!-- path to reportDataServiceAGentDefinition (subscription) namely periodicalProducer-->
  726. <xsl:variable name="rdsad-path" select="/root/rdsad/*/*/cm:schedule"/>
  727. <!-- variable used for reportCache values -->
  728. <xsl:variable name="maxDurationReportCache" select="$the-object/*[local-name()='retentions']/*[local-name()='retentionRule'][@objectClass='reportCache']/@maxDuration"/>
  729. <xsl:variable name="start-at-path">
  730. <xsl:choose>
  731. <xsl:when test="$isRDSAD">
  732. <xsl:value-of select="/root/rdsad/*/*/cm:subscriptionFolder/cm:searchPath"/>
  733. </xsl:when>
  734. <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')))">
  735. <xsl:value-of select="concat(key('session-param', 'e_hp'),'/folder')"/>
  736. </xsl:when>
  737. <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')))">
  738. <xsl:value-of select="concat(key('session-param', 'e_hp'),'/dataSetFolder')"/>
  739. </xsl:when>
  740. <xsl:when test="starts-with($the-object/cm:searchPath,'/content')">
  741. <xsl:value-of select="$defaultContentRoot"/>
  742. </xsl:when>
  743. </xsl:choose>
  744. </xsl:variable>
  745. <cp:flyoutControl/>
  746. <xsl:variable name="has_write_permission" select="contains(/root/cm:queryResponse/*/cm:permissions, 'write')"/>
  747. <xsl:variable name="has_write_permission_to_agentReport" select="contains(/root/agentReport/cm:queryResponse/*/cm:permissions, 'write')"/>
  748. <xsl:variable name="has_read_permission" select="contains(/root/cm:queryResponse/*/cm:permissions, 'read')"/>
  749. <xsl:variable name="has_policy_permission" select="contains(/root/cm:queryResponse/*/cm:permissions, 'setPolicy')"/>
  750. <xsl:variable name="has_traverse_permission" select="contains(/root/cm:queryResponse/*/cm:permissions, 'traverse')"/>
  751. <xsl:variable name="parent_is_public" select="$the-object/cm:parent/*/cm:tenantID=''"/>
  752. <xsl:variable name="theObjectName" select="string($the-object/cm:defaultName)"/>
  753. <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=''"/>
  754. <xsl:variable name="browserTitle">
  755. <xts:string id="IDS_PROPERTIES_TITLE">
  756. <xts:param name="objectName">
  757. <span lang="{$contentLocale}"><xsl:value-of select="xtsext:enforceBTD($theObjectName, $baseTextDirection, $productLocale, boolean($isBidiEnabled='true'))"/></span>
  758. </xts:param>
  759. </xts:string>
  760. </xsl:variable>
  761. <xsl:variable name="default-product-locale">
  762. <!-- TODO: IS IT CORRECT TO GET THIS FROM THE HTTP HEADER... -->
  763. <!--xsl:value-of select="translate(string($contentLocale), 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz' )"/-->
  764. <xsl:value-of select="$contentLocale"/>
  765. </xsl:variable>
  766. <!-- 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)-->
  767. <xsl:variable name="isReadOnly">
  768. <xsl:choose>
  769. <xsl:when test="$has_write_permission and $noUserProfile!=true()">false</xsl:when>
  770. <xsl:otherwise>true</xsl:otherwise>
  771. </xsl:choose>
  772. </xsl:variable>
  773. <xsl:variable name="rootFolder" select="key('session-param','e_proot')='' and key('session-param','e_mroot')=''"/>
  774. <xsl:variable name="compareField">
  775. <xsl:choose>
  776. <xsl:when test="/root/cm:queryResponse/*/cm:defaultName[@modifiable = 'true']">m_t_default_name_</xsl:when>
  777. <xsl:when test="/root/cm:queryResponse/*/cm:defaultDescription[@modifiable = 'true']">m_t_default_description_</xsl:when>
  778. <xsl:when test="/root/cm:queryResponse/*/cm:defaultScreenTip[@modifiable = 'true']">m_t_default_screenTip_</xsl:when>
  779. <xsl:otherwise>noDefaultField</xsl:otherwise>
  780. </xsl:choose>
  781. </xsl:variable>
  782. <xsl:variable name="lg" select="/root/env/param[starts-with(@name,$compareField)]"/>
  783. <xsl:variable name="rootDefault" select="/root/multiLangs/useLangAsDefault"/>
  784. <xsl:variable name="lang">
  785. <xsl:choose>
  786. <xsl:when test="key('env-param','pty_activeLang')!=''"><xsl:value-of select="key('env-param','pty_activeLang')"/></xsl:when>
  787. <xsl:when test="$rootDefault != 'NOMATCH'"><xsl:value-of select="$rootDefault"/></xsl:when>
  788. <xsl:otherwise><xsl:value-of select="/root/multiLangs/name[position()=1]"/></xsl:otherwise>
  789. </xsl:choose>
  790. </xsl:variable>
  791. <xsl:variable name="activeLang">
  792. <xsl:choose>
  793. <xsl:when test="string(key('env-param','pty_activeLang'))!=''"><xsl:value-of select="key('env-param','pty_activeLang')"/></xsl:when>
  794. <xsl:when test="string(key('env-param','pty_del')) != ''"><xsl:value-of select="$lang"/></xsl:when>
  795. </xsl:choose>
  796. </xsl:variable>
  797. <xsl:variable name="showOKCancel" select="($has_write_permission or $has_policy_permission) and $noUserProfile!=true()"/>
  798. <!-- The objects (eg., reportView) base object -->
  799. <xsl:variable name="base" select="$the-object/cm:base/*"/>
  800. <!-- The objects (eg., shortcut) target object -->
  801. <xsl:variable name="target" select="$the-object/cm:target/*"/>
  802. <xsl:variable name="objectHiddenProperty" select="$the-object/cm:hidden"/>
  803. <xsl:variable name="uiClass" select="$the-object/cm:objectClass"/>
  804. <xsl:variable name="objClass">
  805. <xsl:choose>
  806. <xsl:when test="$target and $target/cm:objectClass!='nil'">
  807. <xsl:value-of select="$target/cm:objectClass"/>
  808. </xsl:when>
  809. <xsl:otherwise>
  810. <xsl:value-of select="$uiClass"/>
  811. </xsl:otherwise>
  812. </xsl:choose>
  813. </xsl:variable>
  814. <xsl:variable name="launchableType">
  815. <xsl:choose>
  816. <xsl:when test="$target and $target/cm:launchableType!='nil'">
  817. <xsl:value-of select="$target/cm:launchableType"/>
  818. </xsl:when>
  819. <xsl:otherwise>
  820. <xsl:value-of select="$the-object/cm:launchableType"/>
  821. </xsl:otherwise>
  822. </xsl:choose>
  823. </xsl:variable>
  824. <xsl:variable name="showHideEntry" select="$userCanUseShowHiddenObjectsPreferenceCapability='true' and $objectHiddenProperty and /root/objectClass/class[@name=$objClass and string(@canHide)!='false'] and $has_read_permission"/>
  825. <xsl:variable name="chkSpaceEnterKeyEvent">if (event.keyCode==13 || event.keyCode==32 || event.charCode==32)</xsl:variable>
  826. <!-- start the output -->
  827. <xsl:template match="/root">
  828. <xsl:text disable-output-escaping='yes'>&lt;!DOCTYPE html></xsl:text><dp:page longTitle="$browserTitle" class="tundra">
  829. <dp:meta>
  830. <pf:meta/>
  831. </dp:meta>
  832. <pf:script/>
  833. <dp:script>
  834. <script src="{$webRoot}/dojo16/dojo/dojo.js"/>
  835. <link id="themeStyles" rel="stylesheet" href="{$webcontent}/../dojo16/dijit/themes/tundra/tundra.css"/>
  836. <script language="javascript" src="{$webcontent}/{$app}/js/CCflyoutMenu.js"/>
  837. <script language="javascript" src="{$webcontent}/{$app}/js/utilities.js"/>
  838. <script language="javascript">
  839. function removeUCCFromStr(str)
  840. {
  841. if (typeof bidi != "undefined" &amp;&amp; typeof bidi["removeUCCFromStr"] != "undefined")
  842. {
  843. return bidi.removeUCCFromStr(str);
  844. }
  845. else
  846. {
  847. return str;
  848. }
  849. }
  850. </script>
  851. <pf:help context="HID_PROPERTIES"/>
  852. <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') = '')">
  853. <script language="javascript">
  854. <!-- cwb - Cancel When Back - there are no stack pages. -->
  855. function cwb()
  856. {
  857. <!-- Reset the hHints before cancelling the page -->
  858. clearSessionEntry('hHints');
  859. location.href = "<xsl:value-of select="xtsext:javascriptencode(string(/root/env/param[@name='backURL']))"/>";
  860. }
  861. </script>
  862. </xsl:if>
  863. <xsl:if test="($has_read_permission or $has_write_permission) and $noUserProfile!=true()">
  864. <script language="javascript">
  865. function getPropertiesChanged()
  866. {
  867. 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;
  868. }
  869. function redirect(cmd)
  870. {
  871. if (window.resetPageState)
  872. {
  873. resetPageState();
  874. }
  875. if( cmd == 'undefined' || cmd == null )
  876. {
  877. <xsl:choose>
  878. <xsl:when test="$the-object/cm:base">
  879. 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')"/>";
  880. </xsl:when>
  881. <xsl:when test="$the-object/cm:target and ($the-object/cm:target/*/cm:objectClass='output' or $the-object/cm:target/*/cm:objectClass='documentContent')">
  882. 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')"/>";
  883. </xsl:when>
  884. <xsl:when test="$the-object/cm:target">
  885. 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')"/>";
  886. </xsl:when>
  887. </xsl:choose>
  888. }
  889. <xsl:if test="$has_write_permission">
  890. else if( cmd == 'save' )
  891. {
  892. setFormInputElement("m","<xsl:value-of select="xtsext:javascriptencode($app)"/>/submit.xts");
  893. setFormInputElement("ps-nav-op","maintain");
  894. setFormInputElement("redirect.m","<xsl:value-of select="xtsext:javascriptencode($app)"/>/<xsl:value-of select="$mname"/>");
  895. setFormInputElement("redirect.b_action","xts.run");
  896. <xsl:choose>
  897. <xsl:when test="$the-object/cm:base">
  898. <xsl:choose>
  899. <xsl:when test="string(key('env-param','m_p_base'))=''">
  900. setFormInputElement("redirect.m_name","<xsl:value-of select="xtsext:javascriptencode(string($base/cm:defaultName))"/>");
  901. setFormInputElement("redirect.m_class","<xsl:value-of select="xtsext:javascriptencode(string($base/cm:objectClass))"/>");
  902. setFormInputElement("redirect.m_obj","<xsl:value-of select="xtsext:javascriptencode(string($base/cm:searchPath))"/>");
  903. </xsl:when>
  904. <xsl:otherwise>
  905. setFormInputElement("redirect.m_name","<xsl:value-of select="xtsext:javascriptencode(string(/root/selected/cm:queryResponse/*/cm:defaultName))"/>");
  906. setFormInputElement("redirect.m_class","<xsl:value-of select="xtsext:javascriptencode(string(/root/selected/cm:queryResponse/*/cm:objectClass))"/>");
  907. setFormInputElement("redirect.m_obj","<xsl:value-of select="xtsext:javascriptencode(string(/root/selected/cm:queryResponse/*/cm:searchPath))"/>");
  908. </xsl:otherwise>
  909. </xsl:choose>
  910. </xsl:when>
  911. <xsl:when test="$the-object/cm:target">
  912. setFormInputElement("redirect.m_name","<xsl:value-of select="xtsext:javascriptencode(string($target/cm:defaultName))"/>");
  913. setFormInputElement("redirect.m_class","<xsl:value-of select="xtsext:javascriptencode(string($target/cm:objectClass))"/>");
  914. setFormInputElement("redirect.m_obj","<xsl:value-of select="xtsext:javascriptencode(string($target/cm:searchPath))"/>");
  915. </xsl:when>
  916. </xsl:choose>
  917. setFormInputElement("redirect.backURL","<xsl:value-of select="xtsext:javascriptencode(string(key('env-param', 'backURL')))"/>");
  918. document.pform.submit();
  919. }
  920. </xsl:if>
  921. }
  922. </script>
  923. </xsl:if>
  924. <xsl:if test="$has_write_permission and $noUserProfile!=true()">
  925. <script language="javascript">
  926. var MSG_NEED_ONE_NAME = "<xts:string id="IDS_PROP_NEED_ONE_NAME" encode="javascript"/>";
  927. var MSG_NEED_ONE_NAME_CANT_REMOVE = "<xts:string id="IDS_PROP_NEED_ONE_NAME_CANT_REMOVE" encode="javascript"/>";
  928. var curLang = "<xsl:text/><xsl:value-of select="xtsext:javascriptencode(string($lang))"/>";
  929. function removeLang()
  930. {
  931. if( !validate() )
  932. return;
  933. if( hasAName(null,true) == true )
  934. {
  935. 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)
  936. {
  937. if( document.pform['pty_desc'] )
  938. document.pform['pty_desc'].value = "";
  939. if( document.pform['pty_scrt'] )
  940. document.pform['pty_scrt'].value = "";
  941. }
  942. else
  943. {
  944. document.pform['pty_deactivLang'].value = document.pform['m_transloc'].options[document.pform['m_transloc'].selectedIndex].value;
  945. document.body.style.cursor = "wait";
  946. clearView();
  947. if( document.pform['m_transloc'] )
  948. document.pform['m_transloc'].disabled = true;
  949. if( document.pform['pty_name'] )
  950. document.pform['pty_name'].disabled=true;
  951. if( document.pform['pty_desc'] )
  952. document.pform['pty_desc'].disabled=true;
  953. if( document.pform['pty_scrt'] )
  954. document.pform['pty_scrt'].disabled=true;
  955. setPropertiesChanged();
  956. document.pform['pty_del'].value = "1";
  957. document.pform['pty_add'].value = "";
  958. document.pform['pty_activeLang'].value = "";
  959. document.pform.ps_nav_op.value = "maintain";
  960. document.pform.m.value = "<xsl:value-of select="concat($app,'/',$mname)"/>";
  961. document.pform.submit();
  962. }
  963. }
  964. else
  965. {
  966. alert(MSG_NEED_ONE_NAME_CANT_REMOVE);
  967. }
  968. }
  969. function anyNames(namVal)
  970. {
  971. if( hasAName(namVal,false) == false )
  972. {
  973. alert(MSG_NEED_ONE_NAME);
  974. }
  975. if (document.pform['m_t_default_name_'+curLang] != null) {
  976. document.pform['m_t_default_name_'+curLang].value = namVal;
  977. }
  978. if(namVal!="")
  979. setPropertiesChanged();
  980. }
  981. function hasAName(namVal, remove)
  982. {
  983. <!--
  984. This javascript function checks to make sure that there are values for the name entry
  985. for all the currently active languages.
  986. -->
  987. if (document.pform['ro_name'].value == 'true')
  988. {
  989. if (remove) {
  990. if( document.pform['origDefLang'].value != "" &amp;&amp; document.pform['origDefLang'].value == document.pform['m_transloc'].options[document.pform['m_transloc'].selectedIndex].value)
  991. {
  992. if ( document.pform['pty_keep'] )
  993. {
  994. return true;
  995. }
  996. return false;
  997. }
  998. }
  999. return true;
  1000. }
  1001. var valCnt = 0;
  1002. var entCnt = 0;
  1003. for( i=0; i &lt; document.pform['m_transloc'].options.length; i++ )
  1004. {
  1005. if( document.pform['m_t_default_name_'+document.pform['m_transloc'].options[i].value])
  1006. {
  1007. entCnt += 1;
  1008. if( document.pform['m_t_default_name_'+document.pform['m_transloc'].options[i].value].value != '' )
  1009. valCnt += 1;
  1010. }
  1011. }
  1012. if( valCnt > 1)
  1013. {
  1014. return true;
  1015. }
  1016. else
  1017. {
  1018. if( entCnt == 1)
  1019. {
  1020. <!-- Only 1 entry so cannot be blank -->
  1021. if( namVal )
  1022. {
  1023. if( namVal == "")
  1024. return false;
  1025. }
  1026. else
  1027. { <!-- Should never have this condition... but leave it here for good measure!!! -->
  1028. if( document.pform['pty_name'] &amp;&amp; document.pform['pty_name'].value == "" )
  1029. {
  1030. return false;
  1031. }
  1032. }
  1033. return true;
  1034. }
  1035. else
  1036. {
  1037. var optVal = document.pform['m_transloc'].options[document.pform['m_transloc'].selectedIndex].value;
  1038. <!-- Condition when user has changed the contents of the Name: field -->
  1039. if( namVal )
  1040. {
  1041. if( namVal == "" )
  1042. {
  1043. if( (valCnt == 0) || (valCnt == 1 &amp;&amp; document.pform['m_t_default_name_'+optVal].value != ""))
  1044. {
  1045. return false;
  1046. }
  1047. }
  1048. }
  1049. else
  1050. {
  1051. <!-- multiple entries but none of which has a value! -->
  1052. if (valCnt == 0 ) {
  1053. return false;
  1054. }
  1055. <!-- Condition when removing a language from the dropdown list and it is the only one with a value -->
  1056. if (remove &amp;&amp; valCnt == 1 &amp;&amp; document.pform['m_t_default_name_'+optVal].value != "")
  1057. {
  1058. return false;
  1059. }
  1060. }
  1061. return true;
  1062. }
  1063. }
  1064. }
  1065. function checkLang(x)
  1066. {
  1067. <!--
  1068. This javascript function checks to see if the language exists in the top part of the list (entries before the
  1069. delimiter line) or if we need to do a reload to create m_t_default* hidden input entries for the new value.
  1070. -->
  1071. <!-- What is the current selected language. -->
  1072. var selectedLang = x.options[x.selectedIndex].value;
  1073. <!-- The value, "not", is for the delimiter line. If it is selected, then force the view back to the top of the list -->
  1074. if (selectedLang == "not")
  1075. {
  1076. x.options[x.selectedIndex].selected = false;
  1077. x.options[0].selected = true;
  1078. selectedLang = x.options[0].value;
  1079. }
  1080. <!-- set focus to the name so that the user cannot use the scroll wheel on a mouse and screw stuff up -->
  1081. if( document.pform['pty_name'] )
  1082. {
  1083. document.pform['pty_name'].focus();
  1084. }
  1085. else
  1086. {
  1087. if( document.pform['pty_scrt'] )
  1088. {
  1089. document.pform['pty_scrt'].focus();
  1090. }
  1091. else
  1092. {
  1093. if( document.pform['pty_desc'] )
  1094. document.pform['pty_desc'].focus();
  1095. }
  1096. }
  1097. <xsl:if test="$compareField != 'noDefaultField'">
  1098. setForm();
  1099. <!-- We have a language that is available in the top of the list, so use what's available locally. -->
  1100. if( document.pform['<xsl:value-of select="xtsext:javascriptencode(string($compareField))"/>'+ selectedLang])
  1101. {
  1102. setView();
  1103. document.pform['pty_del'].value = "";
  1104. document.pform['pty_add'].value = "";
  1105. document.pform['pty_activeLang'].value = selectedLang;
  1106. curLang = selectedLang;
  1107. }
  1108. else
  1109. {
  1110. <!-- There is no locally available language entry, so go off and create the new one-->
  1111. <!-- Visual indicator that something is going on -->
  1112. document.body.style.cursor = "wait";
  1113. clearView();
  1114. if( document.pform['m_transloc'] )
  1115. document.pform['m_transloc'].disabled = true;
  1116. if( document.pform['pty_name'] )
  1117. document.pform['pty_name'].disabled = true;
  1118. if( document.pform['pty_desc'] )
  1119. document.pform['pty_desc'].disabled = true;
  1120. if( document.pform['pty_scrt'] )
  1121. document.pform['pty_scrt'].disabled = true;
  1122. document.pform['pty_del'].value = "";
  1123. document.pform['pty_add'].value = "1";
  1124. document.pform['pty_activeLang'].value = selectedLang;
  1125. document.pform.ps_nav_op.value = "maintain";
  1126. document.pform.m.value = "<xsl:value-of select="concat($app,'/',$mname)"/>";
  1127. document.pform.submit();
  1128. }
  1129. </xsl:if>
  1130. }
  1131. function chgD(val)
  1132. {
  1133. document.pform['m_t_default_description_'+curLang].value = val;
  1134. setPropertiesChanged();
  1135. }
  1136. function chgST(val)
  1137. {
  1138. document.pform['m_t_default_screenTip_'+curLang].value = val;
  1139. setPropertiesChanged();
  1140. }
  1141. function setPropertiesChanged()
  1142. {
  1143. document.pform['changed_genprop'].value='1';
  1144. }
  1145. function clearView()
  1146. {
  1147. <!-- Clear out the display fields. -->
  1148. var updateBTD = isBidiEnabled &amp;&amp; (bidi.baseTextDirection == 'auto');
  1149. if( document.pform['pty_name'] ){
  1150. document.pform['pty_name'].value = "";
  1151. if (updateBTD){
  1152. document.pform['pty_name'].dir = bidi.resolveStrBtd("");
  1153. }
  1154. }
  1155. if( document.pform['pty_desc'] ){
  1156. document.pform['pty_desc'].value = "";
  1157. if (updateBTD){
  1158. document.pform['pty_desc'].dir = bidi.resolveStrBtd("");
  1159. }
  1160. }
  1161. if( document.pform['pty_scrt'] ){
  1162. document.pform['pty_scrt'].value = "";
  1163. if (updateBTD){
  1164. document.pform['pty_scrt'].dir = bidi.resolveStrBtd("");
  1165. }
  1166. }
  1167. }
  1168. function setForm()
  1169. {
  1170. <!-- Load what is currently displayed in the fields into the appropriate hidden fields. -->
  1171. if( document.pform['pty_name'] )
  1172. document.pform['m_t_default_name_'+curLang].value = document.pform['pty_name'].value;
  1173. if( document.pform['pty_desc'] )
  1174. document.pform['m_t_default_description_'+curLang].value = document.pform['pty_desc'].value;
  1175. if( document.pform['pty_scrt'] )
  1176. document.pform['m_t_default_screenTip_'+curLang].value = document.pform['pty_scrt'].value;
  1177. }
  1178. function setView()
  1179. {
  1180. <!-- Load what is currently in the hidden selected languages fields into the appropriate display fields. -->
  1181. var updateBTD = isBidiEnabled &amp;&amp; (bidi.baseTextDirection == 'auto');
  1182. var selectedLang = document.pform['m_transloc'].options[document.pform['m_transloc'].selectedIndex].value;
  1183. if( document.pform['pty_name'] ){
  1184. document.pform['pty_name'].value = document.pform['m_t_default_name_'+ selectedLang].value;
  1185. if (updateBTD){
  1186. document.pform['pty_name'].dir = bidi.resolveStrBtd(document.pform['pty_name'].value);
  1187. }
  1188. }
  1189. if( document.pform['pty_desc'] ){
  1190. document.pform['pty_desc'].value = document.pform['m_t_default_description_'+ selectedLang].value;
  1191. if (updateBTD){
  1192. document.pform['pty_desc'].dir = bidi.resolveStrBtd(document.pform['pty_desc'].value);
  1193. }
  1194. }
  1195. if( document.pform['pty_scrt'] ){
  1196. document.pform['pty_scrt'].value = document.pform['m_t_default_screenTip_'+ selectedLang].value;
  1197. if (updateBTD){
  1198. document.pform['pty_scrt'].dir = bidi.resolveStrBtd(document.pform['pty_scrt'].value);
  1199. }
  1200. }
  1201. }
  1202. function init()
  1203. {
  1204. <!-- Load up the display language -->
  1205. <!-- alert(document.pform['pty_activeLang'].value); -->
  1206. if( document.pform['pty_activeLang'] &amp;&amp; document.pform['pty_activeLang'].value == "")
  1207. {
  1208. document.pform['pty_activeLang'].value = document.pform['m_transloc'].options[document.pform['m_transloc'].selectedIndex].value;
  1209. setView();
  1210. }
  1211. else
  1212. {
  1213. <!-- Do not load the values for display if the fields is currently being deleted -->
  1214. <xsl:if test="string(key('env-param','pty_del'))!=''">
  1215. setView();
  1216. </xsl:if>
  1217. }
  1218. if( document.pform['pty_name'] &amp;&amp; document.pform['pty_name'].value == '' )
  1219. {
  1220. try{
  1221. document.pform['pty_name'].focus();
  1222. }catch(e){
  1223. //it is possible the when this control is rendered in a modal dialog that the control
  1224. //is not yet visible...hence we get here...just try again in a few moments
  1225. setTimeout("try{document.pform['pty_name'].focus()}catch(e){}", 11);
  1226. }
  1227. }
  1228. document.pform['pty_add'].value="";
  1229. document.pform['pty_del'].value="";
  1230. if (document.pform.maxNumber_history)
  1231. {
  1232. if (document.pform.rg_retention_history[0].checked)
  1233. {
  1234. document.pform.maxNumber_history.disabled = false;
  1235. }
  1236. else
  1237. {
  1238. document.pform.duration_history.disabled = false;
  1239. }
  1240. }
  1241. if (document.pform.maxNumber_reportVersion)
  1242. {
  1243. if (document.pform.rg_retention_reportVersion[0].checked)
  1244. {
  1245. document.pform.maxNumber_reportVersion.disabled = false;
  1246. }
  1247. else
  1248. {
  1249. document.pform.duration_reportVersion.disabled = false;
  1250. }
  1251. }
  1252. //Report any save errors
  1253. if (document.pform.cmdErrorMessage)
  1254. {
  1255. if (document.pform.cmdErrorMessage.value != '')
  1256. {
  1257. alert(document.pform.cmdErrorMessage.value);
  1258. document.pform.cmdErrorMessage.value='';
  1259. }
  1260. }
  1261. }
  1262. <xsl:if test="$has_write_permission">
  1263. function settrans()
  1264. {
  1265. <!--
  1266. Used by this morphlet in the block (updateEnv) to remove the m_p_default... entries, so that on
  1267. return from properties_multilingual the cm:query is executed to retrieve the latest information.
  1268. -->
  1269. document.pform.toMultilingual.value = '1';
  1270. }
  1271. </xsl:if>
  1272. function validate()
  1273. {
  1274. if( hasAName(null,false) == false ){
  1275. alert(MSG_NEED_ONE_NAME);
  1276. return false;
  1277. }
  1278. if(document.pform.h_CAM_action)
  1279. document.pform.h_CAM_action.value='generateTC';
  1280. if (document.pform.m_p_uri)
  1281. {
  1282. if ( trim(document.pform.m_p_uri.value) == "" )
  1283. {
  1284. document.pform.m_p_uri.focus();
  1285. alert("<xts:string id="IDS_PROP_ERR_NO_URI" encode="javascript"/>");
  1286. return false;
  1287. }
  1288. }
  1289. if (document.pform.m_p_archiveLocation_uri)
  1290. {
  1291. if ( trim(document.pform.m_p_archiveLocation_uri.value) == "" )
  1292. {
  1293. document.pform.m_p_archiveLocation_uri.focus();
  1294. alert("<xts:string id="IDS_PROP_ERR_NO_URI" encode="javascript"/>");
  1295. return false;
  1296. }
  1297. }
  1298. // if retention for runHistory is present on the page validate the values
  1299. if (document.pform.maxNumber_history)
  1300. {
  1301. if (document.pform.rg_retention_history[0].checked)
  1302. {
  1303. document.pform.maxNumber_history.value = trim(document.pform.maxNumber_history.value);
  1304. if(validate_positiveIntegerOrZeroProp(document.pform.maxNumber_history)==false)
  1305. return false;
  1306. }
  1307. else
  1308. {
  1309. document.pform.duration_history.value = trim(document.pform.duration_history.value);
  1310. if(validate_positiveIntegerProp(document.pform.duration_history)==false)
  1311. return false;
  1312. }
  1313. }
  1314. // if retention for reportVersion is present on the page then validate the values
  1315. if (document.pform.maxNumber_reportVersion)
  1316. {
  1317. if (document.pform.rg_retention_reportVersion[0].checked)
  1318. {
  1319. document.pform.maxNumber_reportVersion.value = trim(document.pform.maxNumber_reportVersion.value);
  1320. if(validate_positiveIntegerOrZeroProp(document.pform.maxNumber_reportVersion)==false)
  1321. return false;
  1322. }
  1323. else
  1324. {
  1325. document.pform.duration_reportVersion.value = trim(document.pform.duration_reportVersion.value);
  1326. if(validate_positiveIntegerProp(document.pform.duration_reportVersion)==false)
  1327. return false;
  1328. }
  1329. }
  1330. // if retention for documentVersion is present on the page then validate the values
  1331. if (document.pform.maxNumber_documentVersion)
  1332. {
  1333. if (document.pform.rg_retention_documentVersion[0].checked)
  1334. {
  1335. document.pform.maxNumber_documentVersion.value = trim(document.pform.maxNumber_documentVersion.value);
  1336. if(validate_positiveIntegerOrZeroProp(document.pform.maxNumber_documentVersion)==false)
  1337. return false;
  1338. }
  1339. else
  1340. {
  1341. document.pform.duration_documentVersion.value = trim(document.pform.duration_documentVersion.value);
  1342. if(validate_positiveIntegerProp(document.pform.duration_documentVersion)==false)
  1343. return false;
  1344. }
  1345. }
  1346. return true;
  1347. }
  1348. function makeOwner()
  1349. {
  1350. if( !validate() )
  1351. return;
  1352. document.pform.m_p_owner.value = '<xsl:value-of select="xtsext:javascriptencode(string(key('session-param', 'e_hp')))"/>';
  1353. document.pform.changed_m_p_owner.value = '1';
  1354. document.pform.m.value = '<xsl:value-of select="concat($app,'/',$mname)"/>';
  1355. document.pform.ps_nav_op.value= 'maintain';
  1356. document.pform.m_class.value = '<xsl:value-of select="xtsext:javascriptencode(string(key('env-param','m_class')))"/>';
  1357. document.pform.submit();
  1358. }
  1359. <!-- Make sure the value is a positive integer (1,2,...) -->
  1360. function validate_positiveIntegerProp(e)
  1361. {
  1362. if (e.value &lt; 1 || isNaN(e.value) || parseInt(e.value, 10) != e.value)
  1363. {
  1364. window.alert("<xts:string id="IDS_ERR_POSITIVE" encode="javascript"/>");
  1365. e.focus();
  1366. return false;
  1367. }
  1368. }
  1369. <!-- Make sure the value is a positive integer or 0 (0,1,2,...) -->
  1370. function validate_positiveIntegerOrZeroProp(e)
  1371. {
  1372. if (e.value &lt; 0 || isNaN(e.value) || parseInt(e.value, 10) != e.value)
  1373. {
  1374. window.alert("<xts:string id="IDS_ERR_NON_NEGATIVE" encode="javascript"/>");
  1375. e.focus();
  1376. return false;
  1377. }
  1378. }
  1379. </script>
  1380. </xsl:if>
  1381. </dp:script>
  1382. <utml:form id="theForm" name="pform" method="post" action="{$gateway}">
  1383. <utml:exclude-prefix>m_t_default_</utml:exclude-prefix>
  1384. <utml:excludes>m_p_metadataModel</utml:excludes>
  1385. <utml:excludes>m_p_metadataModelPackage</utml:excludes>
  1386. <utml:excludes>m_agsr_metadataModelPackage</utml:excludes>
  1387. <utml:excludes>emailAddress</utml:excludes>
  1388. <utml:excludes>selectedTenantName</utml:excludes>
  1389. <utml:read-only>
  1390. <xsl:value-of select="$isReadOnly"/>
  1391. </utml:read-only>
  1392. <xsl:if test="not($has_write_permission)">
  1393. <utml:input type="hidden" name="m_return" value=""/>
  1394. </xsl:if>
  1395. <!--
  1396. The following hidden variables need only be defined when user has write permission.
  1397. -->
  1398. <xsl:if test="$has_write_permission and $noUserProfile!=true()">
  1399. <!--
  1400. owner processing variables.
  1401. -->
  1402. <xsl:if test="contains(' analysis interactiveReport report reportView query ', concat(' ', $the-object/cm:objectClass, ' '))">
  1403. <utml:input type="hidden" name="rg_retention_reportCache">
  1404. <xsl:attribute name="value">
  1405. <xsl:value-of select="$maxDurationReportCache"/>
  1406. </xsl:attribute>
  1407. </utml:input>
  1408. <utml:input type="hidden" name="duration_reportCache">
  1409. <xsl:attribute name="value">
  1410. <xsl:choose>
  1411. <xsl:when test="contains($maxDurationReportCache, 'D')">
  1412. <xsl:value-of select="substring-before(substring-after($maxDurationReportCache,'P'),'D')"/>
  1413. </xsl:when>
  1414. <xsl:when test="contains($maxDurationReportCache, 'M')">
  1415. <xsl:value-of select="substring-before(substring-after($maxDurationReportCache,'P'),'M')"/>
  1416. </xsl:when>
  1417. </xsl:choose>
  1418. </xsl:attribute>
  1419. </utml:input>
  1420. <utml:input type="hidden" name="durationSelect_reportCache">
  1421. <xsl:attribute name="value">
  1422. <xsl:choose>
  1423. <xsl:when test="contains($maxDurationReportCache, 'D')">
  1424. <xsl:value-of select="'days'"/>
  1425. </xsl:when>
  1426. <xsl:when test="contains($maxDurationReportCache, 'M')">
  1427. <xsl:value-of select="'months'"/>
  1428. </xsl:when>
  1429. </xsl:choose>
  1430. </xsl:attribute>
  1431. </utml:input>
  1432. </xsl:if>
  1433. <utml:input type="hidden" name="m_p_owner" value=""/>
  1434. <utml:input type="hidden" name="changed_m_p_owner" value="0"/>
  1435. <utml:input type="hidden" name="changed_genprop" value="0"/>
  1436. <utml:input type="hidden" name="so.select" value="" utml:update="false"/>
  1437. <utml:input id="soReturnM" type="hidden" name="so.return.m" utml:update="false">
  1438. <xsl:attribute name="value">
  1439. <xsl:value-of select="concat($app,'/',$mname)"/>
  1440. </xsl:attribute>
  1441. </utml:input>
  1442. <utml:input type="hidden" name="so.defaultLocation" value="" utml:update="false"/>
  1443. <utml:input type="hidden" name="so.defaultObject" value="" utml:update="false"/>
  1444. <utml:input type="hidden" name="ro_name">
  1445. <xsl:attribute name="value">
  1446. <xsl:choose>
  1447. <xsl:when test="$the-object/cm:defaultName[@modifiable = 'false']">true</xsl:when>
  1448. <xsl:otherwise>false</xsl:otherwise>
  1449. </xsl:choose>
  1450. </xsl:attribute>
  1451. </utml:input>
  1452. <utml:input type="hidden" name="origDefLang">
  1453. <xsl:attribute name="value">
  1454. <xsl:if test="string(/root/multiLangs/useLangAsDefault) != 'NOMATCH'">
  1455. <xsl:value-of select="/root/multiLangs/useLangAsDefault"/>
  1456. </xsl:if>
  1457. </xsl:attribute>
  1458. </utml:input>
  1459. <utml:input type="hidden" name="m_email">
  1460. <xsl:attribute name="value">
  1461. <xsl:choose>
  1462. <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>
  1463. <xsl:when test="key('env-param','m_email')"><xsl:value-of select="key('env-param','m_email')"/></xsl:when>
  1464. </xsl:choose>
  1465. </xsl:attribute>
  1466. </utml:input>
  1467. <utml:input type="hidden" name="m_defaultName">
  1468. <xsl:attribute name="value">
  1469. <xsl:choose>
  1470. <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>
  1471. <xsl:when test="key('env-param','m_defaultName')"><xsl:value-of select="key('env-param','m_defaultName')"/></xsl:when>
  1472. </xsl:choose>
  1473. </xsl:attribute>
  1474. </utml:input>
  1475. <xsl:choose>
  1476. <xsl:when test="not(/root/env/param[starts-with(@name,'m_t_default')])">
  1477. <xsl:for-each select="/root/multiLangs/name">
  1478. <xsl:variable name="langName" select="."/>
  1479. <xsl:if test="not(preceding-sibling::name = $langName)">
  1480. <!-- Cannot use $the-object here because of context within for-each -->
  1481. <xsl:if test="/root/cm:queryResponse/*/cm:defaultName[@modifiable = 'true']">
  1482. <utml:input type="hidden" utml:update="false">
  1483. <xsl:attribute name="name"><xsl:value-of select="concat('m_t_default_name_',string($langName))"/></xsl:attribute>
  1484. <xsl:attribute name="value"><xsl:value-of select="/root/cm:queryResponse/child::node()/cm:name/*[@xml:lang=string($langName)]"/></xsl:attribute>
  1485. </utml:input>
  1486. </xsl:if>
  1487. <utml:input type="hidden" utml:update="false">
  1488. <xsl:attribute name="name"><xsl:value-of select="concat('m_t_default_description_',string($langName))"/></xsl:attribute>
  1489. <xsl:attribute name="value"><xsl:value-of select="/root/cm:queryResponse/child::node()/cm:description/*[@xml:lang=string($langName)]"/></xsl:attribute>
  1490. </utml:input>
  1491. <utml:input type="hidden" utml:update="false">
  1492. <xsl:attribute name="name"><xsl:value-of select="concat('m_t_default_screenTip_',string($langName))"/></xsl:attribute>
  1493. <xsl:attribute name="value"><xsl:value-of select="/root/cm:queryResponse/child::node()/cm:screenTip/*[@xml:lang=string($langName)]"/></xsl:attribute>
  1494. </utml:input>
  1495. </xsl:if>
  1496. </xsl:for-each>
  1497. </xsl:when>
  1498. <xsl:otherwise>
  1499. <xsl:if test="$activeLang!=''">
  1500. <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)])">
  1501. <xsl:if test="$the-object/cm:defaultName[@modifiable = 'true']">
  1502. <utml:input type="hidden" utml:update="false">
  1503. <xsl:attribute name="name"><xsl:value-of select="concat('m_t_default_name_',$activeLang)"/></xsl:attribute>
  1504. </utml:input>
  1505. </xsl:if>
  1506. <utml:input type="hidden" utml:update="false">
  1507. <xsl:attribute name="name"><xsl:value-of select="concat('m_t_default_description_',$activeLang)"/></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_',$activeLang)"/></xsl:attribute>
  1511. </utml:input>
  1512. </xsl:if>
  1513. </xsl:if>
  1514. <xsl:for-each select="/root/env/param[starts-with(@name,'m_t_default')]">
  1515. <utml:input type="hidden" utml:update="false">
  1516. <xsl:attribute name="name"><xsl:value-of select="@name"/></xsl:attribute>
  1517. <xsl:attribute name="value"><xsl:value-of select="."/></xsl:attribute>
  1518. </utml:input>
  1519. </xsl:for-each>
  1520. </xsl:otherwise>
  1521. </xsl:choose>
  1522. <xsl:if test="key('env-param', 'm_class') = 'drillPath' and string(/root/cm:queryResponse/*/cm:parent/*/cm:routingServerGroup)!=''">
  1523. <utml:input type="hidden" name="ui.routingServerGroup" utml:update="false">
  1524. <xsl:attribute name="value">
  1525. <xsl:value-of select="/root/cm:queryResponse/*/cm:parent/*/cm:routingServerGroup"/>
  1526. </xsl:attribute>
  1527. </utml:input>
  1528. </xsl:if>
  1529. </xsl:if>
  1530. <utml:input type="hidden" name="ifrmcmd" value="save" utml:update="false"/>
  1531. <!-- if the user doesn't have a credentail then add the h_CAM_action to create one -->
  1532. <xsl:if test="($has_write_permission = true) and not( key('env-param', 'm_sp_credential')) and key('env-param', 'visited_job_properties')">
  1533. <input type="hidden" name="h_CAM_action" value=""/>
  1534. </xsl:if>
  1535. <dp:header useBackURL="not($showOKCancel)" dp:kbA11y="true">
  1536. <dp:title><xsl:copy-of select="$browserTitle"/></dp:title>
  1537. </dp:header>
  1538. <iframe name="dialogWindow" id="dialogWindow" style="display:none; z-index:50; position: absolute;" src="" title="Dialog Window"/>
  1539. <div id="dialogWindowContainer" style="cursor:default;display:none; position: absolute; z-index:50; overflow:none; padding-top:10px;">
  1540. <iframe name="dialogWindow2" id="dialogWindow2" style="width:600px; height:345px; position: relative;" class="visible" src="" title="repository_select"/>
  1541. </div>
  1542. <div id="windowMask" style="z-index:49; display:none; position: absolute; width:100%; height:100%; left:0px; top:0px;">
  1543. <table width="100%" height="100%" role="presentation">
  1544. <tr>
  1545. <td/>
  1546. </tr>
  1547. </table>
  1548. </div>
  1549. <!-- property tabs -->
  1550. <df:propertiesTabs select="general">
  1551. <df:hasRead><xsl:value-of select="$has_read_permission"/></df:hasRead>
  1552. <df:hasTraverse><xsl:value-of select="$has_traverse_permission"/></df:hasTraverse>
  1553. <df:hasUserProfile>
  1554. <xsl:if test="$noUserProfile"><xsl:value-of select="'false'"/></xsl:if>
  1555. </df:hasUserProfile>
  1556. <df:hasSetPolicy>
  1557. <xsl:choose>
  1558. <xsl:when test="key('env-param','m_class')='dataSet'">false</xsl:when>
  1559. <xsl:when test="$noUserProfile"><xsl:value-of select="'false'"/></xsl:when>
  1560. <xsl:otherwise><xsl:value-of select="$has_policy_permission"/></xsl:otherwise>
  1561. </xsl:choose>
  1562. </df:hasSetPolicy>
  1563. </df:propertiesTabs>
  1564. <!-- description tabs -->
  1565. <dp:description dp:kbA11y="true">
  1566. <xts:string id="IDS_PROP_GEN_INTRO"/>
  1567. </dp:description>
  1568. <xsl:variable name="launchableType">
  1569. <xsl:choose>
  1570. <xsl:when test="$the-object/cm:objectClass = 'shortcut'"><xsl:value-of select="$target/cm:launchableType"/></xsl:when>
  1571. <xsl:otherwise><xsl:value-of select="$the-object/cm:launchableType"/></xsl:otherwise>
  1572. </xsl:choose>
  1573. </xsl:variable>
  1574. <table border="0" cellspacing="0" cellpadding="0" width="100%" summary="" role="presentation"><tr>
  1575. <td width="50%" valign="top">
  1576. <lyt:layout style="1" width="100%" lyt:kbA11y="true">
  1577. <!-- Class -->
  1578. <lyt:section dp:kbA11y="true">
  1579. <dp:list width="100%">
  1580. <dp:section>
  1581. <dp:label width="15%"><xts:string id="IDS_PROP_TYPE"/></dp:label>
  1582. <dp:text>
  1583. <xsl:choose>
  1584. <xsl:when test="not($rootFolder)">
  1585. <xsl:choose>
  1586. <xsl:when test="string($the-object/cm:objectClass)!='shortcut'">
  1587. <xsl:choose>
  1588. <xsl:when test="$the-object/cm:objectClass = 'document'">
  1589. <xsl:variable name="docType">
  1590. <xsl:call-template name="getDocumentObjectType">
  1591. <xsl:with-param name="theObject" select="$the-object"/>
  1592. </xsl:call-template>
  1593. </xsl:variable>
  1594. <xsl:choose>
  1595. <xsl:when test="$docType != ''">
  1596. <xts:string id="IDS_OBJ_TYPE_DOCUMENT"><xts:param name="documentType"><xsl:value-of select="$docType"/></xts:param></xts:string>
  1597. </xsl:when>
  1598. <xsl:otherwise>
  1599. <xts:string id="IDS_OBJ_DOCUMENT"></xts:string>
  1600. </xsl:otherwise>
  1601. </xsl:choose>
  1602. </xsl:when>
  1603. <xsl:when test="$the-object/cm:objectClass = 'launchable' and string(/root/objectClass/class[@name=string($the-object/cm:objectClass)][@launchableType=$the-object/cm:launchableType]) != ''">
  1604. <xsl:value-of select="/root/objectClass/class[@name=string($the-object/cm:objectClass)][@launchableType=$the-object/cm:launchableType]"/>
  1605. </xsl:when>
  1606. <xsl:when test="/root/objectClass/class[@name=string($the-object/cm:objectClass)][not($the-object/cm:userInterfaces) or $the-object/cm:userInterfaces/@nil or @userInterface=$the-object/cm:userInterfaces/cm:uiComponentEnum] != ''">
  1607. <xsl:value-of select="/root/objectClass/class[@name=string($the-object/cm:objectClass)][not($the-object/cm:userInterfaces) or $the-object/cm:userInterfaces/@nil or @userInterface=$the-object/cm:userInterfaces/cm:uiComponentEnum]"/>
  1608. </xsl:when>
  1609. <xsl:otherwise>
  1610. <xsl:value-of select="/root/objectClass/class[@name=string($the-object/cm:objectClass)]"/>
  1611. </xsl:otherwise>
  1612. </xsl:choose>
  1613. </xsl:when>
  1614. <xsl:otherwise>
  1615. <xsl:choose>
  1616. <xsl:when test="$target/cm:objectClass = 'document'">
  1617. <xsl:variable name="docType">
  1618. <xsl:call-template name="getDocumentObjectType">
  1619. <xsl:with-param name="theObject" select="$the-object/cm:target/*"/>
  1620. </xsl:call-template>
  1621. </xsl:variable>
  1622. <xsl:variable name="targetObjectClassName">
  1623. <xsl:choose>
  1624. <xsl:when test="$docType != ''">
  1625. <xts:string id="IDS_OBJ_TYPE_DOCUMENT"><xts:param name="documentType"><xsl:value-of select="$docType"/></xts:param></xts:string>
  1626. </xsl:when>
  1627. <xsl:otherwise>
  1628. <xts:string id="IDS_OBJ_DOCUMENT"></xts:string>
  1629. </xsl:otherwise>
  1630. </xsl:choose>
  1631. </xsl:variable>
  1632. <xts:string id="IDS_PROP_SHORTCUT_TO_TEXT"><xts:param name="targetObject"><xsl:value-of select="$targetObjectClassName"/></xts:param></xts:string>
  1633. </xsl:when>
  1634. <xsl:when test="$target/cm:objectClass = 'launchable' and string(/root/objectClass/class[@name= string($target/cm:objectClass)][@launchableType=$target/cm:launchableType]) != ''">
  1635. <xts:string id="IDS_PROP_SHORTCUT_TO_TEXT"><xts:param name="targetObject"><xsl:value-of select="/root/objectClass/class[@name= string($target/cm:objectClass)][@launchableType=$target/cm:launchableType]"/></xts:param></xts:string>
  1636. </xsl:when>
  1637. <xsl:otherwise>
  1638. <xts:string id="IDS_PROP_SHORTCUT_TO_TEXT"><xts:param name="targetObject"><xsl:value-of select="/root/objectClass/class[@name= string($target/cm:objectClass)]"/></xts:param></xts:string>
  1639. </xsl:otherwise>
  1640. </xsl:choose>
  1641. </xsl:otherwise>
  1642. </xsl:choose>
  1643. </xsl:when>
  1644. <xsl:otherwise>
  1645. <xsl:value-of select="/root/objectClass/class[@name= 'folder']"/>
  1646. </xsl:otherwise>
  1647. </xsl:choose>
  1648. </dp:text>
  1649. </dp:section>
  1650. </dp:list>
  1651. </lyt:section>
  1652. <lyt:section>
  1653. <!-- Owner -->
  1654. <!-- ============================================================ -->
  1655. <xsl:variable name="owner" select="$the-object/cm:owner/*"/>
  1656. <xsl:variable name="curOwnerEmail">
  1657. <xsl:choose>
  1658. <xsl:when test="not(key('env-param','changed_m_p_owner')='1')"><xsl:value-of select="$owner/cm:email"/></xsl:when>
  1659. <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>
  1660. <xsl:when test="key('env-param','changed_m_p_owner')='1' and key('env-param','m_email')!=''"><xsl:value-of select="key('env-param','m_email')"/></xsl:when>
  1661. </xsl:choose>
  1662. </xsl:variable>
  1663. <!-- Determine the owner label -->
  1664. <xsl:variable name="ownerLabel">
  1665. <xsl:choose>
  1666. <xsl:when test="key('env-param','changed_m_p_owner')='1' and key('env-param','m_defaultName')='' and key('env-param','m_defaultName')=''"><xsl:value-of select="/root/myInfo//cm:defaultName"/></xsl:when>
  1667. <xsl:when test="(key('env-param', 'm_defaultName')) and not(key('env-param', 'm_defaultName') = '')">
  1668. <xsl:value-of select="key('env-param', 'm_defaultName')"/>
  1669. </xsl:when>
  1670. <xsl:when test="not(key('env-param','changed_m_p_owner')='1') and $owner/cm:defaultName">
  1671. <xsl:value-of select="$owner/cm:defaultName"/>
  1672. </xsl:when>
  1673. <xsl:when test="$curOwnerEmail != ''">
  1674. <xsl:value-of select="$curOwnerEmail"/>
  1675. </xsl:when>
  1676. <xsl:when test="$the-object/cm:owner/cm:nil"><xts:string id="IDS_PROP_UNKNOWN_OWNER"/></xsl:when>
  1677. <xsl:when test="not(string($the-object/cm:owner/*/cm:searchPath)='')"><xts:string id="IDS_PROP_UNKNOWN_OWNER"/></xsl:when>
  1678. <xsl:otherwise><xts:string id="IDS_NONE"/></xsl:otherwise>
  1679. </xsl:choose>
  1680. </xsl:variable>
  1681. <dp:list width="100%">
  1682. <dp:section>
  1683. <dp:label valign="top" width="15%"><xts:string id="IDS_PROP_OWNER"/></dp:label>
  1684. <dp:link wrap="wrap" valign="top" width="25%">
  1685. <!-- email the owner if an email exits -->
  1686. <xsl:choose>
  1687. <xsl:when test="(key('env-param', 'm_email')) and not(string(key('env-param', 'm_email')) = '')">
  1688. <dp:text>
  1689. <a href="#">
  1690. <xsl:attribute name="onclick">javascript:document.location.href='mailto:<xsl:value-of select="xtsext:javascriptencode(key('env-param', 'm_email'))"/>';</xsl:attribute>
  1691. <xsl:attribute name="onkeypress">javascript:<xsl:value-of select="$chkSpaceEnterKeyEvent"/>{this.onclick();return false;}return true;</xsl:attribute>
  1692. <xsl:value-of select="$ownerLabel"/>
  1693. </a>
  1694. </dp:text>
  1695. </xsl:when>
  1696. <xsl:when test="$curOwnerEmail!=''">
  1697. <dp:text>
  1698. <a href="#">
  1699. <xsl:attribute name="onclick">javascript:document.location.href='mailto:<xsl:value-of select="xtsext:javascriptencode($curOwnerEmail)"/>';</xsl:attribute>
  1700. <xsl:attribute name="onkeypress">javascript:<xsl:value-of select="$chkSpaceEnterKeyEvent"/>{this.onclick();return false;}return true;</xsl:attribute>
  1701. <xsl:value-of select="$ownerLabel"/>
  1702. </a>
  1703. </dp:text>
  1704. </xsl:when>
  1705. <xsl:otherwise>
  1706. <dp:text><xsl:value-of select="$ownerLabel"/></dp:text>
  1707. </xsl:otherwise>
  1708. </xsl:choose>
  1709. </dp:link>
  1710. <xsl:if test="key('env-param', 'm_class') != 'dataSet'">
  1711. <dp:link>
  1712. <!-- if you aren't the current owner and you are logged in you will get the set owner link -->
  1713. <xsl:if test="$has_policy_permission and $noUserProfile!=true() and $the-object/cm:owner/@modifiable='true' and $is-named = '1' and not(string(key('session-param', 'e_hp')) = string($owner/cm:searchPath)) and not(string(key('session-param', 'e_hp')) = string(key('env-param', 'm_p_owner')))">
  1714. <dp:text>
  1715. <a href="javascript:makeOwner();">
  1716. <xsl:text/><xts:string id="IDS_PROP_SET_OWNER"/><xsl:text/>
  1717. </a>
  1718. </dp:text>
  1719. </xsl:if>
  1720. </dp:link>
  1721. </xsl:if>
  1722. </dp:section>
  1723. </dp:list>
  1724. </lyt:section>
  1725. <lyt:section>
  1726. <xsl:variable name="contactProp">
  1727. <xsl:choose>
  1728. <!-- A contact string has just been selected -->
  1729. <xsl:when test="key('env-param','m_p_contactEMail') and key('env-param','m_p_contactEMail') != ''">
  1730. <xsl:value-of select="key('env-param','m_p_contactEMail')"/>
  1731. </xsl:when>
  1732. <xsl:when test="not(/root/env/param[starts-with(@name,'contact.so.')]) and key('env-param','m_p_contactEMail') and key('env-param','m_p_contactEMail') = ''">
  1733. <xts:string id="IDS_NONE"/>
  1734. </xsl:when>
  1735. <!-- A contact object has just been selected -->
  1736. <xsl:when test="string(key('env-param','contact.so.storeID')) != '' and (key('env-param','contact.so.email') or key('env-param','contact.so.defaultName'))">
  1737. <xsl:value-of select="/root/env/param[@name='contact.so.defaultName']"/>
  1738. </xsl:when>
  1739. <!-- A contact object is specified on the entry -->
  1740. <xsl:when test="$the-object/cm:contact/*/cm:objectClass">
  1741. <xsl:choose>
  1742. <xsl:when test=" not(string($the-object/cm:contact/*/cm:email) = '') or not(string($the-object/cm:contact/*/cm:defaultName)='') ">
  1743. <xsl:value-of select="$the-object/cm:contact/*/cm:defaultName"/>
  1744. </xsl:when>
  1745. <xsl:when test="not(string($the-object/cm:contact/*/cm:searchPath)='')">
  1746. <xts:string id="IDS_PROP_UNKNOWN_OWNER"/>
  1747. </xsl:when>
  1748. <xsl:otherwise>
  1749. <xts:string id="IDS_NONE"/>
  1750. </xsl:otherwise>
  1751. </xsl:choose>
  1752. </xsl:when>
  1753. <!-- A contact string is specified on the entry -->
  1754. <xsl:when test="string($the-object/cm:contactEMail) != ''">
  1755. <xsl:value-of select="$the-object/cm:contactEMail"/>
  1756. </xsl:when>
  1757. <!-- There is no contact specified -->
  1758. <xsl:otherwise>
  1759. <xts:string id="IDS_NONE"/>
  1760. </xsl:otherwise>
  1761. </xsl:choose>
  1762. </xsl:variable>
  1763. <dp:list width="100%">
  1764. <!-- Contact -->
  1765. <!-- ============================================================ -->
  1766. <xsl:if test="$has_read_permission">
  1767. <!-- If this object has a contact property then show it -->
  1768. <xsl:if test="/root/cm:queryResponse/*/cm:contactEMail">
  1769. <!-- <xsl:variable name="contact" select="cm:queryResponse/*/cm:contact/*"/> -->
  1770. <dp:section>
  1771. <dp:label valign="top" width="15%"><xts:string id="IDS_PROP_CONTACT"/></dp:label>
  1772. <dp:link valign="top" width="25%">
  1773. <xsl:choose>
  1774. <!--
  1775. Set the contact to 'none' when the contact string is blank with a contactChoice of
  1776. 'type' and either:
  1777. 1. a contactEMail is set on the entry.
  1778. 2. a contact object is specified on the entry.
  1779. -->
  1780. <!-- A contact string has just been selected -->
  1781. <xsl:when test="key('env-param','m_p_contactEMail') and key('env-param','m_p_contactEMail') != ''">
  1782. <dp:text>
  1783. <a href="#">
  1784. <xsl:attribute name="onclick">javascript:document.location.href='mailto:<xsl:value-of select="xtsext:javascriptencode(key('env-param','m_p_contactEMail'))"/>';</xsl:attribute>
  1785. <xsl:attribute name="onkeypress">javascript:<xsl:value-of select="$chkSpaceEnterKeyEvent"/>{this.onclick();return false;}return true;</xsl:attribute>
  1786. <xsl:value-of select="xtsext:sttInjectUCCIntoStr($contactProp, 'email', boolean($isBidiEnabled='true'))"/>
  1787. </a>
  1788. </dp:text>
  1789. </xsl:when>
  1790. <xsl:when test="not(/root/env/param[starts-with(@name,'contact.so.')]) and key('env-param','m_p_contactEMail') and key('env-param','m_p_contactEMail') = ''">
  1791. <dp:text><xsl:value-of select="xtsext:enforceBTD($contactProp, $baseTextDirection, $productLocale, boolean($isBidiEnabled='true'))"/></dp:text>
  1792. </xsl:when>
  1793. <!-- A contact object has just been selected -->
  1794. <xsl:when test="string(key('env-param','contact.so.storeID')) != '' and (key('env-param','contact.so.email') or key('env-param','contact.so.defaultName'))">
  1795. <xsl:choose>
  1796. <xsl:when test=" not(string(/root/env/param[@name='contact.so.email']) = '') ">
  1797. <dp:text>
  1798. <a href="#">
  1799. <xsl:attribute name="onclick">javascript:document.location.href='mailto:<xsl:value-of select="xtsext:javascriptencode(key('env-param','contact.so.email'))"/>';</xsl:attribute>
  1800. <xsl:attribute name="onkeypress">javascript:<xsl:value-of select="$chkSpaceEnterKeyEvent"/>{this.onclick();return false;}return true;</xsl:attribute>
  1801. <xsl:value-of select="xtsext:sttInjectUCCIntoStr($contactProp, 'email', boolean($isBidiEnabled='true'))"/>
  1802. </a>
  1803. </dp:text>
  1804. </xsl:when>
  1805. <xsl:otherwise>
  1806. <dp:text><xsl:value-of select="xtsext:enforceBTD($contactProp, $baseTextDirection, $productLocale, boolean($isBidiEnabled='true'))"/></dp:text>
  1807. </xsl:otherwise>
  1808. </xsl:choose>
  1809. </xsl:when>
  1810. <!-- A contact object is specified on the entry -->
  1811. <xsl:when test="$the-object/cm:contact/*/cm:objectClass">
  1812. <xsl:choose>
  1813. <xsl:when test=" not(string($the-object/cm:contact/*/cm:email) = '') ">
  1814. <dp:text>
  1815. <a href="#">
  1816. <xsl:attribute name="onclick">javascript:document.location.href='mailto:<xsl:value-of select="xtsext:javascriptencode($the-object/cm:contact/*/cm:email)"/>';</xsl:attribute>
  1817. <xsl:attribute name="onkeypress">javascript:<xsl:value-of select="$chkSpaceEnterKeyEvent"/>{this.onclick();return false;}return true;</xsl:attribute>
  1818. <xsl:value-of select="xtsext:sttInjectUCCIntoStr($contactProp, 'email', boolean($isBidiEnabled='true'))"/>
  1819. </a>
  1820. </dp:text>
  1821. </xsl:when>
  1822. <xsl:when test="not(string($the-object/cm:contact/*/cm:defaultName)='')">
  1823. <dp:text><xsl:value-of select="xtsext:enforceBTD($contactProp, $baseTextDirection, $productLocale, boolean($isBidiEnabled='true'))"/></dp:text>
  1824. </xsl:when>
  1825. <xsl:when test="not(string($the-object/cm:contact/*/cm:searchPath)='')">
  1826. <dp:text><xsl:value-of select="xtsext:enforceBTD($contactProp, $baseTextDirection, $productLocale, boolean($isBidiEnabled='true'))"/></dp:text>
  1827. </xsl:when>
  1828. <xsl:otherwise>
  1829. <dp:text><xsl:value-of select="xtsext:enforceBTD($contactProp, $baseTextDirection, $productLocale, boolean($isBidiEnabled='true'))"/></dp:text>
  1830. </xsl:otherwise>
  1831. </xsl:choose>
  1832. </xsl:when>
  1833. <!-- A contact string is specified on the entry -->
  1834. <xsl:when test="string($the-object/cm:contactEMail) != ''">
  1835. <dp:text>
  1836. <a href="#">
  1837. <xsl:attribute name="onclick">javascript:document.location.href='mailto:<xsl:value-of select="xtsext:javascriptencode($the-object/cm:contactEMail)"/>';</xsl:attribute>
  1838. <xsl:attribute name="onkeypress">javascript:<xsl:value-of select="$chkSpaceEnterKeyEvent"/>{this.onclick();return false;}return true;</xsl:attribute>
  1839. <xsl:value-of select="xtsext:sttInjectUCCIntoStr($contactProp, 'email', boolean($isBidiEnabled='true'))"/>
  1840. </a>
  1841. </dp:text>
  1842. </xsl:when>
  1843. <!-- There is no contact specified -->
  1844. <xsl:otherwise>
  1845. <dp:text><xsl:value-of select="xtsext:enforceBTD($contactProp, $baseTextDirection, $productLocale, boolean($isBidiEnabled='true'))"/></dp:text>
  1846. </xsl:otherwise>
  1847. </xsl:choose>
  1848. </dp:link>
  1849. <dp:link>
  1850. <xsl:if test="$the-object/cm:contact/@modifiable = 'true' and $the-object/cm:contactEMail/@modifiable = 'true'">
  1851. <!-- link to change the contact -->
  1852. <script language="javascript">
  1853. function runContactCmd(cmd)
  1854. {
  1855. if (cmd == 'select') {
  1856. <!-- m_p_contact -->
  1857. setSelectParams('form', 'pform','so.select','contacts','so.defaultObject','<xsl:text/>
  1858. <xsl:choose>
  1859. <xsl:when test="key('env-param','contact.so.searchPath')"><xsl:value-of select="xtsext:javascriptencode(string(key('env-param','contact.so.searchPath')))"/></xsl:when>
  1860. <xsl:otherwise><xsl:value-of select="xtsext:javascriptencode(string($the-object/cm:contact/*/cm:searchPath))"/></xsl:otherwise>
  1861. </xsl:choose>
  1862. <xsl:text/>');<xsl:text/>
  1863. utmlSubmitForm(document.pform,'<xsl:value-of select="xtsext:javascriptencode(string($app))"/>/select/select.xts','maintain','validate');
  1864. }
  1865. if (cmd == 'enter') {
  1866. <!-- m_p_contactEmail -->
  1867. emailAddressDialog.show();
  1868. setTimeout('setEmailFocus()', 11);
  1869. }
  1870. }
  1871. function setEmailFocus()
  1872. {
  1873. if (emailAddressDialog.className = "visible")
  1874. document.pform.emailAddress.focus();
  1875. }
  1876. function updateEmailAddress()
  1877. {
  1878. setFormInputElement('typeInEMailAddress',removeUCCFromStr(document.pform.emailAddress.value));
  1879. setFormInputElement('typeInContact','true');
  1880. setPropertiesChanged();
  1881. utmlSubmitForm(document.pform,'<xsl:value-of select="xtsext:javascriptencode(string($app))"/>/<xsl:value-of select="xtsext:javascriptencode(string($mname))"/>','maintain','validate');
  1882. }
  1883. </script>
  1884. <xsl:variable name="contactMenu">
  1885. <flyout id="contactMenu">
  1886. <label><xts:string encode="javascript" id="IDS_PROP_CONTACT_MENU"/></label>
  1887. <items>
  1888. <item id="contactmenu_select_contact">
  1889. <text><a><xts:string id="IDS_SELECT_THE_CONTACT_OBJ"/></a></text>
  1890. <action>runContactCmd('select');</action>
  1891. </item>
  1892. <item id="contactmenu_enter_email_address">
  1893. <text><xts:string id="IDS_SELECT_ENTER_EMAIL_ADDRESS"/></text>
  1894. <action>runContactCmd('enter');</action>
  1895. </item>
  1896. </items>
  1897. </flyout>
  1898. </xsl:variable>
  1899. <div id="contactMenu_span" style="z-index: 2;position: relative;">
  1900. <table summary="" cellspacing="0" cellpadding="0" style="position: relative; cursor:pointer;font-size2: 70%"
  1901. tabindex="0"
  1902. accessKey="1"
  1903. onclick="return CCPopupMenu.dropDown(event,0,0,'contactMenu');" role="presentation">
  1904. <xsl:attribute name="onkeypress">javascript:<xsl:value-of select="$chkSpaceEnterKeyEvent"/>{return CCPopupMenu.dropDown(event,0,0,'contactMenu');} else return true;</xsl:attribute>
  1905. <tr>
  1906. <td nowrap="true" valign="top">
  1907. <a onmouseover="window.status='';return true;" onmouseout="window.status='';return true;" role="button" aria-haspopup="true" aria-controls="flyout_contactMenu">
  1908. <xsl:attribute name="title"></xsl:attribute>
  1909. <xsl:attribute name="alt"></xsl:attribute>
  1910. <xts:string id="IDS_SELECT_THE_CONTACT_MENU"/>
  1911. </a>
  1912. </td>
  1913. <td nowrap="true" valign="top">
  1914. <img name="contactMenu_imgFlyControl" src="{$skin_shared_images}dropdown_arrow.gif" title="" alt=""/>
  1915. </td>
  1916. </tr>
  1917. </table>
  1918. </div>
  1919. <xsl:call-template name="renderPopup">
  1920. <xsl:with-param name="flyoutXML">
  1921. <xsl:copy-of select="$contactMenu"/>
  1922. </xsl:with-param>
  1923. <xsl:with-param name="controlID">contactMenu_span</xsl:with-param>
  1924. </xsl:call-template>
  1925. <div>
  1926. <cp:genericDialog id="emailAddressDialog" interactive="true" align="left" width="500" positionVertical="true" positionHorizontal="true" helpid="contactHelp" focusidOnShiftTab="contactCancel">
  1927. <cp:param name="title"><xts:string id="IDS_SELECT_ENTER_EMAIL_ADDRESS_2"/></cp:param>
  1928. <cp:param name="body">
  1929. <lyt:layout style="1" lyt:kbA11y="true">
  1930. <lyt:section>
  1931. <dp:list>
  1932. <dp:section>
  1933. <dp:text><xts:string id="IDS_SELECT_ENTER_EMAIL_ADDRESS_INTRO"/></dp:text>
  1934. </dp:section>
  1935. <dp:section>
  1936. <dp:text/>
  1937. </dp:section>
  1938. <dp:section>
  1939. <dp:input dp:kbA11y="true">
  1940. <dp:section1><Label><xts:string id="IDS_CONTACT_EMAIL"/></Label></dp:section1>
  1941. <dp:section2>
  1942. <span style="position: absolute;margin-left: -9999px; margin-top: -9999px;" id="emailContact"><xts:string id="IDS_SELECT_ENTER_EMAIL_ADDRESS_INTRO"/></span>
  1943. <input type="text" name="emailAddress" value="" size="70" maxlength="256" aria-labelledby="emailContact">
  1944. <xsl:if test="$isBidiEnabled = 'true'">
  1945. <xsl:attribute name="stttype">
  1946. <xsl:value-of select="'email'"/>
  1947. </xsl:attribute>
  1948. <xsl:attribute name="onfocus">
  1949. bidi.onfocus(this)
  1950. </xsl:attribute>
  1951. </xsl:if>
  1952. </input>
  1953. </dp:section2>
  1954. </dp:input>
  1955. </dp:section>
  1956. </dp:list>
  1957. </lyt:section>
  1958. </lyt:layout>
  1959. </cp:param>
  1960. <cp:param name="footer">
  1961. <!-- NOTE: onkeydown required to force navigation within the popup element -->
  1962. <dp:simpleFooter>
  1963. <td>
  1964. <table cellpadding="0" cellspacing="0" role="presentation">
  1965. <tr>
  1966. <td>
  1967. <cp:cmdButton defaultState="active" id="contactOK">
  1968. <cp:cmdButtonText><xts:string id="IDS_OK"/></cp:cmdButtonText>
  1969. <cp:cmdButtonEvents>
  1970. <cp:cmdButtonEvent name="onclick">javascript:emailAddressDialog.hide(); updateEmailAddress();</cp:cmdButtonEvent>
  1971. <cp:cmdButtonEvent name="onkeypress">javascript:<xsl:value-of select="$chkSpaceEnterKeyEvent"/><xsl:text>{</xsl:text> this.onclick(); return false; <xsl:text>}</xsl:text> return true;</cp:cmdButtonEvent>
  1972. </cp:cmdButtonEvents>
  1973. </cp:cmdButton>
  1974. </td>
  1975. <td>
  1976. <cp:cmdButton defaultState="active" id="contactCancel">
  1977. <cp:cmdButtonText><xts:string id="IDS_CANCEL"/></cp:cmdButtonText>
  1978. <cp:cmdButtonEvents>
  1979. <cp:cmdButtonEvent name="onclick">javascript:emailAddressDialog.hide();</cp:cmdButtonEvent>
  1980. <cp:cmdButtonEvent name="onkeypress">javascript:<xsl:value-of select="$chkSpaceEnterKeyEvent"/><xsl:text>{</xsl:text> this.onclick(); return false; <xsl:text>}</xsl:text> return true;</cp:cmdButtonEvent>
  1981. <cp:cmdButtonEvent name="onkeydown">javascript:if(event.keyCode==9) <xsl:text>{</xsl:text> if(event.shiftKey==true) return true; else <xsl:text>{</xsl:text> if(document.getElementById("contactHelp")) <xsl:text>{</xsl:text>document.getElementById("contactHelp").focus(); return false; <xsl:text>}</xsl:text> <xsl:text>}</xsl:text> <xsl:text>}</xsl:text> return true;</cp:cmdButtonEvent>
  1982. </cp:cmdButtonEvents>
  1983. </cp:cmdButton>
  1984. </td>
  1985. </tr>
  1986. </table>
  1987. </td>
  1988. </dp:simpleFooter>
  1989. </cp:param>
  1990. </cp:genericDialog>
  1991. </div>
  1992. </xsl:if>
  1993. </dp:link>
  1994. </dp:section>
  1995. </xsl:if>
  1996. </xsl:if>
  1997. </dp:list>
  1998. </lyt:section>
  1999. <!-- tenantID -->
  2000. <!-- ============================================================ -->
  2001. <lyt:section>
  2002. <xsl:variable name="tenantID">
  2003. <xsl:choose>
  2004. <xsl:when test="key('env-param','m_p_tenantID') and key('env-param', 'm_p_tenantID') != ''">
  2005. <xsl:value-of select="key('env-param', 'm_p_tenantID')"/>
  2006. </xsl:when>
  2007. <xsl:when test="string($the-object/cm:tenantID)!='' and (not(key('env-param', 'changed_m_p_tenantID')) or key('env-param', 'changed_m_p_tenantID') != '1')">
  2008. <xsl:value-of select="string($the-object/cm:tenantID)"/>
  2009. </xsl:when>
  2010. </xsl:choose>
  2011. </xsl:variable>
  2012. <xsl:variable name="displayTenantID">
  2013. <xsl:choose>
  2014. <xsl:when test="key('env-param','objTenantName') != ''">
  2015. <xsl:value-of select="key('env-param','objTenantName')"/>
  2016. </xsl:when>
  2017. <xsl:when test="/root/tenantObjInfo//*/cm:defaultName != ''">
  2018. <xsl:value-of select="/root/tenantObjInfo//*/cm:defaultName"/>
  2019. </xsl:when>
  2020. <xsl:otherwise>
  2021. <xts:string id="IDS_NONE"/>
  2022. </xsl:otherwise>
  2023. </xsl:choose>
  2024. </xsl:variable>
  2025. <xsl:variable name="isAccountObject" select="$the-object/cm:objectClass='account'"/>
  2026. <xsl:variable name="isTenantObject" select="$the-object/cm:objectClass='tenant'"/>
  2027. <xsl:variable name="isTenantedObject" select="not($tenantID ='' and ($isAccountObject or $isTenantObject)) and $parent_is_public and $the-object/cm:tenantID[@modifiable = 'true']"/>
  2028. <xsl:variable name="tenantInfo">
  2029. <xsl:choose>
  2030. <xsl:when test="$isTenantObject">
  2031. <label><xts:string id="IDS_PROP_TENANTID"/></label>
  2032. <text><xsl:value-of select="$the-object/cm:tenantID"/></text>
  2033. </xsl:when>
  2034. <xsl:otherwise>
  2035. <label><xts:string id="IDS_PROP_TENANT_NAME"/></label>
  2036. <text>
  2037. <xsl:choose>
  2038. <xsl:when test="$isTenantedObject">
  2039. <xsl:value-of select="$displayTenantID"/>
  2040. </xsl:when>
  2041. <xsl:otherwise>
  2042. <xts:string id="IDS_PROP_OBJ_TENANCY"><xts:param name="tenantName"><xsl:value-of select="$displayTenantID"/></xts:param></xts:string>
  2043. </xsl:otherwise>
  2044. </xsl:choose>
  2045. </text>
  2046. </xsl:otherwise>
  2047. </xsl:choose>
  2048. </xsl:variable>
  2049. <xsl:if test="key('session-param', 'e_showTenantInfo')='true' and $has_read_permission">
  2050. <dp:list width="100%">
  2051. <dp:section>
  2052. <dp:label valign="top" width="15%"><xsl:value-of select="$tenantInfo/label"/></dp:label>
  2053. <dp:text width="25%">
  2054. <xsl:value-of select="xtsext:enforceBTD($tenantInfo/text, $baseTextDirection, $productLocale, boolean($isBidiEnabled='true'))"/>
  2055. </dp:text>
  2056. <dp:link>
  2057. <xsl:variable name="isSysAdmin" select="key('session-param', 'e_isSysAdmin')='true'"/>
  2058. <xsl:variable name="isSysAdminRoleObject" select="$the-object/cm:objectClass='role' and $the-object/cm:searchPath='CAMID(&quot;::System Administrators&quot;)'"/>
  2059. <xsl:if test="$isSysAdmin and $isTenantedObject and not($isSysAdminRoleObject)">
  2060. <script language="javascript">
  2061. dojo.require("dijit.form.FilteringSelect");
  2062. dojo.require("dojo.data.ItemFileReadStore");
  2063. var g_select;
  2064. dojo.addOnLoad(function() {
  2065. // create store instance referencing data from listTenants.xts
  2066. var tenantStore = new dojo.data.ItemFileReadStore({
  2067. url: "<xsl:value-of select="concat($gateway,'?b_action=xts.run&amp;m=',$app,'/tenants/listTenants.xts')"/>"
  2068. });
  2069. g_select = new dijit.form.FilteringSelect({
  2070. name: "selectedTenantName",
  2071. placeHolder: "<xts:string id="IDS_SELECT_THE_TENANTID" encode="javascript"/>",
  2072. value:"<xsl:value-of select="xtsext:javascriptencode($displayTenantID)"/>",
  2073. store: tenantStore
  2074. }, "selectedTenantName");
  2075. g_select.startup();
  2076. });
  2077. function showTenantDlg()
  2078. {
  2079. selectTenantDialog.show();
  2080. setTimeout('setTenantFocus()', 11);
  2081. }
  2082. function setTenantFocus()
  2083. {
  2084. if (selectTenantDialog.className = "visible")
  2085. g_select.focus();
  2086. }
  2087. function updateTenantID(newTenantID, newTenantName)
  2088. {
  2089. setFormInputElement('newTenantID',newTenantID);
  2090. setFormInputElement('newTenantName',newTenantName);
  2091. setFormInputElement('tenantChanged','true');
  2092. setPropertiesChanged();
  2093. utmlSubmitForm(document.pform,'<xsl:value-of select="xtsext:javascriptencode(string($app))"/>/<xsl:value-of select="xtsext:javascriptencode(string($mname))"/>','maintain','validate');
  2094. }
  2095. function setNewTenantID()
  2096. {
  2097. if (g_select.isValid()) {
  2098. updateTenantID(g_select.item.id, g_select.item.name);
  2099. javascript:selectTenantDialog.hide();
  2100. }
  2101. }
  2102. function makeTenantIDPublic()
  2103. {
  2104. if (confirm('<xts:string id="IDS_SELECT_TENANTID_CONFIRM_MAKE_PUBLIC" encode="javascript"/>')){
  2105. updateTenantID('','<xts:string id="IDS_NONE"/>');
  2106. }
  2107. }
  2108. </script>
  2109. <xsl:if test="not($isTenantObject)">
  2110. <xsl:choose>
  2111. <xsl:when test="$tenantID !=''">
  2112. <dp:text>
  2113. <a href="javascript:showTenantDlg();" role="button">
  2114. <xsl:text/><xts:string id="IDS_EDIT_THE_TENANTID"/><xsl:text/>
  2115. </a>
  2116. </dp:text>
  2117. <xsl:if test="not($isAccountObject)">
  2118. <dp:text>
  2119. <a href="javascript:makeTenantIDPublic();">
  2120. <xsl:text/><xts:string id="IDS_MAKE_PUBLIC"/><xsl:text/>
  2121. </a>
  2122. </dp:text>
  2123. </xsl:if>
  2124. </xsl:when>
  2125. <xsl:otherwise>
  2126. <dp:text>
  2127. <a href="javascript:showTenantDlg();" role="button">
  2128. <xsl:text/><xts:string id="IDS_SELECT_THE_TENANTID"/><xsl:text/>
  2129. </a>
  2130. </dp:text>
  2131. </xsl:otherwise>
  2132. </xsl:choose>
  2133. </xsl:if>
  2134. <div>
  2135. <cp:genericDialog id="selectTenantDialog" rootContainerId="theForm" interactive="true" align="left" width="500" positionVertical="true" positionHorizontal="true" helpid="tenantHelp" focusidOnShiftTab="tenantCancel">
  2136. <cp:param name="title"><xts:string id="IDS_SELECT_TENANTID_TITLE"/></cp:param>
  2137. <cp:param name="body">
  2138. <lyt:layout style="1" lyt:kbA11y="true">
  2139. <lyt:section>
  2140. <dp:list>
  2141. <dp:section>
  2142. <dp:text><xts:string id="IDS_SELECT_TENANTID_INTRO"/></dp:text>
  2143. </dp:section>
  2144. <dp:section>
  2145. <dp:text/>
  2146. </dp:section>
  2147. <dp:section>
  2148. <dp:input dp:kbA11y="true">
  2149. <dp:section1><Label for="selectedTenantName"><xts:string id="IDS_PROP_TENANT_NAME"/></Label></dp:section1>
  2150. <dp:section2>
  2151. <input id="selectedTenantName"/>
  2152. </dp:section2>
  2153. </dp:input>
  2154. </dp:section>
  2155. <dp:section>
  2156. <dp:group>
  2157. <dp:groupItem valign="top">
  2158. <img height="16" width="16" border="0" alt="" src="{concat($image_root,'msg_warning_16.gif')}"/>
  2159. </dp:groupItem>
  2160. <dp:groupItem>
  2161. <!-- used for alignment -->
  2162. <dp:text/><xsl:text>&#160;</xsl:text>
  2163. </dp:groupItem>
  2164. <dp:groupItem valign="top">
  2165. <dp:text nospace="nospace" wrap="wrap">
  2166. <xts:string id="IDS_SELECT_TENANTID_WARNING"/>
  2167. </dp:text>
  2168. </dp:groupItem>
  2169. </dp:group>
  2170. </dp:section>
  2171. <dp:section>
  2172. <dp:text/>
  2173. </dp:section>
  2174. </dp:list>
  2175. </lyt:section>
  2176. </lyt:layout>
  2177. </cp:param>
  2178. <cp:param name="footer">
  2179. <!-- NOTE: onkeydown required to force navigation within the popup element -->
  2180. <dp:simpleFooter>
  2181. <td>
  2182. <table cellpadding="0" cellspacing="0" role="presentation">
  2183. <tr>
  2184. <td>
  2185. <cp:cmdButton defaultState="active" id="tenantOK">
  2186. <cp:cmdButtonText><xts:string id="IDS_OK"/></cp:cmdButtonText>
  2187. <cp:cmdButtonEvents>
  2188. <cp:cmdButtonEvent name="onclick">setNewTenantID();</cp:cmdButtonEvent>
  2189. <cp:cmdButtonEvent name="onkeypress">javascript:<xsl:value-of select="$chkSpaceEnterKeyEvent"/><xsl:text>{</xsl:text> this.onclick(); return false; <xsl:text>}</xsl:text> return true;</cp:cmdButtonEvent>
  2190. </cp:cmdButtonEvents>
  2191. </cp:cmdButton>
  2192. </td>
  2193. <td>
  2194. <cp:cmdButton defaultState="active" id="tenantCancel">
  2195. <cp:cmdButtonText><xts:string id="IDS_CANCEL"/></cp:cmdButtonText>
  2196. <cp:cmdButtonEvents>
  2197. <cp:cmdButtonEvent name="onclick">javascript:selectTenantDialog.hide();</cp:cmdButtonEvent>
  2198. <cp:cmdButtonEvent name="onkeypress">javascript:<xsl:value-of select="$chkSpaceEnterKeyEvent"/><xsl:text>{</xsl:text> this.onclick(); return false; <xsl:text>}</xsl:text> return true;</cp:cmdButtonEvent>
  2199. <cp:cmdButtonEvent name="onkeydown">javascript:if(event.keyCode==9) <xsl:text>{</xsl:text> if(event.shiftKey==true) return true; else <xsl:text>{</xsl:text> if(document.getElementById("tenantHelp")) <xsl:text>{</xsl:text>document.getElementById("tenantHelp").focus(); return false; <xsl:text>}</xsl:text> <xsl:text>}</xsl:text> <xsl:text>}</xsl:text> return true;</cp:cmdButtonEvent>
  2200. </cp:cmdButtonEvents>
  2201. </cp:cmdButton>
  2202. </td>
  2203. </tr>
  2204. </table>
  2205. </td>
  2206. </dp:simpleFooter>
  2207. </cp:param>
  2208. </cp:genericDialog>
  2209. </div>
  2210. </xsl:if>
  2211. </dp:link>
  2212. </dp:section>
  2213. </dp:list>
  2214. </xsl:if>
  2215. </lyt:section>
  2216. <lyt:section>
  2217. <xsl:if test="$the-object/cm:disabled and not($has_read_permission and /root/cm:queryResponse/*/cm:contactEMail)">
  2218. <!-- this section was the largest in a small section so i eliminated it -->
  2219. <xsl:call-template name="render-disabled"/>
  2220. </xsl:if>
  2221. </lyt:section>
  2222. <lyt:section>
  2223. <xsl:if test="$the-object/cm:disabled and $has_read_permission and /root/cm:queryResponse/*/cm:contactEMail">
  2224. <!-- this section was the largest in a small section so i eliminated it -->
  2225. <xsl:call-template name="render-disabled"/>
  2226. </xsl:if>
  2227. </lyt:section>
  2228. <lyt:section>
  2229. <xsl:if test="$showHideEntry">
  2230. <xsl:call-template name="render-hideobject"/>
  2231. </xsl:if>
  2232. </lyt:section>
  2233. </lyt:layout>
  2234. </td>
  2235. <td width="50%" valign="top">
  2236. <xsl:variable name="propLocation">
  2237. <xsl:choose>
  2238. <xsl:when test="$rootFolder">
  2239. <xts:string id="IDS_ROOT"/>
  2240. </xsl:when>
  2241. <xsl:otherwise>
  2242. <cf:do-the-path-link>
  2243. <cf:param name="familytree">$the-object/cm:ancestors</cf:param>
  2244. <cf:param name="familymember">$the-object/cm:defaultName</cf:param>
  2245. <cf:param name="home"><xsl:value-of select="$start-at-path"/></cf:param>
  2246. <cf:param name="onlyAncestors">true</cf:param>
  2247. </cf:do-the-path-link>
  2248. </xsl:otherwise>
  2249. </xsl:choose>
  2250. </xsl:variable>
  2251. <lyt:layout style="1" width="100%" lyt:kbA11y="true">
  2252. <lyt:section>
  2253. <dp:list width="100%">
  2254. <!-- Location -->
  2255. <!-- ============================================================ -->
  2256. <dp:section>
  2257. <dp:label valign="top" width="15%" aria-labelledby="propLoc"><xts:string id="IDS_PROP_LOCATION"/></dp:label>
  2258. <dp:text wrap="wrap" valign="top" width="40%">
  2259. <xsl:value-of select="$propLocation"/>
  2260. </dp:text>
  2261. <span style="position: absolute;margin-left: -9999px; margin-top: -9999px;" id="propLoc"><xsl:value-of select="$propLocation"/></span>
  2262. <dp:list>
  2263. <dp:section valign="top">
  2264. <img width="16" title="" style="height: 16px;position: relative;top:2px" >
  2265. <xsl:attribute name="alt"><xts:string id="IDS_PROP_SEARPATH_VIEW_ICON_ALT"/></xsl:attribute>
  2266. <xsl:attribute name="src"><xsl:value-of select="concat($image_root, 'action_unique_identifier.gif')"/></xsl:attribute>
  2267. </img>
  2268. <dp:link tdClass="">
  2269. <!-- Show the search path -->
  2270. <pm:permissions origin="/root/cm:queryResponse/*/"/>
  2271. <xsl:variable name="isDangling" select="(/root/cm:queryResponse/*/cm:objectClass = 'shortcut' and (/root/cm:queryResponse/*/cm:target/*/cm:objectClass = 'nil' or /root/cm:queryResponse/*/cm:target/*/cm:base/*/cm:objectClass = 'nil' or (/root/cm:queryResponse/*/cm:target/*/cm:base and not(/root/cm:queryResponse/*/cm:target/*/cm:base/*/cm:objectClass)))) or ((/root/cm:queryResponse/*/cm:objectClass = 'reportView' or /root/cm:queryResponse/*/cm:objectClass = 'agentDefinitionView' or /root/cm:queryResponse/*/cm:objectClass = 'dataMovementTaskAlias' or /root/cm:queryResponse/*/cm:objectClass = 'powerPlay8ReportView') and (/root/cm:queryResponse/*/cm:base/*/cm:objectClass = 'nil' or not(/root/cm:queryResponse/*/cm:base/*/cm:objectClass)))"/>
  2272. <xsl:variable name="url-encoded-id"><pf:idToSearchPathForURL source="/root/cm:queryResponse/*/cm:storeID"/></xsl:variable>
  2273. <xsl:variable name="class">
  2274. <xsl:choose>
  2275. <xsl:when test=" /root/cm:queryResponse/*/cm:objectClass = 'shortcut' "><xsl:value-of select="/root/cm:queryResponse/*/cm:target/*/cm:objectClass[1]"/></xsl:when>
  2276. <xsl:otherwise><xsl:value-of select="/root/cm:queryResponse/*/cm:objectClass"/></xsl:otherwise>
  2277. </xsl:choose>
  2278. </xsl:variable>
  2279. <xsl:variable name="documentType">
  2280. <xsl:choose>
  2281. <xsl:when test=" /root/cm:queryResponse/*/cm:objectClass = 'shortcut' "><xsl:value-of select="/root/cm:queryResponse/*/cm:target/*/cm:documentType"/></xsl:when>
  2282. <xsl:otherwise><xsl:value-of select="/root/cm:queryResponse/*/cm:documentType"/></xsl:otherwise>
  2283. </xsl:choose>
  2284. </xsl:variable>
  2285. <xsl:variable name="action">
  2286. <xsl:call-template name="gen-action">
  2287. <xsl:with-param name="class" select="$class"/>
  2288. <xsl:with-param name="object" select="/root/cm:queryResponse/*"/>
  2289. <xsl:with-param name="canExecute" select="$canExecute"/>
  2290. <xsl:with-param name="canRead" select="$canRead"/>
  2291. <xsl:with-param name="canTraverse" select="$canTraverse"/>
  2292. <xsl:with-param name="output_format" select="$output_format"/>
  2293. <xsl:with-param name="userInterfaces" select="$userInterfaces"/>
  2294. <xsl:with-param name="launchableType" select="$launchableType"/>
  2295. <xsl:with-param name="effectiveUserCapabilities" select="$effectiveUserCapabilities"/>
  2296. </xsl:call-template>
  2297. </xsl:variable>
  2298. <xsl:variable name="actionString">
  2299. <xsl:call-template name="gen-action-string">
  2300. <xsl:with-param name="action" select="$action"/>
  2301. <xsl:with-param name="class" select="$class"/>
  2302. <xsl:with-param name="userInterfaces" select="$userInterfaces"/>
  2303. <xsl:with-param name="documentType" select="$documentType"/>
  2304. <xsl:with-param name="launchableType" select="$launchableType"/>
  2305. <xsl:with-param name="effectiveUserCapabilities" select="$effectiveUserCapabilities"/>
  2306. </xsl:call-template>
  2307. </xsl:variable>
  2308. <xsl:variable name="defaultMorphlet"><pf:getDefaultMorphletForObject objectClass="$class"/></xsl:variable>
  2309. <xsl:variable name="geturl">
  2310. <xsl:for-each select="/root/cm:queryResponse/*">
  2311. <!-- Call gen-url to get the default action URL -->
  2312. <xsl:call-template name="gen-url">
  2313. <xsl:with-param name="canExecute" select="$canExecute"/>
  2314. <xsl:with-param name="canRead" select="$canRead"/>
  2315. <xsl:with-param name="canTraverse" select="$canTraverse"/>
  2316. <xsl:with-param name="output_format" select="$output_format"/>
  2317. <xsl:with-param name="class" select="$class"/>
  2318. <xsl:with-param name="userInterfaces" select="$userInterfaces"/>
  2319. <xsl:with-param name="action" select="$action"/>
  2320. <xsl:with-param name="isDangling" select="$isDangling"/>
  2321. <xsl:with-param name="isContainer" select="key('ui-object', string($class))/@container = 'T'"/>
  2322. <xsl:with-param name="canWrite" select="$canWrite"/>
  2323. <xsl:with-param name="morphlet" select="$defaultMorphlet"/>
  2324. <xsl:with-param name="url-encoded-id" select="$url-encoded-id"/>
  2325. <xsl:with-param name="canReadParent" select="contains(/root/cm:queryResponse/*/cm:parent/*/cm:permissions, 'read')"/>
  2326. <xsl:with-param name="hasChildren" select="cm:hasChildren = 'true'"/>
  2327. <xsl:with-param name="genURLForBookmark" select="true()"/>
  2328. <xsl:with-param name="effectiveUserCapabilities" select="$effectiveUserCapabilities"/>
  2329. </xsl:call-template>
  2330. </xsl:for-each>
  2331. </xsl:variable>
  2332. <cp:genericDialog id="searchPath" interactive="true" align="left" positionVertical="false" positionHorizontal="true" width="400" helpid="searchPathHelp" focusidOnShiftTab="closeSearchPath">
  2333. <cp:param name="title"><xts:string id="IDS_PROP_SEARPATH_VIEW"/></cp:param>
  2334. <cp:param name="body">
  2335. <lyt:layout style="1">
  2336. <lyt:section>
  2337. <dp:list>
  2338. <dp:section>
  2339. <dp:text tdClass="formLabel"><xts:string id="IDS_PROP_SEARPATH_LABEL"/></dp:text>
  2340. </dp:section>
  2341. <dp:section>
  2342. <dp:text wrap="true">
  2343. <div class="dialogSearchPathDisplayPanel" style="width:400px;word-break:break-all;" name="searchPathtextarea" tabindex="0">
  2344. <xsl:value-of select="$the-object/cm:searchPath"/>
  2345. </div>
  2346. </dp:text>
  2347. </dp:section>
  2348. <dp:section>
  2349. <dp:text tdClass="formLabel"><div tabindex="0"><xts:string id="IDS_PROP_ID_LABEL"/></div></dp:text>
  2350. </dp:section>
  2351. <dp:section>
  2352. <dp:text nospace="true"><div class="dialogSearchPathDisplayPanel" style="width:400px;word-break:break-all;" tabindex="0"><xsl:value-of select="$the-object/cm:storeID"/></div></dp:text>
  2353. </dp:section>
  2354. <dp:section>
  2355. <dp:text/>
  2356. </dp:section>
  2357. <dp:section>
  2358. <dp:text tdClass="formLabel"><div tabindex="0"><xts:string id="IDS_PROP_URL_LABEL"/></div></dp:text>
  2359. </dp:section>
  2360. <xsl:choose>
  2361. <xsl:when test="string($geturl) = ''">
  2362. <dp:section>
  2363. <dp:text><div class="dialogSearchPathDisplayPanel" style="width:400px;word-break:break-all;" tabindex="0"><xts:string id="IDS_PROP_URL_NONE"/></div></dp:text>
  2364. </dp:section>
  2365. <dp:section>
  2366. <dp:text/>
  2367. </dp:section>
  2368. </xsl:when>
  2369. <xsl:otherwise>
  2370. <dp:section>
  2371. <dp:text wrap="true">
  2372. <div id="GetURLText" style="width:400px;word-break:break-all;" class="dialogSearchPathDisplayPanel" tabIndex="0">
  2373. <xsl:value-of select="$geturl"/>
  2374. </div>
  2375. </dp:text>
  2376. </dp:section>
  2377. </xsl:otherwise>
  2378. </xsl:choose>
  2379. </dp:list>
  2380. </lyt:section>
  2381. </lyt:layout>
  2382. </cp:param>
  2383. <!-- NOTE: onkeydown required to force navigation within the popup element -->
  2384. <cp:param name="footer">
  2385. <dp:simpleFooter>
  2386. <cp:cmdButton defaultState="active" id="closeSearchPath">
  2387. <cp:cmdButtonText><xts:string id="IDS_CLOSE"/></cp:cmdButtonText>
  2388. <cp:cmdButtonEvents>
  2389. <cp:cmdButtonEvent name="onclick">javascript:searchPath.hide()</cp:cmdButtonEvent>
  2390. <cp:cmdButtonEvent name="onkeypress">javascript:<xsl:value-of select="$chkSpaceEnterKeyEvent"/><xsl:text>{</xsl:text> this.onclick(); return false; <xsl:text>}</xsl:text> return true;</cp:cmdButtonEvent>
  2391. <cp:cmdButtonEvent name="onkeydown">javascript:if(event.keyCode==9) <xsl:text>{</xsl:text> if(event.shiftKey==true) return true; else <xsl:text>{</xsl:text> if(document.getElementById("searchPathHelp")) <xsl:text>{</xsl:text>document.getElementById("searchPathHelp").focus(); return false; <xsl:text>}</xsl:text> <xsl:text>}</xsl:text> <xsl:text>}</xsl:text> return true;</cp:cmdButtonEvent>
  2392. </cp:cmdButtonEvents>
  2393. </cp:cmdButton>
  2394. </dp:simpleFooter>
  2395. </cp:param>
  2396. </cp:genericDialog>
  2397. <a href="#" role="button" >
  2398. <xsl:attribute name="onclick">javascript:searchPath.show();</xsl:attribute>
  2399. <xsl:attribute name="onkeypress">javascript:<xsl:value-of select="$chkSpaceEnterKeyEvent"/>{ this.onclick(); return false;};return true;</xsl:attribute>
  2400. <xsl:text/><xts:string id="IDS_PROP_SEARPATH_VIEW"/><xsl:text/>
  2401. </a>
  2402. </dp:link>
  2403. </dp:section>
  2404. </dp:list>
  2405. </dp:section>
  2406. </dp:list>
  2407. </lyt:section>
  2408. <!-- Created -->
  2409. <!-- ============================================================ -->
  2410. <lyt:section>
  2411. <dp:list width="100%">
  2412. <dp:section>
  2413. <dp:label valign="top" width="15%"><xts:string id="IDS_PROP_CREATED"/></dp:label>
  2414. <dp:text wrap="wrap" valign="top" >
  2415. <xsl:variable name="creationTime">
  2416. <xsl:value-of select="xtsext:formatDateFromUTC( string( $the-object/cm:creationTime ), number( '2' ), number( '3' ), string( $timeZone ), string( $contentLocale ))"/>
  2417. </xsl:variable>
  2418. <xsl:value-of select="xtsext:enforceBTD($creationTime, 'auto', $productLocale, boolean($isBidiEnabled='true'))"/>
  2419. </dp:text>
  2420. </dp:section>
  2421. </dp:list>
  2422. </lyt:section>
  2423. <!-- Modified -->
  2424. <!-- ============================================================ -->
  2425. <lyt:section>
  2426. <dp:list width="100%">
  2427. <dp:section>
  2428. <dp:label valign="top" width="15%"><xts:string id="IDS_PROP_MODIFIED"/></dp:label>
  2429. <dp:text wrap="wrap" valign="top">
  2430. <xsl:variable name="modifTime">
  2431. <xsl:value-of select="xtsext:formatDateFromUTC(string( $the-object/cm:modificationTime ), number( '2' ), number( '3' ), string( $timeZone ), string( $contentLocale ) )"/>
  2432. </xsl:variable>
  2433. <xsl:value-of select="xtsext:enforceBTD($modifTime, 'auto', $productLocale, boolean($isBidiEnabled='true'))"/>
  2434. </dp:text>
  2435. </dp:section>
  2436. </dp:list>
  2437. </lyt:section>
  2438. <!-- Icon -->
  2439. <!-- ============================================================ -->
  2440. <lyt:section>
  2441. <dp:list width="100%">
  2442. <xsl:variable name="customIconURI">
  2443. <xsl:if test="$the-object/cm:iconURI and $the-object/cm:iconURI!=''">
  2444. <xsl:value-of select="$the-object/cm:iconURI"/>
  2445. </xsl:if>
  2446. </xsl:variable>
  2447. <xsl:variable name="sysIcon">
  2448. <xsl:choose>
  2449. <xsl:when test="$objClass = 'document'">
  2450. <xsl:variable name="documentType">
  2451. <xsl:choose>
  2452. <xsl:when test="$target">
  2453. <xsl:value-of select="$target/cm:documentType"/>
  2454. </xsl:when>
  2455. <xsl:otherwise>
  2456. <xsl:value-of select="$the-object/cm:documentType"/>
  2457. </xsl:otherwise>
  2458. </xsl:choose>
  2459. </xsl:variable>
  2460. <xsl:value-of select="key('system-param', 'ui_objects')/*[@class = $objClass]/@icon"/><xsl:text/>
  2461. <xsl:value-of select="/root/system/param[@name='ui_graphics']/param[@name='document_format']/format[@name = $documentType]/@icon"/>
  2462. </xsl:when>
  2463. <xsl:when test="$objClass = 'documentContent'">
  2464. <xsl:choose>
  2465. <xsl:when test="$target">
  2466. <xsl:value-of select="key('system-param', 'ui_graphics')/param[@name='output_format']/format[@name=$target/cm:format]/@icon"/>
  2467. </xsl:when>
  2468. <xsl:otherwise>
  2469. <xsl:value-of select="key('system-param', 'ui_graphics')/param[@name='output_format']/format[@name=$the-object/cm:format]/@icon"/>
  2470. </xsl:otherwise>
  2471. </xsl:choose>
  2472. </xsl:when>
  2473. <xsl:when test="$objClass = 'output'">
  2474. <xsl:value-of select="key('system-param', 'ui_graphics')/param[@name='agentHotlist_format']/format[@name='agentOutputHotlist']/@icon"/>
  2475. </xsl:when>
  2476. <xsl:when test="$objClass = 'launchable'">
  2477. <xsl:value-of select="key('system-param', 'ui_objects')/*[@class = $objClass]/launchableType[@name = $launchableType]/@icon"/>
  2478. </xsl:when>
  2479. <xsl:otherwise>
  2480. <xsl:value-of select="key('system-param', 'ui_objects')/*[@class = $objClass]/@icon"/>
  2481. </xsl:otherwise>
  2482. </xsl:choose>
  2483. </xsl:variable>
  2484. <xsl:variable name="scSuffix" select="key('system-param', 'ui_graphics')/param[@name='shortcut_suffix']"/>
  2485. <xsl:variable name="stdIconName">
  2486. <xsl:choose>
  2487. <xsl:when test="$sysIcon!=''">
  2488. <xsl:value-of select="$image_root"/>icon_<xsl:value-of select="$sysIcon"/>
  2489. <xsl:if test="$uiClass='shortcut'">
  2490. <xsl:value-of select="$scSuffix"/>
  2491. </xsl:if>
  2492. <xsl:text/>.gif<xsl:text/>
  2493. </xsl:when>
  2494. <xsl:otherwise>
  2495. <xsl:value-of select="$image_root"/>icon_unknown.gif<xsl:text/>
  2496. </xsl:otherwise>
  2497. </xsl:choose>
  2498. </xsl:variable>
  2499. <dp:section>
  2500. <dp:label valign="top" width="15%"><xts:string id="IDS_PROP_ICON"/></dp:label>
  2501. <dp:text wrap="nowrap" valign="top">
  2502. <xsl:variable name="iconLabel"><xts:string id="IDS_PROP_STANDARD_ENTRY_ICON_ALT"/></xsl:variable>
  2503. <img width="16" id="icon_preview" align="absmiddle" style="height: 16px;">
  2504. <xsl:attribute name="alt"><xsl:value-of select="$iconLabel"/></xsl:attribute>
  2505. <xsl:attribute name="src">
  2506. <xsl:choose>
  2507. <xsl:when test="$customIconURI=''">
  2508. <xsl:value-of select="$stdIconName"/>
  2509. </xsl:when>
  2510. <xsl:otherwise>
  2511. <xsl:choose>
  2512. <!-- Ignore external URLs -->
  2513. <xsl:when test="contains($customIconURI,':/') or contains($customIconURI,'\\') or contains($customIconURI,'//')">
  2514. <!-- blank -->
  2515. </xsl:when>
  2516. <!-- Relative URLs -->
  2517. <xsl:when test="contains($customIconURI, '/') or contains($customIconURI, '\')">
  2518. <xsl:choose>
  2519. <!-- Relative that doesn't start with / -->
  2520. <xsl:when test="not(starts-with($customIconURI, '/'))">
  2521. <xsl:value-of select="$webRoot"/>/<xsl:value-of select="$customIconURI"/>
  2522. </xsl:when>
  2523. <!-- Relative that better start with / -->
  2524. <xsl:otherwise>
  2525. <xsl:value-of select="$webRoot"/><xsl:value-of select="$customIconURI"/>
  2526. </xsl:otherwise>
  2527. </xsl:choose>
  2528. </xsl:when>
  2529. <xsl:otherwise>
  2530. <xsl:value-of select="$image_root"/><xsl:value-of select="$customIconURI"/>
  2531. </xsl:otherwise>
  2532. </xsl:choose>
  2533. </xsl:otherwise>
  2534. </xsl:choose>
  2535. </xsl:attribute>
  2536. </img>
  2537. <xsl:variable name="iconProp">
  2538. <xsl:choose>
  2539. <xsl:when test="/root/cm:queryResponse/*/cm:iconURI and /root/cm:queryResponse/*/cm:iconURI!=''">
  2540. <xts:string id="IDS_PROP_CUSTOM"/>
  2541. </xsl:when>
  2542. <xsl:otherwise>
  2543. <xts:string id="IDS_PROP_STANDARD"/>
  2544. </xsl:otherwise>
  2545. </xsl:choose>
  2546. </xsl:variable>
  2547. <span id="iconType" style="padding-left:10px;padding-right:10px;">
  2548. <xsl:value-of select="$iconProp"/>
  2549. </span>
  2550. <xsl:if test="$the-object/cm:iconURI[@modifiable='true'] and not($noUserProfile)">
  2551. <span>
  2552. <xsl:if test="$is-ui-rtl">
  2553. <xsl:attribute name="dir">rtl</xsl:attribute>
  2554. </xsl:if>
  2555. <a href="#" role="button">
  2556. <xsl:attribute name="onclick">javascript:iconDialog.show();</xsl:attribute>
  2557. <xsl:attribute name="onkeypress">javascript:<xsl:value-of select="$chkSpaceEnterKeyEvent"/>{ this.onclick(); return false;} return true;</xsl:attribute>
  2558. <xsl:text/><xts:string id="IDS_PROP_EDIT"/><xsl:text/>
  2559. </a>
  2560. </span>
  2561. </xsl:if>
  2562. <div id="customIconType" style="display:none"><xts:string id="IDS_PROP_CUSTOM" tabindex="0"/></div>
  2563. <div id="stdIconType" style="display:none"><xts:string id="IDS_PROP_STANDARD" tabindex="0"/></div>
  2564. </dp:text>
  2565. <xsl:if test="$the-object/cm:iconURI[@modifiable='true']">
  2566. <script language="javascript">
  2567. var g_CustomIcon = "<xsl:value-of select="xtsext:javascriptencode(string(/root/cm:queryResponse/*/cm:iconURI))"/>";
  2568. function buildIconName()
  2569. {
  2570. var sCustomIconURI = document.pform.m_p_iconURI ? removeUCCFromStr(document.pform.m_p_iconURI.value) : '';
  2571. var sImagePath = "<xsl:value-of select="xtsext:javascriptencode(string($image_root))"/>";
  2572. var sWebRoot = "<xsl:value-of select="xtsext:javascriptencode(string($webRoot))"/>";
  2573. var sIcon = "";
  2574. if (sCustomIconURI == '')
  2575. {
  2576. sIcon = "<xsl:value-of select="$stdIconName"/>";
  2577. }
  2578. else
  2579. {
  2580. <!-- ignore absolute urls -->
  2581. if ( sCustomIconURI.indexOf("\\\\") != -1 || sCustomIconURI.indexOf("//") != -1 || sCustomIconURI.indexOf(":/") != -1 )
  2582. {
  2583. // No place for absolute URLs in here
  2584. }
  2585. // relative
  2586. else if ( sCustomIconURI.indexOf("/") != -1 || sCustomIconURI.indexOf("\\") != -1 )
  2587. {
  2588. <!-- // relative - doesn't start with / -->
  2589. if (!(sCustomIconURI.indexOf("/") == 0))
  2590. sIcon = sWebRoot + "/" + sCustomIconURI;
  2591. else
  2592. sIcon = sWebRoot + sCustomIconURI;
  2593. }
  2594. else
  2595. {
  2596. sIcon = sImagePath + sCustomIconURI;
  2597. }
  2598. }
  2599. return sIcon;
  2600. }
  2601. function updateIconPreview()
  2602. {
  2603. // Update the preview
  2604. document.getElementById("icon_preview").src = buildIconName();
  2605. // Update the label
  2606. var sCustomIconURI = document.pform.m_p_iconURI ? removeUCCFromStr(document.pform.m_p_iconURI.value) : '';
  2607. if (sCustomIconURI == '')
  2608. {
  2609. document.getElementById("iconType").innerHTML = document.getElementById("stdIconType").innerHTML;
  2610. if (document.pform.icon_radio)
  2611. {
  2612. document.pform.icon_radio[0].checked=true;
  2613. }
  2614. }
  2615. else
  2616. document.getElementById("iconType").innerHTML = document.getElementById("customIconType").innerHTML;
  2617. saveIconInfo();
  2618. }
  2619. function restoreIconInfo()
  2620. {
  2621. if (g_CustomIcon == '')
  2622. {
  2623. document.pform.icon_radio[0].checked = true;
  2624. document.pform.m_p_iconURI.value = "";
  2625. }
  2626. else
  2627. {
  2628. <xsl:choose>
  2629. <xsl:when test="$isBidiEnabled = 'true'">
  2630. document.pform.m_p_iconURI.value = bidi.sttInjectUCCIntoStr(g_CustomIcon, 'filepath');
  2631. </xsl:when>
  2632. <xsl:otherwise>
  2633. document.pform.m_p_iconURI.value = g_CustomIcon;
  2634. </xsl:otherwise>
  2635. </xsl:choose>
  2636. document.pform.m_p_iconURI.value = g_CustomIcon;
  2637. document.pform.icon_radio[1].checked = true;
  2638. }
  2639. }
  2640. function saveIconInfo()
  2641. {
  2642. g_CustomIcon = document.pform.m_p_iconURI ? removeUCCFromStr(document.pform.m_p_iconURI.value) : '';
  2643. }
  2644. </script>
  2645. <dp:link>
  2646. <!-- link to change the icon -->
  2647. <cp:genericDialog id="iconDialog" interactive="true" align="left" width="500" positionVertical="true" positionHorizontal="true" helpid="iconDialogHelp" focusidOnShiftTab="iconDialogCancel">
  2648. <cp:param name="title"><xts:string id="IDS_PROP_SPECIFY_ENTRY_ICON_TITLE"/></cp:param>
  2649. <cp:param name="body">
  2650. <lyt:layout style="1" lyt:kbA11y="true">
  2651. <lyt:section>
  2652. <dp:list dp:kbA11y="true">
  2653. <dp:section dp:kbA11y="true">
  2654. <table border="0" cellspacing="0" cellpadding="1" role="presentation"><tr tabindex="0" aria-labelledby="iconIntro"><td class="dialogHeaderText" summary="">
  2655. <dp:text>
  2656. <div style="width: 500px; ;white-space: pre-line;"><xts:string id="IDS_PROP_SPECIFY_ENTRY_ICON_INTRO"/></div>
  2657. </dp:text>
  2658. </td></tr></table>
  2659. <span style="position: absolute;margin-left: -9999px; margin-top: -9999px;" id="iconIntro"><xts:string id="IDS_PROP_SPECIFY_ENTRY_ICON_INTRO"/></span>
  2660. </dp:section>
  2661. <dp:section>
  2662. <dp:text/>
  2663. </dp:section>
  2664. <dp:section >
  2665. <utml:radio-group name="icon_radio">
  2666. <utml:default-value>
  2667. <xsl:choose>
  2668. <xsl:when test="/root/cm:queryResponse/*/cm:iconURI and /root/cm:queryResponse/*/cm:iconURI!=''">
  2669. <xsl:value-of select="'custom'"/>
  2670. </xsl:when>
  2671. <xsl:otherwise>
  2672. <xsl:value-of select="'standard'"/>
  2673. </xsl:otherwise>
  2674. </xsl:choose>
  2675. </utml:default-value>
  2676. <div>
  2677. <dp:choice id="IDS_PROP_ENTRY_ICON_LABEL" title="IDS_PROP_ENTRY_ICON_LABEL">
  2678. <dp:section1 type="radio">
  2679. <utml:input type="radio" value="standard" onclick="this.form.m_p_iconURI.value = '';this.form.m_p_iconURI.disabled=true" id="std"/>
  2680. </dp:section1>
  2681. <dp:section2>
  2682. <label for="std"><xts:string id="IDS_PROP_STANDARD_ENTRY_ICON_LABEL"/></label>
  2683. </dp:section2>
  2684. <dp:section1>
  2685. <utml:input type="radio" value="custom" id="custom">
  2686. <xsl:attribute name="onclick">this.form.m_p_iconURI.disabled=false</xsl:attribute>
  2687. </utml:input>
  2688. </dp:section1>
  2689. <dp:section2>
  2690. <label for="custom"><xts:string id="IDS_PROP_SPECIFY_ICON_LABEL"/></label>
  2691. </dp:section2>
  2692. <dp:section3>
  2693. <xsl:variable name="initValue">
  2694. <xsl:value-of select="/root/cm:queryResponse/*/cm:iconURI"/>
  2695. </xsl:variable>
  2696. <utml:input type="text" name="m_p_iconURI" size="70" maxlength="256" title="custom" stttype="filepath">
  2697. <utml:value>
  2698. <xsl:value-of select="xtsext:sttInjectUCCIntoStr($initValue, 'filepath', boolean($isBidiEnabled='true'))"/>
  2699. </utml:value>
  2700. <xsl:if test="/root/cm:queryResponse/*/cm:iconURI/@nil = 'true'">
  2701. <xsl:attribute name="disabled">true</xsl:attribute>
  2702. </xsl:if>
  2703. </utml:input>
  2704. </dp:section3>
  2705. </dp:choice>
  2706. </div>
  2707. </utml:radio-group>
  2708. </dp:section>
  2709. </dp:list>
  2710. </lyt:section>
  2711. </lyt:layout>
  2712. </cp:param>
  2713. <cp:param name="footer">
  2714. <!-- NOTE: onkeydown required to force navigation within the popup element -->
  2715. <dp:simpleFooter>
  2716. <td>
  2717. <table cellpadding="0" cellspacing="0" role="presentation">
  2718. <tr>
  2719. <td>
  2720. <cp:cmdButton defaultState="active" id="iconDialogOK">
  2721. <cp:cmdButtonText><xts:string id="IDS_OK"/></cp:cmdButtonText>
  2722. <cp:cmdButtonEvents>
  2723. <cp:cmdButtonEvent name="onclick">javascript:iconDialog.hide(); updateIconPreview(); setPropertiesChanged();</cp:cmdButtonEvent>
  2724. <cp:cmdButtonEvent name="onkeypress">javascript:<xsl:value-of select="$chkSpaceEnterKeyEvent"/>{ this.onclick(); return false; } return true;</cp:cmdButtonEvent>
  2725. </cp:cmdButtonEvents>
  2726. </cp:cmdButton>
  2727. </td>
  2728. <td>
  2729. <cp:cmdButton defaultState="active" id="iconDialogCancel">
  2730. <cp:cmdButtonText><xts:string id="IDS_CANCEL"/></cp:cmdButtonText>
  2731. <cp:cmdButtonEvents>
  2732. <cp:cmdButtonEvent name="onclick">javascript:iconDialog.hide();restoreIconInfo();</cp:cmdButtonEvent>
  2733. <cp:cmdButtonEvent name="onkeypress">javascript:<xsl:value-of select="$chkSpaceEnterKeyEvent"/> { this.onclick(); return false; } return true;</cp:cmdButtonEvent>
  2734. <cp:cmdButtonEvent name="onkeydown">javascript:if(event.keyCode==9) <xsl:text>{</xsl:text> if(event.shiftKey==true) return true; else { if(document.getElementById("iconDialogHelp")) {document.getElementById("iconDialogHelp").focus(); return false; } } } return true;</cp:cmdButtonEvent>
  2735. </cp:cmdButtonEvents>
  2736. </cp:cmdButton>
  2737. </td>
  2738. </tr>
  2739. </table>
  2740. </td>
  2741. </dp:simpleFooter>
  2742. </cp:param>
  2743. </cp:genericDialog>
  2744. <!-- <script language="javascript">
  2745. updateIconPreview();
  2746. </script> -->
  2747. </dp:link>
  2748. </xsl:if>
  2749. </dp:section>
  2750. </dp:list>
  2751. </lyt:section>
  2752. <!-- Indexed date and view -->
  2753. <!-- ============================================================ -->
  2754. <lyt:section>
  2755. <xsl:variable name="indexedTime" select="/root/indexResult//*[local-name()='getResponse']/*[local-name()='result']/*[local-name()='details']/*[local-name()='item']/*[local-name()='modificationTime']"/>
  2756. <xsl:if test="$userCanUseIndexSearch and $indexedTime">
  2757. <dp:list width="100%">
  2758. <dp:section>
  2759. <dp:label valign="top" width="15%"><xts:string id="IDS_PROP_INDEXED"/></dp:label>
  2760. <dp:text wrap="wrap" valign="top">
  2761. <xsl:value-of select="xtsext:formatDateFromUTC(string( $indexedTime ), number( '2' ), number( '3' ), string( $timeZone ), string( $contentLocale ) )"/>
  2762. </dp:text>
  2763. <dp:list>
  2764. <dp:section valign="top">
  2765. <dp:link>
  2766. <dp:text>
  2767. <utml:a utml:op="stack-up" utml:formName="pform" utml:kbA11y="true">
  2768. <utml:target><xsl:value-of select="$app"/>/view_indexdetails.xts</utml:target>
  2769. <utml:validate>validate</utml:validate>
  2770. <xsl:text/><xts:string id="IDS_VIEW_INDEXING_DETAILS"/><xsl:text/>
  2771. </utml:a>
  2772. </dp:text>
  2773. </dp:link>
  2774. </dp:section>
  2775. </dp:list>
  2776. </dp:section>
  2777. </dp:list>
  2778. </xsl:if>
  2779. <xsl:if test="$the-object/cm:base or $the-object/cm:target">
  2780. <cp:genericDialog id="decision" interactive="false" align="left" width="300" positionVertical="true" positionHorizontal="true" helpid="decisionHelp" focusidOnShiftTab="decisionCancel">
  2781. <cp:param name="title"><xts:string id="IDS_PROP_CHANGES_TITLE"/></cp:param>
  2782. <cp:param name="body">
  2783. <lyt:layout style="1" lyt:kbA11y="true">
  2784. <lyt:section>
  2785. <dp:list dpkbA11y="true">
  2786. <dp:section>
  2787. <dp:text><xts:string id="IDS_PROP_SAVE_CHANGES_1"/></dp:text>
  2788. </dp:section>
  2789. <dp:section>
  2790. <dp:text/>
  2791. </dp:section>
  2792. <dp:section dpkbA11y="true">
  2793. <dp:text><xts:string id="IDS_PROP_SAVE_CHANGES_2"/></dp:text>
  2794. </dp:section>
  2795. <dp:section>
  2796. <dp:text/>
  2797. </dp:section>
  2798. <dp:section>
  2799. <dp:text/>
  2800. </dp:section>
  2801. </dp:list>
  2802. </lyt:section>
  2803. </lyt:layout>
  2804. </cp:param>
  2805. <cp:param name="footer">
  2806. <dp:simpleFooter>
  2807. <df:button df:id="IDS_PROP_SAVE_CHANGES_YES" df:style="href" df:href="javascript:decision.hide();redirect('save');" df:kbA11y="true"/>
  2808. <df:button df:id="IDS_PROP_SAVE_CHANGES_NO" df:style="href" df:href="javascript:decision.hide();redirect();" df:kbA11y="true"/>
  2809. <df:button df:id="IDS_CANCEL" df:style="href" id="decisionCancel" df:href="javascript:decision.hide();" focusidOnTab="decisionHelp" df:kbA11y="true"/>
  2810. </dp:simpleFooter>
  2811. </cp:param>
  2812. </cp:genericDialog>
  2813. </xsl:if>
  2814. </lyt:section>
  2815. </lyt:layout>
  2816. </td>
  2817. </tr><tr><td></td><td></td></tr>
  2818. </table>
  2819. <xsl:if test="string(/root/*[local-name()='queryResponse'])!=''">
  2820. <!-- Horizontal line -->
  2821. <xsl:call-template name="renderLanguages"/>
  2822. <!-- this section was the largest in a small section so i eliminated it -->
  2823. <xsl:call-template name="render-retention"/>
  2824. </xsl:if>
  2825. <xsl:if test="starts-with(string($the-object/cm:objectClass),'reportDataServiceAgentDefinition')">
  2826. <!-- add source report info when subscription -->
  2827. <xsl:variable name="rdsadName">
  2828. <xsl:choose>
  2829. <xsl:when test="string(key('env-param','m_periodicalProducer'))=''">
  2830. <cf:do-the-path-link>
  2831. <cf:param name="familytree">$rdsad-path/cm:periodicalProducer/*/cm:ancestors</cf:param>
  2832. <cf:param name="familymember">$rdsad-path/cm:periodicalProducer/*/cm:defaultName</cf:param>
  2833. <cf:param name="home"><xsl:value-of select="'/content'"/></cf:param>
  2834. </cf:do-the-path-link>
  2835. </xsl:when>
  2836. <xsl:otherwise>
  2837. <cf:do-the-path-link>
  2838. <cf:param name="familytree">/root/selected/cm:queryResponse/*/cm:ancestors</cf:param>
  2839. <cf:param name="familymember">/root/selected/cm:queryResponse/*/cm:defaultName</cf:param>
  2840. <cf:param name="home"><xsl:value-of select="'/content'"/></cf:param>
  2841. </cf:do-the-path-link>
  2842. </xsl:otherwise>
  2843. </xsl:choose>
  2844. </xsl:variable>
  2845. <lyt:layout style="2" border="yes" width="100%" lyt:kbA11y="true">
  2846. <lyt:section>
  2847. <dp:list>
  2848. <dp:section>
  2849. <dp:label valign="top" width="15%"><xts:string id="IDS_PROP_SOURCE_RPT"/></dp:label>
  2850. <dp:text valign="top" width="100%">
  2851. <xsl:value-of select="$rdsadName"/>
  2852. </dp:text>
  2853. <dp:text></dp:text>
  2854. <xsl:if test="$hasCondSubscriptionsCapability">
  2855. <dp:text valign="top"><utml:a utml:op="maintain" utml:formName="pform">
  2856. <xsl:attribute name="onclick">setSelectParams('so.select','<xsl:value-of select="$the-object/cm:objectClass"/>Base',<xsl:text/>
  2857. <xsl:choose>
  2858. <xsl:when test="string($rdsad-path/cm:periodicalProducer/*/cm:searchPath)!='' or string(key('env-param','m_periodicalProducer'))!=''">
  2859. <xsl:text/>'so.defaultObject','<xsl:text/>
  2860. <xsl:choose>
  2861. <xsl:when test="string(key('env-param','m_periodicalProducer'))!=''"><xsl:value-of select="xtsext:javascriptencode(string(key('env-param','m_periodicalProducer')))"/></xsl:when>
  2862. <xsl:otherwise><xsl:value-of select="xtsext:javascriptencode(string($rdsad-path/cm:periodicalProducer/*/cm:searchPath))"/></xsl:otherwise>
  2863. </xsl:choose>
  2864. </xsl:when>
  2865. <xsl:otherwise>
  2866. <xsl:text/>'so.defaultLocation','<xsl:text/>
  2867. <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>
  2868. </xsl:otherwise>
  2869. </xsl:choose>
  2870. <xsl:text/>');<xsl:text/>
  2871. </xsl:attribute>
  2872. <utml:target><xsl:value-of select="$app"/>/select/select.xts</utml:target>
  2873. <utml:validate>validate</utml:validate>
  2874. <xsl:text/><xts:string id="IDS_PROP_LINK_TO_REPORT"/><xsl:text/></utml:a>
  2875. </dp:text>
  2876. </xsl:if>
  2877. </dp:section>
  2878. </dp:list>
  2879. </lyt:section>
  2880. </lyt:layout>
  2881. </xsl:if>
  2882. <!-- show PP series7 gateway -->
  2883. <xsl:if test="$the-object/cm:objectClass ='powerPlayCube' or $the-object/cm:objectClass ='powerPlayReport'">
  2884. <lyt:layout style="1" border="yes" lyt:kbA11y="true">
  2885. <lyt:section>
  2886. <dp:section>
  2887. <dp:input>
  2888. <dp:section1>
  2889. <xts:string id="IDS_PROP_PP_GATEWAY"/>
  2890. </dp:section1>
  2891. <dp:section2>
  2892. <utml:input type="text" class="pInput" size="30" name="m_p_gateway">
  2893. <utml:read-only>
  2894. <xsl:choose>
  2895. <xsl:when test="$the-object/cm:gateway[@modifiable = 'false']">true</xsl:when>
  2896. <xsl:otherwise>false</xsl:otherwise>
  2897. </xsl:choose>
  2898. </utml:read-only>
  2899. <utml:value>
  2900. <xsl:value-of select="$the-object/cm:gateway"/>
  2901. </utml:value>
  2902. </utml:input>
  2903. </dp:section2>
  2904. </dp:input>
  2905. </dp:section>
  2906. </lyt:section>
  2907. </lyt:layout>
  2908. </xsl:if>
  2909. <!-- Shortcut - Target properties -->
  2910. <xsl:if test="$the-object/cm:objectClass = 'shortcut'">
  2911. <xsl:variable name="canReadOnTarget" select="contains($target/cm:permissions, 'read')"/>
  2912. <xsl:variable name="canWriteOnTarget" select="contains($target/cm:permissions, 'write')"/>
  2913. <xsl:variable name="canSPOnTarget" select="contains($target/cm:permissions, 'setPolicy')"/>
  2914. <xsl:variable name="sourceProp">
  2915. <cf:do-the-path-link>
  2916. <cf:param name="familytree">$target/cm:ancestors</cf:param>
  2917. <cf:param name="familymember">$target/cm:defaultName</cf:param>
  2918. <cf:param name="home"><xsl:value-of select="$start-at-path"/></cf:param>
  2919. </cf:do-the-path-link>
  2920. </xsl:variable>
  2921. <lyt:layout style="1" border="yes" lyt:kbA11y="true">
  2922. <lyt:section>
  2923. <dp:list>
  2924. <dp:section>
  2925. <dp:label valign="top">
  2926. <xts:string id="IDS_PROP_SHORTCUT_TO"/>
  2927. </dp:label>
  2928. <dp:text wrap="wrap" valign="top">
  2929. <xsl:value-of select="$sourceProp"/>
  2930. </dp:text>
  2931. <xsl:choose>
  2932. <xsl:when test="$the-object/cm:target/cm:nil">
  2933. <dp:text valign="top"><xts:string id="IDS_PROP_SOURCE_NOTFOUND"/></dp:text>
  2934. </xsl:when>
  2935. <xsl:when test="$canReadOnTarget or $canWriteOnTarget or $canSPOnTarget">
  2936. <dp:text valign="top">
  2937. <a href="#">
  2938. <xsl:attribute name="onclick">javascript:if(!getPropertiesChanged()){redirect();} else {decision.show();}</xsl:attribute>
  2939. <xsl:attribute name="onkeypress">javascript:<xsl:value-of select="$chkSpaceEnterKeyEvent"/>{if(!getPropertiesChanged()){redirect(); return false;} else {decision.show();return false;} }return true;</xsl:attribute>
  2940. <xsl:text/><xts:string id="IDS_PROP_SOURCE_PROPERTIES"/><xsl:text/>
  2941. </a>
  2942. </dp:text>
  2943. </xsl:when>
  2944. </xsl:choose>
  2945. </dp:section>
  2946. </dp:list>
  2947. </lyt:section>
  2948. </lyt:layout>
  2949. </xsl:if>
  2950. <!-- repository options and package info -->
  2951. <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'"/>
  2952. <xsl:if test="/root/env/param[@name='m_class'] = 'package' or $renderRepositoryOverride">
  2953. <lyt:layout style="1" border="yes" width="100%" lyt:kbA11y="true">
  2954. <lyt:section>
  2955. <xsl:if test="$renderRepositoryOverride='true'">
  2956. <xsl:variable name="hasRepositoryRules" select="count(/root/cm:queryResponse[1]/*/cm:repositoryRules/cm:repositoryRule) > 0"/>
  2957. <xsl:variable name="isRepositoryRulesNotAcquired" select="/root/cm:queryResponse[1]/*/cm:repositoryRules/@acquired = 'false'"/>
  2958. <xsl:variable name="isRepositoryRulesOverriden" select="$isRepositoryRulesNotAcquired and $hasRepositoryRules"/>
  2959. <xsl:variable name="reportVerRepDataSource" select="/root/cm:queryResponse[1]/*/cm:repositoryRules/cm:repositoryRule[cm:objectClass='reportVersion']/cm:dataSourceName"/>
  2960. <xsl:variable name="documentVerRepDataSource" select="/root/cm:queryResponse[1]/*/cm:repositoryRules/cm:repositoryRule[cm:objectClass='documentVersion']/cm:dataSourceName"/>
  2961. <script language="javascript">
  2962. function toggleRepositoryRulesOverride(){
  2963. var controlsEl = document.getElementById("repositoryRulesEdit");
  2964. var docForm = document.pform;
  2965. if (docForm.overrideRepositoryRules.checked){
  2966. controlsEl.style.visibility = "visible";
  2967. }else{
  2968. //hide the selection controls and set the selection to the parents selection
  2969. controlsEl.style.visibility = "hidden";
  2970. }
  2971. setRepositoryDataSourceName(docForm.parent_reportRepositoryDataSource.value, docForm.parent_documentRepositoryDataSource.value);
  2972. var clearEl = document.getElementById("rdsClear");
  2973. if (docForm.parent_reportRepositoryDataSource.value == ""){
  2974. clearEl.style.display = "none";
  2975. } else{
  2976. clearEl.style.display = "inline";
  2977. }
  2978. }
  2979. function setRepositoryDataSourceName(report_repoName, doc_repoName){
  2980. var docForm = document.pform;
  2981. docForm.m_reportRepositoryDataSource.value = report_repoName;
  2982. docForm.m_documentRepositoryDataSource.value = doc_repoName;
  2983. var dataSourceSpanEl = document.getElementById("repRulesText");
  2984. dataSourceSpanEl.innerHTML = "";
  2985. dataSourceSpanEl.appendChild(document.createTextNode(createDataSourceString()));
  2986. }
  2987. function clearRepositoryRules(){
  2988. setRepositoryDataSourceName("","");
  2989. document.getElementById("rdsClear").style.display = "none";
  2990. setPropertiesChanged();
  2991. }
  2992. function createDataSourceString(){
  2993. var returnString = "";
  2994. var docForm = document.pform;
  2995. if (docForm.m_reportRepositoryDataSource.value == docForm.m_documentRepositoryDataSource.value){
  2996. if (docForm.m_reportRepositoryDataSource.value == ""){
  2997. returnString = "<xts:string encode="javascript" id="IDS_NONE"/>";
  2998. } else{
  2999. returnString = docForm.m_reportRepositoryDataSource.value;
  3000. }
  3001. } else{
  3002. if (docForm.m_reportRepositoryDataSource.value == ""){
  3003. returnString = docForm.m_documentRepositoryDataSource.value;
  3004. } else if (docForm.m_documentRepositoryDataSource.value == ""){
  3005. returnString = docForm.m_reportRepositoryDataSource.value;
  3006. } else {
  3007. returnString = docForm.m_reportRepositoryDataSource.value + "," + docForm.m_documentRepositoryDataSource.value;
  3008. }
  3009. }
  3010. return returnString;
  3011. }
  3012. function maskWindow() {
  3013. var d = document.getElementById("windowMask");
  3014. d.style.display = "block";
  3015. }
  3016. var currentSOReturnValue;
  3017. function openDialog() {
  3018. var i = document.getElementById("dialogWindowContainer");
  3019. if(i.style.display == "block") closeDialog();
  3020. //currrentSOReturnValue = document.pform["so.return.m"].value;
  3021. var soRetEl = document.getElementById("soReturnM");
  3022. currrentSOReturnValue = soRetEl.getAttribute("value");
  3023. soRetEl.parentNode.removeChild(soRetEl);
  3024. setDialogContainer();
  3025. var formEl = document.getElementById("theForm");
  3026. var input = document.createElement("input");
  3027. input.setAttribute("id","modalnput");
  3028. input.setAttribute("type", "hidden");
  3029. input.setAttribute("name", "md.callBack");
  3030. input.setAttribute("value", "xml");
  3031. formEl.appendChild(input);
  3032. document.pform.m.value = "portal/select/select.xts";
  3033. document.pform["so.select"].value = "repositoryDataSource";
  3034. var dsName = "";
  3035. if (document.pform.m_reportRepositoryDataSource.value != ""){
  3036. dsName = document.pform.m_reportRepositoryDataSource.value;
  3037. } else if (document.pform.m_documentRepositoryDataSource.value != ""){
  3038. dsName = document.pform.m_documentRepositoryDataSource.value;
  3039. }
  3040. document.pform["so.defaultLocation"].value = "CAMID(\":\")";
  3041. document.pform["so.defaultObject"].value = dsName!='' ? "CAMID(\":\")/dataSource[@name='" + dsName.replace(/'/g,"''") + "']" : "";
  3042. document.pform.target = "dialogWindow2";
  3043. document.pform.submit();
  3044. }
  3045. function setDialogContainer() {
  3046. // Get ready to show a modal dialog
  3047. maskWindow();
  3048. var i = document.getElementById("dialogWindowContainer");
  3049. i.style.display = "block";
  3050. // Size it
  3051. i.style.height = "325px";
  3052. i.style.width = "600px";
  3053. // Position it
  3054. i.style.position="absolute";
  3055. i.style.top = ((document.body.clientHeight - i.scrollHeight) / 2) + document.body.scrollTop + "px";
  3056. i.style.left = ((document.body.clientWidth - i.scrollWidth) / 2) + document.body.scrollLeft + "px";
  3057. console.log("top: " + i.style.top + " left: " + i.style.left);
  3058. }
  3059. //-- Closes a simple dialog
  3060. function closeDialog() {
  3061. var inputEl = document.getElementById("modalnput");
  3062. inputEl.parentNode.removeChild(inputEl);
  3063. var soRetEl = document.createElement("input");
  3064. soRetEl.setAttribute("id","soReturnM");
  3065. soRetEl.setAttribute("type", "hidden");
  3066. soRetEl.setAttribute("name", "so.return.m");
  3067. soRetEl.setAttribute("value", currrentSOReturnValue);
  3068. var formEl = document.getElementById("theForm");
  3069. formEl.appendChild(soRetEl);
  3070. document.pform.target = "_self";
  3071. document.pform.m.value ="<xsl:value-of select="$app"/>/properties_general.xts";
  3072. document.getElementById("windowMask").style.display = "none";
  3073. document.getElementById("dialogWindowContainer").style.display = "none";
  3074. document.getElementById("dialogWindow2").src = "../ps/images/space.gif";
  3075. document.getElementById("repositoryRulesEditLink").focus();
  3076. }
  3077. //-- Handle Call back
  3078. //------------------------------------------------------------------------------------------
  3079. function ccModalCmdTarget(cmd) {
  3080. var result = "";
  3081. if (cmd == 'error')
  3082. result = document.getElementById(dialogWindow()).document.enterdfaultact();
  3083. else
  3084. result = cmd;
  3085. closeDialog();
  3086. }
  3087. function ccModalCallBack(cmd,sResponse) {
  3088. var result = "";
  3089. if (cmd == 'error')
  3090. result = cmd;
  3091. else
  3092. result = cmd;
  3093. closeDialog();
  3094. if(sResponse!='') {
  3095. var xmlDoc = null;
  3096. var decodedResponse = xmlDecodeResponse(sResponse);
  3097. if (window.DOMParser) {
  3098. xmlDoc=new DOMParser().parseFromString(decodedResponse,"text/xml");
  3099. }
  3100. else { // Internet Explorer (less than IE 7)
  3101. xmlDoc=new ActiveXObject("Microsoft.XMLDOM");
  3102. xmlDoc.async="false";
  3103. xmlDoc.loadXML(decodedResponse);
  3104. }
  3105. var items = xmlDoc.getElementsByTagName("item")[0];
  3106. var dataSourceName = items.getElementsByTagName("value")[0];
  3107. var dataSourceNameValue= dataSourceName.firstChild.nodeValue;
  3108. setRepositoryDataSourceName(dataSourceNameValue, dataSourceNameValue);
  3109. document.getElementById("rdsClear").style.display = "inline";
  3110. setPropertiesChanged();
  3111. }
  3112. }
  3113. </script>
  3114. <utml:input type="hidden" name="m_reportRepositoryDataSource">
  3115. <utml:value><xsl:value-of select="$reportVerRepDataSource"/></utml:value>
  3116. </utml:input>
  3117. <utml:input type="hidden" name="m_documentRepositoryDataSource" >
  3118. <utml:value><xsl:value-of select="$documentVerRepDataSource"/></utml:value>
  3119. </utml:input>
  3120. <utml:input type="hidden" name="parent_reportRepositoryDataSource">
  3121. <utml:value><xsl:value-of select="/root/cm:queryResponse[1]/*/cm:parent/*/cm:repositoryRules/cm:repositoryRule[cm:objectClass='reportVersion']/cm:dataSourceName"/></utml:value>
  3122. </utml:input>
  3123. <utml:input type="hidden" name="parent_documentRepositoryDataSource" >
  3124. <utml:value><xsl:value-of select="/root/cm:queryResponse[1]/*/cm:parent/*/cm:repositoryRules/cm:repositoryRule[cm:objectClass='documentVersion']/cm:dataSourceName"/></utml:value>
  3125. </utml:input>
  3126. <span style="position: absolute;margin-left: -9999px; margin-top: -9999px;" id="reposTitle"><xts:string id="IDS_PROP_OBJ_REPORT_REPOSITORY"/></span>
  3127. <xsl:variable name="has-no-parent" select="/root/cm:queryResponse/*/cm:parent/cm:root"/>
  3128. <dp:input dp:kbA11y="true" tabindex="0">
  3129. <dp:section1 aria-labelledby="reposTitle">
  3130. <label><xts:string id="IDS_PROP_OBJ_REPORT_REPOSITORY"/></label>
  3131. </dp:section1>
  3132. <dp:section2>
  3133. <dp:choice>
  3134. <dp:section1>
  3135. <table border="0" cellpadding="1" cellspacing="0" style="padding-left: 2px;" role="presentation">
  3136. <tr role="checkbox" id="overrideRepositoryRulesTable" summary="" aria-labelledby="labelForOverrideRepositoryRules" tabindex="0">
  3137. <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>
  3138. <xsl:attribute name="onkeypress">javascript:<xsl:value-of select="$chkSpaceEnterKeyEvent"/>{ return this.onclick(); } return true;</xsl:attribute>
  3139. <xsl:choose>
  3140. <xsl:when test="$isRepositoryRulesOverriden">
  3141. <xsl:attribute name="aria-checked">true</xsl:attribute>
  3142. </xsl:when>
  3143. <xsl:otherwise>
  3144. <xsl:attribute name="aria-checked">false</xsl:attribute>
  3145. </xsl:otherwise>
  3146. </xsl:choose>
  3147. <td class="formText" nowrap="">
  3148. <xsl:choose>
  3149. <xsl:when test="$has-no-parent">
  3150. <utml:input type="checkbox" name="dummyOverrideRepositoryRules" value="true" disabled="true"/>
  3151. <utml:input type="hidden" name="overrideRepositoryRules" value="true"/>
  3152. </xsl:when>
  3153. <xsl:otherwise>
  3154. <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">
  3155. <utml:default-value>
  3156. <xsl:choose>
  3157. <xsl:when test="$isRepositoryRulesOverriden">true</xsl:when>
  3158. <xsl:otherwise>false</xsl:otherwise>
  3159. </xsl:choose>
  3160. </utml:default-value>
  3161. </utml:input>
  3162. </xsl:otherwise>
  3163. </xsl:choose>
  3164. </td>
  3165. <td id="labelForOverrideRepositoryRules" class="formText" nowrap="">
  3166. <label for="overrideRepositoryRules">
  3167. <xsl:text/><xts:string id="IDS_PROP_ADVANCED_REPOSITORY_OVERRIDE"/><xsl:text/>
  3168. </label>
  3169. </td>
  3170. </tr>
  3171. <tr>
  3172. <td><img src="{$webcontent}/images/space.gif" width="1" height="1" border="0"/></td>
  3173. <td>
  3174. <dp:list>
  3175. <dp:section>
  3176. <dp:label>
  3177. <xsl:text/><xts:string id="IDS_PROP_ADVANCED_REPOSITORY_RULES_CONNECT_LABEL"/><xsl:text/>
  3178. </dp:label>
  3179. </dp:section>
  3180. <dp:section>
  3181. <div id="repositoryRules">
  3182. <xsl:variable name="reposConnectName">
  3183. <xsl:choose>
  3184. <xsl:when test="$hasRepositoryRules">
  3185. <xsl:choose>
  3186. <xsl:when test="$reportVerRepDataSource = $documentVerRepDataSource and $documentVerRepDataSource = ''">
  3187. <xsl:text><xts:string id="IDS_NONE"/></xsl:text>
  3188. </xsl:when>
  3189. <xsl:when test="$reportVerRepDataSource = $documentVerRepDataSource">
  3190. <xsl:text/><xsl:value-of select="$reportVerRepDataSource"/><xsl:text/>
  3191. </xsl:when>
  3192. <xsl:when test="$reportVerRepDataSource = ''"><xsl:value-of select="$documentVerRepDataSource"/></xsl:when>
  3193. <xsl:when test="$documentVerRepDataSource = ''"><xsl:value-of select="$reportVerRepDataSource"/></xsl:when>
  3194. <xsl:otherwise>
  3195. <xsl:text/><xsl:value-of select="$reportVerRepDataSource"/><xsl:text/>
  3196. <xsl:text>, </xsl:text>
  3197. <xsl:text/><xsl:value-of select="$documentVerRepDataSource"/><xsl:text/>
  3198. </xsl:otherwise>
  3199. </xsl:choose>
  3200. </xsl:when>
  3201. <xsl:otherwise><xts:string id="IDS_NONE"/></xsl:otherwise>
  3202. </xsl:choose>
  3203. </xsl:variable>
  3204. <dp:text wrap="true">
  3205. <span id="repRulesText">
  3206. <xsl:value-of select="$reposConnectName"/>
  3207. </span>
  3208. </dp:text>
  3209. <!-- aria-labelledby="reposConnect" Tried this everywhere, list, div, secion not same as others -->
  3210. </div>
  3211. <div id="repositoryRulesEdit">
  3212. <xsl:if test="not($has-no-parent) and (not($isRepositoryRulesOverriden) or not($has_write_permission or $has_policy_permission))">
  3213. <xsl:attribute name="style">visibility: hidden</xsl:attribute>
  3214. </xsl:if>
  3215. <dp:link>
  3216. <xsl:variable name="ancTitleSet"><xts:string id="IDS_PROP_REPOSITORY_DATASOURCE_SET"/></xsl:variable>
  3217. <a href="#" title="" alt="" id="repositoryRulesEditLink" role="button">
  3218. <xsl:attribute name="onclick">javascript:openDialog();</xsl:attribute>
  3219. <xsl:attribute name="onkeypress">javascript:<xsl:value-of select="$chkSpaceEnterKeyEvent"/>{ this.onclick(); return false;}return true;</xsl:attribute>
  3220. <xsl:text/><xsl:value-of select="$ancTitleSet"/>
  3221. </a>
  3222. </dp:link>
  3223. <xsl:text>&#160;&#160;</xsl:text>
  3224. <dp:link>
  3225. <xsl:variable name="ancTitleClr"><xts:string id="IDS_PROP_REPOSITORY_DATASOURCE_CLEAR"/></xsl:variable>
  3226. <a href="#" title="" alt="" id="rdsClear">
  3227. <xsl:variable name="hasSelectedDataSource" select="not($reportVerRepDataSource = '') or not($documentVerRepDataSource = '')"/>
  3228. <xsl:if test="not($isRepositoryRulesOverriden and $hasSelectedDataSource)">
  3229. <xsl:attribute name="style">display: none</xsl:attribute>
  3230. </xsl:if>
  3231. <xsl:attribute name="onclick">javascript:clearRepositoryRules();</xsl:attribute>
  3232. <xsl:attribute name="onkeypress">javascript:<xsl:value-of select="$chkSpaceEnterKeyEvent"/>{ this.onclick(); return false;} return true;</xsl:attribute>
  3233. <xsl:text/><xsl:value-of select="$ancTitleClr"/>
  3234. </a>
  3235. </dp:link>
  3236. </div>
  3237. </dp:section>
  3238. </dp:list>
  3239. </td>
  3240. </tr>
  3241. </table>
  3242. </dp:section1>
  3243. </dp:choice>
  3244. </dp:section2>
  3245. </dp:input>
  3246. </xsl:if>
  3247. </lyt:section>
  3248. <lyt:section>
  3249. <xsl:if test="/root/env/param[@name='m_class'] = 'package'"> <!-- package options -->
  3250. <xsl:variable name="qryModeName">
  3251. <xsl:if test="not(contains(/root/packageModel/cm:queryResponse/cm:model/cm:permissions,'read'))">
  3252. <xts:string id="IDS_PROP_PACKAGE_UNAVAILABLE_QUERY_STACK"/>
  3253. </xsl:if>
  3254. <xsl:if test="contains(/root/packageModel/cm:queryResponse/cm:model/cm:permissions,'read')">
  3255. <xsl:variable name="queryMode" select="/root/packageModel/cm:queryResponse/cm:model/options/value/*[name='http://developer.cognos.com/ceba/constants/queryOptionEnum#mode']/value"/>
  3256. <xsl:choose>
  3257. <xsl:when test="not($queryMode)">
  3258. <xts:string id="IDS_PROP_PACKAGE_CLASSIC_QUERY_STACK"/>
  3259. </xsl:when>
  3260. <xsl:when test="not(count($queryMode)=1)">
  3261. <xts:string id="IDS_PROP_PACKAGE_MULTIPLE_QUERY_STACK"/>
  3262. </xsl:when>
  3263. <xsl:when test="string($queryMode)='http://developer.cognos.com/ceba/constants/queryModeEnum#compatible'">
  3264. <xts:string id="IDS_PROP_PACKAGE_CLASSIC_QUERY_STACK"/>
  3265. </xsl:when>
  3266. <xsl:when test="string($queryMode)='http://developer.cognos.com/ceba/constants/queryModeEnum#dynamic'">
  3267. <xts:string id="IDS_PROP_PACKAGE_V5_QUERY_STACK"/>
  3268. </xsl:when>
  3269. <xsl:otherwise>
  3270. <xts:string id="IDS_PROP_PACKAGE_UNKNOWN_QUERY_STACK">
  3271. <xts:param name="queryStack"><xsl:value-of select="string($queryMode)"/></xts:param>
  3272. </xts:string>
  3273. </xsl:otherwise>
  3274. </xsl:choose>
  3275. </xsl:if>
  3276. </xsl:variable>
  3277. <dp:input dp:kbA11y="true" tabindex="0">
  3278. <dp:section1>
  3279. <label><xts:string id="IDS_PROP_PACKAGE_QUERY_STACK"/></label>
  3280. </dp:section1>
  3281. <dp:section2>
  3282. <dp:text wrap="true">
  3283. <xsl:value-of select="$qryModeName"/>
  3284. </dp:text>
  3285. </dp:section2>
  3286. </dp:input>
  3287. </xsl:if>
  3288. </lyt:section>
  3289. </lyt:layout>
  3290. </xsl:if>
  3291. <!-- dataSourceAccessAccount prop of rolapDataSource -->
  3292. <xsl:if test="/root/env/param[@name='m_class'] = 'rolapDataSource'">
  3293. <xsl:variable name="accessAccountProp">
  3294. <xsl:choose>
  3295. <!-- A dataSourceAccessAccount object has just been selected -->
  3296. <xsl:when test="string(key('env-param','accessAccount.so.searchPath')) != '' and key('env-param','accessAccount.so.defaultName')">
  3297. <xsl:value-of select="/root/env/param[@name='accessAccount.so.defaultName']"/>
  3298. </xsl:when>
  3299. <!-- A dataSourceAccessAccount is specified on the entry -->
  3300. <xsl:when test="$the-object/cm:dataSourceAccessAccount/*/cm:objectClass">
  3301. <xsl:choose>
  3302. <xsl:when test="not(string($the-object/cm:dataSourceAccessAccount/*/cm:defaultName)='')">
  3303. <xsl:value-of select="$the-object/cm:dataSourceAccessAccount/*/cm:defaultName"/>
  3304. </xsl:when>
  3305. <xsl:when test="not(string($the-object/cm:dataSourceAccessAccount/*/cm:searchPath)='')">
  3306. <xts:string id="IDS_PROP_UNKNOWN_OWNER"/>
  3307. </xsl:when>
  3308. <xsl:otherwise>
  3309. <xts:string id="IDS_NONE"/>
  3310. </xsl:otherwise>
  3311. </xsl:choose>
  3312. </xsl:when>
  3313. <!-- There is no dataSourceAccessAccount specified -->
  3314. <xsl:otherwise>
  3315. <xts:string id="IDS_NONE"/>
  3316. </xsl:otherwise>
  3317. </xsl:choose>
  3318. </xsl:variable>
  3319. <lyt:layout style="2" width="100%" border="yes" lyt:kbA11y="true">
  3320. <lyt:section>
  3321. <dp:list width="100%">
  3322. <!-- Datasource Access Account -->
  3323. <!-- ============================================================ -->
  3324. <xsl:if test="$the-object/cm:dataSourceAccessAccount/@modifiable = 'true'">
  3325. <dp:section>
  3326. <dp:label valign="top" width="15%" aria-labelledby="labelForDataSourceAccessAccount" tabindex="0"><xts:string id="IDS_PROP_ACCESS_ACCOUNT"/></dp:label>
  3327. </dp:section>
  3328. <dp:section>
  3329. <dp:text><xsl:value-of select="$accessAccountProp"/></dp:text>
  3330. <script language="javascript">
  3331. function selectAccessAccount()
  3332. {
  3333. <!-- m_p_dataSourceAccessAccount -->
  3334. setSelectParams('form', 'pform','so.select','dataSourceAccessAccount','so.defaultObject','<xsl:text/>
  3335. <xsl:choose>
  3336. <xsl:when test="key('env-param','accessAccount.so.searchPath')"><xsl:value-of select="xtsext:javascriptencode(string(key('env-param','accessAccount.so.searchPath')))"/></xsl:when>
  3337. <xsl:otherwise><xsl:value-of select="xtsext:javascriptencode(string($the-object/cm:dataSourceAccessAccount/*/cm:searchPath))"/></xsl:otherwise>
  3338. </xsl:choose>
  3339. <xsl:text/>');<xsl:text/>
  3340. utmlSubmitForm(document.pform,'<xsl:value-of select="xtsext:javascriptencode(string($app))"/>/select/select.xts','maintain','validate');
  3341. }
  3342. </script>
  3343. <dp:link>
  3344. <dp:text>
  3345. <a href="javascript:selectAccessAccount();">
  3346. <xsl:text/><xts:string id="IDS_PROP_SELECT_ACCESS_ACCOUNT"/><xsl:text/>
  3347. </a>
  3348. </dp:text>
  3349. </dp:link>
  3350. </dp:section>
  3351. </xsl:if>
  3352. </dp:list>
  3353. </lyt:section>
  3354. </lyt:layout>
  3355. </xsl:if>
  3356. <!-- advanced routing -->
  3357. <xsl:if test="contains(' package role group ', concat(' ',$the-object/cm:objectClass, ' ')) and $isAdminUser">
  3358. <script language="javascript">
  3359. <!-- Page State must be managed so that dynamic area behaves when refreshing page -->
  3360. function validate()
  3361. {
  3362. <!-- Reset the hasHints state tag -->
  3363. resetPageState();
  3364. return true;
  3365. }
  3366. function resetPageState()
  3367. {
  3368. <!-- Clear the cookie value hasHints -->
  3369. clearSessionEntry('hHints');
  3370. }
  3371. function toggleHintsOverride( item )
  3372. {
  3373. var frm = document.pform;
  3374. <!-- Change state based on the checkbox selected -->
  3375. var val = getSessionValue(item);
  3376. if (val != '0') {
  3377. var msg = "<xts:string id="IDS_PROP_ADVANCED_ROUTING_INHERIT_CONFIRM" encode="javascript"/>";
  3378. if (!confirm(msg))
  3379. {
  3380. frm.overrideRoutingHints.checked = "checked";
  3381. return;
  3382. }
  3383. setStateValue(item,'0');
  3384. resetHintsToParent();
  3385. }
  3386. else
  3387. {
  3388. setStateValue(item,'1');
  3389. }
  3390. toggledynamicDiv('overrideHintsDiv');
  3391. toggledynamicDiv('defaultHintsDiv');
  3392. frm.routingHintsChanged.value = 'true';
  3393. setPropertiesChanged();
  3394. }
  3395. function resetHintsToOrig ()
  3396. {
  3397. }
  3398. function resetHintsToParent()
  3399. {
  3400. // Start by removing all the hidden 'm_routingHints' fields
  3401. var hints = document.getElementsByName("m_routingHints");
  3402. for(var i=0; i &lt; hints.length; i++) {
  3403. var obj = hints[i];
  3404. if (obj.parentNode.removeChild ) {
  3405. obj.parentNode.removeChild(obj);
  3406. i--;
  3407. }
  3408. }
  3409. // Next replace them with copies of the defaultRoutingHints
  3410. var frm = document.pform;
  3411. var newHints = document.getElementsByName("defaultRoutingHints");
  3412. for (var i=0; i &lt; newHints.length; i++) {
  3413. var obj = newHints[i];
  3414. var hiddenElement = document.createElement("input");
  3415. hiddenElement.setAttribute("type","hidden");
  3416. hiddenElement.setAttribute("name","m_routingHints");
  3417. hiddenElement.setAttribute("value", obj.value);
  3418. frm.appendChild(hiddenElement);
  3419. }
  3420. // Finally replace the summary text for the overrideHintsDiv
  3421. document.getElementById("overrideHintsSummary").innerHTML = document.getElementById("defaultHintsSummary").innerHTML;
  3422. }
  3423. </script>
  3424. <xsl:variable name="overrideRoutinghints">
  3425. <xsl:choose>
  3426. <xsl:when test="key('session-param', 'hHints')='1'">true</xsl:when>
  3427. <xsl:when test="key('session-param', 'hHints')='0'">false</xsl:when>
  3428. <xsl:when test="key('env-param', 'routingHintsChanged') and key('env-param', 'overrideRoutingHints')">true</xsl:when>
  3429. <xsl:when test="key('env-param', 'routingHintsChanged')">false</xsl:when>
  3430. <xsl:otherwise>
  3431. <xsl:choose>
  3432. <xsl:when test="/root/cm:queryResponse[1]/*/cm:routingHints/@acquired = 'false'">true</xsl:when>
  3433. <xsl:otherwise>false</xsl:otherwise>
  3434. </xsl:choose>
  3435. </xsl:otherwise>
  3436. </xsl:choose>
  3437. </xsl:variable>
  3438. <utml:input type="hidden" name="routingHintsChanged" value="false"/>
  3439. <lyt:layout style="1" title="IDS_PROP_ADVANCED_ROUTING" border="yes" width="100%" lyt:kbA11y="true">
  3440. <lyt:section>
  3441. <dp:choice width="100%">
  3442. <dp:section1>
  3443. <table border="0" cellpadding="1" cellspacing="0" style="padding-left: 2px;" role="presentation">
  3444. <tr role="checkbox" id="overrideRouting" summary="" tabindex="0" aria-labelledby="lbl_overrideRoutingHints">
  3445. <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>
  3446. <xsl:attribute name="onkeypress">javascript:<xsl:value-of select="$chkSpaceEnterKeyEvent"/>{ return this.onclick(); } return true;</xsl:attribute>
  3447. <xsl:choose>
  3448. <xsl:when test="$overrideRoutinghints = 'true'">
  3449. <xsl:attribute name="aria-checked">true</xsl:attribute>
  3450. </xsl:when>
  3451. <xsl:otherwise>
  3452. <xsl:attribute name="aria-checked">false</xsl:attribute>
  3453. </xsl:otherwise>
  3454. </xsl:choose>
  3455. <td class="formText" nowrap="">
  3456. <xsl:choose>
  3457. <xsl:when test="$the-object/cm:objectClass='package'">
  3458. <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">
  3459. <utml:default-value>
  3460. <xsl:value-of select="$overrideRoutinghints"/>
  3461. </utml:default-value>
  3462. </utml:input>
  3463. </xsl:when>
  3464. <xsl:otherwise>
  3465. <utml:input type="hidden" name="overrideRoutingHints">
  3466. <utml:default-value>
  3467. <xsl:value-of select="$overrideRoutinghints"/>
  3468. </utml:default-value>
  3469. </utml:input>
  3470. </xsl:otherwise>
  3471. </xsl:choose>
  3472. </td>
  3473. </tr>
  3474. </table>
  3475. </dp:section1>
  3476. <dp:section2>
  3477. <xsl:if test="$the-object/cm:objectClass='package'">
  3478. <span id="lbl_overrideRoutingHints"><xts:string id="IDS_PROP_ADVANCED_ROUTING_OVERRIDE"/></span>
  3479. </xsl:if>
  3480. </dp:section2>
  3481. <dp:section3 width="100%">
  3482. <cf:dynamicDiv name="defaultHintsDiv" runTimeVisibleCheck="$overrideRoutinghints='false'">
  3483. <xsl:for-each select="/root/cm:queryResponse[2]/*[last()]/cm:routingHints/cm:string">
  3484. <utml:input type="hidden" name="defaultRoutingHints" utml:update="false">
  3485. <utml:value><xsl:value-of select="."/></utml:value>
  3486. </utml:input>
  3487. </xsl:for-each>
  3488. <dp:list>
  3489. <dp:section>
  3490. <div>
  3491. <dp:label>
  3492. <xts:string id="IDS_PROP_ADVANCED_ROUTING_SETS_LABEL"/>
  3493. </dp:label>
  3494. </div>
  3495. </dp:section>
  3496. <xsl:variable name="routingValue">
  3497. <xsl:choose>
  3498. <xsl:when test="/root/cm:queryResponse[2]/*[last()]/cm:routingHints/cm:string != ''">
  3499. <xsl:for-each select="/root/cm:queryResponse[2]/*[last()]/cm:routingHints/cm:string">
  3500. <xsl:if test="position() != '1'"><xsl:value-of select="', '"/></xsl:if>
  3501. <xsl:value-of select="."/>
  3502. </xsl:for-each>
  3503. </xsl:when>
  3504. <xsl:otherwise>
  3505. <xts:string id="IDS_PROP_ADVANCED_ROUTING_NO_VALUES"/>
  3506. </xsl:otherwise>
  3507. </xsl:choose>
  3508. </xsl:variable>
  3509. <dp:section>
  3510. <dp:text wrap="true">
  3511. <div tabindex="0">
  3512. <span id="defaultHintsSummary">
  3513. <xsl:value-of select="$routingValue"/>
  3514. </span>
  3515. </div>
  3516. </dp:text>
  3517. </dp:section>
  3518. </dp:list>
  3519. </cf:dynamicDiv>
  3520. <cf:dynamicDiv name="overrideHintsDiv" runTimeVisibleCheck="$overrideRoutinghints='true'">
  3521. <xsl:variable name="routingHints">
  3522. <xsl:choose>
  3523. <xsl:when test="key('env-param','m_routingHints')!=''">
  3524. <xsl:for-each select="key('env-param','m_routingHints')">
  3525. <xsl:if test="position() != '1'"><xsl:value-of select="', '"/></xsl:if>
  3526. <xsl:value-of select="."/>
  3527. </xsl:for-each>
  3528. </xsl:when>
  3529. <xsl:when test="not(key('env-param', 'routingHintsChanged')) and /root/cm:queryResponse[1]/*/cm:routingHints/cm:string != ''">
  3530. <xsl:for-each select="/root/cm:queryResponse[1]/*/cm:routingHints/cm:string">
  3531. <xsl:if test="position() != '1'"><xsl:value-of select="', '"/></xsl:if>
  3532. <xsl:value-of select="."/>
  3533. </xsl:for-each>
  3534. </xsl:when>
  3535. <xsl:otherwise>
  3536. <xts:string id="IDS_PROP_ADVANCED_ROUTING_NO_VALUES"/>
  3537. </xsl:otherwise>
  3538. </xsl:choose>
  3539. </xsl:variable>
  3540. <dp:list>
  3541. <dp:section>
  3542. <dp:label>
  3543. <xts:string id="IDS_PROP_ADVANCED_ROUTING_SETS_LABEL"/>
  3544. </dp:label>
  3545. </dp:section>
  3546. <xsl:choose>
  3547. <xsl:when test="key('env-param','m_routingHints')!=''">
  3548. <xsl:for-each select="key('env-param','m_routingHints')">
  3549. <utml:input type="hidden" name="m_routingHints" utml:update="false">
  3550. <utml:value><xsl:value-of select="."/></utml:value>
  3551. </utml:input>
  3552. </xsl:for-each>
  3553. <dp:section>
  3554. <dp:text wrap="true">
  3555. <span id="overrideHintsSummary">
  3556. <xsl:value-of select="$routingHints"/>
  3557. </span>
  3558. </dp:text>
  3559. </dp:section>
  3560. <xsl:if test="$has_write_permission">
  3561. <dp:section>
  3562. <dp:link>
  3563. <utml:a utml:op="stack-up" utml:formName="pform" utml:kbA11y="true">
  3564. <utml:target><xsl:value-of select="$app"/>/specify_advanced_routing.xts</utml:target>
  3565. <utml:validate>validate</utml:validate>
  3566. <xts:string id="IDS_PROP_ADVANCED_ROUTING_EDIT"/>
  3567. </utml:a>
  3568. </dp:link>
  3569. </dp:section>
  3570. </xsl:if>
  3571. </xsl:when>
  3572. <!-- if this is the first time we visit the general dialog, and there are hints stored in CM, then show them. -->
  3573. <xsl:when test="not(key('env-param', 'routingHintsChanged')) and /root/cm:queryResponse[1]/*/cm:routingHints/cm:string != ''">
  3574. <xsl:for-each select="/root/cm:queryResponse[1]/*/cm:routingHints/cm:string">
  3575. <utml:input type="hidden" name="m_routingHints" utml:update="false">
  3576. <utml:value><xsl:value-of select="."/></utml:value>
  3577. </utml:input>
  3578. </xsl:for-each>
  3579. <dp:section wrap="true">
  3580. <dp:text wrap="true">
  3581. <span id="overrideHintsSummary">
  3582. <xsl:value-of select="$routingHints"/>
  3583. </span>
  3584. </dp:text>
  3585. </dp:section>
  3586. <xsl:if test="$has_write_permission">
  3587. <dp:section>
  3588. <dp:link>
  3589. <utml:a utml:op="stack-up" utml:formName="pform" utml:kbA11y="true">
  3590. <utml:target><xsl:value-of select="$app"/>/specify_advanced_routing.xts</utml:target>
  3591. <utml:validate>validate</utml:validate>
  3592. <xts:string id="IDS_PROP_ADVANCED_ROUTING_EDIT"/>
  3593. </utml:a>
  3594. </dp:link>
  3595. </dp:section>
  3596. </xsl:if>
  3597. </xsl:when>
  3598. <xsl:otherwise>
  3599. <dp:section>
  3600. <dp:text>
  3601. <span id="overrideHintsSummary">
  3602. <xsl:value-of select="$routingHints"/>
  3603. </span>
  3604. </dp:text>
  3605. </dp:section>
  3606. <xsl:if test="$has_write_permission">
  3607. <dp:section>
  3608. <dp:link>
  3609. <utml:a utml:op="stack-up" utml:formName="pform" utml:kbA11y="true">
  3610. <utml:target><xsl:value-of select="$app"/>/specify_advanced_routing.xts</utml:target>
  3611. <utml:validate>validate</utml:validate>
  3612. <xts:string id="IDS_PROP_ADVANCED_ROUTING_SET"/>
  3613. </utml:a>
  3614. </dp:link>
  3615. </dp:section>
  3616. </xsl:if>
  3617. </xsl:otherwise>
  3618. </xsl:choose>
  3619. </dp:list>
  3620. </cf:dynamicDiv>
  3621. </dp:section3>
  3622. </dp:choice>
  3623. </lyt:section>
  3624. </lyt:layout>
  3625. <xsl:if test="$has_write_permission">
  3626. <script language="javascript">
  3627. <!-- The following script is executed on page load or when the page is refreshed to render the correct view of the dynamic region -->
  3628. <!-- The states that can be set are:
  3629. 0 - hasHints - override the default routing sets checkbox is not checked.
  3630. 1 - hasHints - override the default routing sets checkbox is checked.
  3631. information.
  3632. -->
  3633. var hHints = getSessionValue('hHints');
  3634. <!-- This portion of the script is executed on refresh -->
  3635. if ( hHints != null &amp;&amp; hHints != "" )
  3636. {
  3637. if ( hHints == '0' )
  3638. {
  3639. if (document.pform['overrideRoutingHints']) {
  3640. document.pform['overrideRoutingHints'].checked = false;
  3641. }
  3642. hideDynamicDiv('overrideHintsDiv');
  3643. showDynamicDiv('defaultHintsDiv');
  3644. }
  3645. else
  3646. {
  3647. if (document.pform['overrideRoutingHints']) {
  3648. document.pform['overrideRoutingHints'].checked = "checked";
  3649. }
  3650. showDynamicDiv('overrideHintsDiv');
  3651. hideDynamicDiv('defaultHintsDiv');
  3652. }
  3653. }
  3654. else
  3655. {
  3656. <!-- This portion of the script is executed on page load -->
  3657. <xsl:choose>
  3658. <xsl:when test="$overrideRoutinghints = 'true'">
  3659. if (document.pform['overrideRoutingHints']) {
  3660. document.pform['overrideRoutingHints'].checked = "checked";
  3661. }
  3662. setStateValue('hHints','1');
  3663. showDynamicDiv('overrideHintsDiv');
  3664. hideDynamicDiv('defaultHintsDiv');
  3665. </xsl:when>
  3666. <xsl:otherwise>
  3667. if (document.pform['overrideRoutingHints']) {
  3668. document.pform['overrideRoutingHints'].checked = false;
  3669. }
  3670. setStateValue('hHints','0');
  3671. hideDynamicDiv('overrideHintsDiv');
  3672. showDynamicDiv('defaultHintsDiv');
  3673. </xsl:otherwise>
  3674. </xsl:choose>
  3675. }
  3676. </script>
  3677. </xsl:if>
  3678. </xsl:if>
  3679. <!-- Base Report -->
  3680. <xsl:if test="$the-object/cm:base">
  3681. <xsl:call-template name="renderBase"/>
  3682. </xsl:if>
  3683. <xsl:if test="$the-object/cm:metadataModelPackage and (contains(' report interactiveReport powerPlay8Report query analysis metricsDataSourceETLTask metricsExportTask metricsFileImportTask metricsMaintenanceTask ', concat(' ',$the-object/cm:objectClass,' ')))">
  3684. <xsl:call-template name="renderPackage"/>
  3685. </xsl:if>
  3686. <xsl:if test="/root/agentReport/cm:queryResponse">
  3687. <xsl:call-template name="renderPackage">
  3688. <xsl:with-param name="nodeObject" select="/root/agentReport/cm:queryResponse/*"/>
  3689. <xsl:with-param name="entryNameIndicator" select="'agsr'"/>
  3690. </xsl:call-template>
  3691. </xsl:if>
  3692. <dp:footer>
  3693. <xsl:choose>
  3694. <xsl:when test="$showOKCancel">
  3695. <!-- The following is needed to get prevent an issue with a zero width OK buttom on IE8 only -->
  3696. <div/>
  3697. <df:button df:id="IDS_OK" utml:validate="true" df:style="submit" df:nav_op="stack-down" df:kbA11y="true"/>
  3698. <xsl:choose>
  3699. <xsl:when test="key('env-param','ps_nav_stack') and not(key('env-param','ps_nav_stack') = '') ">
  3700. <!-- The following is needed to get around some issues with formlogic_lite (needs more investigation) -->
  3701. <df:button df:id="IDS_CANCEL" df:idPrefix="dialogButton" df:style="stack-down" df:kbA11y="true"/>
  3702. </xsl:when>
  3703. <xsl:otherwise>
  3704. <!-- The following is needed to get around some issues with formlogic_lite (needs more investigation) -->
  3705. <df:button df:id="IDS_CANCEL" df:idPrefix="dialogButton" df:href="javascript:cwb();" df:style="href" df:kbA11y="true"/>
  3706. </xsl:otherwise>
  3707. </xsl:choose>
  3708. </xsl:when>
  3709. <xsl:otherwise>
  3710. <df:button df:id="IDS_CLOSE" df:style="back-url" df:kbA11y="true"/>
  3711. </xsl:otherwise>
  3712. </xsl:choose>
  3713. </dp:footer>
  3714. </utml:form>
  3715. </dp:page>
  3716. </xsl:template>
  3717. <xsl:template name="renderBase">
  3718. <xsl:variable name="start-at-reportbase-path">
  3719. <xsl:choose>
  3720. <xsl:when test="string(key('env-param','m_p_base'))!=''">
  3721. <xsl:choose>
  3722. <xsl:when test="starts-with(/root/selected/cm:queryResponse/*/cm:searchPath, key('session-param', 'e_hp'))">
  3723. <xsl:value-of select="concat(key('session-param', 'e_hp'),'/folder')"/>
  3724. </xsl:when>
  3725. <xsl:when test="starts-with(/root/selected/cm:queryResponse/*/cm:searchPath,'/content')">
  3726. <xsl:value-of select="$defaultContentRoot"/>
  3727. </xsl:when>
  3728. </xsl:choose>
  3729. </xsl:when>
  3730. <xsl:when test="starts-with($base/cm:searchPath, key('session-param', 'e_hp'))">
  3731. <xsl:value-of select="concat(key('session-param', 'e_hp'),'/folder')"/>
  3732. </xsl:when>
  3733. <xsl:when test="starts-with($base/cm:searchPath,'/content')">
  3734. <xsl:value-of select="$defaultContentRoot"/>
  3735. </xsl:when>
  3736. </xsl:choose>
  3737. </xsl:variable>
  3738. <xsl:variable name="canReadOnSource" select="contains($base/cm:permissions, 'read')"/>
  3739. <xsl:variable name="canWriteOnSource" select="contains($base/cm:permissions, 'write')"/>
  3740. <xsl:variable name="canSPOnSource" select="contains($base/cm:permissions, 'setPolicy')"/>
  3741. <xsl:variable name="baselabel">
  3742. <xsl:choose>
  3743. <xsl:when test="/root/selected/cm:queryResponse">
  3744. <xsl:choose>
  3745. <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>
  3746. <xsl:when test="/root/selected/cm:queryResponse/*/cm:objectClass = 'dataMovementTask'"><xts:string id="IDS_PROP_SOURCE_DATAMOVEMENT"/></xsl:when>
  3747. <xsl:otherwise><xts:string id="IDS_PROP_SOURCE_AGENT"/></xsl:otherwise>
  3748. </xsl:choose>
  3749. </xsl:when>
  3750. <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>
  3751. <xsl:when test="string($the-object/cm:objectClass) = 'dataMovementTaskAlias'"><xts:string id="IDS_PROP_SOURCE_DATAMOVEMENT"/></xsl:when>
  3752. <xsl:when test="string($the-object/cm:objectClass) = 'portalSkin'"><xts:string id="IDS_PROP_BASE_SKIN"/></xsl:when>
  3753. <xsl:otherwise><xts:string id="IDS_PROP_SOURCE_AGENT"/></xsl:otherwise>
  3754. </xsl:choose>
  3755. </xsl:variable>
  3756. <xsl:variable name="baselinktext">
  3757. <xsl:choose>
  3758. <xsl:when test="/root/selected/cm:queryResponse">
  3759. <xsl:choose>
  3760. <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>
  3761. <xsl:when test="/root/selected/cm:queryResponse/*/cm:objectClass = 'dataMovementTask'"><xts:string id="IDS_PROP_DATAMOVEMENT_PROPERTIES"/></xsl:when>
  3762. <xsl:otherwise><xts:string id="IDS_PROP_AGENT_PROPERTIES"/></xsl:otherwise>
  3763. </xsl:choose>
  3764. </xsl:when>
  3765. <xsl:when test="$base/cm:objectClass != 'agentDefinition' and $base/cm:objectClass != 'dataMovementTask'"><xts:string id="IDS_PROP_REPORT_PROPERTIES"/></xsl:when>
  3766. <xsl:when test="$base/cm:objectClass = 'dataMovementTask'"><xts:string id="IDS_PROP_DATAMOVEMENT_PROPERTIES"/></xsl:when>
  3767. <xsl:otherwise><xts:string id="IDS_PROP_AGENT_PROPERTIES"/></xsl:otherwise>
  3768. </xsl:choose>
  3769. </xsl:variable>
  3770. <xsl:variable name="linktotext">
  3771. <xsl:choose>
  3772. <xsl:when test="$the-object/cm:objectClass = 'reportView' or $the-object/cm:objectClass = 'powerPlay8ReportView'"><xts:string id="IDS_PROP_LINK_TO_REPORT"/></xsl:when>
  3773. <xsl:when test="$the-object/cm:objectClass = 'dataMovementTaskAlias'"><xts:string id="IDS_PROP_LINK_TO_DATAMOVEMENT"/></xsl:when>
  3774. <xsl:when test="$the-object/cm:objectClass = 'agentDefinitionView'"><xts:string id="IDS_PROP_LINK_TO_AGENT"/></xsl:when>
  3775. </xsl:choose>
  3776. </xsl:variable>
  3777. <xsl:variable name="baseLabelPath">
  3778. <xsl:choose>
  3779. <xsl:when test="( string($base/cm:objectClass)='' or string($base/cm:objectClass) = 'nil') and string(/root/env/param[@name='m_p_base'])=''">
  3780. <xts:string id="IDS_PROP_BASE_UNAVAILABLE"/>
  3781. </xsl:when>
  3782. <xsl:otherwise>
  3783. <xsl:choose>
  3784. <xsl:when test="string(/root/env/param[@name='m_p_base'])=''">
  3785. <cf:do-the-path-link>
  3786. <cf:param name="familytree">$base/cm:ancestors</cf:param>
  3787. <cf:param name="familymember">$base/cm:defaultName</cf:param>
  3788. <cf:param name="home"><xsl:value-of select="$start-at-reportbase-path"/></cf:param>
  3789. </cf:do-the-path-link>
  3790. </xsl:when>
  3791. <xsl:otherwise>
  3792. <cf:do-the-path-link>
  3793. <cf:param name="familytree">/root/selected/cm:queryResponse/*/cm:ancestors</cf:param>
  3794. <cf:param name="familymember">/root/selected/cm:queryResponse/*/cm:defaultName</cf:param>
  3795. <cf:param name="home"><xsl:value-of select="$start-at-reportbase-path"/></cf:param>
  3796. </cf:do-the-path-link>
  3797. </xsl:otherwise>
  3798. </xsl:choose>
  3799. </xsl:otherwise>
  3800. </xsl:choose>
  3801. </xsl:variable>
  3802. <lyt:layout style="1" border="yes" lyt:kbA11y="true">
  3803. <lyt:section>
  3804. <dp:list>
  3805. <dp:section>
  3806. <dp:label valign="top"><xsl:value-of select="$baselabel"/></dp:label>
  3807. <dp:text valign="top"><xsl:value-of select="$baseLabelPath"/></dp:text>
  3808. <dp:link valign="top">
  3809. <xsl:choose>
  3810. <xsl:when test="string(/root/env/param[@name='m_p_base'])=''">
  3811. <xsl:if test="$canReadOnSource or $canWriteOnSource or $canSPOnSource">
  3812. <a href="#">
  3813. <xsl:attribute name="onclick">javascript:if(!getPropertiesChanged()){redirect();} else {decision.show();}</xsl:attribute>
  3814. <xsl:attribute name="onkeypress">javascript:<xsl:value-of select="$chkSpaceEnterKeyEvent"/>{ this.onclick(); return false; } return true;</xsl:attribute>
  3815. <xsl:value-of select="$baselinktext"/>
  3816. </a>
  3817. </xsl:if>
  3818. </xsl:when>
  3819. <xsl:otherwise>
  3820. <xsl:variable name="permis" select="/root/selected/cm:queryResponse/*/cm:permissions"/>
  3821. <xsl:if test="contains(string($permis),'read') or contains(string($permis),'write') or contains(string($permis),'setPolicy')">
  3822. <a href="#">
  3823. <xsl:attribute name="onclick">javascript:if(!getPropertiesChanged()){redirect();} else {decision.show();}</xsl:attribute>
  3824. <xsl:attribute name="onkeypress">javascript:<xsl:value-of select="$chkSpaceEnterKeyEvent"/>{this.onclick(); return false;}return true;</xsl:attribute>
  3825. <xsl:value-of select="$baselinktext"/>
  3826. </a>
  3827. </xsl:if>
  3828. </xsl:otherwise>
  3829. </xsl:choose>
  3830. </dp:link>
  3831. <dp:text></dp:text>
  3832. <xsl:if test="$has_write_permission and $noUserProfile!=true()">
  3833. <dp:text><utml:a utml:op="maintain" utml:formName="pform">
  3834. <xsl:attribute name="onclick">setSelectParams('so.select','<xsl:value-of select="$the-object/cm:objectClass"/>Base',<xsl:text/>
  3835. <xsl:choose>
  3836. <xsl:when test="string($base/cm:searchPath)!='' or string(key('env-param','m_p_base'))!=''">
  3837. <xsl:text/>'so.defaultObject','<xsl:text/>
  3838. <xsl:choose>
  3839. <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>
  3840. <xsl:otherwise><xsl:value-of select="xtsext:javascriptencode(string($base/cm:searchPath))"/></xsl:otherwise>
  3841. </xsl:choose>
  3842. </xsl:when>
  3843. <xsl:otherwise>
  3844. <xsl:text/>'so.defaultLocation','<xsl:text/>
  3845. <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>
  3846. </xsl:otherwise>
  3847. </xsl:choose>
  3848. <xsl:text/>');<xsl:text/>
  3849. </xsl:attribute>
  3850. <utml:target><xsl:value-of select="$app"/>/select/select.xts</utml:target>
  3851. <utml:validate>validate</utml:validate>
  3852. <xsl:text/><xsl:value-of select="$linktotext"/><xsl:text/>
  3853. </utml:a></dp:text>
  3854. </xsl:if>
  3855. </dp:section>
  3856. </dp:list>
  3857. </lyt:section>
  3858. </lyt:layout>
  3859. </xsl:template>
  3860. <!-- kludge!: if you introduce a new 'entryNameIndicator', remember to delete it to the 'updateEnv' block -->
  3861. <!-- that is, add this: <xts:delete select="/root/env/param[@name='{$entryNameIndicator}']"/>, otherwise you'll run into problem /w duplicates -->
  3862. <!-- note: utml:exclusion-list would work nicely here but it's not available in formlogic-lite! -->
  3863. <xsl:template name="renderPackage">
  3864. <xsl:param name="nodeObject" select="$the-object"/>
  3865. <xsl:param name="entryNameIndicator" select="'p'"/>
  3866. <xsl:variable name="modelPackage" select="$nodeObject/cm:metadataModelPackage/*"/>
  3867. <xsl:variable name="mdmp" select="key('env-param',concat('m_',$entryNameIndicator,'__metadataModelPackage'))"/>
  3868. <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'"/>
  3869. <xsl:variable name="selectedPackageValue">
  3870. <xsl:choose>
  3871. <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>
  3872. </xsl:choose>
  3873. </xsl:variable>
  3874. <xsl:variable name="packageName">
  3875. <xsl:choose>
  3876. <xsl:when test="string($modelPackage/cm:defaultName)!='' and not(/root/selected)">
  3877. <xsl:value-of select="$modelPackage/cm:defaultName"/>
  3878. </xsl:when>
  3879. <xsl:when test="not(/root/selected)">
  3880. <xts:string id="IDS_PROP_BASE_UNAVAILABLE"/>
  3881. </xsl:when>
  3882. <xsl:otherwise>
  3883. <xsl:choose>
  3884. <xsl:when test="/root/selected">
  3885. <xsl:value-of select="/root/selected/cm:queryResponse/*/cm:defaultName"/>
  3886. </xsl:when>
  3887. <xsl:when test="/root/env/param[@name=concat('m_',$entryNameIndicator,'_metadataModelPackage')]">
  3888. <xsl:value-of select="/root/env/param[@name=concat('m_',$entryNameIndicator,'_metadataModelPackage')]"/>
  3889. </xsl:when>
  3890. <xsl:otherwise>
  3891. <xsl:text/><xts:string id="IDS_PROP_BASE_UNAVAILABLE"/><xsl:text/>
  3892. </xsl:otherwise>
  3893. </xsl:choose>
  3894. </xsl:otherwise>
  3895. </xsl:choose>
  3896. </xsl:variable>
  3897. <xsl:variable name="packageNameDisplay">
  3898. <xsl:value-of select="xtsext:enforceBTD($packageName, $baseTextDirection, $productLocale, boolean($isBidiEnabled='true'))"/>
  3899. </xsl:variable>
  3900. <lyt:layout style="1" border="yes">
  3901. <lyt:section>
  3902. <dp:list>
  3903. <dp:section>
  3904. <dp:label valign="top"><xts:string id="IDS_PROP_PACKAGE_LABEL"/></dp:label>
  3905. </dp:section>
  3906. <dp:section>
  3907. <xsl:choose>
  3908. <xsl:when test="string($modelPackage/cm:defaultName)!='' and not(/root/selected)">
  3909. <dp:text wrap="wrap" valign="top">
  3910. <xsl:value-of select="$packageNameDisplay"/>
  3911. </dp:text>
  3912. </xsl:when>
  3913. <xsl:when test="not(/root/selected)">
  3914. <dp:text wrap="wrap" valign="top"><xsl:text/><xsl:value-of select="$packageNameDisplay"/><xsl:text/></dp:text>
  3915. </xsl:when>
  3916. <xsl:otherwise>
  3917. <dp:text wrap="wrap" valign="top">
  3918. <xsl:choose>
  3919. <xsl:when test="/root/selected">
  3920. <xsl:text/><xsl:value-of select="$packageNameDisplay"/>
  3921. <utml:input type="hidden">
  3922. <xsl:attribute name="name">m_<xsl:value-of select="$entryNameIndicator"/>_metadataModelPackage</xsl:attribute>
  3923. <utml:value><xsl:value-of select="/root/selected/cm:queryResponse/*/cm:searchPath"/></utml:value>
  3924. </utml:input>
  3925. <!-- When updating metadataModelPackage for the report object, metadataModel needs to be cleared -->
  3926. <xsl:if test="contains( ' report interactiveReport query analysis agentDefinition',concat(' ',$the-object/cm:objectClass,' '))">
  3927. <utml:input type="hidden">
  3928. <xsl:attribute name="name">m_<xsl:value-of select="$entryNameIndicator"/>_metadataModel</xsl:attribute>
  3929. <utml:value></utml:value>
  3930. </utml:input>
  3931. </xsl:if>
  3932. </xsl:when>
  3933. <xsl:when test="/root/env/param[@name=concat('m_',$entryNameIndicator,'_metadataModelPackage')]">
  3934. <xsl:text/><xsl:value-of select="$packageNameDisplay"/>
  3935. </xsl:when>
  3936. <xsl:otherwise>
  3937. <xsl:text/><xsl:value-of select="$packageNameDisplay"/><xsl:text/>
  3938. </xsl:otherwise>
  3939. </xsl:choose>
  3940. </dp:text>
  3941. </xsl:otherwise>
  3942. </xsl:choose>
  3943. <!-- Determine whether to display the package link -->
  3944. <xsl:if test="$has_write_permission and not(/root/agentReport/cm:queryResponse and not($has_write_permission_to_agentReport))">
  3945. <dp:text wrap="wrap" valign="top">
  3946. <utml:a utml:op="maintain" utml:formName="pform">
  3947. <xsl:attribute name="onclick">setSelectParams('so.select','<xsl:text/>
  3948. <xsl:choose>
  3949. <xsl:when test="not($isMMS)"><xsl:text/>packageBase<xsl:text/></xsl:when>
  3950. <xsl:otherwise><xsl:text/>metricspackageBase<xsl:text/></xsl:otherwise>
  3951. </xsl:choose>
  3952. <xsl:text/>','so.defaultObject','<xsl:text/>
  3953. <xsl:choose>
  3954. <xsl:when test="not(/root/selected)"><xsl:value-of select="xtsext:javascriptencode(string($modelPackage/cm:searchPath))"/></xsl:when>
  3955. <xsl:otherwise><xsl:value-of select="xtsext:javascriptencode(string(/root/selected/cm:queryResponse/*/cm:searchPath))"/></xsl:otherwise>
  3956. </xsl:choose>
  3957. <xsl:text/>');<xsl:text/></xsl:attribute>
  3958. <utml:target><xsl:value-of select="$app"/>/select/select.xts</utml:target>
  3959. <utml:validate>validate</utml:validate>
  3960. <xsl:text/><xts:string id="IDS_PROP_LINK_TO_PACKAGE"/><xsl:text/>
  3961. </utml:a>
  3962. </dp:text>
  3963. </xsl:if>
  3964. </dp:section>
  3965. </dp:list>
  3966. </lyt:section>
  3967. </lyt:layout>
  3968. </xsl:template>
  3969. <xsl:template name="renderLanguages">
  3970. <lyt:layout style="2" width="100%" border="yes" intro="IDS_PROP_SET_LANG_HINT">
  3971. <lyt:section>
  3972. <span style="position: absolute;margin-left: -9999px; margin-top: -9999px;" id="intro"><xts:string id="IDS_PROP_SET_LANG_HINT"/></span>
  3973. <dp:group>
  3974. <dp:groupItem>
  3975. <dp:list>
  3976. <dp:section>
  3977. <dp:input dp:kbA11y="true">
  3978. <dp:section1>
  3979. <label for="selLang"><xts:string id="IDS_PROP_LANGUAGE"/></label>
  3980. </dp:section1>
  3981. <dp:section2>
  3982. <!-- Build up the values that the user has currently defined -->
  3983. <xsl:variable name="vals">
  3984. <xsl:for-each select="/root/multiLangs/name">
  3985. <xsl:if test="not(preceding-sibling::name = .)">
  3986. <xsl:choose>
  3987. <xsl:when test="position()!=last"><xsl:value-of select="concat(' ',string(.))"/></xsl:when>
  3988. <xsl:otherwise><xsl:value-of select="concat(' ',string(.),' ')"/></xsl:otherwise>
  3989. </xsl:choose>
  3990. </xsl:if>
  3991. </xsl:for-each>
  3992. </xsl:variable>
  3993. <xsl:choose>
  3994. <xsl:when test="$has_write_permission and $noUserProfile!=true()">
  3995. <utml:select name="m_transloc" onchange="javascript:checkLang(this)" id="selLang">
  3996. <!-- Loop through the content locales to display the entries (in alpha order) that the user currently has defined -->
  3997. <xsl:for-each select="/root/multiLangs/name">
  3998. <xsl:if test="not(preceding-sibling::name= .)">
  3999. <xsl:variable name="locnam"><xsl:value-of select="."/></xsl:variable>
  4000. <xsl:variable name="displayName">
  4001. <xsl:choose>
  4002. <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>
  4003. <xsl:otherwise><xsl:value-of select="$locnam"/>(<xts:string id="IDS_PROP_BASE_UNAVAILABLE"/>)</xsl:otherwise>
  4004. </xsl:choose>
  4005. </xsl:variable>
  4006. <utml:option value="{$locnam}">
  4007. <xsl:attribute name="id"><xsl:value-of select="$displayName"/></xsl:attribute>
  4008. <xsl:choose>
  4009. <xsl:when test="string(key('env-param','pty_add'))!='' and $locnam = $activeLang">
  4010. <xsl:attribute name="selected"><xsl:value-of select="'true'"/></xsl:attribute>
  4011. </xsl:when>
  4012. <xsl:when test="string(key('env-param','pty_add'))='' and $locnam = $lang">
  4013. <xsl:attribute name="selected"><xsl:value-of select="'true'"/></xsl:attribute>
  4014. </xsl:when>
  4015. </xsl:choose>
  4016. <xsl:value-of select="$displayName"/>
  4017. </utml:option>
  4018. </xsl:if>
  4019. </xsl:for-each>
  4020. <!-- This is the separator bar between what languages are defined and what languages are available to define -->
  4021. <utml:option value="not" role="separator"><xsl:value-of select="'-----------------------'"/></utml:option>
  4022. <!-- Loop through the content locales to display the entries (in alpha order) that the user has available to define -->
  4023. <xsl:for-each select="/root/config/param[@name='locale']/locale[@type='contentLocale']">
  4024. <xsl:if test="not(contains($vals,concat(' ',id,' ')))">
  4025. <utml:option value="{id}" >
  4026. <xsl:attribute name="id"><xsl:value-of select="./displayName"/></xsl:attribute>
  4027. <xsl:value-of select="./displayName"/>
  4028. </utml:option>
  4029. </xsl:if>
  4030. </xsl:for-each>
  4031. </utml:select>
  4032. <!-- Hidden fields to process the add, remove capabilities of this page -->
  4033. <utml:input value="" type="hidden" name="pty_activeLang"/>
  4034. <utml:input value="" type="hidden" name="pty_deactivLang"/>
  4035. <utml:input value="" type="hidden" name="pty_del"/>
  4036. <utml:input value="" type="hidden" name="pty_add"/>
  4037. <xsl:if test="$the-object/cm:defaultName[@modifiable = 'false']
  4038. and $the-object/cm:objectClass='namespace'">
  4039. <utml:input type="hidden" name="pty_keep"><utml:value><xsl:value-of select="$the-object/cm:name/*/@xml:lang"/></utml:value></utml:input>
  4040. </xsl:if>
  4041. </xsl:when>
  4042. <xsl:otherwise>
  4043. <utml:select name="m_transloc" onchange="checkLang(this)" role="listbox" aria-readonly="true">
  4044. <utml:read-only>true</utml:read-only>
  4045. <xsl:variable name="actval">
  4046. <xsl:value-of select="/root/config/param[@name='locale']/locale[@type='contentLocale' and string(id)=$lang]/displayName"/>
  4047. </xsl:variable>
  4048. <xsl:choose>
  4049. <xsl:when test="$actval=''">
  4050. <xsl:variable name="actval2"><xsl:value-of select="substring-before(substring-after($vals,' '),' ')"/></xsl:variable>
  4051. <xsl:value-of select="/root/config/param[@name='locale']/locale[@type='contentLocale' and string(id)=$actval2]/displayName"/>
  4052. </xsl:when>
  4053. <xsl:otherwise>
  4054. <xsl:value-of select="$actval"/>
  4055. </xsl:otherwise>
  4056. </xsl:choose>
  4057. </utml:select>
  4058. </xsl:otherwise>
  4059. </xsl:choose>
  4060. </dp:section2>
  4061. </dp:input>
  4062. </dp:section>
  4063. </dp:list>
  4064. </dp:groupItem>
  4065. <xsl:choose>
  4066. <xsl:when test="$has_write_permission and $noUserProfile!=true()">
  4067. <xsl:choose>
  4068. <!-- Output the remove languages link when there is more than one entry and at least one of them has a modifiable value -->
  4069. <xsl:when test="$activeLang=''">
  4070. <xsl:if test="$compareField != 'noDefaultField' and count(/root/multiLangs/name[not(preceding-sibling::name = .)]) > 1">
  4071. <dp:groupItem><dp:text/><dp:text/></dp:groupItem>
  4072. <dp:groupItem>
  4073. <dp:text>
  4074. <a href="#" role="link">
  4075. <xsl:attribute name="onclick">javascript:removeLang()</xsl:attribute>
  4076. <xsl:attribute name="onkeypress">javascript:<xsl:value-of select="$chkSpaceEnterKeyEvent"/>{this.onclick();return false;}return true;</xsl:attribute>
  4077. <xsl:text/><xts:string id="IDS_PROP_REMOVE_MULTILINGUAL"/><xsl:text/>
  4078. </a>
  4079. </dp:text>
  4080. </dp:groupItem>
  4081. </xsl:if>
  4082. </xsl:when>
  4083. <xsl:otherwise>
  4084. <xsl:variable name="cnt" select="count(/root/env/param[starts-with(@name,$compareField)])"/>
  4085. <xsl:if test="$cnt > 1 or ($cnt = 1 and string(key('env-param','pty_add'))!='')">
  4086. <dp:groupItem><dp:text/><dp:text/></dp:groupItem>
  4087. <dp:groupItem>
  4088. <dp:text>
  4089. <a href="#" role="link">
  4090. <xsl:attribute name="onclick">javascript:removeLang()</xsl:attribute>
  4091. <xsl:attribute name="onkeypress">javascript:<xsl:value-of select="$chkSpaceEnterKeyEvent"/>{this.onclick(); return false;}return true;</xsl:attribute>
  4092. <xsl:text/><xts:string id="IDS_PROP_REMOVE_MULTILINGUAL"/><xsl:text/>
  4093. </a>
  4094. </dp:text>
  4095. </dp:groupItem>
  4096. </xsl:if>
  4097. </xsl:otherwise>
  4098. </xsl:choose>
  4099. </xsl:when>
  4100. <xsl:otherwise>
  4101. <xsl:if test="count(/root/multiLangs/name[not(preceding-sibling::name = .)]) > 1">
  4102. <dp:groupItem><dp:text/><dp:text/></dp:groupItem>
  4103. <dp:groupItem>
  4104. <dp:text>
  4105. <dp:link>
  4106. <utml:a utml:op="stack-up" utml:formName="pform" utml:kbA11y="true" role="link">
  4107. <utml:href><xsl:text/>
  4108. <xsl:text/>document.pform.m_return.value='<xsl:value-of select="concat($app,'/',$mname)"/>';</utml:href>
  4109. <utml:target><xsl:value-of select="$app"/>/properties_multilingual.xts</utml:target>
  4110. <utml:validate>validate</utml:validate>
  4111. <xts:string id="IDS_PROP_TRANSLATION_RO"/><xsl:text/>
  4112. </utml:a>
  4113. </dp:link>
  4114. </dp:text>
  4115. </dp:groupItem>
  4116. </xsl:if>
  4117. </xsl:otherwise>
  4118. </xsl:choose>
  4119. </dp:group>
  4120. </lyt:section>
  4121. <lyt:section/>
  4122. <!-- Name -->
  4123. <lyt:section>
  4124. <dp:list dp:kbA11y="true">
  4125. <xsl:if test="$the-object/cm:defaultName">
  4126. <dp:section>
  4127. <dp:input dp:kbA11y="true">
  4128. <dp:section1>
  4129. <label for="ptyName"><xts:string id="IDS_PROP_NAME"/></label>
  4130. </dp:section1>
  4131. <dp:section2>
  4132. <utml:input type="text" class="pInput" size="30" name="pty_name" onchange="anyNames(this.value)" maxlength="256" id="ptyName" role="textbox" >
  4133. <utml:read-only>
  4134. <xsl:choose>
  4135. <xsl:when test="$the-object/cm:defaultName[@modifiable = 'false'] or $noUserProfile">true</xsl:when>
  4136. <xsl:otherwise>false</xsl:otherwise>
  4137. </xsl:choose>
  4138. </utml:read-only>
  4139. <utml:value>
  4140. <xsl:choose>
  4141. <xsl:when test="$the-object/cm:defaultName[@modifiable = 'false'] and $the-object/cm:objectClass='namespace'">
  4142. <xsl:value-of select="$the-object/cm:defaultName"/>
  4143. </xsl:when>
  4144. <xsl:when test="not(/root/env/param[starts-with(@name,'m_t_default_name_')])">
  4145. <xsl:value-of select="$the-object/cm:name/*[@xml:lang=$lang]"/>
  4146. </xsl:when>
  4147. <xsl:when test="/root/env/param[@name= concat('m_t_default_name_',$lang)]">
  4148. <xsl:value-of select="/root/env/param[@name = concat('m_t_default_name_',$lang)]"/>
  4149. </xsl:when>
  4150. </xsl:choose>
  4151. </utml:value>
  4152. </utml:input>
  4153. </dp:section2>
  4154. </dp:input>
  4155. </dp:section>
  4156. </xsl:if>
  4157. <xsl:if test="$the-object/cm:defaultScreenTip and not($rootFolder)">
  4158. <dp:section>
  4159. <dp:input dp:kbA11y="true">
  4160. <dp:section1>
  4161. <label for="ptyScrt"><xts:string id="IDS_PROP_SCREENTIP"/></label>
  4162. </dp:section1>
  4163. <dp:section2>
  4164. <utml:input type="text" maxlength="100" size="30" class="pInput" name="pty_scrt" onchange="chgST(this.value)" id="ptyScrt" role="textbox" >
  4165. <utml:read-only>
  4166. <xsl:choose>
  4167. <xsl:when test="$the-object/cm:defaultScreenTip[@modifiable = 'false'] or $noUserProfile">true</xsl:when>
  4168. <xsl:otherwise>false</xsl:otherwise>
  4169. </xsl:choose>
  4170. </utml:read-only>
  4171. <utml:value>
  4172. <xsl:choose>
  4173. <xsl:when test="not(/root/env/param[starts-with(@name,'m_t_default_screenTip_')])">
  4174. <xsl:value-of select="$the-object/cm:screenTip/*[@xml:lang=$lang]"/>
  4175. </xsl:when>
  4176. <xsl:when test="/root/env/param[@name= concat('m_t_default_screenTip_',$lang)]">
  4177. <xsl:value-of select="/root/env/param[@name= concat('m_t_default_screenTip_',$lang)]"/>
  4178. </xsl:when>
  4179. </xsl:choose>
  4180. </utml:value>
  4181. </utml:input>
  4182. </dp:section2>
  4183. </dp:input>
  4184. </dp:section>
  4185. </xsl:if>
  4186. </dp:list>
  4187. </lyt:section>
  4188. <!-- Description -->
  4189. <lyt:section>
  4190. <xsl:if test="$the-object/cm:defaultDescription and not($the-object/cm:shortcut != '')">
  4191. <dp:input>
  4192. <dp:section1>
  4193. <label for="ptyDesc"><xts:string id="IDS_PROP_DESCRIPTION"/></label>
  4194. </dp:section1>
  4195. <dp:section2>
  4196. <utml:textarea class="pTextarea" rows="4" cols="30" name="pty_desc" onchange="chgD(this.value)" id="ptyDesc" role="textbox" aria-multiline="true">
  4197. <utml:read-only>
  4198. <xsl:choose>
  4199. <xsl:when test="$the-object/cm:defaultDescription[@modifiable = 'false'] or $noUserProfile">true</xsl:when>
  4200. <xsl:otherwise>false</xsl:otherwise>
  4201. </xsl:choose>
  4202. </utml:read-only>
  4203. <utml:value>
  4204. <xsl:choose>
  4205. <xsl:when test="not(/root/env/param[starts-with(@name,'m_t_default_description_')])">
  4206. <xsl:value-of select="$the-object/cm:description/*[@xml:lang=$lang]"/>
  4207. </xsl:when>
  4208. <xsl:when test="/root/env/param[@name= concat('m_t_default_description_',$lang)]">
  4209. <xsl:value-of select="/root/env/param[@name= concat('m_t_default_description_',$lang)]"/>
  4210. </xsl:when>
  4211. </xsl:choose>
  4212. </utml:value>
  4213. </utml:textarea>
  4214. </dp:section2>
  4215. </dp:input>
  4216. </xsl:if>
  4217. </lyt:section>
  4218. </lyt:layout>
  4219. </xsl:template>
  4220. <!-- template for the floating disabled entry -->
  4221. <xsl:template name="render-disabled">
  4222. <!-- Disabled option.-->
  4223. <xsl:variable name="disabledSetting">
  4224. <xsl:choose>
  4225. <xsl:when test="key('env-param','m_p_disabled')"><xsl:value-of select="key('env-param','m_p_disabled')"/></xsl:when>
  4226. <xsl:when test="$the-object/cm:disabled/@acquired='false'"><xsl:value-of select="$the-object/cm:disabled"/></xsl:when>
  4227. </xsl:choose>
  4228. </xsl:variable>
  4229. <table role="checkbox" border="0" cellpadding="1" cellspacing="0" tabindex="0" id="isDisabled" summary="" aria-labelledby="labelForIsDisabled" style="padding-left: 2px;">
  4230. <xsl:if test="$has_write_permission and $noUserProfile!=true()">
  4231. <xsl:attribute name="onclick">javascript:if(document.getElementById('is_disabled')!=null)<xsl:text>{</xsl:text>setPropertiesChanged();if(document.getElementById('is_disabled').checked) <xsl:text> { </xsl:text>this.setAttribute('aria-checked','false'); document.getElementById('is_disabled').checked=false; <xsl:text>}</xsl:text>else <xsl:text>{</xsl:text>this.setAttribute('aria-checked','true');document.pform.m_p_disabled.value='true'; document.getElementById('is_disabled').checked=true; <xsl:text>}</xsl:text>return false;<xsl:text>} return true;</xsl:text></xsl:attribute>
  4232. <xsl:attribute name="onkeypress">javascript:<xsl:value-of select="$chkSpaceEnterKeyEvent"/>{ return this.onclick(); } return true;</xsl:attribute>
  4233. </xsl:if>
  4234. <xsl:choose>
  4235. <xsl:when test="not(string($disabledSetting) = 'true')">
  4236. <xsl:attribute name="aria-checked">false</xsl:attribute>
  4237. </xsl:when>
  4238. <xsl:otherwise>
  4239. <xsl:attribute name="aria-checked">true</xsl:attribute>
  4240. </xsl:otherwise>
  4241. </xsl:choose>
  4242. <tr>
  4243. <td class="formText" nowrap="">
  4244. <utml:input type="checkbox" id="is_disabled" name="is_disabled" value="true" tabindex="-1">
  4245. <xsl:attribute name="onclick">setPropertiesChanged();if(this.checked) <xsl:text> { </xsl:text>document.getElementById('isDisabled').setAttribute('aria-checked','true');document.pform.m_p_disabled.value='true'; <xsl:text>}</xsl:text>else <xsl:text>{</xsl:text>document.getElementById('isDisabled').setAttribute('aria-checked','false');document.pform.m_p_disabled.value='false'; <xsl:text>}</xsl:text>event.cancelBubble='true';if(event.stopPropogation)event.stopPropagation();</xsl:attribute>
  4246. <utml:read-only>
  4247. <xsl:choose>
  4248. <!-- also set to readonly when parent's disabled property is true and the disabled property is acquired -->
  4249. <xsl:when test="$the-object/cm:disabled/@modifiable = 'false' or $noUserProfile or ($the-object/cm:disabled/@acquired='true' and $the-object/cm:disabled='true')">true</xsl:when>
  4250. <xsl:otherwise>false</xsl:otherwise>
  4251. </xsl:choose>
  4252. </utml:read-only>
  4253. <utml:default-value>
  4254. <xsl:choose>
  4255. <xsl:when test="key('env-param','m_p_disabled')">
  4256. <xsl:value-of select="key('env-param','m_p_disabled')"/>
  4257. </xsl:when>
  4258. <xsl:otherwise>
  4259. <xsl:value-of select="$the-object/cm:disabled"/>
  4260. </xsl:otherwise>
  4261. </xsl:choose>
  4262. </utml:default-value>
  4263. </utml:input>
  4264. </td>
  4265. <td id="labelForIsDisabled" class="formText" nowrap=""><label for="is_disabled"><xts:string id="IDS_PROP_DISABLE"/></label></td>
  4266. </tr>
  4267. </table>
  4268. <xsl:if test="$has_write_permission and $noUserProfile!=true()">
  4269. <utml:input type="hidden" name="m_p_disabled">
  4270. <xsl:attribute name="value"><xsl:value-of select="$disabledSetting"/></xsl:attribute>
  4271. </utml:input>
  4272. </xsl:if>
  4273. </xsl:template>
  4274. <xsl:template name="render-hideobject">
  4275. <xsl:variable name="hiddenSetting">
  4276. <xsl:choose>
  4277. <xsl:when test="key('env-param','m_p_hidden')"><xsl:value-of select="key('env-param','m_p_hidden')"/></xsl:when>
  4278. <xsl:when test="$objectHiddenProperty/@acquired='false'"><xsl:value-of select="$objectHiddenProperty"/></xsl:when>
  4279. </xsl:choose>
  4280. </xsl:variable>
  4281. <table role="checkbox" border="0" cellpadding="1" cellspacing="0" tabindex="0" id="isHidden" summary="" aria-labelledby="labelForIsHidden" style="padding-left: 2px;">
  4282. <xsl:if test="$has_write_permission and $noUserProfile!=true()">
  4283. <xsl:attribute name="onclick">javascript:if(document.getElementById('is_hidden')!=null)<xsl:text>{</xsl:text>setPropertiesChanged();if(document.getElementById('is_hidden').checked) <xsl:text> { </xsl:text>this.setAttribute('aria-checked','false');document.pform.m_p_hidden.value='false';document.getElementById('is_hidden').checked=false; <xsl:text>}</xsl:text>else <xsl:text>{</xsl:text>this.setAttribute('aria-checked','true');document.pform.m_p_hidden.value='true';document.getElementById('is_hidden').checked=true; <xsl:text>}</xsl:text>return false;<xsl:text>} return true;</xsl:text></xsl:attribute>
  4284. <xsl:attribute name="onkeypress">javascript:<xsl:value-of select="$chkSpaceEnterKeyEvent"/>{ return this.onclick(); } return true;</xsl:attribute>
  4285. </xsl:if>
  4286. <xsl:choose>
  4287. <xsl:when test="not(string($hiddenSetting) = 'false')">
  4288. <xsl:attribute name="aria-checked">true</xsl:attribute>
  4289. </xsl:when>
  4290. <xsl:otherwise>
  4291. <xsl:attribute name="aria-checked">false</xsl:attribute>
  4292. </xsl:otherwise>
  4293. </xsl:choose>
  4294. <tr>
  4295. <td class="formText" nowrap="">
  4296. <utml:input type="checkbox" id="is_hidden" name="is_hidden" value="true" tabindex="-1">
  4297. <xsl:attribute name="onclick">setPropertiesChanged();if(this.checked) <xsl:text> { </xsl:text>document.getElementById('isHidden').setAttribute('aria-checked','true');document.pform.m_p_hidden.value='true'; <xsl:text>}</xsl:text>else <xsl:text>{</xsl:text>document.getElementById('isHidden').setAttribute('aria-checked','false');document.pform.m_p_hidden.value='false'; <xsl:text>}</xsl:text>event.cancelBubble='true';if(event.stopPropogation)event.stopPropagation();</xsl:attribute>
  4298. <utml:read-only>
  4299. <xsl:choose>
  4300. <!-- also set to readonly when parent's disabled property is true and the disabled property is acquired -->
  4301. <xsl:when test="$objectHiddenProperty/@modifiable = 'false' or $noUserProfile or ($objectHiddenProperty/@acquired='true' and $objectHiddenProperty='true')">true</xsl:when>
  4302. <xsl:otherwise>false</xsl:otherwise>
  4303. </xsl:choose>
  4304. </utml:read-only>
  4305. <utml:default-value>
  4306. <xsl:choose>
  4307. <xsl:when test="key('env-param','m_p_hidden')">
  4308. <xsl:value-of select="key('env-param','m_p_hidden')"/>
  4309. </xsl:when>
  4310. <xsl:otherwise>
  4311. <xsl:value-of select="$objectHiddenProperty"/>
  4312. </xsl:otherwise>
  4313. </xsl:choose>
  4314. </utml:default-value>
  4315. </utml:input>
  4316. </td>
  4317. <td id="labelForIsHidden" class="formText" nowrap=""><label for="is_hidden"><xts:string id="IDS_PROP_HIDE_OBJECT"/></label></td>
  4318. </tr>
  4319. </table>
  4320. <xsl:if test="$has_write_permission and $noUserProfile!=true()">
  4321. <utml:input type="hidden" name="m_p_hidden">
  4322. <xsl:attribute name="value"><xsl:value-of select="$hiddenSetting"/></xsl:attribute>
  4323. </utml:input>
  4324. </xsl:if>
  4325. </xsl:template>
  4326. <!-- template for the notification and retention sections -->
  4327. <xsl:template name="render-retention">
  4328. <utml:group>
  4329. <!-- only show the retention if we have read permission -->
  4330. <xsl:if test="$has_read_permission">
  4331. <utml:read-only>
  4332. <xsl:choose>
  4333. <xsl:when test="$has_write_permission and $the-object/cm:retentions/@modifiable = 'true'">false</xsl:when>
  4334. <xsl:otherwise>true</xsl:otherwise>
  4335. </xsl:choose>
  4336. </utml:read-only>
  4337. <!-- Notification and Retention settings -->
  4338. <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')">
  4339. <lyt:layout style="2" border="yes" width="100%">
  4340. <lyt:section>
  4341. <xsl:choose>
  4342. <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>
  4343. <xsl:otherwise><dt:retention class="history" title="IDS_PROP_RETENTION_EXECUTION" trackchange="setPropertiesChanged()" label="IDS_PROP_RETENTION_EXECUTION_LABEL"/></xsl:otherwise>
  4344. </xsl:choose>
  4345. </lyt:section>
  4346. <lyt:section>
  4347. <xsl:if test="contains(' analysis report interactiveReport reportView query powerPlay8Report powerPlay8ReportView ', concat(' ', $the-object/cm:objectClass, ' '))">
  4348. <dt:retention class="reportVersion" title="IDS_PROP_RETENTION_OUTPUTS" trackchange="setPropertiesChanged()" label="IDS_PROP_RETENTION_OUTPUTS_LABEL"/>
  4349. </xsl:if>
  4350. </lyt:section>
  4351. </lyt:layout>
  4352. </xsl:if>
  4353. </xsl:if>
  4354. <!-- only show the "URL" or "File System Location settings" if user has read permission -->
  4355. <xsl:if test="$has_read_permission">
  4356. <!-- URL -->
  4357. <xsl:if test="key('env-param', 'm_class') = 'URL'">
  4358. <!-- Check to see if url is safe (e.g.: domain-valid) -->
  4359. <xsl:variable name="is-url-validated" select="xtsext:cafaction('issafeurl_null', normalize-space($the-object/cm:uri)) = 'true'"/>
  4360. <xsl:variable name="urlValue">
  4361. <xsl:if test="$is-url-validated or $isAdminUser">
  4362. <xsl:value-of select="$the-object/cm:uri"/>
  4363. </xsl:if>
  4364. </xsl:variable>
  4365. <dt:domainListPopup/>
  4366. <lyt:layout style="1" border="yes" lyt:kbA11y="true">
  4367. <lyt:section>
  4368. <dp:input>
  4369. <dp:section1>
  4370. <xts:string id="IDS_PROP_URL"/>
  4371. <dp:list>
  4372. <dp:section>
  4373. <div>
  4374. <xsl:text/><xts:string id="IDS_NEW_URL_HINT"/>&#160;&#160;<xsl:text/>
  4375. <a href="#">
  4376. <xsl:attribute name="onclick">javascript:validDomains.show();return false;</xsl:attribute>
  4377. <xsl:attribute name="onkeypress">javascript:<xsl:value-of select="$chkSpaceEnterKeyEvent"/>{ return this.onclick(); }return true;</xsl:attribute>
  4378. <xsl:text/><xts:string id="IDS_NEW_URL_VIEW_VALID_DOMAINS"/><xsl:text/>
  4379. </a>
  4380. </div>
  4381. </dp:section>
  4382. </dp:list>
  4383. </dp:section1>
  4384. <dp:section2>
  4385. <dp:list>
  4386. <dp:section>
  4387. <utml:input type="text" name="m_p_uri" maxlength="2048" size="30" class="pInput" onchange="setPropertiesChanged()" aria-labelledby="urlInEdit" stttype="url">
  4388. <utml:read-only>
  4389. <xsl:choose>
  4390. <xsl:when test="$the-object/cm:uri/@modifiable = 'false'">true</xsl:when>
  4391. <xsl:otherwise>false</xsl:otherwise>
  4392. </xsl:choose>
  4393. </utml:read-only>
  4394. <utml:value>
  4395. <xsl:value-of select="$urlValue"/>
  4396. </utml:value>
  4397. </utml:input>
  4398. <span style="position: absolute;margin-left: -9999px; margin-top: -9999px;" id="urlInEdit"><xsl:value-of select="$urlValue"/></span>
  4399. </dp:section>
  4400. <dp:section>
  4401. <xsl:if test="not($is-url-validated)">
  4402. <xsl:choose>
  4403. <xsl:when test="$isAdminUser">
  4404. <xts:string id="IDS_NEW_URL_NOT_VALID_URL"/>
  4405. </xsl:when>
  4406. <xsl:otherwise>
  4407. <xts:string id="IDS_NEW_URL_NOT_ALLOWED_TO_VIEW"/>
  4408. </xsl:otherwise>
  4409. </xsl:choose>
  4410. </xsl:if>
  4411. </dp:section>
  4412. </dp:list>
  4413. </dp:section2>
  4414. </dp:input>
  4415. </lyt:section>
  4416. </lyt:layout>
  4417. </xsl:if>
  4418. <!-- File System Location settings -->
  4419. <xsl:if test="key('env-param', 'm_class') = 'archiveLocation'">
  4420. <!-- get ROOT value from configuration -->
  4421. <xsl:variable name="fileSystemRoot" select="string(/root/configuration/property[@name='archiveLocationFileSchemeRoot'])"/>
  4422. <xsl:variable name="sysRootValue">
  4423. <xsl:choose>
  4424. <xsl:when test="$fileSystemRoot=''">
  4425. <xts:string id="IDS_PROP_FILE_SYSTEM_ROOT_LOCATION_MISSING"/>
  4426. </xsl:when>
  4427. <xsl:otherwise>
  4428. <xsl:value-of select="$fileSystemRoot"/>
  4429. </xsl:otherwise>
  4430. </xsl:choose>
  4431. </xsl:variable>
  4432. <lyt:layout style="1" border="yes" lyt:kbA11y="true">
  4433. <lyt:section>
  4434. <dp:input>
  4435. <dp:section1>
  4436. <xts:string id="IDS_PROP_FILE_SYSTEM_ROOT_LOCATION_LABEL"/>
  4437. <dp:list>
  4438. <dp:section>
  4439. <dp:hint>
  4440. <xts:string id="IDS_PROP_FILE_SYSTEM_ROOT_LOCATION_INTRO"/>
  4441. </dp:hint>
  4442. </dp:section>
  4443. </dp:list>
  4444. </dp:section1>
  4445. <dp:section2>
  4446. <xsl:value-of select="$sysRootValue"/>
  4447. </dp:section2>
  4448. </dp:input>
  4449. <dp:input>
  4450. <dp:section1>
  4451. <label for="ctrl_m_p_archiveLocation_uri"><xts:string id="IDS_PROP_FILE_SYSTEM_LOCATION_LABEL"/></label>
  4452. <dp:list>
  4453. <dp:section>
  4454. <dp:hint>
  4455. <xts:string id="IDS_PROP_FILE_SYSTEM_LOCATION_INTRO"/>
  4456. </dp:hint>
  4457. </dp:section>
  4458. </dp:list>
  4459. </dp:section1>
  4460. <dp:section2>
  4461. <utml:input type="text" name="m_p_archiveLocation_uri" maxlength="2048" size="30" class="pInput" onchange="setPropertiesChanged()" id="ctrl_m_p_archiveLocation_uri">
  4462. <utml:read-only>
  4463. <xsl:choose>
  4464. <xsl:when test="$the-object/cm:uri/@modifiable = 'false'">true</xsl:when>
  4465. <xsl:otherwise>false</xsl:otherwise>
  4466. </xsl:choose>
  4467. </utml:read-only>
  4468. <utml:value>
  4469. <xsl:value-of select="$the-object/cm:uri"/>
  4470. </utml:value>
  4471. </utml:input>
  4472. </dp:section2>
  4473. </dp:input>
  4474. </lyt:section>
  4475. </lyt:layout>
  4476. </xsl:if>
  4477. </xsl:if>
  4478. </utml:group>
  4479. </xsl:template>
  4480. <!-- Variables needed for pf:gen-url -->
  4481. <xsl:variable name="location" select="''"/>
  4482. <xsl:variable name="request-url-params">
  4483. <xsl:if test="/root/env/param[@name='rui']">
  4484. <xsl:text/>&amp;rui=<xsl:value-of select="xtsext:protect(xtsext:urlencode(string(/root/env/param[@name='rui'])),'url','rui','getdata')"/>
  4485. </xsl:if>
  4486. </xsl:variable>
  4487. <!-- Back URLs will be stripped from the final URL, so these variables may be blank. -->
  4488. <xsl:variable name="back-url" select="''"/>
  4489. <xsl:variable name="encodedPPBack" select="''"/>
  4490. <xsl:variable name="encodedPP8Back" select="''"/>
  4491. <xsl:variable name="javascript-encodedPP8Back" select="''"/>
  4492. <xsl:variable name="encoded-back-url" select="''"/>
  4493. <xsl:variable name="encoded-s7-back-url" select="''"/>
  4494. <pf:gen-action/>
  4495. <pf:gen-action-string/>
  4496. <pf:gen-url/>
  4497. </xsl:stylesheet>
  4498. </xts:block>
  4499. <xts:block id="ignoreFaultHandler" type="fault" processor="XSLT">
  4500. <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" exclude-result-prefixes="xsl">
  4501. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  4502. <xsl:template match="/">
  4503. <ignoreFault/>
  4504. </xsl:template>
  4505. </xsl:stylesheet>
  4506. </xts:block>
  4507. <!--
  4508. ===============================================================================================
  4509. debug - display debug information
  4510. ===============================================================================================
  4511. -->
  4512. <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">
  4513. <!-- get the debug logic sheet -->
  4514. <xts:logicsheet path="logicsheets/debuglogic.xslt"/>
  4515. <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">
  4516. <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no"/>
  4517. <xsl:template match="/">
  4518. <dbg:dumpxml select="/root"/>
  4519. </xsl:template>
  4520. </xsl:stylesheet>
  4521. </xts:block>
  4522. </xts:morphlet>