Modifications pour le document RecentlyUpdated
Modifié par superadmin le 21/07/2025 - 08:55
Résumé
-
Propriétés de la Page (1 modifications, 0 ajouts, 0 suppressions)
-
Objets (8 modifications, 0 ajouts, 4 suppressions)
- XWiki.WikiMacroClass[0]
- XWiki.WikiMacroParameterClass[0]
- XWiki.WikiMacroParameterClass[1]
- XWiki.WikiMacroParameterClass[2]
- XWiki.WikiMacroParameterClass[4]
- XWiki.WikiMacroParameterClass[6]
- XWiki.WikiMacroParameterClass[7]
- XWiki.WikiMacroParameterClass[8]
- XWiki.WikiMacroParameterClass[9]
- XWiki.WikiMacroParameterClass[10]
- XWiki.WikiMacroParameterClass[11]
- XWiki.WikiMacroParameterClass[12]
Détails
- Propriétés de la Page
-
- Contenu
-
... ... @@ -6,20 +6,17 @@ 6 6 = Parameters = 7 7 8 8 |=Parameter|=Description|=Required|=Default 9 -|**types**|Select one or multiple content types. The macro will display only the content of the type you specify here.|No|//all types// 10 -|**spaces**|Select one or multiple spaces. The macro will display only the documents present in the selected spaces.|No|{{{@self}}} 11 -|**author**|Comma-separated list of authors.|No| 12 -|**labels**|Comma-separated list of tags.|No| 13 -|**excludedLabels**|Comma-separated list of tags.|No| 9 +|**types**|Comma-separated list of types ({{{ page }}}, {{{ blogpost }}}, {{{ comment }}} or {{{ attachment }}}), possibly prefixed with "-".|No|//all types// 10 +|**spaces**|Comma-separated list of spaces, possibly prefixed with "+" or "-", or special value like {{{ @self }}}, {{{ @global }}} or {{{ @all }}}.|No|{{{ @self }}} 11 +|**author**|Comma-separated list of authors.|No| 12 +|**labels**|Comma-separated list of tags, possibly prefixed with "+" or "-".|No| 14 14 |**max**|Maximum number of results.|No| {{{ 15 }}} 15 15 |**theme**|Appearance of the macro ({{{ concise }}}, {{{ social }}}, {{{ sidebar }}}).|No| {{{ concise }}} 16 16 |**width**|Width of the macro in percentage.|No| {{{ 100% }}} 17 17 |**hideHeading**|Whether to hide the text "Recently Updated" as title|No| {{{ false }}} 18 18 |**showProfilePic**|Whether to show the profile picture of users|No| {{{ false }}} 19 -|**currentWiki**|If this parameter is selected then the spaces & excluded spaces parameters are ignored and the macro will display the documents from the current wiki.|No| {{{ false}}} 20 -|**excludedSpaces**|Select one or multiple spaces. The macro will not display the documents present in the selected spaces.|No| 21 -|**global**|If this parameter is selected then spaces, excluded spaces and the current wiki parameters are ignored and the macro will display the documents from the current wiki and subwikis. |No| {{{ false}}} 22 22 19 + 23 23 = Example Usage = 24 24 25 25 {{code}}
- XWiki.WikiMacroClass[0]
-
- Code de la macro
-
... ... @@ -43,60 +43,6 @@ 43 43 #setVariable("$return" $types) 44 44 #end 45 45 46 -## Creates the final space parameter. ConfluenceSpaces comes from migreations and is a mix of prefixed(+/-) spaces and excludedSpaces comes 47 -## from XWiki and are the spaces that should be excluded when doing the solr query. 48 -#macro (constructSpaceParameter $confluenceSpaces, $excludedSpaces) 49 - #set ($exclude = "") 50 - #foreach ($excludedSpace in $excludedSpaces.split(",")) 51 - #if (!$excludedSpace.trim().isBlank()) 52 - #if ($foreach.first) 53 - #set ($exclude = "-$excludedSpace") 54 - #else 55 - #set ($exclude = "$exclude,-$excludedSpace") 56 - #end 57 - #end 58 - #end 59 - #if (!$confluenceSpaces.trim().isEmpty() && !$exclude.trim().isEmpty()) 60 - #set ($finalSpace = "${confluenceSpaces},${exclude}") 61 - #elseif(!$confluenceSpaces.trim().isEmpty()) 62 - #set ($finalSpace = $confluenceSpaces) 63 - #else 64 - #set ($finalSpace = $exclude) 65 - #end 66 -#end 67 - 68 -## Determine if the search should be done in the currentWiki, globally or only on specific spaces. 69 -#macro (determinateSpaceScope $confluenceSpacesString) 70 - ## If the global parameter is marked then we set the search to everywhere, if the currentWiki is marked then we select the current wiki 71 - ## otherwise we just the actual space selected. 72 - #if ($xcontext.macro.params.global == "true") 73 - #set ($confluenceSpacesString = '@all') 74 - #elseif ($xcontext.macro.params.currentWiki == "true") 75 - #set ($confluenceSpacesString = '@global') 76 - #end 77 -#end 78 - 79 -## Handles the construction of the tags parameter. 80 -#macro (constructTagsParameter $confluenceTags, $excludedTags) 81 - #set ($exclude = "") 82 - #foreach ($excludedSpace in $excludedTags.split(",")) 83 - #if (!$excludedSpace.trim().isBlank()) 84 - #if ($foreach.first) 85 - #set ($exclude = "-$excludedSpace") 86 - #else 87 - #set ($exclude = "$exclude,-$excludedSpace") 88 - #end 89 - #end 90 - #end 91 - #if (!$confluenceTags.trim().isEmpty() && !$exclude.trim().isEmpty()) 92 - #set ($finalTags = "${confluenceTags},${exclude}") 93 - #elseif (!$confluenceTags.trim().isEmpty()) 94 - #set ($finalTags = $confluenceTags) 95 - #else 96 - #set ($finalTags = $exclude) 97 - #end 98 -#end 99 - 100 100 ## Init options from macro parameters 101 101 #macro (initOptionsFromParameters $return) 102 102 ## Gather every parameter in an option object that will be returned ... ... @@ -108,13 +108,12 @@ 108 108 #end 109 109 110 110 ## Authors 111 - #set ($options.authors = "$!stringtool.strip($!stringtool.join($!wikimacro.parameters.author, ','))") 57 + #set ($options.authors = "$!stringtool.strip($!wikimacro.parameters.author)") 58 + 112 112 ## Wiki & Spaces 113 - #set ($excludedSpaces = "$!xcontext.macro.params.excludedSpaces") 114 - #set ($confluenceSpacesString = "$!stringtool.strip($!xcontext.macro.params.spaces)") 60 + #set ($confluenceSpacesString = "$!stringtool.strip($!wikimacro.parameters.spaces)") 115 115 #set ($options.spaces = $NULL) 116 116 #set ($options.wiki = $doc.wiki) 117 - #determinateSpaceScope($confluenceSpacesString) 118 118 #if ( 119 119 $confluenceSpacesString.equals('') 120 120 || $confluenceSpacesString.equals('@self') ... ... @@ -140,16 +140,14 @@ 140 140 #set ($options.wiki = $NULL) 141 141 #else 142 142 ## Search in specified spaces 143 - #constructSpaceParameter($confluenceSpacesString, $excludedSpaces) 144 - #set ($options.spaces = $finalSpace) 88 + #set ($options.spaces = $confluenceSpacesString) 145 145 #end 146 146 147 147 ## Tags 148 - #constructTagsParameter("$!stringtool.strip($!xcontext.macro.params.labels)", "$!stringtool.strip($!xcontext.macro.params.excludedLabels)") 149 - #set ($options.tags = $finalTags) 92 + #set ($options.tags = "$!stringtool.strip($!wikimacro.parameters.labels)") 150 150 151 151 ## Types 152 - #set ($confluenceTypesString = "$!stringtool.strip($! xcontext.macro.params.types)")95 + #set ($confluenceTypesString = "$!stringtool.strip($!wikimacro.parameters.types)") 153 153 #parseTypes($confluenceTypesString, $types) 154 154 #set ($options.types = $types) 155 155 - Default categories
-
... ... @@ -1,1 +1,0 @@ 1 -Content
- XWiki.WikiMacroParameterClass[0]
-
- Type du paramètre
-
... ... @@ -1,1 +1,1 @@ 1 - com.xwiki.macros.internal.userlist.UserReferenceList1 +java.lang.String
- XWiki.WikiMacroParameterClass[1]
-
- Type du paramètre
-
... ... @@ -1,1 +1,1 @@ 1 - com.xwiki.pickers.SuggestSpacesReference1 +java.lang.String
- XWiki.WikiMacroParameterClass[2]
-
- Description du paramètre
-
... ... @@ -1,0 +1,1 @@ 1 +Filter the results by label. The macro will display only the pages etc which are tagged with the label(s) you specify here. You can specify one or more label values, separated by a comma or a space. To exclude content which matches a given label, put a minus sign (-) immediately in front of that label value. For example: If you specify a label value of -badpage you will get only content which is not labeled with 'badpage'. To indicate that the results** **must match a given label value, put a plus sign (+) immediately in front of that label value. For example: If you specify a label value of +superpage,+goodpage you will get only content which has at least two labels, being 'superpage' and 'goodpage'. The labels parameter only applies to the page and blog content types. - Type du paramètre
-
... ... @@ -1,1 +1,1 @@ 1 - com.xwiki.pickers.TagsReference1 +java.lang.String
- XWiki.WikiMacroParameterClass[4]
-
- Description du paramètre
-
... ... @@ -1,0 +1,1 @@ 1 +This parameter allows you to filter content by content type. The macro will display only the content of the type you specify here. You can specify one or more types, separated by a comma or a space. To exclude content of a given content type, put a minus sign (-) immediately in front of that content type. For example: If you specify a content type of -blogpost you will get pages and all other content except for blog posts. Available values: "page" - documents, "blogpost" or "news" - blogpost documents, "comment" - comments on documents, "attachment" - attachments - Type du paramètre
-
... ... @@ -1,1 +1,1 @@ 1 - com.xwiki.pickers.recentlyupdated.RecentlyUpdateType1 +java.lang.String
- XWiki.WikiMacroParameterClass[6]
-
- Description du paramètre
-
... ... @@ -1,0 +1,1 @@ 1 +Choose the appearance of this macro: "concise" - the default list, showing the names of pages which were updated or commented on, the users who made the page modifications and time when the modifications occurred. "social" - lists recent modifications in reverse chronological order, but groups them by user into short time segments. A 'sub' list appears within each user's time segment, showing the names of pages which they updated or commented on and time when these modifications occurred. "sidebar" - lists recent updates in reverse chronological order, showing the names of pages which were updated or commented on and time when the page modifications occurred. This theme does not show authorship. - Type du paramètre
-
... ... @@ -1,1 +1,1 @@ 1 - com.xwiki.macros.internal.recentlyupdated.RecentlyUpdatedThemeEnum1 +java.lang.String
- XWiki.WikiMacroParameterClass[7]
-
- Description du paramètre
-
... ... @@ -1,0 +1,1 @@ 1 +Specify "showProfilePic=true" to display the profile pictures of the users who updated the content.
- XWiki.WikiMacroParameterClass[8]
-
- Description du paramètre
-
... ... @@ -1,0 +1,1 @@ 1 +Determines whether the macro hides or displays the text 'Recently Updated' as a title above the list of content. Only available in wikimarkup and storage format. Accepted values: "true" - Title is hidden, "false" - Title is shown.
- XWiki.WikiMacroParameterClass[9]
-
- Nom du paramètre
-
... ... @@ -1,1 +1,0 @@ 1 -excludedLabels - Type du paramètre
-
... ... @@ -1,1 +1,0 @@ 1 -com.xwiki.pickers.TagsReference
- XWiki.WikiMacroParameterClass[10]
-
- Valeur par défaut du paramètre
-
... ... @@ -1,1 +1,0 @@ 1 -false - Paramètre obligatoire
-
... ... @@ -1,1 +1,0 @@ 1 -Non - Nom du paramètre
-
... ... @@ -1,1 +1,0 @@ 1 -global - Type du paramètre
-
... ... @@ -1,1 +1,0 @@ 1 -java.lang.Boolean
- XWiki.WikiMacroParameterClass[11]
-
- Valeur par défaut du paramètre
-
... ... @@ -1,1 +1,0 @@ 1 -false - Paramètre obligatoire
-
... ... @@ -1,1 +1,0 @@ 1 -Non - Nom du paramètre
-
... ... @@ -1,1 +1,0 @@ 1 -currentWiki - Type du paramètre
-
... ... @@ -1,1 +1,0 @@ 1 -java.lang.Boolean
- XWiki.WikiMacroParameterClass[12]
-
- Nom du paramètre
-
... ... @@ -1,1 +1,0 @@ 1 -excludedSpaces - Type du paramètre
-
... ... @@ -1,1 +1,0 @@ 1 -com.xwiki.pickers.SuggestSpacesReference