General Actions:
Log-in
Register
Wiki:
Main wiki
▼
:
Document Index
»
Space:
XemManager
▼
:
Document Index
»
Page:
Install
Search
en
Page Actions:
Export
▼
:
Export as PDF
Export as RTF
Export as HTML
More actions
▼
:
Print preview
View Source
Main wiki
»
Space XemManager
»
Install
Wiki source code of
Install
Last modified by
Administrator
on 2012/03/21 17:40
Content
·
Comments
(0)
·
Annotations
(0)
·
Attachments
(1)
·
History
·
Information
Show line numbers
#set($WikiManager = $services.wikimanager) #if(!$WikiManager) #error($msg.get("wikimanager.pluginnotenabled")) #end #if(!$services.applicationmanager) #error($msg.get("xapp.pluginnotenabled")) #end #set($Exception = $WikiManager.DefaultException) #set($confirm = $request.getParameter("confirm")) ############################################### #set($templateName = "templatexe") #set($templateList = $WikiManager.getWikiTemplateList()) #set($templateExists = false) #foreach($template in $templateList) #if($template.wikiName == $templateName) #set($templateExists = true) #end #end #if($templateExists == false) #if($confirm && $confirm == 1) #set($result = $WikiManager.createWikiTemplate($templateName, "XWiki Entreprise (default xwiki)", "template-xe.xar")) #if ($result == $Exception.ERROR_NOERROR) #info($msg.get("xem.install.success")) #elseif ($result == $Exception.ERROR_XWIKI_ACCESS_DENIED) #error($msg.get("notallowed")) #else #error($msg.get("xem.install.error", [$context.lastexception])) #end #else #set($urlyes = $doc.getURL("view", "confirm=1")) #set($urlno = $doc.getURL("view")) #xwikimessageboxstart($msg.get("xem.answer.install.title") $msg.get("xem.answer.install.actions")) $msg.get("xem.answer.install.actions.template") <div class="buttons"> <a href="$urlyes"><input type="button" class="button" value="$msg.get("yes")" onclick="location='$urlyes'; return false;"/></a><a href="$urlno"><input type="button" class="button" value="$msg.get("no")" onclick="location='$urlno'; return false;"/></a> </div> #xwikimessageboxend() #end #else #info($msg.get("xem.install.noneed")) #end