Toggle navigation
Go
Log-in
Register
Home
Go to Wiki
Wiki Index
Document Index
User Index
Main
Go to Space
Document Index
Rename Spaces
Wiki Home: Projeto ODR UnB/MI
Space Index
Rename Spaces
Wiki source code of
Rename Spaces
More actions
Content
Comments
Attachments
History
Information
Hide line numbers
1: {{velocity}} 2: = Rename space = 3: 4: #if($request.action == 'rename') 5: #if($request.from && $request.to) 6: Renamings: 7: #foreach($item in $xwiki.getSpaceDocsName($request.from)) 8: #set ($fromReference = $services.model.createDocumentReference("", $request.from, $item)) 9: #set ($toReference = $services.model.createDocumentReference("", $request.to, $item)) 10: * Renamed [$services.model.serialize($fromReference)] to [$services.model.serialize($toReference)] 11: #set($ok = $xwiki.getDocument($fromReference).rename($toReference)) 12: #end 13: #end 14: #end 15: 16: {{html wiki='true'}} 17: <form action="$doc.getURL()" method="post" class="xform third"> 18: <input type="hidden" name="action" value="rename" /> 19: <div class="xform"> 20: <dl> 21: <dt>Source space:</dt> 22: <dd><select name="from"> 23: <option value="">please select</option> 24: #foreach($space in $xwiki.getSpaces()) 25: <option value="$escapetool.xml($space)">$escapetool.xml($space)</option> 26: #end 27: </select></dd> 28: <dt>New space:</dt> 29: <dd><input type="text" name="to" value=""/></dd> 30: </dl> 31: </div> 32: <div class="buttons"> 33: <input type="submit" value="Rename" class="button" /> 34: </div> 35: </form> 36: {{/html}} 37: {{/velocity}}
Applications
Blog
Dashboard
User Index
Quick Links
Sandbox