first draft
This commit is contained in:
25
app/Resources/views/default/_flash_messages.html.twig
Normal file
25
app/Resources/views/default/_flash_messages.html.twig
Normal file
@@ -0,0 +1,25 @@
|
||||
{#
|
||||
This is a template fragment designed to be included in other templates
|
||||
See http://symfony.com/doc/current/book/templating.html#including-other-templates
|
||||
|
||||
A common practice to better distinguish between templates and fragments is to
|
||||
prefix fragments with an underscore. That's why this template is called
|
||||
'_flash_messages.html.twig' instead of 'flash_messages.html.twig'
|
||||
#}
|
||||
|
||||
{% if app.session.started and app.session.flashBag.peekAll is not empty %}
|
||||
<div class="messages">
|
||||
{% for type, messages in app.session.flashBag.all %}
|
||||
{% for message in messages %}
|
||||
{# Bootstrap alert, see http://getbootstrap.com/components/#alerts #}
|
||||
<div class="alert alert-dismissible alert-{{ type }}" role="alert">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
|
||||
{{ message|trans }}
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
Reference in New Issue
Block a user