Translated 'Sort by' label on table headers.

git-svn-id: http://redmine.rubyforge.org/svn/trunk@618 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2007-08-12 14:42:15 +00:00
parent 5478e5cbae
commit 1eff42eda6
13 changed files with 14 additions and 7 deletions
+2 -7
View File
@@ -137,13 +137,8 @@ module SortHelper
# </th>
#
def sort_header_tag(column, options = {})
if options[:caption]
caption = options[:caption]
options.delete(:caption)
else
caption = titleize(Inflector::humanize(column))
end
options[:title]= "Sort by #{caption}" unless options[:title]
caption = options.delete(:caption) || titleize(Inflector::humanize(column))
options[:title]= l(:label_sort_by, caption) unless options[:title]
content_tag('th', sort_link(column, caption), options)
end