General Actions:
Log-in
Register
Wiki:
games
▼
:
Document Index
»
Space:
XWiki
▼
:
Document Index
»
Page:
DeletedDocuments
Search
default
Page Actions:
Export
▼
:
Export as PDF
Export as RTF
Export as HTML
More actions
▼
:
Print preview
View Source
Wiki Home
»
Documents on this Wiki
»
Deleted Documents
Wiki source code of
Deleted Documents
Last modified by
Administrator
on 2011/11/06 20:09
Content
·
Comments
(0)
·
Annotations
(0)
·
Attachments
(0)
·
History
·
Information
Hide line numbers
1: {{velocity}}## 2: #if(!$xwiki.hasProgrammingRights()) 3: {{warning}}This document requires programming rights and needs to be saved by an administrator of this Wiki{{/warning}} 4: #else 5: #set($dateFormat = 'yyyy MMMM d, HH:mm') 6: $xwiki.ssx.use('XWiki.DeletedDocuments')## 7: $xwiki.jsx.use('XWiki.DeletedDocuments')## 8: ## 9: #set($columns = ["ddoc.fullName", "ddoc.title", "ddoc.date", "ddoc.deleter", 'actions']) 10: #set($columnProperties = { 11: 'ddoc.fullName' : { 'type' : 'text', 'size' : 10 }, 12: 'ddoc.title' : { 'type' : 'text', 'filterable' : false, 'sortable' : false }, 13: 'ddoc.date' : { 'type' : 'date', 'filterable' : false }, 14: 'ddoc.deleter' : { 'type' : 'text', 'size' : 10 }, 15: 'actions' : { 'type' : 'text', 'filterable' : false, 'sortable' : false } 16: })## 17: #set($options = { 18: 'url' : "$xwiki.getURL('XWiki.DeletedDocumentsJSON', 'view', 'list=1&xpage=plain&outputSyntax=plain')", 19: 'callback' : 'XWiki.index.trash.documents.displayEntry', 20: 'translationPrefix' : 'xe.index.trash.documents.' 21: })## 22: ## 23: ## 24: ## 25: {{html wiki="true" clean="false"}} 26: <div class="hidden"> 27: #livetable('documentsTrash' $columns $columnProperties $options) 28: </div> 29: {{/html}} 30: ## 31: ## 32: ## 33: 34: {{html wiki="true" clean="false"}} 35: <noscript> 36: #set($deletedDocuments = $xwiki.search('select count(ddoc.id) from XWikiDeletedDocument as ddoc').get(0)) 37: #if($deletedDocuments == 0) 38: 39: {{info}}$msg.get('xe.index.trash.documents.empty'){{/info}} 40: 41: #else 42: #macro(displayDeletedDoc $id) 43: #set($ddoc = $xwiki.getDeletedDocument('', '', "$id")) 44: #set($originalDocument = $ddoc.getDocument()) 45: <tr> 46: <td><a href="$originalDocument.getURL('view', "viewer=recyclebin&id=${id}")">$ddoc.fullName</a></td> 47: <td>$originalDocument.displayTitle</td> 48: <td>$xwiki.formatDate($ddoc.getDate(), $dateFormat)</td> 49: <td>$xwiki.getLocalUserName($ddoc.getDeleter())</td> 50: <td class="itemActions"> 51: #if($xwiki.getDocument($ddoc.fullName).isNew()) 52: #if($ddoc.canUndelete()) 53: <a href="${originalDocument.getURL('undelete', "id=${id}")}" class="tool restore" title="$msg.get('xe.index.trash.documents.actions.restore.tooltip')">$msg.get('xe.index.trash.documents.actions.restore.text')</a> 54: #end 55: #else 56: <a href="${originalDocument.getURL()}" class="tool cannot-restore" title="$msg.get('xe.index.trash.documents.actions.cannotRestore.tooltip')">$msg.get('xe.index.trash.documents.actions.cannotRestore.text')</a> 57: #end 58: #if($ddoc.canDelete()) 59: <a href="${originalDocument.getURL('delete', "id=${id}&xredirect=$util.encodeURI($!request.getRequestURI())?$util.encodeURI($!request.getQueryString())")}" class="tool delete" title="$msg.get('xe.index.trash.documents.actions.delete.tooltip')">$msg.get('xe.index.trash.documents.actions.delete.text')</a> 60: #end 61: </td> 62: </tr> 63: #end 64: ## 65: #if("$!{request.view}" == '') 66: #set($queryParams = '') 67: #else 68: #set($queryParams = "view=$!{escapetool.url($request.view)}") 69: #end 70: #set($paginationParameters = { 71: 'totalItems' : $xwiki.search("select count(ddoc.id) from XWikiDeletedDocument as ddoc").get(0), 72: 'defaultItemsPerPage' : 15, 73: 'url' : $doc.getURL('view', $queryParams) 74: }) 75: #pagination($paginationParameters) 76: <table id="searchResults" class="xwiki-livetable xwiki-livetable-display"> 77: <thead class="xwiki-livetable-display-header"><tr> 78: <th scope="col" class="xwiki-livetable-display-header-text selected asc">$msg.get('xe.index.trash.documents.ddoc.fullName')</th> 79: <th scope="col" class="xwiki-livetable-display-header-text">$msg.get('xe.index.trash.documents.ddoc.title')</th> 80: <th scope="col" class="xwiki-livetable-display-header-text">$msg.get('xe.index.trash.documents.ddoc.date')</th> 81: <th scope="col" class="xwiki-livetable-display-header-text">$msg.get('xe.index.trash.documents.ddoc.deleter')</th> 82: <th scope="col" class="xwiki-livetable-display-header-text">$msg.get('xe.index.trash.documents.actions')</th> 83: </tr></thead> 84: <tbody class="xwiki-livetable-display-body"> 85: #foreach($item in $xwiki.search('select ddoc.id from XWikiDeletedDocument as ddoc order by ddoc.fullName asc', $paginationParameters.itemsPerPage, $paginationParameters.firstItem)) 86: #displayDeletedDoc($item) 87: #end 88: </tbody> 89: </table> 90: #set($discard = $paginationParameters.put('position', 'bottom')) 91: #pagination($paginationParameters) 92: #end ## deletedDocuments.size 93: </noscript> 94: {{/html}}## 95: #end## hasProgramR 96: {{/velocity}}