Modifications pour le document Confluence bridge for Details Summary (Page properties report)
Modifié par Admin le 21/07/2025 - 09:06
Résumé
-
Propriétés de la Page (1 modifications, 0 ajouts, 0 suppressions)
-
Objets (2 modifications, 0 ajouts, 0 suppressions)
Détails
- Propriétés de la Page
-
- Contenu
-
... ... @@ -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** 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" %)exampletag12 +|**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 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" %) 1000|(% 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" %)(unset)|(% 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]
-
- Code de la macro
-
... ... @@ -14,55 +14,40 @@ 14 14 #end 15 15 #set ($results = $NULL) 16 16 #getCQLMacroResults($xcontext.macro $results) 17 - #if ($results != $NULL) 18 - #set ($showLastModified = "$!xcontext.macro.params.showLastModified") 19 - #set ($showLastModified = $showLastModified.equalsIgnoreCase("true")) 20 - #set ($showPageLabels = "$!xcontext.macro.params.showPageLabels") 21 - #set ($showPageLabels = $showPageLabels.equalsIgnoreCase("true")) 22 - #set ($showCreator = "$!xcontext.macro.params.showCreator") 23 - #set ($showCreator = $showCreator.equalsIgnoreCase("true")) 24 - #set ($showAnyMetadata = $showLastModified || $showPageLabels || $showCreator) 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 - #if ($details.size() < 2) 27 - $services.localization.render('rendering.macro.detailssummary.noresults') 28 - #else 29 - #foreach ($row in $details) 30 - #if ($foreach.first) 31 - |=$title## 32 - #foreach ($cell in $row) 33 - |=$cell## 34 - #end## 35 - #if ($showLastModified)|=$services.localization.render('rendering.macro.detailssummary.lastModified')#end## 36 - #if ($showCreator)|=$services.localization.render('rendering.macro.detailssummary.creator')#end## 37 - #if ($showPageLabels)|=$services.localization.render('rendering.macro.detailssummary.tags')#end## 17 + #set ($showLastModified = "$!xcontext.macro.params.showLastModified") 18 + #set ($showLastModified = $showLastModified.equalsIgnoreCase("true")) 19 + #set ($showPageLabels = "$!xcontext.macro.params.showPageLabels") 20 + #set ($showPageLabels = $showPageLabels.equalsIgnoreCase("true")) 21 + #set ($showCreator = "$!xcontext.macro.params.showCreator") 22 + #set ($showCreator = $showCreator.equalsIgnoreCase("true")) 23 + #set ($showAnyMetadata = $showLastModified || $showPageLabels || $showCreator) 24 + #set ($details = $services.confluence.details.getDetails("$!xcontext.macro.params.id", "$!xcontext.macro.params.headings", $results)) 25 + #if ($details.size() < 2) 26 + $services.localization.render('rendering.macro.detailssummary.noresults') 27 + #else 28 + #foreach ($row in $details) 29 + #if ($foreach.first) 30 + |=$title## 31 + #foreach ($cell in $row) 32 + |=$services.rendering.escape($cell, $xwiki.currentContentSyntaxId)## 33 + #end## 34 + #if ($showLastModified)|=$services.localization.render('rendering.macro.detailssummary.lastModified')#end## 35 + #if ($showCreator)|=$services.localization.render('rendering.macro.detailssummary.creator')#end## 36 + #if ($showPageLabels)|=$services.localization.render('rendering.macro.detailssummary.tags')#end## 38 38 39 - #else 38 + #else 39 + #if ($showAnyMetadata) 40 40 #set ($d = $xwiki.getDocument($row.get(0))) 41 - #foreach ($cell in $row) 42 - #set ($title = $d.getTitle()) 43 - #if (!$title) 44 - #set ($title = $d.getDocumentReference().getName()) 45 - #if ($title == "WebHome") 46 - #set ($title = $d.getDocumentReference().getParent().getName()) 47 - #end 48 - #end 49 - #if (!$title) 50 - #set ($title = $cell) 51 - #end 52 - | ((( #if ($foreach.first)[[$services.rendering.escape($services.rendering.escape($title, $xwiki.currentContentSyntaxId), $xwiki.currentContentSyntaxId)>>$cell]]#{else}## 53 - {{context document="$row.get(0)" restricted="true"}}## 54 - $cell## 55 - {{/context}} 56 - #end )))## 57 - #end## 58 - #if ($showLastModified)|$xwiki.formatDate($d.getDate())#end## 59 - #if ($showCreator)|#if ($d.getCreator() == "XWiki.superadmin")superadmin#else[[$d.getCreator()]]#end#end## 60 - #if ($showPageLabels)|#showTags($d)#end## 61 - 62 - #end 41 + #end## 42 + #foreach ($cell in $row) 43 + |#if ($foreach.first)[[$cell]]#{else}$services.rendering.escape($cell, $xwiki.currentContentSyntaxId)#end## 44 + #end## 45 + #if ($showLastModified)|$xwiki.formatDate($d.getDate())#end## 46 + #if ($showCreator)|#if ($d.getCreator() == "XWiki.superadmin")superadmin#else[[$d.getCreator()]]#end#end## 47 + #if ($showPageLabels)|#showTags($d)#end| 63 63 #end 64 - 65 65 #end 50 + 66 66 #end 67 67 #end 68 68 {{/velocity}} ... ... @@ -71,7 +71,7 @@ 71 71 ## We need to check if there is a valid license because the macro is registered even if the user doesn't have view right 72 72 ## on the macro definition page. See XWIKI-14828: Rendering macros defined in wiki pages are available to users that 73 73 ## don't have view right on those pages. 74 -#if ($services.licensing. licensor.hasLicensureForEntity($xcontext.macro.doc.documentReference))59 +#if ($services.promacrolicensing.hasLicensureForEntity($xcontext.macro.doc.documentReference)) 75 75 #executeMacro 76 76 #else 77 77 {{missingLicenseMessage extensionName="proMacros.extension.name"/}}
- XWiki.WikiMacroParameterClass[3]
-
- Nom du paramètre
-
... ... @@ -1,1 +1,1 @@ 1 -label 1 +labels