Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update the description of the type parameter #430 Make the type parameter a static list picker #429 #462

Merged
merged 4 commits into from
Feb 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/*
* See the NOTICE file distributed with this work for additional
* information regarding copyright ownership.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
package com.xwiki.pickers.recentlyupdated;

/**
* Picker representation for the type parameter of the recently-updated macro.
*
* @version $Id$
*/
public class RecentlyUpdateType
{
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
## ---------------------------------------------------------------------------
## See the NOTICE file distributed with this work for additional
## information regarding copyright ownership.
##
## This is free software; you can redistribute it and/or modify it
## under the terms of the GNU Lesser General Public License as
## published by the Free Software Foundation; either version 2.1 of
## the License, or (at your option) any later version.
##
## This software is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
## Lesser General Public License for more details.
##
## You should have received a copy of the GNU Lesser General Public
## License along with this software; if not, write to the Free
## Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
## 02110-1301 USA, or see the FSF site: http://www.fsf.org.
## ---------------------------------------------------------------------------
#template("pickers_macros.vm")
#set ($parameters = {
'name': $displayer.parameters.name,
Farcasut marked this conversation as resolved.
Show resolved Hide resolved
'value': $displayer.value,
'multiple': 'multiple',
'prefix': 'recentlyUpdated.param.types.',
'options': [
{'name': 'page', 'value': 'page'},
{'name': 'blogpost', 'value': 'blogpost'},
{'name': 'comment', 'value': 'comment'},
{'name': 'attachment', 'value': 'attachment'}
]
})
#staticSelectPicker($parameters)
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ There are only a few things that are not supported compared to the Confluence ma
= Parameters =

