diff options
Diffstat (limited to 'app/helpers')
| -rw-r--r-- | app/helpers/application_helper.rb | 16 | ||||
| -rw-r--r-- | app/helpers/lines_helper.rb | 6 |
2 files changed, 16 insertions, 6 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index a16d32d46..ef354cc30 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -3,5 +3,21 @@ module ApplicationHelper def chouette_line_path(line) line_path(line) end + + def chouette_network_path(line) + network_path(line) + end + + def chouette_company_path(line) + company_path(line) + end + + def link_to_order(name, column) + css_class = (column == sort_column) ? "current #{sort_direction}" : nil + Rails.logger.debug sort_direction.inspect + direction = (column == sort_column && sort_direction == "asc") ? "desc" : "asc" + Rails.logger.debug direction.inspect + link_to name, { :sort => column, :direction => direction}, {:class => css_class} + end end diff --git a/app/helpers/lines_helper.rb b/app/helpers/lines_helper.rb index 45bd8c6c3..a03868a0a 100644 --- a/app/helpers/lines_helper.rb +++ b/app/helpers/lines_helper.rb @@ -1,8 +1,2 @@ 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 |
