<
From version < 23.1 >
edited by Thomas Mortagne
on 2020/01/28
To version < 24.1
edited by Simon Urli
on 2022/03/02
Change comment: Install extension [org.xwiki.platform:xwiki-platform-wiki-ui-mainwiki/13.10.3]

Summary

Details

Page properties
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.ThomasMortagne
1 +XWiki.surli
Content
... ... @@ -1,38 +1,82 @@
1 1  {{velocity}}
2 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>
3 +#set ($createWikiDocReference = $services.model.createDocumentReference($services.wiki.mainWikiId,
4 + 'WikiManager', 'CreateWiki'))
5 +#if ($hasCreateWiki && $xwiki.exists($createWikiDocReference)
6 + && $services.security.authorization.hasAccess('view', $createWikiDocReference))
7 + <p>
8 + <a href="$xwiki.getURL('WikiManager.CreateWiki')" class="button button-success" id="tmCreateWiki">
9 + $services.icon.renderHTML('add') $services.localization.render('platform.wiki.create.button')
10 + </a>
11 + </p>
6 6  #end
7 7  {{/html}}
8 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 22  #if(!$isGuest)
23 23   #set($discard = $columns.add('_actions'))
24 - #set($discard = $columnsProperties.put('_actions', {
17 +#end
18 +
19 +#set ($liveDataConfig = {
20 + 'meta': {
21 + 'propertyDescriptors': [
22 + { 'id': 'wikiprettyname', 'displayer': { 'id': 'link', 'propertyHref': 'wikiprettyname_url' } },
23 + { 'id': 'owner', 'editable': false},
24 + { 'id': 'membershipType', 'sortable': false, 'filterable': false, 'editable': false },
25 + {
26 + 'id': '_actions',
27 + 'displayer': {
28 + 'id': 'actions',
29 + 'actions': ['join', 'leave', 'requestJoin', 'cancelJoinRequest', 'viewInvitation', 'edit', 'delete']
30 + }
31 + }
32 + ],
25 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'
34 + {
35 + 'id': 'join',
36 + 'icon': 'user_add',
37 + 'allowProperty': 'doc.hasjoin',
38 + 'urlProperty': 'doc.join_url'
39 + },
40 + {
41 + 'id': 'leave',
42 + 'icon': 'user_delete',
43 + 'allowProperty': 'doc.hasleave',
44 + 'urlProperty': 'doc.leave_url'
45 + },
46 + {
47 + 'id': 'requestJoin',
48 + 'icon': 'bell',
49 + 'allowProperty': 'doc.hasrequestJoin',
50 + 'urlProperty': 'doc.requestJoin_url'
51 + },
52 + {
53 + 'id': 'cancelJoinRequest',
54 + 'icon': 'bell_delete',
55 + 'allowProperty': 'doc.hascancelJoinRequest',
56 + 'urlProperty': 'doc.cancelJoinRequest_url'
57 + },
58 + {
59 + 'id': 'viewInvitation',
60 + 'icon': 'envelope',
61 + 'allowProperty': 'doc.hasviewInvitation',
62 + 'urlProperty': 'doc.viewInvitation_url'
63 + }
32 32   ]
33 - }))
34 -#end
35 -#livetable('wikis', $columns, $columnsProperties, $options)
65 + }
66 +})
67 +#set ($sourceParameters = $escapetool.url({
68 + 'className' : 'XWiki.XWikiServerClass',
69 + 'resultPage' : 'WikiManager.WikisLiveTableResults',
70 + 'translationPrefix' : 'platform.wiki.browse.'
71 +
72 +}))
73 +{{liveData
74 + id='wikis'
75 + source='liveTable'
76 + sourceParameters="$sourceParameters"
77 + properties="$stringtool.join($columns, ',')"
78 + limit=10
79 +}}$jsontool.serialize($liveDataConfig){{/liveData}}
36 36  #set($docextras=[])
37 37  {{/velocity}}
38 38  

Get Connected