diff --git a/init.rb b/init.rb index 2da0c5f935..84dda4f8de 100644 --- a/init.rb +++ b/init.rb @@ -1,45 +1,5 @@ -require 'redmine' - fail "upgrade ruby version, ruby < 1.8.7 suffers from Hash#hash bug" if {:a => 10}.hash != {:a => 10}.hash #require "hwia_rails" require 'big_decimal_patch' -require 'to_date_patch' - -# Hooks -require 'view_projects_show_sidebar_bottom_hook' - -Redmine::Plugin.register :redmine_reporting do - name 'Reporting Plugin' - author 'Konstantin Haase, Philipp Tessenow @ finnlabs' - author_url 'http://finn.de/team' - description 'The reporting plugin provides extended reporting functionality for Redmine including Cost Reports.' - version '0.1' - - requires_redmine :version_or_higher => '0.9' - requires_redmine_plugin :redmine_costs, :version_or_higher => '0.3' - - #register reporting_module including permissions - project_module :reporting_module do - #require_or_load 'costs_access_control_permission_patch' - - permission :view_cost_entries, {:costlog => [:details], :cost_reports => [:index, :drill_down]} - permission :view_own_cost_entries, {:costlog => [:details], :cost_reports => [:index, :drill_down]}, - :granular_for => :view_cost_entries - end - - #register additional permissions for the time log - Redmine::AccessControl.permission(:view_own_time_entries).actions << "cost_reports/index" - - #menu extensions - menu :top_menu, :cost_reports_global, {:controller => 'cost_reports', :action => 'index', :project_id => nil}, - :caption => :cost_reports_title, - :if => Proc.new { - ( User.current.allowed_to?(:view_cost_entries, nil, :global => true, :for => User.current ) || - User.current.allowed_to?(:view_time_entries, nil, :global => true, :for => User.current ) - ) - } - - menu :project_menu, :cost_reports, {:controller => 'cost_reports', :action => 'index'}, - :param => :project_id, :after => :cost_objects, :caption => :cost_reports_title -end +require 'to_date_patch' \ No newline at end of file diff --git a/lib/view_projects_show_sidebar_bottom_hook.rb b/lib/view_projects_show_sidebar_bottom_hook.rb deleted file mode 100644 index 89b107c813..0000000000 --- a/lib/view_projects_show_sidebar_bottom_hook.rb +++ /dev/null @@ -1,3 +0,0 @@ -class ViewProjectsShowSidebarBottomHook < Redmine::Hook::ViewListener - render_on :view_projects_show_sidebar_bottom, :partial => 'hooks/view_projects_show_sidebar_bottom_hook' -end