diff options
| author | Luc Donnet | 2012-01-09 17:57:51 +0100 | 
|---|---|---|
| committer | Luc Donnet | 2012-01-09 17:57:51 +0100 | 
| commit | a4eeeeaa4b7b199e5b4e41c61c33e5a56fccc823 (patch) | |
| tree | fb6d934cb44518c7b04b87e4f4886efd36fcfa58 /app/helpers/lines_helper.rb | |
| parent | d9dd47206fe11e6b2400ed93407fc50521fa10dd (diff) | |
| download | chouette-core-a4eeeeaa4b7b199e5b4e41c61c33e5a56fccc823.tar.bz2 | |
Add locales and views for lines
Diffstat (limited to 'app/helpers/lines_helper.rb')
| -rw-r--r-- | app/helpers/lines_helper.rb | 6 | 
1 files changed, 6 insertions, 0 deletions
| diff --git a/app/helpers/lines_helper.rb b/app/helpers/lines_helper.rb index a03868a0a..45bd8c6c3 100644 --- a/app/helpers/lines_helper.rb +++ b/app/helpers/lines_helper.rb @@ -1,2 +1,8 @@  module LinesHelper +  def order(column) +    title ||= Chouette::Line.human_attribute_name(column).titleize   +    css_class = (column == sort_column) ? "current #{sort_direction}" : nil   +    direction = (column == sort_column && sort_direction == "asc") ? "desc" : "asc"   +    link_to title, { :sort => column, :direction => direction}, {:class => css_class} +  end  end | 
