61 lines
2.7 KiB
Twig

{% extends "@ChillMain/layout.html.twig" %}
{% block title 'List of third parties'|trans %}
{% set third_parties = entities %}
{% block content %}
{% embed '@ChillMain/CRUD/_index.html.twig' %}
{% block index_header %}
<h1>{{ 'List of third parties'|trans }}</h1>
{% endblock %}
{% block table_entities %}
<div class="thirdparty-list my-5">
<div class="row justify-content-center">
<div>
<label class="counter">
<span>{{ paginator.totalItems }}</span> {{ 'third parties'|trans }}
</label>
<div class="flex-table">
{% for tp in third_parties %}
<div class="item-bloc">
{{ tp|chill_entity_render_box({'render': 'bloc', 'addLink': false, 'showContacts': true, 'isConfidential': (tp.contactDataAnonymous ? true : false) }) }}
<div class="item-row separator">
<ul class="record_actions">
{% if is_granted('CHILL_3PARTY_3PARTY_UPDATE', tp) %}
<li>
<a href="{{ chill_path_add_return_path('chill_crud_3party_3party_edit',
{ 'id': (tp.isParent ? tp.id : tp.parent.id) }) }}" class="btn btn-sm btn-update"></a>
</li>
{% endif %}
{% if is_granted('CHILL_3PARTY_3PARTY_SHOW', tp) %}
<li>
<a href="{{ chill_path_add_return_path('chill_crud_3party_3party_view',
{ 'id': (tp.isParent ? tp.id : tp.parent.id) }) }}" class="btn btn-sm btn-show"></a>
</li>
{% endif %}
</ul>
</div>
</div>
{% endfor %}
</div>
</div>
</div>
</div>
{% endblock %}
{% block actions_before %}
<li class="cancel">
{{ chill_items_per_page(paginator) }}
</li>
{% endblock %}
{% endembed %}
{% endblock %}
{% block css %}
{{ encore_entry_link_tags('page_3party_3party_index') }}
{% endblock %}