summaryrefslogtreecommitdiffstats
path: root/app/helpers/sort_helper.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2008-02-26 18:15:58 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2008-02-26 18:15:58 +0000
commit328df74dd1779963b80317b72e56aa2a4ea5e2f2 (patch)
treebc34c905768eeae2106de016d9887ba106c14a8a /app/helpers/sort_helper.rb
parent792b7f30e32eec84d6106e947fc3987e4e26a0b0 (diff)
downloadredmine-328df74dd1779963b80317b72e56aa2a4ea5e2f2.tar.gz
redmine-328df74dd1779963b80317b72e56aa2a4ea5e2f2.zip
Adds date range filter and pagination on time entries detail view (closes #434).
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1173 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/helpers/sort_helper.rb')
-rw-r--r--app/helpers/sort_helper.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/app/helpers/sort_helper.rb b/app/helpers/sort_helper.rb
index 155e7e5e3..f16ff3c7d 100644
--- a/app/helpers/sort_helper.rb
+++ b/app/helpers/sort_helper.rb
@@ -108,13 +108,13 @@ module SortHelper
end
caption = titleize(Inflector::humanize(column)) unless caption
- url = {:sort_key => column, :sort_order => order, :status => params[:status],
- :issue_id => params[:issue_id],
- :project_id => params[:project_id]}
+ sort_options = { :sort_key => column, :sort_order => order }
+ # don't reuse params if filters are present
+ url_options = params.has_key?(:set_filter) ? sort_options : params.merge(sort_options)
link_to_remote(caption,
- {:update => "content", :url => url},
- {:href => url_for(url)}) +
+ {:update => "content", :url => url_options},
+ {:href => url_for(url_options)}) +
(icon ? nbsp(2) + image_tag(icon) : '')
end