|=Parameter|=Description|=Required|=Default
|**types**|Comma-separated list of types ({{{ page }}}, {{{ blogpost }}}, {{{ comment }}} or {{{ attachment }}}), possibly prefixed with "-".|No|//all types//
|**types**|Select one or multiple content types. The macro will display only the content of the type you specify here.|No|//all types//
|**spaces**|Comma-separated list of spaces, possibly prefixed with "+" or "-", or special value like {{{ @self }}}, {{{ @global }}} or {{{ @all }}}.|No|{{{ @self }}}
|**author**|Comma-separated list of authors.|No|
|**labels**|Comma-separated list of tags, possibly prefixed with "+" or "-".|No|
|**author**|Comma-separated list of authors.|No|
|**labels**|Comma-separated list of tags, possibly prefixed with "+" or "-".|No|
|**max**|Maximum number of results.|No| {{{ 15 }}}
|**theme**|Appearance of the macro ({{{ concise }}}, {{{ social }}}, {{{ sidebar }}}).|No| {{{ concise }}}
|**width**|Width of the macro in percentage.|No| {{{ 100% }}}
Expand Down Expand Up @@ -913,7 +913,7 @@ require(['jquery'], $ => {
#set ($options.tags = "$!stringtool.strip($!wikimacro.parameters.labels)")

## Types
#set ($confluenceTypesString = "$!stringtool.strip($!wikimacro.parameters.types)")
#set ($confluenceTypesString = "$!stringtool.strip($!xcontext.macro.params.types)")
#parseTypes($confluenceTypesString, $types)
#set ($options.types = $types)

Expand Down Expand Up @@ -1401,7 +1401,7 @@ require(['jquery'], $ => {
<defaultValue/>
</property>
<property>
<description>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</description>
<description/>
</property>
<property>
<mandatory>0</mandatory>
Expand All @@ -1410,7 +1410,7 @@ require(['jquery'], $ =&gt; {
<name>types</name>
</property>
<property>
<type>java.lang.String</type>
<type>com.xwiki.pickers.recentlyupdated.RecentlyUpdateType</type>
</property>
</object>
<object>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -221,34 +221,38 @@ rendering.macro.profilepicture.parameter.User.description =The user name to show
## Recently Updated macro
recentlyUpdatedMacro.title=Recently Updated
recentlyUpdatedMacro.noMoreResults=No more results
rendering.macro.recentlyUpdated.name=Recently Updated
rendering.macro.recentlyUpdated.description=Add the Recently Updated macro to a page to show a list of pages, blogs, files, and comments that have been created or edited recently. This is great for project landing, information pages, or team space home pages. It's very flexible, you can limit the list to specific people, spaces, types of content, and more.
rendering.macro.recentlyUpdated.parameter.title.name=title
rendering.macro.recentlyUpdated.parameter.description.name=Filter the results by author. The macro will display only the pages etc which were last modified by the author(s) you specify here. You can specify multiple users.
rendering.macro.recentlyUpdated.parameter.author.name=author
rendering.macro.recentlyUpdated.parameter.author.description=This parameter allows you to filter content by space. The macro will display only the pages etc which belong to the space(s) you specify here. You can specify one or more space keys, separated by a comma or a space. To exclude content in a specific space, put a minus sign (-) immediately in front of that space key. For example: If you specify a space key of -BADSPACE you will get only content which is not in the BADSPACE. To indicate that the results must come from a specific space, put a plus sign (+) immediately in front of that space key. For example: If you specify a space key of +GOODSPACE you will get only content in GOODSPACE. (Note that this is not particularly useful, because each content item belongs to one space only. If you put a plus sign next to one space key and list other space keys too, the other space keys will be ignored.) Special values: "@self" - the current space, "@global" - all spaces in wiki, "@all" or "*" - all spaces in every wiki
rendering.macro.recentlyUpdated.parameter.spaces.name=spaces
rendering.macro.recentlyUpdated.parameter.spaces.description=This parameter allows you to filter content by space. The macro will display only the pages etc which belong to the space(s) you specify here. You can specify one or more space keys, separated by a comma or a space. To exclude content in a specific space, put a minus sign (-) immediately in front of that space key. For example: If you specify a space key of -BADSPACE you will get only content which is not in the BADSPACE. To indicate that the results must come from a specific space, put a plus sign (+) immediately in front of that space key. For example: If you specify a space key of +GOODSPACE you will get only content in GOODSPACE. (Note that this is not particularly useful, because each content item belongs to one space only. If you put a plus sign next to one space key and list other space keys too, the other space keys will be ignored.) Special values: "@self" - the current space, "@global" - all spaces in wiki, "@all" or "*" - all spaces in every wiki
rendering.macro.recentlyUpdated.parameter.labels.name=labels
rendering.macro.recentlyUpdated.parameter.labels.description=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.
rendering.macro.recentlyUpdated.parameter.width.name=width
rendering.macro.recentlyUpdated.parameter.width.description=Specify the width of the macro display, as a percentage of the window width.
rendering.macro.recentlyUpdated.parameter.types.name=types
rendering.macro.recentlyUpdated.parameter.types.description=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
rendering.macro.recentlyUpdated.parameter.max.name=max
rendering.macro.recentlyUpdated.parameter.max.description=Specify the maximum number of results to be displayed. If this parameter is omitted, then a maximum of 15 results are displayed.
rendering.macro.recentlyUpdated.parameter.theme.name=theme
rendering.macro.recentlyUpdated.parameter.theme.description=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.
rendering.macro.recentlyUpdated.parameter.showProfilePic.name=showProfilePic
rendering.macro.recentlyUpdated.parameter.showProfilePic.description=Specify "showProfilePic=true" to display the profile pictures of the users who updated the content.
rendering.macro.recentlyUpdated.parameter.hideHeading.name=hideHeading
rendering.macro.recentlyUpdated.parameter.hideHeading.description=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.
rendering.macro.recently-updated.name=Recently Updated
rendering.macro.recently-updated.description=Add the Recently Updated macro to a page to show a list of pages, blogs, files, and comments that have been created or edited recently. This is great for project landing, information pages, or team space home pages. It's very flexible, you can limit the list to specific people, spaces, types of content, and more.
rendering.macro.recently-updated.parameter.title.name=title
rendering.macro.recently-updated.parameter.description.name=Filter the results by author. The macro will display only the pages etc which were last modified by the author(s) you specify here. You can specify multiple users.
rendering.macro.recently-updated.parameter.author.name=author
rendering.macro.recently-updated.parameter.author.description=This parameter allows you to filter content by space. The macro will display only the pages etc which belong to the space(s) you specify here. You can specify one or more space keys, separated by a comma or a space. To exclude content in a specific space, put a minus sign delete immediately in front of that space key. For example: If you specify a space key of -BADSPACE you will get only content which is not in the BADSPACE. To indicate that the results must come from a specific space, put a plus sign add immediately in front of that space key. For example: If you specify a space key of +GOODSPACE you will get only content in GOODSPACE. (Note that this is not particularly useful, because each content item belongs to one space only. If you put a plus sign next to one space key and list other space keys too, the other space keys will be ignored.) Special values: "@self" - the current space, "@global" - all spaces in wiki, "@all" or "*" - all spaces in every wiki
rendering.macro.recently-updated.parameter.spaces.name=spaces
rendering.macro.recently-updated.parameter.spaces.description=This parameter allows you to filter content by space. The macro will display only the pages etc which belong to the space(s) you specify here. You can specify one or more space keys, separated by a comma or a space. To exclude content in a specific space, put a minus sign delete immediately in front of that space key. For example: If you specify a space key of -BADSPACE you will get only content which is not in the BADSPACE. To indicate that the results must come from a specific space, put a plus sign add immediately in front of that space key. For example: If you specify a space key of +GOODSPACE you will get only content in GOODSPACE. (Note that this is not particularly useful, because each content item belongs to one space only. If you put a plus sign next to one space key and list other space keys too, the other space keys will be ignored.) Special values: "@self" - the current space, "@global" - all spaces in wiki, "@all" or "*" - all spaces in every wiki
rendering.macro.recently-updated.parameter.labels.name=labels
rendering.macro.recently-updated.parameter.labels.description=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 delete 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 add 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.
rendering.macro.recently-updated.parameter.width.name=width
rendering.macro.recently-updated.parameter.width.description=Specify the width of the macro display, as a percentage of the window width.
rendering.macro.recently-updated.parameter.types.name=types
rendering.macro.recently-updated.parameter.types.description=Select one or multiple content types. The macro will display only the content of the type you specify here.
rendering.macro.recently-updated.parameter.max.name=max
rendering.macro.recently-updated.parameter.max.description=Specify the maximum number of results to be displayed. If this parameter is omitted, then a maximum of 15 results are displayed.
rendering.macro.recently-updated.parameter.theme.name=theme
rendering.macro.recently-updated.parameter.theme.description=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.
rendering.macro.recently-updated.parameter.showProfilePic.name=showProfilePic
rendering.macro.recently-updated.parameter.showProfilePic.description=Specify "showProfilePic=true" to display the profile pictures of the users who updated the content.
rendering.macro.recently-updated.parameter.hideHeading.name=hideHeading
rendering.macro.recently-updated.parameter.hideHeading.description=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.
rendering.macro.recently-updated.parameter.theme.description=Choose the display format of this macro.
rendering.macro.recently-updated.parameter.showProfilePic.description=Check this box to display the profile pictures of the users who updated the content.
rendering.macro.recently-updated.parameter.hideHeading.description=Check this box if you would like to hide the text 'Recently Updated' displayed by default as a title above the list of content.
com.xwiki.macros.internal.recentlyupdated.RecentlyUpdatedThemeEnum.concise=Title, username, time
com.xwiki.macros.internal.recentlyupdated.RecentlyUpdatedThemeEnum.social=User, title, time
com.xwiki.macros.internal.recentlyupdated.RecentlyUpdatedThemeEnum.sidebar=Title, time
recentlyUpdated.param.types.attachment=Attachment
recentlyUpdated.param.types.blogpost=Blogpost
recentlyUpdated.param.types.comment=Comment
recentlyUpdated.param.types.page=Page

## View Files macro
com.xwiki.macros.viewfile.DisplayType.full=Full
Expand Down