aboutsummaryrefslogtreecommitdiffstats
path: root/app/helpers
diff options
context:
space:
mode:
Diffstat (limited to 'app/helpers')
-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