Wiki source code of Browse Wikis
Last modified by physadmin on 2020/08/15 19:14
Hide last authors
author | version | line-number | content |
---|---|---|---|
![]() |
1.1 | 1 | {{velocity}} |
2 | {{html}} | ||
3 | #set ($createWikiDocReference = $services.model.createDocumentReference($services.wiki.mainWikiId, 'WikiManager', 'CreateWiki')) | ||
4 | #if ($hasCreateWiki&& $xwiki.exists($createWikiDocReference)&& $services.security.authorization.hasAccess('view', $createWikiDocReference)) | ||
5 | <p><a href="$xwiki.getURL('WikiManager.CreateWiki')" class="button button-success" id="tmCreateWiki">$services.icon.renderHTML('add') $services.localization.render('platform.wiki.create.button')</a></p> | ||
6 | #end | ||
7 | {{/html}} | ||
8 | #set($columns = ['wikiprettyname', 'description', 'owner', 'doc.creationDate', 'membershipType']) | ||
9 | #set($columnsProperties = { | ||
10 | 'wikiprettyname' : { 'type' : 'text', 'link' : 'field' }, | ||
11 | 'description' : { 'type' : 'text' , 'size' : 50, 'html' : 'true' }, | ||
12 | 'owner' : { 'html' : 'true' }, | ||
13 | 'membershipType' : { 'sortable': false, 'filterable': false}, | ||
14 | 'doc.creationDate' : { 'type' : 'date', 'size' : 10, 'html' : 'false' } | ||
15 | }) | ||
16 | #set($options = { | ||
17 | 'className' : 'XWiki.XWikiServerClass', | ||
18 | 'rowCount' : 10, | ||
19 | 'resultPage' : 'WikiManager.WikisLiveTableResults', | ||
20 | 'translationPrefix' : 'platform.wiki.browse.' | ||
21 | }) | ||
22 | #if(!$isGuest) | ||
23 | #set($discard = $columns.add('_actions')) | ||
24 | #set($discard = $columnsProperties.put('_actions', { | ||
25 | 'actions': [ | ||
26 | {'id': 'join', 'icon': 'user_add'}, | ||
27 | {'id': 'leave', 'icon': 'user_delete'}, | ||
28 | {'id': 'requestJoin', 'icon': 'bell'}, | ||
29 | {'id': 'cancelJoinRequest', 'icon': 'bell_delete'}, | ||
30 | {'id': 'viewInvitation', 'icon': 'envelope'}, | ||
31 | 'edit', 'delete' | ||
32 | ] | ||
33 | })) | ||
34 | #end | ||
35 | #livetable('wikis', $columns, $columnsProperties, $options) | ||
36 | #set($docextras=[]) | ||
37 | {{/velocity}} |