-
Notifications
You must be signed in to change notification settings - Fork 43
/
init.rb
30 lines (22 loc) · 959 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
30
require 'redmine'
require_dependency 'time_logger_hooks'
# workaround helping rails to find the helper-methods
require File.join(File.dirname(__FILE__), 'app/helpers/application_helper.rb')
Redmine::Plugin.register :time_logger do
name 'Time Logger'
author 'Jim McAleer'
description 'The orignal author was Jérémie Delaitre.'
url 'https://github.com/speedy32129/time_logger'
version '0.5.4'
# fix for contect menus
requires_redmine version_or_higher: '1.1.0'
settings default: { refresh_rate: '60', status_transitions: {}, redirect_to_new_time_entry: 'off' }, partial: 'settings/time_logger'
permission :view_others_time_loggers, time_loggers: :index
permission :delete_others_time_loggers, time_loggers: :delete
menu :account_menu, :time_logger_menu, 'javascript:void(0)',
caption: '',
html: { id: 'time-logger-menu' },
first: true,
param: :project_id,
if: proc { User.current.logged? }
end