notice.html.twig 616 B

12345678910111213141516171819202122
  1. {#
  2. This file is part of the Sonata package.
  3. (c) Thomas Rabaix <thomas.rabaix@sonata-project.org>
  4. For the full copyright and license information, please view the LICENSE
  5. file that was distributed with this source code.
  6. #}
  7. {# flash notice defined in CRUDController after actions- 3 levels #}
  8. {% for notice_level in ['success','error','notice'] %}
  9. {% set session_var = 'sonata_flash_' ~ notice_level %}
  10. {% if app.session.hasFlash(session_var) %}
  11. <div class="{{notice_level}}">
  12. {{ app.session.flash(session_var) | trans([],'SonataAdminBundle') }}
  13. </div>
  14. {% endif %}
  15. {% endfor %}