diff options
| author | Michel Etienne | 2014-11-12 16:55:40 +0100 | 
|---|---|---|
| committer | Michel Etienne | 2014-11-12 16:55:40 +0100 | 
| commit | 28350f95744a03290a28dd8d941d1e6248f2eeb2 (patch) | |
| tree | 6ce8b6b89525b0428d29fc93d27949e60e2c2efb /app/helpers/lines_helper.rb | |
| parent | 0906ff71269c2bcec1a6445a6fb53900be66be9b (diff) | |
| download | chouette-core-28350f95744a03290a28dd8d941d1e6248f2eeb2.tar.bz2 | |
new fields for GTFS exchange
Diffstat (limited to 'app/helpers/lines_helper.rb')
| -rw-r--r-- | app/helpers/lines_helper.rb | 17 | 
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 | 
