forked from TeamRocketScience/redmine_spent_time_required
-
Notifications
You must be signed in to change notification settings - Fork 0
/
init.rb
29 lines (25 loc) · 879 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
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'
}, :partial => 'settings/spent_time_settings')
end