-
Notifications
You must be signed in to change notification settings - Fork 8
/
init.rb
32 lines (28 loc) · 1.05 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
require 'redmine'
require 'dispatcher' unless Rails::VERSION::MAJOR >= 3
require 'sis_asset_helpers'
Redmine::Plugin.register SIS_AssetHelpers::PLUGIN_NAME do
name 'Smart issues sort plugin'
author 'Vitaly Klimov'
author_url 'mailto:[email protected]'
description "Plugin correctly sorts issues, adds options to sort by parent always and adds categories support for queries. Queries category mechanism is taken from Andrew Chaika's 'Issues Group' plugin"
version '0.3.1'
requires_redmine :version_or_higher => '1.3.0'
settings(:partial => 'settings/smart_issues_sort_settings',
:default => {
'prepend_parent_sort' => '0',
'use_default_sort' => '1',
'nil_values_first' => '1'
})
end
if Rails::VERSION::MAJOR >= 3
ActionDispatch::Callbacks.to_prepare do
require 'issues_helper_patch'
require 'query_patch'
end
else
Dispatcher.to_prepare SIS_AssetHelpers::PLUGIN_NAME do
require_dependency 'issues_helper_patch'
require_dependency 'query_patch'
end
end