aboutsummaryrefslogtreecommitdiffstats
path: root/app/helpers/lines_helper.rb
diff options
context:
space:
mode:
authorMichel Etienne2014-11-12 16:55:40 +0100
committerMichel Etienne2014-11-12 16:55:40 +0100
commit28350f95744a03290a28dd8d941d1e6248f2eeb2 (patch)
tree6ce8b6b89525b0428d29fc93d27949e60e2c2efb /app/helpers/lines_helper.rb
parent0906ff71269c2bcec1a6445a6fb53900be66be9b (diff)
downloadchouette-core-28350f95744a03290a28dd8d941d1e6248f2eeb2.tar.bz2
new fields for GTFS exchange
Diffstat (limited to 'app/helpers/lines_helper.rb')
-rw-r--r--app/helpers/lines_helper.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/app/helpers/lines_helper.rb b/app/helpers/lines_helper.rb
index a03868a0a..623d091ca 100644
--- a/app/helpers/lines_helper.rb
+++ b/app/helpers/lines_helper.rb
@@ -1,2 +1,19 @@
module LinesHelper
+
+ def line_sticker( line)
+ return line.name if line.number.blank?
+ line.number
+ end
+
+ def colors?(line)
+ line.text_color.present? || line.color.present?
+ end
+
+ def text_color(line)
+ line.text_color.blank? ? "black" : "##{line.text_color}"
+ end
+
+ def background_color(line)
+ line.color.blank? ? "white" : "#"+line.color
+ end
end