{# This file is part of the Sonata package. (c) Thomas Rabaix For the full copyright and license information, please view the LICENSE file that was distributed with this source code. #} {% extends 'SonataAdminBundle:CRUD:base_list_field.html.twig' %} {% block field %}
{% if object.image and admin.isGranted('VIEW', object.image) %} {% if admin.isGranted('EDIT', object) and admin.hasRoute('edit') %} {% thumbnail object.image, 'admin' with {'width': 90} %} {% else %} {% thumbnail object.image, 'admin' with {'width': 90} %} {% endif %} {% else %} {% endif %}
{{ object.commentsCount }} {% if admin.isGranted('EDIT', object) and admin.hasRoute('edit') %} {{ object.title }} {% else %} {{ object.title }} {% endif %} {% if object.author %} ~ {{ object.author.username }} {% endif %}
{{ object.abstract|truncate(150) }}
{% if object.collection %} {{ object.collection.name }} {% endif %} {% if object.collection and object.tags|length > 0 %} ~ {% endif %} {% for tag in object.tags %} {{ tag.name }}{% if not loop.last %}, {% endif %} {% endfor %}
{% endblock %}