2013-11-11 14:57:30 +04:00
require 'redmine'
2017-06-07 20:23:20 +03:00
require 'additionals'
2013-11-11 14:57:30 +04:00
2017-06-07 20:23:20 +03:00
Redmine :: Plugin . register :additionals do
name 'Additionals'
2013-11-11 14:57:30 +04:00
author 'AlphaNodes GmbH'
2017-06-07 20:23:20 +03:00
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'
2015-01-11 18:48:15 +03:00
author_url 'https://alphanodes.com/'
2017-06-07 20:23:20 +03:00
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 : '' ,
2017-02-07 14:31:35 +03:00
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 : '' ,
2017-02-07 14:31:35 +03:00
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 : '' ,
2017-02-07 14:31:35 +03:00
issue_auto_assign : 0 ,
2017-04-27 17:53:08 +03:00
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.' ,
2017-02-07 14:31:35 +03:00
remove_help : 0 ,
remove_mypage : 0 ,
remove_news : 0
2013-11-11 14:57:30 +04:00
}
2014-10-01 21:51:46 +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' ] = ''
2014-10-01 21:51:46 +04:00
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
2016-12-05 17:47:53 +03:00
project_module :time_tracking do
permission :log_time_on_closed_issues , { }
end
2013-11-11 14:57:30 +04:00
# required redmine version
2017-06-07 20:23:20 +03:00
requires_redmine version_or_higher : '3.0.0'
2013-11-11 14:57:30 +04:00
2017-06-07 20:23:20 +03: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