forked from jgraichen/redmine_dashboard
-
Notifications
You must be signed in to change notification settings - Fork 0
/
init.rb
44 lines (34 loc) · 1.28 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
require 'redmine'
require 'slim'
require 'rdb/rails/i18n'
require 'rdb/rails/patch' if Rails::VERSION::MAJOR < 4
Rails.configuration.to_prepare do
Dir.glob File.expand_path('../lib/rdb/patches/**/*.rb', __FILE__) do |patch|
require_dependency patch
end
ActiveSupport::Dependencies
.autoload_paths << File.expand_path('../lib', __FILE__)
ActiveSupport::Dependencies
.autoload_paths << File.expand_path('../app/decorators', __FILE__)
Rails.configuration.i18n.load_path += Dir[File.expand_path('../app/locales/**/*.{rb,yml}', __FILE__)]
end
Redmine::Plugin.register :redmine_dashboard do
name 'Redmine Dashboard plugin'
author 'Jan Graichen'
description 'Add a task board and a planning board to Redmine'
version '3.0.0.dev0'
url 'https://github.com/jgraichen/redmine_dashboard'
author_url 'mailto:jg@altimos.de'
requires_redmine version_or_higher: '2.1'
project_module :dashboard do
permission :enable_dashboards,
rdb_user: [:index],
rdb_project: [:index]
end
menu :project_menu, :rdb_project_dashboards,
{controller: 'rdb_project', action: 'index'},
caption: :'rdb.menu.dashboards', after: :new_issue
menu :top_menu, :rdb_dashboards,
{controller: 'rdb', action: 'index'},
caption: :'rdb.menu.dashboards', after: :projects
end