aboutsummaryrefslogtreecommitdiffstats
path: root/app/helpers/referentials_helper.rb
diff options
context:
space:
mode:
authorcedricnjanga2018-04-10 09:40:58 -0700
committercedricnjanga2018-04-24 12:08:37 -0700
commit1f8d2759c545e60ab2989fc6331e55e95a3b0e67 (patch)
tree973df3c31ffb6e498b5110dd4e859616d3bd4851 /app/helpers/referentials_helper.rb
parentca8c0a0c829c9a55c531ed7c8422239473e09cff (diff)
downloadchouette-core-1f8d2759c545e60ab2989fc6331e55e95a3b0e67.tar.bz2
Refs #6431 small changes on line & stop area status
Diffstat (limited to 'app/helpers/referentials_helper.rb')
-rw-r--r--app/helpers/referentials_helper.rb15
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