diff options
| author | teddywing | 2018-04-25 17:59:33 +0200 |
|---|---|---|
| committer | GitHub | 2018-04-25 17:59:33 +0200 |
| commit | 9fec2b10fa947047e9a8a2f354d232c402b1ef40 (patch) | |
| tree | 2508ad56fcf1ca77e160e3a98b0b74eaf4bf0fec /app/helpers/referentials_helper.rb | |
| parent | 913dd3b3c6cfa0b519ac3043e8b0a4efc4d983b9 (diff) | |
| parent | 9050f4dde351e27e2cf33df7d1a4bc3b694ac04c (diff) | |
| download | chouette-core-9fec2b10fa947047e9a8a2f354d232c402b1ef40.tar.bz2 | |
Merge pull request #466 from af83/6431-line-and-stop-area-status
Refs #6431 small changes on line & stop area status
Diffstat (limited to 'app/helpers/referentials_helper.rb')
| -rw-r--r-- | app/helpers/referentials_helper.rb | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/app/helpers/referentials_helper.rb b/app/helpers/referentials_helper.rb index a01d901e6..9b5b13ace 100644 --- a/app/helpers/referentials_helper.rb +++ b/app/helpers/referentials_helper.rb @@ -1,15 +1,14 @@ module ReferentialsHelper # Outputs a green check icon and the text "Oui" or a red exclamation mark # icon and the text "Non" based on `status` - def line_status(status, verbose=true) - if status - out = content_tag(:span, nil, class: 'fa fa-exclamation-circle fa-lg text-danger') - out += t('activerecord.attributes.line.deactivated') if verbose - out + def line_status(status) + case status + when :deactivated + content_tag(:span, nil, class: 'fa fa-exclamation-circle fa-lg text-danger') + + Chouette::Line.tmf('deactivated') else - out = content_tag(:span, nil, class: 'fa fa-check-circle fa-lg text-success') - out += t('activerecord.attributes.line.activated') if verbose - out + content_tag(:span, nil, class: 'fa fa-check-circle fa-lg text-success') + + Chouette::Line.tmf('activated') end end |
