Documentation improved and list_projects renamed to projects
This commit is contained in:
parent
26001f0822
commit
1dc4ef8eb0
@ -9,7 +9,8 @@
|
||||
- Tweaks link added to admin menu
|
||||
- replaced user macro with {{user}} syntax (old syntax user#id is not supported anymore)
|
||||
- more formats for user macro and avatar support
|
||||
- rename list_users in members
|
||||
- rename list_users to members
|
||||
- rename list_projects to projects
|
||||
|
||||
### 0.5.7
|
||||
|
||||
|
@ -74,14 +74,14 @@ Restart Redmine and have a fun!
|
||||
* {{members(123, title=Manager, role=Manager only)}} := Lists all members of the project with project id 123 and the role "Manager" and adds the heading "Manager only"
|
||||
|
||||
|
||||
### Project list macros
|
||||
### Project macros
|
||||
|
||||
Lists projects of current user
|
||||
|
||||
#### Description
|
||||
|
||||
* {{list_projects}} := lists all projects of current users
|
||||
* {{list_projects(title=My title)}} := lists all projects of current users and adds the heading "My title"
|
||||
* {{projects}} := lists all projects of current users
|
||||
* {{projects(title=My title)}} := lists all projects of current users and adds the heading "My title"
|
||||
|
||||
### Calendar macro
|
||||
|
||||
|
@ -30,13 +30,13 @@ if ActiveRecord::Base.connection.table_exists?(:settings)
|
||||
require_dependency 'redmine_tweaks/wiki_macros/gist'
|
||||
require_dependency 'redmine_tweaks/wiki_macros/last_updated_at'
|
||||
require_dependency 'redmine_tweaks/wiki_macros/last_updated_by'
|
||||
require_dependency 'redmine_tweaks/wiki_macros/project'
|
||||
require_dependency 'redmine_tweaks/wiki_macros/member_macro'
|
||||
require_dependency 'redmine_tweaks/wiki_macros/project_macro'
|
||||
require_dependency 'redmine_tweaks/wiki_macros/recently_updated'
|
||||
require_dependency 'redmine_tweaks/wiki_macros/twitter'
|
||||
require_dependency 'redmine_tweaks/wiki_macros/user_macro'
|
||||
require_dependency 'redmine_tweaks/wiki_macros/vimeo'
|
||||
require_dependency 'redmine_tweaks/wiki_macros/youtube'
|
||||
require_dependency 'redmine_tweaks/wiki_macros/user_macro'
|
||||
require_dependency 'redmine_tweaks/wiki_macros/member_macro'
|
||||
|
||||
unless RedmineTweaks.settings[:remove_help]
|
||||
Redmine::Plugin.find('redmine_tweaks')
|
||||
|
@ -6,11 +6,11 @@ module RedmineTweaks
|
||||
module WikiMacros
|
||||
Redmine::WikiFormatting::Macros.register do
|
||||
desc <<-EOHELP
|
||||
Display users.
|
||||
Display members.
|
||||
|
||||
Syntax:
|
||||
|
||||
{{members(PROJECT_NAME, title=My user list, role=ROLE_NAME)}}
|
||||
{{members([PROJECT_NAME, title=My members list, role=ROLE_NAME)]}}
|
||||
|
||||
PROJECT_NAME can be project identifier, project name or project id
|
||||
|
||||
|
@ -10,22 +10,22 @@ module RedmineTweaks
|
||||
|
||||
Syntax:
|
||||
|
||||
{{list_projects(title=My project list,with_create_issue=BOOL)}}
|
||||
{{projects([title=My project list, with_create_issue=BOOL])}}
|
||||
|
||||
Examples:
|
||||
|
||||
{{list_projects}}
|
||||
{{projects}}
|
||||
...List all project, which I am member of
|
||||
|
||||
{{list_projects(title=My project list)}}
|
||||
{{projects(title=My project list)}}
|
||||
...List all project with title "My project list", which I am member of
|
||||
|
||||
{{list_projects(with_create_issue=true)}}
|
||||
{{projects(with_create_issue=true)}}
|
||||
...List all project with link to create new issue, which I am member of
|
||||
|
||||
EOHELP
|
||||
|
||||
macro :list_projects do |_obj, args|
|
||||
macro :projects do |_obj, args|
|
||||
args, options = extract_macro_options(args, :title, :with_create_issue)
|
||||
@projects = RedmineTweaks.load_projects
|
||||
return '' if @projects.nil?
|
@ -8,7 +8,16 @@ module RedmineTweaks
|
||||
desc <<-EOHELP
|
||||
Displays a list of pages that were updated recently.
|
||||
{{recently_updated}}
|
||||
{{recently_updated(number_of_days)}}
|
||||
{{recently_updated([number_of_days])}}
|
||||
|
||||
Examples:
|
||||
|
||||
{{recently_updated}}
|
||||
...List last updated pages (of the last 5 days)
|
||||
|
||||
{{recently_updated(15)}}
|
||||
...List last updated pages of the last 15 days
|
||||
|
||||
EOHELP
|
||||
|
||||
macro :recently_updated do |obj, args|
|
||||
|
@ -7,7 +7,8 @@ module RedmineTweaks
|
||||
Redmine::WikiFormatting::Macros.register do
|
||||
desc "Display link to user profile\n\n" \
|
||||
"Syntax:\n\n" \
|
||||
"{{user(user id or username [, format=USER_FORMAT, avatar=BOOL])}}\n\n" \
|
||||
"{{user(USER_NAME [, format=USER_FORMAT, avatar=BOOL])}}\n\n" \
|
||||
"USER_NAME can be user id or user name (login name)\n" \
|
||||
"USER_FORMATS\n" \
|
||||
"- system (use system settings) (default)\n- " +
|
||||
User::USER_FORMATS.keys.join("\n- ") + "\n\n" \
|
||||
|
@ -118,7 +118,7 @@ class WikiControllerTest < ActionController::TestCase
|
||||
assert_select 'div.wiki div.user'
|
||||
end
|
||||
|
||||
def test_show_with_list_projects_macro
|
||||
def test_show_with_projects_macro
|
||||
@request.session[:user_id] = 1
|
||||
@page.content.text = '{{list_projects}}'
|
||||
@page.content.save!
|
||||
|
Loading…
Reference in New Issue
Block a user