additionals/init.rb

66 lines
2.0 KiB
Ruby
Raw Normal View History

2013-11-11 14:57:30 +04:00
require 'redmine'
require 'additionals'
2013-11-11 14:57:30 +04:00
Redmine::Plugin.register :additionals do
name 'Additionals'
2013-11-11 14:57:30 +04:00
author 'AlphaNodes GmbH'
description 'Customizing Redmine, providing wiki macros and act as a library/function provider for other Redmine plugins'
2017-07-13 13:05:17 +03:00
version '2.0.1'
author_url 'https://alphanodes.com/'
url 'https://github.com/alphanodes/additionals'
2013-11-11 14:57:30 +04:00
default_settings = {
2016-12-02 14:45:12 +03:00
account_login_bottom: '',
add_go_to_top: 0,
2016-12-02 14:45:12 +03:00
custom_help_url: 'http://www.redmine.org/guide',
disabled_modules: nil,
2017-07-13 13:05:17 +03:00
external_urls: 1,
2016-12-02 14:45:12 +03:00
global_footer: '',
global_sidebar: '',
wiki_pdf_header: '',
wiki_pdf_remove_title: 0,
wiki_pdf_remove_attachments: 0,
2016-12-02 14:45:12 +03:00
global_wiki_footer: '',
global_wiki_header: '',
global_wiki_sidebar: '',
issue_auto_assign_role: '',
issue_auto_assign_status: '',
issue_auto_assign: 0,
legacy_smiley_support: 0,
2016-12-02 14:45:12 +03:00
new_ticket_message: 'Don\'t forget to define acceptance criteria!',
overview_bottom: '',
overview_right: '',
overview_top: '',
project_overview_content: 'Go to admin area and define a nice wiki text here as a fixed skeletal for all projects.',
remove_help: 0,
remove_mypage: 0,
remove_news: 0
2013-11-11 14:57:30 +04:00
}
5.times do |i|
2015-10-10 15:11:02 +03:00
default_settings['custom_menu' + i.to_s + '_name'] = ''
default_settings['custom_menu' + i.to_s + '_url'] = ''
default_settings['custom_menu' + i.to_s + '_title'] = ''
end
2017-07-11 19:07:05 +03:00
settings(default: default_settings, partial: 'additionals/settings/additionals')
2016-12-02 14:45:12 +03:00
permission :hide_in_memberbox, {}
permission :show_hidden_roles_in_memberbox, {}
project_module :issue_tracking do
permission :edit_closed_issues, {}
end
2013-11-11 14:57:30 +04:00
project_module :time_tracking do
permission :log_time_on_closed_issues, {}
end
2013-11-11 14:57:30 +04:00
# required redmine version
requires_redmine version_or_higher: '3.0.0'
2013-11-11 14:57:30 +04:00
menu :admin_menu, :additionals, { controller: 'settings', action: 'plugin', id: 'additionals' }, caption: :label_additionals
2016-11-17 09:17:21 +03:00
RedCloth3::ALLOWED_TAGS << 'div'
2013-11-11 14:57:30 +04:00
end