-
Notifications
You must be signed in to change notification settings - Fork 42
/
init.rb
73 lines (57 loc) · 2.49 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
require 'redmine'
require 'ekanban/ekanban_hooks'
require 'ekanban/redmine_patches'
require 'ekanban/issue_patch'
require 'ekanban/group_patch'
require 'ekanban/issue_status_patch'
require 'ekanban/journal_patch'
require 'ekanban/principal_patch'
require 'ekanban/project_patch'
require 'ekanban/role_patch'
require 'ekanban/user_patch'
Redmine::Plugin.register :ekanban do
name 'Ekanban Plugin'
author '[email protected]'
description 'This is a kanban plugin for Redmine'
version '0.0.1'
url 'https://github.com/samchen2009/ekanban'
author_url 'http://www.e-kaifa.com'
requires_redmine :version_or_higher => '2.1.2'
project_module :Kanban do
permission :view_kanban, :kanbans => :index
end
menu :project_menu, :Kanban, {:controller=>'kanbans', :action => 'index'}, :caption => 'Kanbans', :after => :activity, :param => :project_id
menu :admin_menu, :Kanban_States, {:controller=>'kanban_states', :action => 'setup'}, :caption => 'Kanban States'
Rails.configuration.to_prepare do
unless ProjectsHelper.included_modules.include?(EKanban::Patches::ProjectsHelperPatch)
ProjectsHelper.send(:include, EKanban::Patches::ProjectsHelperPatch)
end
unless ProjectsController.included_modules.include? EKanban::Patches::ProjectsControllerPatch
ProjectsController.send(:include, EKanban::Patches::ProjectsControllerPatch)
end
unless Issue.included_modules.include? EKanban::Patches::IssuePatch
Issue.send(:include, EKanban::Patches::IssuePatch)
end
unless IssueStatus.included_modules.include? EKanban::Patches::IssueStatusPatch
IssueStatus.send(:include, EKanban::Patches::IssueStatusPatch)
end
unless Project.included_modules.include? EKanban::Patches::ProjectPatch
Project.send(:include, EKanban::Patches::ProjectPatch)
end
unless Group.included_modules.include? EKanban::Patches::GroupPatch
Group.send(:include, EKanban::Patches::GroupPatch)
end
unless User.included_modules.include? EKanban::Patches::UserPatch
User.send(:include, EKanban::Patches::UserPatch)
end
unless Principal.included_modules.include? EKanban::Patches::PrincipalPatch
Principal.send(:include, EKanban::Patches::PrincipalPatch)
end
unless Journal.included_modules.include? EKanban::Patches::JournalPatch
Journal.send(:include, EKanban::Patches::JournalPatch)
end
unless Role.included_modules.include? EKanban::Patches::RolePatch
Role.send(:include, EKanban::Patches::RolePatch)
end
end
end