forked from edavis10/redmine-stuff-to-do-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit.rb
52 lines (41 loc) · 1.52 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
42
43
44
45
46
47
48
49
50
51
52
require 'redmine'
#Dir[File.join(File.dirname(__FILE__),'vendor','plugins','*')].each do |dir|
# path = File.join(dir, 'lib')
# $LOAD_PATH << path
# Dependencies.load_paths << path
# Dependencies.load_once_paths.delete(path)
#end
# Patches to Ruby, oh my
#require 'stuff_to_do_array_patch'
# Patches to the Redmine core.
Rails.configuration.to_prepare do
require_dependency 'project'
require_dependency 'issue'
require_dependency 'user'
Project.send(:include, StuffToDoProjectPatch)
Issue.send(:include, StuffToDoIssuePatch)
User.send(:include, StuffToDoUserPatch)
# Needed for the compatibility check
begin
require_dependency 'issue_priority'
rescue LoadError
# TimeEntryActivity is not available
end
end
Redmine::Plugin.register :stuff_to_do_plugin do
name 'Stuff-To-Do Plugin'
author 'Eric Davis, Undev'
url 'https://github.com/Undev/redmine-stuff-to-do-plugin'
author_url 'https://github.com/Undev'
description "This plugin allows users to prioritize issues and manage users' workload."
version '0.5.2'
requires_redmine :version_or_higher => '2.1.0'
settings(:partial => 'settings/stuff_to_do_settings',
:default => {
'use_as_stuff_to_do' => '0',
'threshold' => '1',
'email_to' => '[email protected],[email protected]',
'use_time_grid' => '0'
})
menu(:top_menu, :stuff_to_do, {:controller => "stuff_to_do", :action => 'index'}, :caption => :stuff_to_do_title, :if => Proc.new{ User.current.logged? })
end