Make the application modular to have a "main" and "backend" part.
This commit is contained in:
parent
884f721002
commit
e5b0e1fcfd
28 changed files with 112 additions and 7 deletions
22
app/views/_common/_components/flash.volt
Normal file
22
app/views/_common/_components/flash.volt
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
|
||||
{% 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">
|
||||
<button type="button" class="close" data-dismiss="alert">×</button>
|
||||
|
||||
<strong>{{ type|capitalize }}</strong>
|
||||
<p>
|
||||
{{ message }}
|
||||
</p>
|
||||
</div>
|
||||
{% endfor%}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
Reference in a new issue