forked from jmpri3/redmine_allocation
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathinit.rb
More file actions
24 lines (20 loc) · 754 Bytes
/
init.rb
File metadata and controls
24 lines (20 loc) · 754 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
require 'redmine'
require_dependency 'allocation/hooks'
require_dependency 'allocation/patches/members_controller_patch.rb'
Redmine::Plugin.register :redmine_allocation do
Rails.configuration.after_initialize do
locale = if Setting.table_exists?
Setting.default_language
else
'en'
end
I18n.with_locale(locale) do
name I18n.t :'allocation.plugin_name'
description I18n.t :'allocation.plugin_description'
author 'Emergya'
version '1.1.2'
end
end
settings :default => {}, :partial => 'settings/redmine_allocation'
Redmine::AccessControl.permission(:manage_members).instance_variable_get(:@actions) << "allocation/by_user" << "allocation/by_project"
end