Skip to content
This repository has been archived by the owner on Sep 30, 2021. It is now read-only.

Commit

Permalink
Revert "added batched flashmessage template"
Browse files Browse the repository at this point in the history
This reverts commit 6dfca8c.
  • Loading branch information
kunicmarko20 authored and greg0ire committed Jan 17, 2019
1 parent ded0613 commit fed2e40
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 49 deletions.
12 changes: 0 additions & 12 deletions src/CoreBundle/Resources/translations/SonataCoreBundle.de.xliff
Original file line number Diff line number Diff line change
Expand Up @@ -602,18 +602,6 @@
<source>message_close</source>
<target>Schließen</target>
</trans-unit>
<trans-unit id="success">
<source>success</source>
<target>Erfolgreich</target>
</trans-unit>
<trans-unit id="warning">
<source>warning</source>
<target>Warnung</target>
</trans-unit>
<trans-unit id="danger">
<source>danger</source>
<target>Fehlgeschlagen</target>
</trans-unit>
</body>
</file>
</xliff>
12 changes: 0 additions & 12 deletions src/CoreBundle/Resources/translations/SonataCoreBundle.en.xliff
Original file line number Diff line number Diff line change
Expand Up @@ -602,18 +602,6 @@
<source>message_close</source>
<target>Close</target>
</trans-unit>
<trans-unit id="success">
<source>success</source>
<target>Success</target>
</trans-unit>
<trans-unit id="warning">
<source>warning</source>
<target>Warning</target>
</trans-unit>
<trans-unit id="danger">
<source>danger</source>
<target>Danger</target>
</trans-unit>
</body>
</file>
</xliff>
33 changes: 8 additions & 25 deletions src/CoreBundle/Resources/views/FlashMessage/render.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -8,35 +8,18 @@ For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.
#}

{% for type in sonata_flashmessages_types() %}
{% set domain = domain is defined ? domain : null %}
{% set messages = sonata_flashmessages_get(type, domain) %}
{% if messages|length > 1 %}
<div class="alert alert-{{ type|sonata_status_class }} alert-dismissible collapsed-box">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true" aria-label="{{ 'message_close'|trans({}, 'SonataCoreBundle') }}">×</button>
<h4>
<button class="btn btn-link" style="color: unset; padding: 0;" data-toggle="collapse" data-target="#alert-body-{{ loop.index }}">
{{ type|trans({}, 'SonataCoreBundle')|upper }}
<span>&#x25BE;</span>
</button>
</h4>
<div id="alert-body-{{ loop.index }}" class="collapse">
{% for message in messages %}
{{ message|raw }} </br>
{% endfor %}
</div>
</div>
{% elseif messages|length != 0 %}
{% for message in sonata_flashmessages_get(type, domain) %}
<div class="alert alert-{{ type|sonata_status_class }} alert-dismissable">
<button
type="button"
class="close"
data-dismiss="alert"
aria-hidden="true"
aria-label="{{ 'message_close'|trans({}, 'SonataCoreBundle') }}"
type="button"
class="close"
data-dismiss="alert"
aria-hidden="true"
aria-label="{{ 'message_close'|trans({}, 'SonataCoreBundle') }}"
>&times;</button>
{{ messages|first|raw }}
{{ message|raw }}
</div>
{% endif %}
{% endfor %}
{% endfor %}

0 comments on commit fed2e40

Please sign in to comment.