diff options
| author | Zog | 2018-04-17 13:04:17 +0200 |
|---|---|---|
| committer | Zog | 2018-04-17 13:04:17 +0200 |
| commit | 6c0195c979ffd1391a7b00d1c02d211f9bf8b1df (patch) | |
| tree | 6a20107d865647c216f83e63f77b0be1f2352fb5 /app/helpers | |
| parent | de6edec5a85e2282f11b1eed0bd97fb5b6eaafe8 (diff) | |
| download | chouette-core-6c0195c979ffd1391a7b00d1c02d211f9bf8b1df.tar.bz2 | |
Refs #6508; Uniformize lines show
Diffstat (limited to 'app/helpers')
| -rw-r--r-- | app/helpers/referentials_helper.rb | 12 |
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 |
