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.rb11
1 files changed, 6 insertions, 5 deletions
diff --git a/app/helpers/referentials_helper.rb b/app/helpers/referentials_helper.rb
index f3c18d9f8..01e5a5879 100644
--- a/app/helpers/referentials_helper.rb
+++ b/app/helpers/referentials_helper.rb
@@ -1,12 +1,13 @@
module ReferentialsHelper
- # Line statuses helper
+ # 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)
if status
- cls = 'danger'
- content_tag :span, status ? " #{t('false')} " : " #{t('true')}", class: "fa fa-exclamation-circle fa-lg text-#{cls}"
+ content_tag(:span, nil, class: 'fa fa-exclamation-circle fa-lg text-danger') +
+ t('false')
else
- cls = 'success'
- content_tag :span, status ? " #{t('false')} " : " #{t('true')}", class: "fa fa-check-circle fa-lg text-#{cls}"
+ content_tag(:span, nil, class: 'fa fa-check-circle fa-lg text-success') +
+ t('true')
end
end
end