forked from edavis10/redmine_charts
-
Notifications
You must be signed in to change notification settings - Fork 1
/
init.rb
45 lines (33 loc) · 1.5 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
require 'redmine'
RAILS_DEFAULT_LOGGER.info 'Starting Charts Plugin for RedMine'
require 'dispatcher'
require_dependency 'redmine_charts/enumeration_patch'
unless defined?(Redmine::I18n)
require_dependency 'redmine_charts/i18n_patch'
end
Dispatcher.to_prepare do
Enumeration.send(:include, ChartsEnumerationPatch)
end
require_dependency 'redmine_charts/sql_utils'
require_dependency 'redmine_charts/line_data_converter'
require_dependency 'redmine_charts/pie_data_converter'
require_dependency 'redmine_charts/stack_data_converter'
require_dependency 'redmine_charts/utils'
require_dependency 'redmine_charts/conditions_utils'
require_dependency 'redmine_charts/grouping_utils'
require_dependency 'redmine_charts/range_utils'
Redmine::Plugin.register :redmine_charts do
name 'Charts Plugin'
author 'Maciej Szczytowski'
description 'Plugin for Redmine which integrates some nice project charts.'
url 'http://github.com/mszczytowski/redmine_charts/'
version '0.0.14-daipresents'
# Minimum version of Redmine.
requires_redmine :version_or_higher => '0.9.0'
# Configuring permissions for plugin's controllers.
project_module :charts do
permission :view_charts, RedmineCharts::Utils.controllers_for_permissions, :require => :member
end
# Creating menu entry. It appears in project menu, after 'new_issue' entry.
menu :project_menu, :charts, { :controller => RedmineCharts::Utils.default_controller, :action => 'index' }, :caption => :charts_menu_label, :after => :new_issue, :param => :project_id
end