forked from deeeki/redmine_spent_time_required
-
Notifications
You must be signed in to change notification settings - Fork 1
/
init.rb
30 lines (26 loc) · 910 Bytes
/
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
require 'redmine'
require File.dirname(__FILE__) + '/lib/issues_controller_patch.rb'
if Rails::VERSION::MAJOR >= 3
ActionDispatch::Callbacks.to_prepare do
require_dependency 'issues_controller'
IssuesController.send(:include, RedmineSpentTimeRequired::Patches::IssuesControllerPatch)
end
else
require 'dispatcher'
Dispatcher.to_prepare do
require_dependency 'issues_controller'
IssuesController.send(:include, RedmineSpentTimeRequired::Patches::IssuesControllerPatch)
end
end
Redmine::Plugin.register :redmine_spent_time_required do
name 'Redmine Spent Time Required'
author 'Max Prokopiev'
description 'Plugin to require adding spent time'
version '0.0.1'
url 'http://trs.io/'
author_url 'http://github.com/juggler'
settings(:default => {
'statuses' => '3,5',
'projects' => ''
}, :partial => 'settings/spent_time_settings')
end