-
Notifications
You must be signed in to change notification settings - Fork 0
/
init.rb
28 lines (22 loc) · 1006 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
require 'redmine'
require_dependency 'redmine_luceit/hooks/view_my_account_hook'
require 'dispatcher'
Dispatcher.to_prepare :redmine_luceit do
require_dependency 'principal'
require_dependency 'user'
User.send(:include, RedmineLuceit::Patches::UserPatch)
end
unless Redmine::Plugin.registered_plugins.keys.include?(:redmine_luceit)
Redmine::Plugin.register :redmine_luceit do
name 'Redmine LuceIt Plugin'
author 'Luce IT'
description 'Redmine plugin for our internal agile methodology'
version '0.0.1'
url 'http://luceit.es'
author_url 'http://luceit.es'
Redmine::MenuManager.map :top_menu do |menu|
menu.push :luceit_personal_activity, { :controller => 'time_report', :action => 'index' },:caption => :my_time_report, :if => Proc.new { User.current.logged? }
menu.push :luceit_activity, { :controller => 'time_report', :action => 'activity' },:caption => :time_report, :if => Proc.new { User.current.logged? && User.current.admin?}
end
end
end