forked from fernandokosh/redmine_time_tracker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
init.rb
30 lines (23 loc) · 924 Bytes
/
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
require 'redmine'
require_dependency 'time_tracker_hooks'
Redmine::Plugin.register :redmine_time_tracker do
name 'Redmine Time Tracker plugin'
author 'Jérémie Delaitre'
description 'This is a plugin to track time in Redmine'
version '0.3'
requires_redmine :version_or_higher => '0.9.0'
settings :default => { 'refresh_rate' => '60', 'status_transitions' => {} }, :partial => 'settings/time_tracker'
menu :account_menu, :time_tracker_menu, '',
{
:caption => '',
:html => { :id => 'time-tracker-menu' },
:first => true,
:param => :project_id,
:if => Proc.new { User.current.logged? }
}
menu :top_menu, :time_tracker_admin_menu, { :controller => 'time_trackers', :action => 'index' },
{
:caption => :time_tracker_admin_menu,
:if => Proc.new { User.current.admin }
}
end