demarches-normaliennes/app/views/layouts/_flash_messages.html.haml

15 lines
597 B
Text
Raw Normal View History

#flash_messages
- if flash.any?
#flash_message.center
- flash.each do |key, value|
2018-08-09 11:15:23 +02:00
- sticky = defined?(sticky) ? sticky : false
2018-11-14 16:28:02 +01:00
- fixed = defined?(fixed) ? fixed : false
- if value.class == Array
.alert{ class: flash_class(key, sticky: sticky, fixed: fixed), role: flash_role(key) }
- value.each do |message|
= sanitize_with_link(message)
%br
- elsif value.present?
.alert{ class: flash_class(key, sticky: sticky, fixed: fixed), role: flash_role(key) }
= sanitize_with_link(value)