Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
rhukster committed Dec 1, 2017
1 parent eac1691 commit b4cf789
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions system/templates/partials/messages.html.twig
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{% set type_mapping = {'info':'green', 'error': 'red', 'warning': 'yellow'} %}
{% set status_mapping = {'info':'green', 'error': 'red', 'warning': 'yellow'} %}

{% if grav.messages.all %}
<div id="messages">
{% for message in grav.messages.fetch %}

{% set scope = message.scope|e %}
{% set type = type_mapping[scope] %}
{% set color = status_mapping[scope] %}

<div class="notices {{ type }} {{ scope }}"><p>{{ message.message|raw }}</p></div>
<div class="notices {{ scope }} {{ color }}"><p>{{ message.message|raw }}</p></div>

{% endfor %}
</div>
Expand Down

0 comments on commit b4cf789

Please sign in to comment.