debian-mirror-gitlab/app/views/layouts/_flash.html.haml

16 lines
837 B
Text
Raw Normal View History

2020-01-01 13:55:28 +05:30
-# We currently only support `alert`, `notice`, `success`, 'toast'
2021-04-29 21:17:54 +05:30
- icons = {'alert' => 'error', 'notice' => 'information-o', 'success' => 'check-circle'}
2021-01-29 00:20:46 +05:30
.flash-container.flash-container-page.sticky{ data: { qa_selector: 'flash_container' } }
2018-03-17 18:26:18 +05:30
- flash.each do |key, value|
2020-01-01 13:55:28 +05:30
- if key == 'toast' && value
.js-toast-message{ data: { message: value } }
2021-09-30 23:02:18 +05:30
- elsif value == I18n.t('devise.failure.unconfirmed')
= render 'shared/confirm_your_email_alert'
2020-01-01 13:55:28 +05:30
- elsif value
2019-12-26 22:10:19 +05:30
%div{ class: "flash-#{key} mb-2" }
2020-10-24 23:57:45 +05:30
= sprite_icon(icons[key], css_class: 'align-middle mr-1') unless icons[key].nil?
2019-12-04 20:38:33 +05:30
%span= value
2020-10-24 23:57:45 +05:30
- if %w(alert notice success).include?(key)
%div{ class: "close-icon-wrapper js-close-icon" }
2020-11-24 15:15:51 +05:30
= sprite_icon('close', css_class: 'close-icon gl-vertical-align-baseline!')