diff --git a/app/helpers/reporting_helper.rb b/app/helpers/reporting_helper.rb index ba6c451c5c..06e43933cc 100644 --- a/app/helpers/reporting_helper.rb +++ b/app/helpers/reporting_helper.rb @@ -8,14 +8,14 @@ module ReportingHelper # Extends the definition in ApplicationHelper, to allow passing Dates as well # This is the definitions that is hit by the views and widgets - def l(*values) - return values.first if values.size == 1 and values.first.respond_to? :to_str - if [Date, DateTime, Time].include? values.first.class - ::I18n.l values.first - else - ApplicationHelper.l(*values) - end - end + #def l(*values) + # return values.first if values.size == 1 and values.first.respond_to? :to_str + # if [Date, DateTime, Time].include? values.first.class + # ::I18n.l values.first + # else + # ApplicationHelper.l(*values) + # end + #end # ## # # For a given CostQuery::Filter filter, return an array of hashes, that contain diff --git a/app/models/cost_query.rb b/app/models/cost_query.rb index 566b71f540..cb727ad3c2 100644 --- a/app/models/cost_query.rb +++ b/app/models/cost_query.rb @@ -1,4 +1,4 @@ -require 'reporting_engine/report' +require 'open_project/reporting_engine/report' class CostQuery < Report def_delegators :result, :real_costs diff --git a/lib/open_project/reporting/engine.rb b/lib/open_project/reporting/engine.rb index 8c362c7501..5dfcf3de88 100644 --- a/lib/open_project/reporting/engine.rb +++ b/lib/open_project/reporting/engine.rb @@ -1,4 +1,5 @@ require 'openproject_costs' +require 'openproject-reportingengine' module OpenProject::Reporting class Engine < ::Rails::Engine @@ -37,7 +38,11 @@ module OpenProject::Reporting end config.to_prepare do - require_dependency 'open_project/reporting/widgets.rb' + require_dependency 'open_project/reporting_engine/widget.rb' + require_dependency 'open_project/reporting/widgets/simple_table' + require_dependency 'open_project/reporting/widgets/entry_table' + require_dependency 'open_project/reporting/widgets/cost_types' + require_dependency 'open_project/reporting/widgets/settings' unless Redmine::Plugin.registered_plugins.include?(:openproject_reporting) Redmine::Plugin.register :openproject_reporting do diff --git a/lib/open_project/reporting/widgets.rb b/lib/open_project/reporting/widgets.rb deleted file mode 100644 index 7d4371cbd1..0000000000 --- a/lib/open_project/reporting/widgets.rb +++ /dev/null @@ -1,5 +0,0 @@ -require 'reporting_engine/widget.rb' -require 'open_project/reporting/widgets/simple_table' -require 'open_project/reporting/widgets/entry_table' -require 'open_project/reporting/widgets/cost_types' -require 'open_project/reporting/widgets/settings' \ No newline at end of file diff --git a/openproject-reporting.gemspec b/openproject-reporting.gemspec index 3dc21e77d6..8915dd8f63 100644 --- a/openproject-reporting.gemspec +++ b/openproject-reporting.gemspec @@ -18,7 +18,7 @@ Gem::Specification.new do |s| # FIXME # s.test_files = Dir["spec/**/*"] - s.add_dependency "reporting_engine", "~> 0.0.1" + s.add_dependency "openproject-reportingengine", "~> 0.0.1" s.add_dependency "openproject_costs", "> 4.0.0" s.add_development_dependency "factory_girl_rails", "~> 4.0"