Cambios para el documento Documents Macro

Última modificación por Administrator el 2024/06/06 10:05

Desde la versión 4.1
editado por Administrator
el 2024/06/06 10:05
Cambiar el comentario: Install extension [org.xwiki.platform:xwiki-platform-index-ui/15.10.10]
Hasta la versión 2.1
editado por Administrator
el 2024/06/05 19:09
Cambiar el comentario: Migrated property [type] from class [XWiki.WikiMacroParameterClass]

Resumen

Detalles

Propiedades de página
Contenido
... ... @@ -1,7 +1,7 @@
1 1  Example:
2 2  
3 -##{{{{{documents id="example" count="5" actions="false" columns="doc.title, doc.location"/}}}}}##
3 +##{{{{{documents id="example" count="5" actions="false" columns="doc.title"/}}}}}##
4 4  
5 5  Generates:
6 6  
7 -{{documents id="example" count="5" actions="false" columns="doc.title, doc.location"/}}
7 +{{documents id="example" count="5" actions="false" space="Main" parent="Main.WebHome" columns="doc.title"/}}
XWiki.WikiMacroClass[0]
Código de la macro
... ... @@ -5,15 +5,15 @@
5 5   #set ($discard = $collist.add($colname.trim()))
6 6   #end
7 7  #else
8 - #set($collist = ['doc.title', 'doc.location', 'doc.date', 'doc.author'])
8 + #set($collist = ['doc.name', 'doc.space', 'doc.date', 'doc.author'])
9 9  #end
10 10  #set($colprops = {
11 - 'doc.title' : { 'size' : 30, 'link' : 'view' },
12 - 'doc.location' : { 'html': true },
13 - 'doc.fullName' : { 'size' : 30, 'link' : 'view' },
14 - 'doc.name' : { 'size' : 30, 'link' : 'view' },
15 - 'doc.space' : { 'link' : 'space' },
16 - 'doc.author' : { 'link' : 'author' }
11 + 'doc.title' : { 'type' : 'text' , 'size' : 30, 'link' : 'view' },
12 + 'doc.fullName' : { 'type' : 'text' , 'size' : 30, 'link' : 'view' },
13 + 'doc.name' : { 'type' : 'text' , 'size' : 30, 'link' : 'view' },
14 + 'doc.space' : { 'type' : 'text', 'link' : 'space' },
15 + 'doc.date' : { 'type' : 'date' },
16 + 'doc.author' : { 'type' : 'text', 'link' : 'author' }
17 17  })
18 18  #set($options = {
19 19   'translationPrefix' : 'platform.index.',
... ... @@ -23,11 +23,8 @@
23 23  #if ("$!xcontext.macro.params.space" != "")
24 24   #set ($extraParams = "&space=$escapetool.url($xcontext.macro.params.space)")
25 25  #end
26 -#if ("$!xcontext.macro.params.location" != "")
27 - #set ($extraParams = "$!{extraParams}&location=$escapetool.url($xcontext.macro.params.location)")
28 -#end
29 29  #if ("$!xcontext.macro.params.parent" != "")
30 - #set ($extraParams = "$!{extraParams}&parent=$escapetool.url($xcontext.macro.params.parent)")
27 + #set ($extraParams = "${extraParams}&parent=$escapetool.url($xcontext.macro.params.parent)")
31 31  #end
32 32  #if ("$!extraParams" != "")
33 33   #set($discard = $options.put('extraParams', $extraParams))
... ... @@ -34,23 +34,8 @@
34 34  #end
35 35  #if(!$isGuest && $xcontext.macro.params.actions == "true")
36 36   #set($discard = $collist.add('_actions'))
37 - #set($discard = $colprops.put('_actions', {
38 - 'actions': ['copy', 'rename', 'rights', 'delete'],
39 - 'filterable': false,
40 - 'sortable': false
41 - }))
34 + #set($discard = $colprops.put('_actions', { 'actions' : ['copy', 'rename', 'rights', 'delete'] }))
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
54 54  #if ("$!xcontext.macro.params.id" != "")
55 55   #set ($livetableId = $xcontext.macro.params.id)
56 56  #else
Categoría predeterminada
... ... @@ -1,0 +1,1 @@
1 +Content
Cacheado
... ... @@ -1,1 +1,0 @@
1 -No
Renderizado asíncrono
... ... @@ -1,1 +1,0 @@
1 -No
Default categories
... ... @@ -1,1 +1,0 @@
1 -Content
XWiki.WikiMacroParameterClass[6]
Nombre del parámetro
... ... @@ -1,1 +1,0 @@
1 -location
Descripción del parámetro
... ... @@ -1,1 +1,0 @@
1 -Only lists documents having a full reference matching the passed location (e.g. passing "Beau" would match a document reference of "France.Paris.Beaubourg.Office")
Parámetro obligatorio
... ... @@ -1,1 +1,0 @@
1 -No