Changes for page Documents Macro

Last modified by Ludovic Dubost on 2024/07/22 15:50

From version 9.1
edited by Ludovic Dubost
on 2018/11/30 15:24
Change comment: Migrated property [async_enabled] from class [XWiki.WikiMacroClass]
To version 15.1
edited by Ludovic Dubost
on 2023/04/25 09:12
Change comment: Migrated property [type] from class [XWiki.WikiMacroParameterClass]

Summary

Details

XWiki.WikiMacroClass[0]
Macro code
... ... @@ -8,7 +8,7 @@
8 8   #set($collist = ['doc.title', 'doc.location', 'doc.date', 'doc.author'])
9 9  #end
10 10  #set($colprops = {
11 - 'doc.title' : { 'size' : 30, 'link' : 'view', 'filterable': false, 'sortable': false },
11 + 'doc.title' : { 'size' : 30, 'link' : 'view' },
12 12   'doc.location' : { 'html': true },
13 13   'doc.fullName' : { 'size' : 30, 'link' : 'view' },
14 14   'doc.name' : { 'size' : 30, 'link' : 'view' },
... ... @@ -40,6 +40,17 @@
40 40   'sortable': false
41 41   }))
42 42  #end
43 +#if ("$!services.like" != "")
44 + #set($discard = $collist.add('_likes'))
45 + ## We can't make it sortable or filterable right now since it's not stored in DB.
46 + #set($discard = $colprops.put('_likes', {
47 + 'filterable': false,
48 + 'sortable': false
49 + }))
50 +#end
51 +#if ($collist.contains('doc.location'))
52 + #set ($discard = $options.put('selectedColumn','doc.location'))
53 +#end
43 43  #if ("$!xcontext.macro.params.id" != "")
44 44   #set ($livetableId = $xcontext.macro.params.id)
45 45  #else