Allgemeine Aktionen:
Anmelden
Wiki
▼
:
Dokumentenindex
»
Space:
Main
▼
:
Dokumentenverzeichnis
»
Seite:
Spaces
Suche
Aktionen:
Exportieren
▼
:
Als PDF exportieren
Als RTF exportieren
Als HTML exportieren
Weitere Aktionen
▼
:
Druckvorschau
Zeige den Quellcode
Willkommen in den metamagix Wikis!
»
Dashboard
»
Spaces
Wiki-Quellcode von
Spaces
Zuletzt geändert von
Administrator
am 2009/09/09 02:00
Inhalt
·
Kommentare
(0)
·
Anmerkungen
(0)
·
Anhänge
(0)
·
Historie
·
Information
Zeilennummern verstecken
1: {{velocity}} 2: ## 3: ## List spaces within the wiki. 4: ## 5: $xwiki.ssx.use("Main.Spaces")## 6: ## 7: ## List of spaces in this wiki. 8: ## This page allow to display spaces within this wiki and to delete any space. 9: ## Only wiki administrators are allowed to delete spaces. 10: ## 11: ## Optional HTTP parameter : 12: ## deleteSpace name of a space to delete. 13: ## 14: ## Delete space if requested. 15: ## 16: #set($spaceToDelete = "$!request.getParameter('deleteSpace')") 17: #if("$!spaceToDelete" != '' && $xwiki.hasAdminRights()) 18: #foreach ($page in $xwiki.getSpaceDocsName($spaceToDelete)) 19: #set($discard = $xwiki.getDocument("${spaceToDelete}.${page}").delete()) 20: #end 21: {{info}}Space ”${spaceToDelete}“ deleted.{{/info}} 22: #set($xredirect = "$!request.getParameter('xredirect')") 23: ## Redirect to the previous page if requested. 24: #if("$!xredirect" != '') 25: $response.sendRedirect($xredirect) 26: #end 27: #end 28: #set($spaceList = $xwiki.getSpaces()) 29: ## Get this very doc, useful when it is included from another one. 30: #set($spaceListDoc = $xwiki.getDocument('Main.Spaces')) 31: {{html wiki="true"}} 32: <ul class="xlist"> 33: ## 34: ## List spaces. 35: ## 36: #foreach($space in $spaceList) 37: ## Display space only if the user has view right on space home and if the space is not blacklisted. 38: ## $blacklistedSpaces is set in xwikivars.vm 39: #if($xwiki.hasAccessLevel('view', "${space}.WebHome") && !$blacklistedSpaces.contains($space)) 40: <li class="xitem xunderline xhighlight space"> 41: <div class="xitemcontainer"> 42: <div class="spSpaceName">[[${space}>>${space}.WebHome]]</div> 43: <div class="xshowonhover spSpaceActions"> 44: ## Link to the space index. 45: <a href="$xwiki.getURL('Main.SpaceIndex', 'view', "space=$escapetool.url($space)")" title="$msg.get('xe.spaces.action.index')"> 46: <img src="$xwiki.getSkinFile('icons/silk/book_open.gif')" alt="Space index icon"/> 47: </a> 48: ## If the user has admin right on the space display links to administration and delete. 49: #if($xwiki.hasAccessLevel('admin', "${space}.XWikiPreferences")) 50: <a href="$xwiki.getURL("${space}.WebPreferences", 'admin')" title="$msg.get('xe.spaces.action.admin')"> 51: <img src="$xwiki.getSkinFile('icons/silk/cog.gif')" alt="Administrate space icon"/> 52: </a> 53: ## <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')"> 54: ## <img src="$xwiki.getSkinFile('icons/silk/cross.gif')" alt="Delete space icon" /> 55: ##</a> 56: #end 57: </div> 58: <div class="xspacer"> </div> 59: </div> 60: </li> 61: #end 62: #end 63: ## 64: ## Space creation. 65: ## 66: #if($xwiki.hasAdminRights()) 67: <li id="spSpaceCreateItem" class="xitem space"> 68: <div class="xitemcontainer"> 69: <div id="spSpaceCreateLabel" class="spSpaceName"><a href="$xwiki.getURL('XWiki.CreatePage', 'view', 'tocreate=space')" onclick="toggleClass($('spSpaceCreateForm'), 'hidden'); return false;">$msg.get('xe.spaces.createspace')</a></div> 70: <div class="spacer"> </div> 71: <div id="spSpaceCreateForm" class="hidden"> 72: <form method="post" action="$doc.getURL('view', 'xpage=create')"> 73: <div> 74: <input name="tocreate" type="hidden" value="space" /> 75: #set($newSpaceName = $msg.get('xe.spaces.createspace.defaultname')) 76: <label class="hidden" for="spSpaceCreateTextInput">$newSpaceName</label> 77: <input id="spSpaceCreateTextInput" type="text" name="space" value="$newSpaceName" class="panelinput" onfocus="if(this.value=='$newSpaceName') this.value=''" onblur="if(this.value=='') this.value='$newSpaceName'" /> 78: <span class="buttonwrapper"> 79: <input type="submit" value="$msg.get('xe.spaces.createspace.submit')" class="button" /> 80: </span> 81: </div> 82: </form> 83: </div> 84: <div class="spacer"> </div> 85: </div> 86: </li> 87: #end 88: </ul> 89: {{/html}} 90: {{/velocity}}