"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "app/helpers/sort_helper.rb" between
redmine-4.1.0.tar.gz and redmine-4.1.1.tar.gz

About: Redmine is a flexible project management and bug-tracking web application (using the Ruby on Rails framework). It supports also project wikis and forums, documents management, and multiple version control systems.

sort_helper.rb  (redmine-4.1.0):sort_helper.rb  (redmine-4.1.1)
skipping to change at line 118 skipping to change at line 118
# #
# - column is the name of an attribute in the sorted record collection. # - column is the name of an attribute in the sorted record collection.
# - the optional caption explicitly specifies the displayed link text. # - the optional caption explicitly specifies the displayed link text.
# - 2 CSS classes reflect the state of the link: sort and asc or desc # - 2 CSS classes reflect the state of the link: sort and asc or desc
# #
def sort_link(column, caption, default_order) def sort_link(column, caption, default_order)
css, order = nil, default_order css, order = nil, default_order
if column.to_s == @sort_criteria.first_key if column.to_s == @sort_criteria.first_key
if @sort_criteria.first_asc? if @sort_criteria.first_asc?
css = 'sort asc' css = 'sort asc icon icon-sorted-desc'
order = 'desc' order = 'desc'
else else
css = 'sort desc' css = 'sort desc icon icon-sorted-asc'
order = 'asc' order = 'asc'
end end
end end
caption = column.to_s.humanize unless caption caption = column.to_s.humanize unless caption
sort_options = { :sort => @sort_criteria.add(column.to_s, order).to_param } sort_options = { :sort => @sort_criteria.add(column.to_s, order).to_param }
link_to(caption, {:params => request.query_parameters.merge(sort_options)}, :class => css) link_to(caption, {:params => request.query_parameters.merge(sort_options)}, :class => css)
end end
# Returns a table header <th> tag with a sort link for the named column # Returns a table header <th> tag with a sort link for the named column
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)