list_field_username.html.twig 881 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('VIEW', object) %}
  9. {% if admin.hasroute('edit') and admin.isGranted('EDIT', object) %}
  10. <a href="{{ admin.generateObjectUrl('edit', object) }}">
  11. {% elseif admin.hasroute('show') and admin.show|length > 0 %}
  12. <a href="{{ admin.generateObjectUrl('show', object) }}">
  13. {% endif %}
  14. {% block field %}{{ value }}{% endblock %}
  15. </a>
  16. {% else %}
  17. {{ block('field') }}
  18. {% endif %}
  19. </td>