-
Notifications
You must be signed in to change notification settings - Fork 5
/
init.rb
41 lines (35 loc) · 1.41 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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
require_relative 'lib/redmine_custom_fields_groups/hooks/view_layouts_base_html_head_hook'
require_relative 'lib/redmine_custom_fields_groups/hooks/view_user_preferences_hook'
Redmine::Plugin.register :redmine_custom_fields_groups do
name 'Redmine Custom Fields Groups plugin'
author 'Georepublic'
author_url 'https://github.com/georepublic'
url 'https://github.com/gtt-project/redmine_custom_fields_groups'
description 'This is a plugin for grouping custom fields'
version '1.0.0'
requires_redmine :version_or_higher => '4.1.0'
settings partial: 'settings/redmine_custom_fields_groups',
default: {
'custom_fields_group_tag' => 'h4',
'fieldset_default_state' => 'all_expended'
}
menu :admin_menu,
:custom_fields_group,
{ controller: 'custom_fields_groups', action: 'index' },
caption: :label_custom_fields_group_plural,
after: :custom_fields,
html: { class: 'icon icon-custom-fields custom-fields-groups' }
end
if Rails.version > '6.0' && Rails.autoloaders.zeitwerk_enabled?
require_relative 'app/overrides/issues'
Rails.application.config.after_initialize do
RedmineCustomFieldsGroups.setup
end
else
require 'redmine_custom_fields_groups'
Rails.application.paths["app/overrides"] ||= []
Rails.application.paths["app/overrides"] << File.expand_path("../app/overrides", __FILE__)
Rails.configuration.to_prepare do
RedmineCustomFieldsGroups.setup
end
end