General Actions:
Log-in
Wiki:
L3D's Wiki
▼
:
Document Index
»
Space:
Main
▼
:
Document Index
»
Page:
Spaces
Search
Page Actions:
Export
▼
:
Export as PDF
Export as RTF
Export as HTML
More actions
▼
:
Print preview
View Source
Welcome to your wiki
»
Dashboard
»
Spaces
Wiki source code of
Spaces
Last modified by
Administrator
on 2009/01/30 11:18
Content
·
Comments
(0)
·
Attachments
(0)
·
History
·
Information
Show line numbers
## ## List spaces wihtin the wiki. ## $xwiki.ssx.use("Main.Spaces") ## ## List of spaces in this wiki. ## This page allow to display spaces within this wiki and to delete any space. ## Only wiki administrators are allowed to delete spaces. ## ## Optional HTTP parameter : ## deleteSpace name of a space to delete. ## ## Delete space if requested. ## #set($spaceToDelete = "$!request.getParameter('deleteSpace')") #if("$!spaceToDelete" != "" && $xwiki.hasAdminRights()) #foreach ($page in $xwiki.getSpaceDocsName($spaceToDelete)) #set($discard = $xwiki.getDocument("${spaceToDelete}.${page}").delete()) #end #info("Space ”${spaceToDelete}“ deleted.") #set($xredirect = "$!request.getParameter('xredirect')") ## Redirect to the previous page if requested. #if("$!xredirect" != "") $response.sendRedirect($xredirect) #end #end #set($spaceList = $xwiki.getSpaces()) ## Get this very doc, useful when it is included from another one. #set($spaceListDoc = $xwiki.getDocument("Main.Spaces")) <ul class="xlist"> ## ## List spaces. ## #foreach($space in $spaceList) ## Display space only if the user has view right on space home and if the space is not blacklisted. ## $blacklistedSpaces is set in xwikivars.vm #if($xwiki.hasAccessLevel("view", "${space}.WebHome") && !$blacklistedSpaces.contains($space)) <li class="xitem xunderline xhighlight space"> <div class="xitemcontainer"> <div class="spSpaceName">[${space}>${space}.WebHome]</div> <div class="xshowonhover spSpaceActions"> ## Link to the space index. <a href="$xwiki.getURL("Main.SpaceIndex", "view", "space=${space}")" title="$msg.get("xe.spaces.action.index")"> <img src="$xwiki.getSkinFile("icons/silk/book_open.gif")" alt="Space index icon"/> </a> ## If the user has admin right on the space display links to administration and delete. #if($xwiki.hasAccessLevel("admin", "${space}.XWikiPreferences")) <a href="$xwiki.getURL("${space}.WebPreferences", "admin")" title="$msg.get("xe.spaces.action.admin")"> <img src="$xwiki.getSkinFile("icons/silk/cog.gif")" alt="Administrate space icon"/> </a> ## <a href="#" onclick="confirm('ALL THE PAGES WITHIN THE SPACE “${space}” WILL BE DELETED, are you sure that you want to continue ?'); this.href='$spaceListDoc.getURL("view", "deleteSpace=${space}&xredirect=$doc.getExternalURL()")'" title="$msg.get("xe.spaces.action.delete")"> ## <img src="$xwiki.getSkinFile("icons/silk/cross.gif")" alt="Delete space icon" /> ##</a> #end </div> <div class="xspacer"> </div> </div> </li> #end #end ## ## Space creation. ## #if($xwiki.hasAdminRights()) <li id="spSpaceCreateItem" class="xitem space"> <div class="xitemcontainer"> <div id="spSpaceCreateLabel" class="spSpaceName"><a href="#" onclick="toggleClass($('spSpaceCreateForm'), 'hidden'); return false;">$msg.get("xe.spaces.createspace")</a></div> <div class="spacer"> </div> <div id="spSpaceCreateForm" class="hidden"> <form method="post" action="$doc.getURL("view", "xpage=create")"> <div> <input name="tocreate" type="hidden" value="space" /> #set($newSpaceName = $msg.get("xe.spaces.createspace.defaultname")) <input type="text" name="title" value="$newSpaceName" class="panelinput" style="margin:auto;" onfocus="if(this.value=='$newSpaceName') this.value=''" onblur="if(this.value=='') this.value='$newSpaceName'" /> <input type="submit" value="$msg.get("xe.spaces.createspace.submit")" /> </div> </form> </div> <div class="spacer"> </div> </div> </li> #end </ul>
Search
Quick Links
L3D Calendar
Wiki Dashboard
Document Index
Blog
Sandbox
Recently Modified
XWiki Scheduler Job Class
|
XWiki Preferences
|
XWikiAllGroup