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
Show line numbers
{{velocity}}## #if(!$xwiki.hasProgrammingRights()) {{warning}}This document requires programming rights and needs to be saved by an administrator of this Wiki{{/warning}} #else #set($dateFormat = 'yyyy MMMM d, HH:mm') $xwiki.ssx.use('XWiki.DeletedDocuments')## $xwiki.jsx.use('XWiki.DeletedDocuments')## ## #set($columns = ["ddoc.fullName", "ddoc.title", "ddoc.date", "ddoc.deleter", 'actions']) #set($columnProperties = { 'ddoc.fullName' : { 'type' : 'text', 'size' : 10 }, 'ddoc.title' : { 'type' : 'text', 'filterable' : false, 'sortable' : false }, 'ddoc.date' : { 'type' : 'date', 'filterable' : false }, 'ddoc.deleter' : { 'type' : 'text', 'size' : 10 }, 'actions' : { 'type' : 'text', 'filterable' : false, 'sortable' : false } })## #set($options = { 'url' : "$xwiki.getURL('XWiki.DeletedDocumentsJSON', 'view', 'list=1&xpage=plain&outputSyntax=plain')", 'callback' : 'XWiki.index.trash.documents.displayEntry', 'translationPrefix' : 'xe.index.trash.documents.' })## ## ## ## {{html wiki="true" clean="false"}} <div class="hidden"> #livetable('documentsTrash' $columns $columnProperties $options) </div> {{/html}} ## ## ## {{html wiki="true" clean="false"}} <noscript> #set($deletedDocuments = $xwiki.search('select count(ddoc.id) from XWikiDeletedDocument as ddoc').get(0)) #if($deletedDocuments == 0) {{info}}$msg.get('xe.index.trash.documents.empty'){{/info}} #else #macro(displayDeletedDoc $id) #set($ddoc = $xwiki.getDeletedDocument('', '', "$id")) #set($originalDocument = $ddoc.getDocument()) <tr> <td><a href="$originalDocument.getURL('view', "viewer=recyclebin&id=${id}")">$ddoc.fullName</a></td> <td>$originalDocument.displayTitle</td> <td>$xwiki.formatDate($ddoc.getDate(), $dateFormat)</td> <td>$xwiki.getLocalUserName($ddoc.getDeleter())</td> <td class="itemActions"> #if($xwiki.getDocument($ddoc.fullName).isNew()) #if($ddoc.canUndelete()) <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> #end #else <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> #end #if($ddoc.canDelete()) <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> #end </td> </tr> #end ## #if("$!{request.view}" == '') #set($queryParams = '') #else #set($queryParams = "view=$!{escapetool.url($request.view)}") #end #set($paginationParameters = { 'totalItems' : $xwiki.search("select count(ddoc.id) from XWikiDeletedDocument as ddoc").get(0), 'defaultItemsPerPage' : 15, 'url' : $doc.getURL('view', $queryParams) }) #pagination($paginationParameters) <table id="searchResults" class="xwiki-livetable xwiki-livetable-display"> <thead class="xwiki-livetable-display-header"><tr> <th scope="col" class="xwiki-livetable-display-header-text selected asc">$msg.get('xe.index.trash.documents.ddoc.fullName')</th> <th scope="col" class="xwiki-livetable-display-header-text">$msg.get('xe.index.trash.documents.ddoc.title')</th> <th scope="col" class="xwiki-livetable-display-header-text">$msg.get('xe.index.trash.documents.ddoc.date')</th> <th scope="col" class="xwiki-livetable-display-header-text">$msg.get('xe.index.trash.documents.ddoc.deleter')</th> <th scope="col" class="xwiki-livetable-display-header-text">$msg.get('xe.index.trash.documents.actions')</th> </tr></thead> <tbody class="xwiki-livetable-display-body"> #foreach($item in $xwiki.search('select ddoc.id from XWikiDeletedDocument as ddoc order by ddoc.fullName asc', $paginationParameters.itemsPerPage, $paginationParameters.firstItem)) #displayDeletedDoc($item) #end </tbody> </table> #set($discard = $paginationParameters.put('position', 'bottom')) #pagination($paginationParameters) #end ## deletedDocuments.size </noscript> {{/html}}## #end## hasProgramR {{/velocity}}