forked from meumacha/redmine_graph_activities
-
Notifications
You must be signed in to change notification settings - Fork 1
/
init.rb
27 lines (23 loc) · 1.15 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
require 'redmine'
Redmine::Plugin.register :redmine_graph_activities do
name 'Redmine Graph Activities plugin'
author '@me_umacha'
description "The plugin to generate a graph for visualizing members' activities."
version '0.0.3'
# This plugin works as a project module and can be enabled/disabled at project level
project_module :graph_activities do
# All actions are public permission
permission :graph_activities_view, {:graph_activities => [:view]}, :public => true
permission :graph_activities_graph, {:graph_activities => [:graph]}, :public => true
permission :graph_activities_graph_issue_per_day, {:graph_activities => [:graph_issue_per_day]}, :public => true
permission :graph_activities_graph_repos_per_day, {:graph_activities => [:graph_repos_per_day]}, :public => true
end
# Add an item in project menu
menu :project_menu,
:graph_activities,
{:controller=>'graph_activities', :action=>'view', :user_id=>'', :from=>'', :to=>''},
:caption => :graph_activities_name
# Settings
settings :default => {'include_subproject' => '1'},
:partial => 'settings/redmine_graph_activities_settings'
end