Mercurial > hg > soundsoftware-site
comparison app/helpers/.svn/text-base/sort_helper.rb.svn-base @ 441:cbce1fd3b1b7 redmine-1.2
Update to Redmine 1.2-stable branch (Redmine SVN rev 6000)
author | Chris Cannam |
---|---|
date | Mon, 06 Jun 2011 14:24:13 +0100 |
parents | 513646585e45 |
children |
comparison
equal
deleted
inserted
replaced
245:051f544170fe | 441:cbce1fd3b1b7 |
---|---|
198 end | 198 end |
199 end | 199 end |
200 caption = column.to_s.humanize unless caption | 200 caption = column.to_s.humanize unless caption |
201 | 201 |
202 sort_options = { :sort => @sort_criteria.add(column.to_s, order).to_param } | 202 sort_options = { :sort => @sort_criteria.add(column.to_s, order).to_param } |
203 # don't reuse params if filters are present | 203 url_options = params.merge(sort_options) |
204 url_options = params.has_key?(:set_filter) ? sort_options : params.merge(sort_options) | |
205 | 204 |
206 # Add project_id to url_options | 205 # Add project_id to url_options |
207 url_options = url_options.merge(:project_id => params[:project_id]) if params.has_key?(:project_id) | 206 url_options = url_options.merge(:project_id => params[:project_id]) if params.has_key?(:project_id) |
208 | 207 |
209 link_to_remote(caption, | 208 link_to_content_update(caption, url_options, :class => css) |
210 {:update => "content", :url => url_options, :method => :get}, | |
211 {:href => url_for(url_options), | |
212 :class => css}) | |
213 end | 209 end |
214 | 210 |
215 # Returns a table header <th> tag with a sort link for the named column | 211 # Returns a table header <th> tag with a sort link for the named column |
216 # attribute. | 212 # attribute. |
217 # | 213 # |