Änderungen von Dokument Confluence bridge for Details Summary (Page properties report)
Zuletzt geändert von xwikiadmin am 2025/12/11 07:38
Von Version 3.1
bearbeitet von xwikiadmin
am 2025/05/21 09:22
am 2025/05/21 09:22
Änderungskommentar:
Migrated property [feature] from class [XWiki.WikiMacroParameterClass]
Auf Version 6.1
bearbeitet von xwikiadmin
am 2025/12/11 07:38
am 2025/12/11 07:38
Änderungskommentar:
Install extension [com.xwiki.pro:xwiki-pro-macros-confluence-bridges-ui/1.28.5]
Zusammenfassung
-
Seiteneigenschaften (1 geändert, 0 hinzugefügt, 0 gelöscht)
-
Objekte (2 geändert, 2 hinzugefügt, 0 gelöscht)
Details
- Seiteneigenschaften
-
- Inhalt
-
... ... @@ -9,9 +9,9 @@ 9 9 |**id**|The group of properties to show. If empty, will show page properties without identifiers.|No|(% style="width:27px" %)(empty)|(% style="width:334px" %)book 10 10 |**headings**|Which column of the page properties to show. By default, all columns are shown. Columns with comma in their names require being quoted|No|(% style="width:27px" %)(empty)|(% style="width:334px" %){{{Title,Author,~"Released in years~""}}} 11 11 |**cql**|A query written in the Confluence Query Language (CQL) syntax defining the list of documents to show. [[See the documentation>>https://extensions.xwiki.org/xwiki/bin/view/Extension/CQL/#HSyntax]].|If labels is not given|(% style="width:27px" %)(empty)|(% style="width:334px" %){{{label = "examplelabel" and space = currentSpace ( )}}} 12 -|**labels**|A list of tags to use, separated by a comma or a space. This value is ignored if the cql parameter is set. Note: this parameter doesn't exist in Confluence, it's an XWiki addition.|If cql is not given|(% style="width:27px" %)(empty)|(% style="width:334px" %)exampletag 12 +|**labels** or **label**|A list of tags to use, separated by a comma or a space. This value is ignored if the cql parameter is set. Note: this parameter doesn't exist in Confluence, it's an XWiki addition.|If cql is not given|(% style="width:27px" %)(empty)|(% style="width:334px" %)exampletag 13 13 |**operator**|Whether all the tags should match (AND), or any (OR). This value is ignored if the cql parameter is set. Note: this parameter doesn't exist in Confluence, it's an XWiki addition.|No|(% style="width:27px" %)OR|(% style="width:334px" %)AND 14 -|**max**|Maximum number of results. Note: this parameter doesn't exist in Confluence, it's an XWiki addition.|No|(% style="width:27px" %) (unset)|(% style="width:27px" %)1514 +|**max**|Maximum number of results. Note: this parameter doesn't exist in Confluence, it's an XWiki addition.|No|(% style="width:27px" %)1000|(% style="width:27px" %)15 15 15 |**sort**|What to sort on. The only supported values are "modified", "creation" and "title" for now. Ignored if an ##order by## clause is present in the cql parameter. Note: this parameter doesn't exist in Confluence, it's an XWiki addition.|No|(% style="width:27px" %)(unset)|(% style="width:27px" %)title 16 16 |**reverse**|Whether to reverse the sort (true) or not (false). Note: this parameter doesn't exist in Confluence, it's an XWiki addition.|No|(% style="width:27px" %)false|(% style="width:27px" %)true 17 17 |**firstcolumn**|A custom title for the document name column|No|(% style="width:27px" %)Title|(% style="width:334px" %)Book
- XWiki.WikiMacroClass[0]
-
- Makro-Code
-
... ... @@ -22,32 +22,48 @@ 22 22 #set ($showCreator = "$!xcontext.macro.params.showCreator") 23 23 #set ($showCreator = $showCreator.equalsIgnoreCase("true")) 24 24 #set ($showAnyMetadata = $showLastModified || $showPageLabels || $showCreator) 25 - #set ($details = $services.confluence.details.getDetails("$!xcontext.macro.params.id", "$!xcontext.macro.params.headings", $results)) 25 + #set ($details = $services.confluence.details.getDetails("$!xcontext.macro.params.id", "$!xcontext.macro.params.headings", $results, "$!xcontext.macro.params.sortBy", "$!xcontext.macro.params.reverseSort" == "true")) 26 26 #if ($details.size() < 2) 27 27 $services.localization.render('rendering.macro.detailssummary.noresults') 28 28 #else 29 - #foreach($rowin $details)30 - #if($foreach.first)31 - |=$title##32 - #foreach ($cellin $row)33 - |=$ cell##34 - #en d##35 - #if($showLastModified)|=$services.localization.render('rendering.macro.detailssummary.lastModified')#end##36 - #if($showCreator)|=$services.localization.render('rendering.macro.detailssummary.creator')#end##37 - #if ($show PageLabels)|=$services.localization.render('rendering.macro.detailssummary.tags')#end##38 - 39 - #else 40 - # if ($showAnyMetadata)29 + (% class="details_summary" %) 30 + ((( 31 + #foreach ($row in $details) 32 + #if ($foreach.first) 33 + |=$title## 34 + #foreach ($cell in $row) 35 + |=$cell## 36 + #end## 37 + #if ($showLastModified)|=$services.localization.render('rendering.macro.detailssummary.lastModified')#end## 38 + #if ($showCreator)|=$services.localization.render('rendering.macro.detailssummary.creator')#end## 39 + #if ($showPageLabels)|=$services.localization.render('rendering.macro.detailssummary.tags')#end## 40 + #else 41 41 #set ($d = $xwiki.getDocument($row.get(0))) 42 - #end## 43 - #foreach ($cell in $row) 44 - | ((( #if ($foreach.first)[[$cell]]#{else}$cell#end ))) ## 45 - #end## 46 - #if ($showLastModified)|$xwiki.formatDate($d.getDate())#end## 47 - #if ($showCreator)|#if ($d.getCreator() == "XWiki.superadmin")superadmin#else[[$d.getCreator()]]#end#end## 48 - #if ($showPageLabels)|#showTags($d)#end| 42 + #set ($escapedReference = $services.rendering.escape($row.get(0), "xwiki/2.1")) 43 + #foreach ($cell in $row) 44 + #set ($title = $d.getTitle()) 45 + #if (!$title) 46 + #set ($title = $d.getDocumentReference().getName()) 47 + #if ($title == "WebHome") 48 + #set ($title = $d.getDocumentReference().getParent().getName()) 49 + #end 50 + #end 51 + #if (!$title) 52 + #set ($title = $cell) 53 + #end 54 + | ((( #if ($foreach.first)[[$services.rendering.escape($services.rendering.escape($title, $xwiki.currentContentSyntaxId), $xwiki.currentContentSyntaxId)>>$escapedReference]]#{else}## 55 + {{context document="$row.get(0)" restricted="true"}}## 56 + $cell## 57 + {{/context}} 58 + #end )))## 59 + #end## 60 + #if ($showLastModified)|$xwiki.formatDate($d.getDate())#end## 61 + #if ($showCreator)|#if ($d.getCreator() == "XWiki.superadmin")superadmin#else[[$d.getCreator()]]#end#end## 62 + #if ($showPageLabels)|#showTags($d)#end## 63 + #end 64 + 49 49 #end 50 - #end66 + ))) 51 51 52 52 #end 53 53 #end
- XWiki.WikiMacroParameterClass[3]
-
- Parameter-Name
-
... ... @@ -1,1 +1,1 @@ 1 -label s1 +label
- XWiki.WikiMacroParameterClass[12]
-
- Parameter-Name
-
... ... @@ -1,0 +1,1 @@ 1 +sortBy - Parameter-Beschreibung
-
... ... @@ -1,0 +1,1 @@ 1 +What to sort on.
- XWiki.WikiMacroParameterClass[13]
-
- Parameter-Name
-
... ... @@ -1,0 +1,1 @@ 1 +reverseSort - Parameter-Beschreibung
-
... ... @@ -1,0 +1,1 @@ 1 +Whether to reverse the sort.