diff options
| author | Luc Donnet | 2014-12-11 17:42:15 +0100 | 
|---|---|---|
| committer | Luc Donnet | 2014-12-11 17:42:15 +0100 | 
| commit | a0433013264531e825268d0ae1a0da873d368313 (patch) | |
| tree | d52bf2868ed0edea7181ba7f58ffecc4a597cd31 /app/helpers | |
| parent | 38cc4cf370129bf0b88bba9c62df1b165261430f (diff) | |
| download | chouette-core-a0433013264531e825268d0ae1a0da873d368313.tar.bz2 | |
Add boarding and alighting to routes controller
Diffstat (limited to 'app/helpers')
| -rw-r--r-- | app/helpers/stop_areas_helper.rb | 12 | 
1 files changed, 12 insertions, 0 deletions
| diff --git a/app/helpers/stop_areas_helper.rb b/app/helpers/stop_areas_helper.rb index e287af7f3..ce0dab85a 100644 --- a/app/helpers/stop_areas_helper.rb +++ b/app/helpers/stop_areas_helper.rb @@ -1,4 +1,16 @@  module StopAreasHelper +  def explicit_name(stop_area) +    name = localization = "" +     +    name += truncate(stop_area.name, :length => 30) || "" +    name += (" <small>["+ ( truncate(stop_area.registration_number, :length => 10) || "") + "]</small>") if stop_area.registration_number +     +    localization += stop_area.zip_code || "" +    localization += ( truncate(stop_area.city_name, :length => 15) ) if stop_area.city_name +     +    ( "#{image_tag( stop_area_picture_url(stop_area)) }" + " <span style='height:25px; line-height:25px; margin-left: 5px; '>" + name + " <small style='height:25px; line-height:25px; margin-left: 10px; color: #555;'>" + localization + "</small></span>").html_safe +  end +      def genealogical_title      return t(".stop_areas.genealogical.genealogical_routing") if @stop_area.stop_area_type == 'itl'          t("stop_areas.genealogical.genealogical") | 
