Wiki source code of Livetable part for the Home page
Last modified by ztx lyghters on 2025/01/31 19:55
Show last authors
author | version | line-number | content |
---|---|---|---|
1 | {{velocity}} | ||
2 | #set($columns = ["name", "summary", "category", "authors", "doc.creationDate", "doc.date", "installedCount", "rating"]) | ||
3 | #if ($useRecommendations && $isRecommendedView) | ||
4 | #set ($discard = $columns.add('recommended')) | ||
5 | #end | ||
6 | #set($columnsProperties = { | ||
7 | "name" : { "type" : "text", "link" : "view" }, | ||
8 | "summary" : { "type" : "text" }, | ||
9 | "category" : { "type" : "list" }, | ||
10 | "authors" : {'html': true}, | ||
11 | "doc.creationDate" : { "type" : "date" }, | ||
12 | "doc.date" : { "type" : "date" }, | ||
13 | "rating" : { 'html' : true, 'filterable' : false, 'sortable' : false} | ||
14 | }) | ||
15 | #if ($useRecommendations && $isRecommendedView) | ||
16 | #set ($discard = $columnsProperties.put('recommended', { 'type' : 'hidden' })) | ||
17 | #end | ||
18 | #set($options = { | ||
19 | "className":"ExtensionCode.ExtensionClass", | ||
20 | "selectedColumn":"doc.creationDate", | ||
21 | "defaultOrder":"desc", | ||
22 | "translationPrefix" : "extension.repository.", | ||
23 | "rowCount": 30 | ||
24 | }) | ||
25 | ## Only display tags for non Recommended because there's currently a limitation, | ||
26 | ## see https://jira.xwiki.org/browse/XWIKI-13680 | ||
27 | #if (!$useRecommendations || !$isRecommendedView) | ||
28 | #set ($discard = $options.put('tagCloud', true)) | ||
29 | #else | ||
30 | #set ($discard = $options.put('extraParams', '&recommended=1')) | ||
31 | #end | ||
32 | #livetable("extensions" $columns $columnsProperties $options) | ||
33 | {{/velocity}} |