aboutsummaryrefslogtreecommitdiffstats
path: root/app/helpers/referentials_helper.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/helpers/referentials_helper.rb')
-rw-r--r--app/helpers/referentials_helper.rb12
1 files changed, 7 insertions, 5 deletions
diff --git a/app/helpers/referentials_helper.rb b/app/helpers/referentials_helper.rb
index 9c3852322..a01d901e6 100644
--- a/app/helpers/referentials_helper.rb
+++ b/app/helpers/referentials_helper.rb
@@ -1,13 +1,15 @@
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)
+ def line_status(status, verbose=true)
if status
- content_tag(:span, nil, class: 'fa fa-exclamation-circle fa-lg text-danger') +
- t('activerecord.attributes.line.deactivated')
+ out = content_tag(:span, nil, class: 'fa fa-exclamation-circle fa-lg text-danger')
+ out += t('activerecord.attributes.line.deactivated') if verbose
+ out
else
- content_tag(:span, nil, class: 'fa fa-check-circle fa-lg text-success') +
- t('activerecord.attributes.line.activated')
+ out = content_tag(:span, nil, class: 'fa fa-check-circle fa-lg text-success')
+ out += t('activerecord.attributes.line.activated') if verbose
+ out
end
end