Panel Layout Update
Log-in
|
Panels
:
Panels
>
Panel Layout Update
Top Menu
Show
:
Comments
Attachments
History
Information
Stampa
:
Stampa
Anteprima di stampa
Esporta come PDF
Esporta in formato RTF
Esporta come HTML
Esporta in formato XAR
Wiki source code of
Panel Layout Update
Show line numbers
#set($place = $request.place) ## ## Get the preferences document where the new layout must be saved (XWiki.XWikiPreferences or Space.WebPreferences) ## #if("$!{request.prefsdoc}" != "") #set($prefsdocument = $request.prefsdoc) #else #set($prefsdocument = "XWiki.XWikiPreferences") #end ## ## Check to see if the current user has admin rights on the current preferences document. ## #if(!$xwiki.hasAccessLevel("admin", $context.user, $prefsdocument)) #xwikimessageboxstart("$msg.get(’panelwizard.placemanager’)" "") $msg.get("panelwizard.notadmininplace", $place) #xwikimessageboxend() ## ## Set the current panel layout. Note that you must have at least one panel in the new layout column (left or right panels) to keep the layout. ## #elseif($request.xpage && $request.xpage == "plain") #if( (!$place) || ($place == "") ) #set($prefsdoc = $xwiki.getDocument($prefsdocument)) #set($ok = $prefsdoc.use("XWiki.XWikiPreferences")) #set($leftPanels = $request.leftPanels) #set($rightPanels = $request.rightPanels) #set($showLeftPanels = $request.showLeftPanels) #set($showRightPanels = $request.showRightPanels) #if($leftPanels) #set($ok = $prefsdoc.set("leftPanels", $leftPanels)) #end #if($showLeftPanels) #set($ok = $prefsdoc.set("showLeftPanels", $showLeftPanels)) #end #if($rightPanels) #set($ok = $prefsdoc.set("rightPanels", $rightPanels)) #end #if($showRightPanels) #set($ok = $prefsdoc.set("showRightPanels", $showRightPanels)) #end #set($ok = $prefsdoc.save()) SUCCESS #else #set($prefsdoc = $xwiki.getDocument("${place}:${prefsdocument}")) #set($ok = $prefsdoc.use("XWiki.XWikiPreferences")) #set($leftPanels = $request.leftPanels) #set($rightPanels = $request.rightPanels) #if($leftPanels&&$leftPanels!="") #set($ok = $prefsdoc.set("leftPanels", $leftPanels)) #end #if($rightPanels&&$rightPanels!="") #set($ok = $prefsdoc.set("rightPanels", $rightPanels)) #end #set($ok = $prefsdoc.save()) SUCCESS #end #else 1 $msg.get("panelwizard.panellayoutupdate") #set($url = $xwiki.getURL("Panels.PanelWizard")) #warning($msg.get("panelwizard.nodirectaccess", ["<a href=’$url’>Panel Wizard</a>"])) #end
Search
Quick Links
Wiki Dashboard
Document Index
Blog
Sandbox
My Recent Modifications
dany
|
marco