forked from GEROMAX/redmine_subtask_list_accordion
-
Notifications
You must be signed in to change notification settings - Fork 2
/
init.rb
24 lines (21 loc) · 1.31 KB
/
init.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
require_dependency File.expand_path('../lib/redmine_subtask_list_accordion/hooks/subtask_list_accordion_hook', __FILE__)
require_dependency File.expand_path('../lib/redmine_subtask_list_accordion/patches/issues_helper_patch', __FILE__)
require_dependency File.expand_path('../lib/redmine_subtask_list_accordion/patches/user_preference_patch', __FILE__)
reloader = defined?(ActiveSupport::Reloader) ? ActiveSupport::Reloader : ActionDispatch::Reloader
reloader.to_prepare do
unless UserPreference.included_modules.include?(RedmineSubtaskListAccordion::Patches::UserPreferencePatch)
UserPreference.send :prepend, RedmineSubtaskListAccordion::Patches::UserPreferencePatch
end
unless IssuesHelper.included_modules.include?(RedmineSubtaskListAccordion::Patches::IssuesHelperPatch)
IssuesHelper.send :include, RedmineSubtaskListAccordion::Patches::IssuesHelperPatch
end
end
Redmine::Plugin.register :redmine_subtask_list_accordion do
name 'Redmine Subtask List Accordion plugin'
author 'Ryuta Tobita'
description 'This plugin provide accordion to subtask list of issue.'
version '2.2.0'
url 'https://github.com/GEROMAX/redmine_subtask_list_accordion'
author_url 'https://github.com/GEROMAX'
settings default: { 'enable_server_scripting_mode' => true }, :partial => 'settings/subtask_list_accordion_settings'
end