summaryrefslogtreecommitdiffstats
path: root/app/controllers/timelog_controller.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2011-12-02 19:33:05 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2011-12-02 19:33:05 +0000
commit69a2431dd0513de112b77e5a4c9a3707fb7ea283 (patch)
tree4f26db5d2aa1a79077c32c0db9ffbdc8a701277b /app/controllers/timelog_controller.rb
parentcaf898d7d13fa9df8acfaab4a7163f123cb59bf9 (diff)
downloadredmine-69a2431dd0513de112b77e5a4c9a3707fb7ea283.tar.gz
redmine-69a2431dd0513de112b77e5a4c9a3707fb7ea283.zip
Dropped TimeEntryReportsController.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8027 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers/timelog_controller.rb')
-rw-r--r--app/controllers/timelog_controller.rb14
1 files changed, 12 insertions, 2 deletions
diff --git a/app/controllers/timelog_controller.rb b/app/controllers/timelog_controller.rb
index 932ba7fff..063df30cc 100644
--- a/app/controllers/timelog_controller.rb
+++ b/app/controllers/timelog_controller.rb
@@ -20,8 +20,8 @@ class TimelogController < ApplicationController
before_filter :find_project, :only => [:new, :create]
before_filter :find_time_entry, :only => [:show, :edit, :update]
before_filter :find_time_entries, :only => [:bulk_edit, :bulk_update, :destroy]
- before_filter :authorize, :except => [:index]
- before_filter :find_optional_project, :only => [:index]
+ before_filter :authorize, :except => [:index, :report]
+ before_filter :find_optional_project, :only => [:index, :report]
accept_rss_auth :index
accept_api_auth :index, :show, :create, :update, :destroy
@@ -95,6 +95,16 @@ class TimelogController < ApplicationController
end
end
+ def report
+ retrieve_date_range
+ @report = Redmine::Helpers::TimeReport.new(@project, @issue, params[:criteria], params[:columns], @from, @to)
+
+ respond_to do |format|
+ format.html { render :layout => !request.xhr? }
+ format.csv { send_data(report_to_csv(@report), :type => 'text/csv; header=present', :filename => 'timelog.csv') }
+ end
+ end
+
def show
respond_to do |format|
# TODO: Implement html response