Changes for page Browse Wikis

Last modified by superadmin on 06.01.2023 13:15

From version 1.1
edited by XWiki Admin
on 26.05.2017 08:18
Change comment: Install extension [org.xwiki.platform:xwiki-platform-wiki-ui-mainwiki-9.3.1]
To version 2.1
edited by superadmin
on 06.01.2023 13:15
Change comment: Install extension [org.xwiki.platform:xwiki-platform-wiki-ui-mainwiki/14.10.2]

Summary

Details

Page properties
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.Admin
1 +XWiki.superadmin
Content
... ... @@ -1,30 +1,81 @@
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 -## Load the User Picker style for the wiki owner column.
9 -#set($discard = $xwiki.ssfx.use('uicomponents/widgets/userpicker/userPicker.css'))
10 10  #set($columns = ['wikiprettyname', 'description', 'owner', 'doc.creationDate', 'membershipType'])
11 -#set($columnsProperties = {
12 - 'wikiprettyname' : { 'type' : 'text', 'link' : 'field' },
13 - 'description' : { 'type' : 'text' , 'size' : 50, 'html' : 'true' },
14 - 'owner' : { 'type' : 'text', 'size' : 10, 'html' : 'true' },
15 - 'membershipType' : { 'sortable': false, 'filterable': false},
16 - 'doc.creationDate' : { 'type' : 'date', 'size' : 10, 'html' : 'false' }
17 -})
18 -#set($options = {
19 - 'className' : 'XWiki.XWikiServerClass',
20 - 'rowCount' : 10,
21 - 'resultPage' : 'WikiManager.WikisLiveTableResults',
22 - 'translationPrefix' : 'platform.wiki.browse.'
23 -})
24 24  #if(!$isGuest)
25 25   #set($discard = $columns.add('_actions'))
26 - #set($discard = $columnsProperties.put('_actions', { 'actions' : ['join', 'requestJoin', 'cancelJoinRequest', 'viewInvitation', 'leave', 'edit', 'delete'] }))
27 27  #end
28 -#livetable('wikis', $columns, $columnsProperties, $options)
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 + ],
33 + 'actions': [
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 + }
64 + ]
65 + }
66 +})
67 +#set ($sourceParameters = $escapetool.url({
68 + 'className' : 'XWiki.XWikiServerClass',
69 + 'resultPage' : 'WikiManager.WikisLiveTableResults',
70 + 'translationPrefix' : 'platform.wiki.browse.',
71 + '$doc' : $doc.fullName
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}}
29 29  #set($docextras=[])
30 30  {{/velocity}}
XWiki.StyleSheetExtension[0]
Caching policy
... ... @@ -1,1 +1,0 @@
1 -long
Code
... ... @@ -1,19 +1,0 @@
1 -.actionjoin {
2 - background-image: url("$xwiki.getSkinFile('icons/silk/user_add.png')");
3 -}
4 -
5 -.actionleave {
6 - background-image: url("$xwiki.getSkinFile('icons/silk/user_delete.png')");
7 -}
8 -
9 -.actionrequestJoin {
10 - background-image: url("$xwiki.getSkinFile('icons/silk/bell.png')");
11 -}
12 -
13 -.actioncancelJoinRequest {
14 - background-image: url("$xwiki.getSkinFile('icons/silk/bell_delete.png')");
15 -}
16 -
17 -.actionviewInvitation {
18 - background-image: url("$xwiki.getSkinFile('icons/silk/script.png')");
19 -}
Parse content
... ... @@ -1,1 +1,0 @@
1 -Yes
Use this extension
... ... @@ -1,1 +1,0 @@
1 -currentPage