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

14 lines
581 B
Text

#flash_messages
- if flash.any?
#flash_message.center
- flash.each do |key, value|
- sticky = defined?(sticky) ? sticky : false
- 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
- else
.alert{ class: flash_class(key, sticky: sticky, fixed: fixed), role: flash_role(key) }
= sanitize_with_link(value)