From a0433013264531e825268d0ae1a0da873d368313 Mon Sep 17 00:00:00 2001
From: Luc Donnet
Date: Thu, 11 Dec 2014 17:42:15 +0100
Subject: Add boarding and alighting to routes controller
---
 app/helpers/stop_areas_helper.rb | 12 ++++++++++++
 1 file changed, 12 insertions(+)
(limited to 'app/helpers/stop_areas_helper.rb')
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 += (" ["+ ( truncate(stop_area.registration_number, :length => 10) || "") + "]") 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)) }" + " " + name + " " + localization + "").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")
-- 
cgit v1.2.3