forked from Restream/redmine_custom_reports
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit.rb
34 lines (30 loc) · 1.14 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
require 'redmine'
Rails.configuration.to_prepare do
require_dependency 'project'
unless Project.included_modules.include? RedmineCustomReports::ProjectPatch
Project.send :include, RedmineCustomReports::ProjectPatch
end
require_dependency 'user'
unless User.included_modules.include? RedmineCustomReports::UserPatch
User.send :include, RedmineCustomReports::UserPatch
end
end
Redmine::Plugin.register :redmine_custom_reports do
name 'Redmine Custom Reports (with charts) plugin'
author 'Danil Tashkinov'
description 'Redmine plugin for custom reports with charts'
version '0.1.4'
url 'https://github.com/nodecarter/redmine_custom_reports'
author_url 'https://github.com/Undev'
project_module :custom_reports do
permission :manage_custom_reports,
{ :custom_reports => [:new, :create, :edit, :update, :destroy] }
permission :view_custom_reports, { :custom_reports => [:index, :show] }
permission :manage_public_custom_reports, {}
end
menu :project_menu,
:custom_reports,
{ :controller => 'custom_reports', :action => 'index' },
:param => :project_id,
:before => :settings
end