@@ -77,18 +77,18 module ApplicationHelper | |||||
77 | def pagination_links_full(paginator, options={}, html_options={}) |
|
77 | def pagination_links_full(paginator, options={}, html_options={}) | |
78 | html = '' |
|
78 | html = '' | |
79 | html << link_to_remote(('« ' + l(:label_previous)), |
|
79 | html << link_to_remote(('« ' + l(:label_previous)), | |
80 |
{:update => "content", :url => |
|
80 | {:update => "content", :url => { :page => paginator.current.previous }}, | |
81 |
{:href => url_for(:action => 'list', :params => |
|
81 | {:href => url_for(:action => 'list', :params =>{:page => paginator.current.previous})}) + ' ' if paginator.current.previous | |
82 |
|
82 | |||
83 | html << (pagination_links_each(paginator, options) do |n| |
|
83 | html << (pagination_links_each(paginator, options) do |n| | |
84 | link_to_remote(n.to_s, |
|
84 | link_to_remote(n.to_s, | |
85 |
{:url => {:action => 'list', :params => |
|
85 | {:url => {:action => 'list', :params => {:page => n}}, :update => 'content'}, | |
86 |
{:href => url_for(:action => 'list', :params => |
|
86 | {:href => url_for(:action => 'list', :params => {:page => n})}) | |
87 | end || '') |
|
87 | end || '') | |
88 |
|
88 | |||
89 | html << ' ' + link_to_remote((l(:label_next) + ' »'), |
|
89 | html << ' ' + link_to_remote((l(:label_next) + ' »'), | |
90 |
{:update => "content", :url => |
|
90 | {:update => "content", :url => { :page => paginator.current.next }}, | |
91 |
{:href => url_for(:action => 'list', :params => |
|
91 | {:href => url_for(:action => 'list', :params => {:page => paginator.current.next})}) if paginator.current.next | |
92 | html |
|
92 | html | |
93 | end |
|
93 | end | |
94 |
|
94 |
@@ -107,10 +107,12 module SortHelper | |||||
107 | order = 'desc' # changed for desc order by default |
|
107 | order = 'desc' # changed for desc order by default | |
108 | end |
|
108 | end | |
109 | caption = titleize(Inflector::humanize(column)) unless caption |
|
109 | caption = titleize(Inflector::humanize(column)) unless caption | |
110 | #params = {:params => {:sort_key => column, :sort_order => order}} |
|
110 | ||
|
111 | url = {:sort_key => column, :sort_order => order, :issue_id => params[:issue_id], :project_id => params[:project_id]} | |||
|
112 | ||||
111 | link_to_remote(caption, |
|
113 | link_to_remote(caption, | |
112 |
{:update => "content", :url => |
|
114 | {:update => "content", :url => url}, | |
113 | {:href => url_for(:params => params.update(:sort_key => column, :sort_order => order))}) + |
|
115 | {:href => url_for(url)}) + | |
114 | (icon ? nbsp(2) + image_tag(icon) : '') |
|
116 | (icon ? nbsp(2) + image_tag(icon) : '') | |
115 | end |
|
117 | end | |
116 |
|
118 |
General Comments 0
You need to be logged in to leave comments.
Login now