vendor/sonata-project/admin-bundle/src/Resources/views/CRUD/list__action_delete.html.twig line 1

  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. {% if admin.hasAccess('delete', object) and admin.hasRoute('delete') %}
  8.     {% set button_content = sonata_config.getOption('list_action_button_content') %}
  9.     <a
  10.         href="{{ admin.generateObjectUrl('delete', object, actions.link_parameters|default([])) }}"
  11.         class="btn btn-sm btn-default delete_link"
  12.         title="{{ 'action_delete'|trans({}, 'SonataAdminBundle') }}"
  13.     >
  14.         {% if button_content == 'icon' or button_content == 'all' %}
  15.             <i class="fas fa-times" aria-hidden="true"></i>
  16.         {% endif %}
  17.         {% if button_content == 'text' or button_content == 'all' %}
  18.             {{ 'action_delete'|trans({}, 'SonataAdminBundle') }}
  19.         {% else %}
  20.             <span class="sr-only">
  21.                 {{ 'action_delete'|trans({}, 'SonataAdminBundle') }}
  22.             </span>
  23.         {% endif %}
  24.     </a>
  25. {% endif %}