Files
vision/templates/_cells/directoryTable.html.twig
Xbird 9f22f5b1ee V-Beta-1.0.0
Vision is out of alpha !
2022-02-02 17:46:29 +01:00

39 lines
1.9 KiB
Twig

{% if directories|length > 0 %}
<div class="table-responsive">
<table class="table table-dark table-striped">
<thead>
<tr>
<th scope="col">{% trans %}title_full_name{% endtrans %}</th>
{% if date is not defined %}<th scope="col">{% trans %}title_informations{% endtrans %}</th>{% endif %}
{% if noaction is not defined %}
<th scope="col">{% trans %}title_actions{% endtrans %}</th>
{% endif %}
</tr>
</thead>
<tbody>
{% for i in directories %}
<tr>
<td>
<a href="{{ path('directory_view', {'id': i.id}) }}" data-bs-toggle="tooltip" data-placement="top" title="{% trans %}tooltip_view{% endtrans %}"># {{i.id}} - {{i.fullName}}{% if i.dead %}, {% trans %}title_dead{% endtrans %}{% endif %}</a>
{% if i.wanted %}<p class="text-danger">{% trans %}title_directory_wanted_light{% endtrans %}</p>{% endif %}
</td>
<td>
<ul>
{% if nogender is not defined %}<li>{% trans %}title_gender{% endtrans %}: {{i.gender}}</li>{% endif %}
{% if nophone is not defined %}<li>{% trans %}title_phone{% endtrans %}: {{i.phone}}</li>{% endif %}
{% if nodate is not defined %}<li>{% trans %}title_created_at{% endtrans %}: {{i.createdAt |date('_datetime.format'|trans)}}</li>{% endif %}
</ul>
</td>
{% if noaction is not defined %}
<td>
{% include '_cells/directoryActions.html.twig' with {'directory': i} %}
</td>
{% endif %}
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% else %}
<p>{% trans %}no_data{% endtrans %}</p>
{% endif %}