aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
author0Napster2017-11-21 14:49:39 +0100
committerGitHub2017-11-21 14:49:39 +0100
commitf01e81604053e9cbdaf4b84534214e37fbfcae5e (patch)
treee71a70631a7b29f3f31c66dde65ba5bc2cff1ba3
parentacb37189bea8e0bd2c36d9b02042a8e3ee5bb238 (diff)
parent4815be1302c6d9d2b7aedfa4010e936a0f3e8e77 (diff)
downloadchouette-core-f01e81604053e9cbdaf4b84534214e37fbfcae5e.tar.bz2
Merge pull request #122 from af83/5005-make-style-of-Oui-label-in-tables-consistent-with-the-normal-text-style
5005 make style of oui label in tables consistent with the normal text style
-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