base_list_field.html.twig 873 B

123456789101112131415161718192021222324252627
  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. <td class="sonata-ba-list-field sonata-ba-list-field-{{ field_description.type }}" objectId="{{ admin.id(object) }}">
  8. {% if field_description.options.identifier is defined and admin.isGranted(['EDIT', 'SHOW']) %}
  9. {% if admin.hasroute('edit') and admin.isGranted('EDIT') %}
  10. <a href="{{ admin.generateUrl('edit', {'id': admin.id(object)}) }}">
  11. {% elseif admin.hasroute('show') %}
  12. <a href="{{ admin.generateUrl('show', {'id': admin.id(object)}) }}">
  13. {% endif %}
  14. {% block field %}{{ value }}{% endblock %}
  15. </a>
  16. {% else %}
  17. {{ block('field') }}
  18. {% endif %}
  19. </td>