-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #46 from BitBagCommerce/OPSRC-562/flash_message_fix
Add page reload to summary
- Loading branch information
Showing
4 changed files
with
36 additions
and
1 deletion.
There are no files selected for viewing
File renamed without changes.
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
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
31 changes: 31 additions & 0 deletions
31
tests/Application/templates/bundles/SyliusShopBundle/_flashes.html.twig
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{% if app.session is not null and app.session.started %} | ||
{% for type in ['success', 'error', 'info', 'warning'] %} | ||
{% for flash in app.session.flashbag.get(type) %} | ||
{% if 'error' == type %} | ||
{% set result = 'negative' %} | ||
{% set icon = 'remove' %} | ||
{% endif %} | ||
{% if 'info' == type %} | ||
{% set result = 'info' %} | ||
{% set icon = 'info' %} | ||
{% endif %} | ||
<div class="ui icon {{ result|default('positive') }} message sylius-flash-message" data-sylius-flash-message> | ||
<i class="close icon"></i> | ||
<i class="{{ icon|default('checkmark') }} icon"></i> | ||
<div class="content"> | ||
<div class="header"> | ||
{% set header = 'sylius.ui.'~type %} | ||
{{ header|trans }} | ||
</div> | ||
<p {{ sylius_test_html_attribute('flash-messages') }}> | ||
{% if flash is iterable %} | ||
{{ flash.message|trans(flash.parameters, 'flashes') }} | ||
{% else %} | ||
{{ flash|trans({}, 'flashes') }} | ||
{% endif %} | ||
</p> | ||
</div> | ||
</div> | ||
{% endfor %} | ||
{% endfor %} | ||
{% endif %} |