Redo alert template

This commit is contained in:
Nicolas Le Goff
2013-06-10 13:40:06 +02:00
parent 6b2b804f3e
commit b16de7cd03

View File

@@ -19,6 +19,7 @@
</tr>
</table>
<div class="error-view"></div>
{{ form_errors(field) }}
{% endmacro %}
@@ -134,7 +135,25 @@
{% macro flashes() %}
{% for type in app.getAvailableFlashTypes %}
{% for message in app.getFlash(type) %}
<phraseanet-flash type="{{ type }}">{{ message }}</phraseanet-flash>
<div class="alert alert-{{ type }}">
{% set sign = "icon-exclamation-sign" %}
{% if type == "error" %}
{% set sign = "icon-warning-sign" %}
{% elseif type == "success" %}
{% set sign = "icon-ok-sign" %}
{% elseif type == "info" %}
{% set sign = "icon-info-sign" %}
{% endif %}
<table>
<tr>
<td class="alert-block-logo"><i class="icon-2x icon-white {{ sign }}"></i></td>
<td class="alert-block-content">{{ message }}</td>
<td class="alert-block-close"><a href="#"><b>&times;</b></a></td>
</tr>
</table>
</div>
{% endfor %}
{% endfor %}
{% endmacro %}