Archived
1
0
Fork 0
This repository has been archived on 2026-04-03. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
httpcb/app/views/_common/_components/flash.volt

19 lines
583 B
Text

{% set types = {
'error': 'danger',
'success': 'success',
'notice': 'info',
'warning': 'warning'
} %}
{% if (flash.has()) %}
{% for type, messages in flash.getMessages() %}
{% for message in messages %}
<div class="alert alert-{{ types[type] }} alert-dismissible" role="alert">
<h5 class="alert-heading">{{ type|capitalize }}</h5>
<p class="mb-0">{{ message }}</p>
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close">
</div>
{% endfor%}
{% endfor %}
{% endif %}