base_list_field.html.twig 800 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="{{ object.id }}">
  8. {% if field_description.options.identifier is defined and admin.isGranted(['EDIT', 'VIEW']) %}
  9. {% if admin.isGranted('EDIT') %}
  10. <a href="{{ admin.generateUrl('edit', {'id': object.id}) }}">
  11. {% else %}
  12. <a href="{{ admin.generateUrl('view', {'id': object.id}) }}">
  13. {% endif %}
  14. {% block field %}{{ value }}{% endblock %}
  15. </a>
  16. {% else %}
  17. {{ block('field') }}
  18. {% endif %}
  19. </td>