Created
August 15, 2015 14:55
-
-
Save grachevko/254341bd55fa7ef5334c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% if app.session.flashbag.peekAll|length > 0 %} | |
{% set flashbag = app.session.flashbag.all %} | |
<script> | |
init.push(function () { | |
{% for type,messages in flashbag %} | |
{% for message in messages %} | |
PixelAdmin.plugins.alerts.add('<strong>{{ message[0]|trans }}</strong> {{ message[1]|trans(message[2], 'backend')|raw }}', { | |
type: '{{ type }}', | |
namespace: 'pa_page_alerts_dark', | |
{% if message[3] is not null %} | |
'auto_close': {{ message[3] }}, | |
{% endif %} | |
classes: 'alert-dark' | |
}); | |
{% endfor %} | |
{% endfor %} | |
}); | |
</script> | |
{% endif %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment