diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 877c6d9c9..dc07a8f93 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -77,18 +77,18 @@ module ApplicationHelper def pagination_links_full(paginator, options={}, html_options={}) html = '' html << link_to_remote(('« ' + l(:label_previous)), - {:update => "content", :url => params.merge({ :page => paginator.current.previous })}, - {:href => url_for(:action => 'list', :params => params.merge({:page => paginator.current.previous}))}) + ' ' if paginator.current.previous + {:update => "content", :url => { :page => paginator.current.previous }}, + {:href => url_for(:action => 'list', :params =>{:page => paginator.current.previous})}) + ' ' if paginator.current.previous html << (pagination_links_each(paginator, options) do |n| link_to_remote(n.to_s, - {:url => {:action => 'list', :params => params.merge({:page => n})}, :update => 'content'}, - {:href => url_for(:action => 'list', :params => params.merge({:page => n}))}) + {:url => {:action => 'list', :params => {:page => n}}, :update => 'content'}, + {:href => url_for(:action => 'list', :params => {:page => n})}) end || '') html << ' ' + link_to_remote((l(:label_next) + ' »'), - {:update => "content", :url => params.merge({ :page => paginator.current.next })}, - {:href => url_for(:action => 'list', :params => params.merge({:page => paginator.current.next}))}) if paginator.current.next + {:update => "content", :url => { :page => paginator.current.next }}, + {:href => url_for(:action => 'list', :params => {:page => paginator.current.next})}) if paginator.current.next html end diff --git a/app/helpers/sort_helper.rb b/app/helpers/sort_helper.rb index eac0d4d3f..5201b7ef4 100644 --- a/app/helpers/sort_helper.rb +++ b/app/helpers/sort_helper.rb @@ -107,10 +107,12 @@ module SortHelper order = 'desc' # changed for desc order by default end caption = titleize(Inflector::humanize(column)) unless caption - #params = {:params => {:sort_key => column, :sort_order => order}} + + url = {:sort_key => column, :sort_order => order, :issue_id => params[:issue_id], :project_id => params[:project_id]} + link_to_remote(caption, - {:update => "content", :url => params.update( :sort_key => column, :sort_order => order)}, - {:href => url_for(:params => params.update(:sort_key => column, :sort_order => order))}) + + {:update => "content", :url => url}, + {:href => url_for(url)}) + (icon ? nbsp(2) + image_tag(icon) : '') end