init.rb

Arun M V, 2013-06-19 12:36

Download (1.61 KB)

 
1
# Patches to the Redmine core
2
#require 'dispatcher'
3
ActionDispatch::Callbacks.to_prepare do
4
  require_dependency 'rate_users_helper_patch' 
5
  require_dependency 'rate_time_entry_patch' 
6
  require_dependency 'rate_sort_helper_patch' 
7
end
8

    
9
# Hooks
10
require 'rate_project_hook'
11
require 'rate_memberships_hook'
12

    
13

    
14
Redmine::Plugin.register :redmine_rate do
15
  name 'Rate Plugin'
16
  author 'Eric Davis'
17
  url 'https://projects.littlestreamsoftware.com/projects/show/redmine-rate'
18
  author_url 'http://www.littlestreamsoftware.com'
19
  description "The Rate plugin provides an API that can be used to find the rate for a Member of a Project at a specific date.  It also stores historical rate data so calculations will remain correct in the future."
20
  version '0.1.0'
21

    
22
  requires_redmine :version_or_higher => '0.8.0'
23

    
24
   #These settings are set automatically when caching
25
  settings(:default => {
26
             'last_caching_run' => nil
27
           })
28

    
29
  permission :view_rate, { }
30

    
31
  #menu :admin_menu, :rate_caches, { :controller => 'rate_caches', :action => 'index',:id => :redmine_rate}, :caption => :text_rate_caches_panel
32
end
33

    
34
 
35

    
36
require 'redmine_rate/hooks/timesheet_hook_helper'
37
require 'redmine_rate/hooks/plugin_timesheet_views_timesheets_time_entry_row_class_hook'
38
require 'redmine_rate/hooks/plugin_timesheet_views_timesheet_group_header_hook'
39
require 'redmine_rate/hooks/plugin_timesheet_views_timesheet_time_entry_hook'
40
require 'redmine_rate/hooks/plugin_timesheet_views_timesheet_time_entry_sum_hook'
41
require 'redmine_rate/hooks/plugin_timesheet_view_timesheets_report_header_tags_hook'
42
require 'redmine_rate/hooks/view_layouts_base_html_head_hook'