diff options
| author | 0Napster | 2017-11-21 14:49:39 +0100 |
|---|---|---|
| committer | GitHub | 2017-11-21 14:49:39 +0100 |
| commit | f01e81604053e9cbdaf4b84534214e37fbfcae5e (patch) | |
| tree | e71a70631a7b29f3f31c66dde65ba5bc2cff1ba3 | |
| parent | acb37189bea8e0bd2c36d9b02042a8e3ee5bb238 (diff) | |
| parent | 4815be1302c6d9d2b7aedfa4010e936a0f3e8e77 (diff) | |
| download | chouette-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.rb | 11 |
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 |
