mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-17 15:54:23 +00:00
67 lines
2.5 KiB
Twig
67 lines
2.5 KiB
Twig
{% extends "@ChillMain/layout.html.twig" %}
|
|
|
|
{% block title 'List of third parties'|trans %}
|
|
|
|
{% block content %}
|
|
<div class="grid-10 centered">
|
|
<h1>{{ 'List of third parties'|trans }}</h1>
|
|
|
|
{% if third_parties|length == 0 %}
|
|
<p class="chill-no-data-statement">{{ 'No third parties'|trans }}</p>
|
|
{% else %}
|
|
|
|
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th style="width: 35px;"></th>
|
|
<th>{{ 'Name'|trans }}</th>
|
|
<th>{{ 'Category'|trans }}</th>
|
|
<th> </th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for tp in third_parties %}
|
|
<tr>
|
|
<th>{{ (tp.active ? '<i class="fa fa-check chill-green">' : '<i class="fa fa-times chill-red">')|raw }}</th>
|
|
<td>{{ tp.name }}</td>
|
|
{% set types = [] %}
|
|
{% for t in tp.type %}
|
|
{% set types = types|merge( [ ('chill_3party.key_label.'~t)|trans ] ) %}
|
|
{% endfor %}
|
|
<td>{{ types|join(', ') }}</td>
|
|
<td>
|
|
<ul class="record_actions">
|
|
{% if is_granted('CHILL_3PARTY_3PARTY_UPDATE', tp) %}
|
|
<li>
|
|
<a href="{{ chill_path_add_return_path('chill_3party_3party_update', { 'thirdparty_id': tp.id }) }}" class="sc-button bt-update"></a>
|
|
</li>
|
|
{% endif %}
|
|
{% if is_granted('CHILL_3PARTY_3PARTY_SHOW', tp) %}
|
|
<li>
|
|
<a href="{{ chill_path_add_return_path('chill_3party_3party_show', { 'thirdparty_id': tp.id }) }}" class="sc-button bt-show"></a>
|
|
</li>
|
|
{% endif %}
|
|
</ul>
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
|
|
{% if third_parties|length < pagination.getTotalItems %}
|
|
{{ chill_pagination(pagination) }}
|
|
{% endif %}
|
|
|
|
{% endif %}
|
|
|
|
{% if is_granted('CHILL_3PARTY_3PARTY_CREATE') %}
|
|
<ul class="record_actions">
|
|
<li>
|
|
<a href="{{ chill_path_add_return_path('chill_3party_3party_new') }}" class="sc-button bt-create">
|
|
{{ "New third party"|trans }}
|
|
</a>
|
|
{% endif %}
|
|
</div>
|
|
{% endblock %}
|