Files
vision/templates/sentence/list.html.twig

64 lines
2.7 KiB
Twig

{% extends 'base.html.twig' %}
{% block title %}{{ "title_unsettled_sentence_list"|trans }}{% endblock %}
{% block body %}
<div class="row">
<div class="col-12 col-md-12">{{form(searchForm)}}</div>
</div>
<div class="btn-group d-flex">
<a href="fine" class="btn btn-outline-primary w-100{% if type=="fine" %} disabled{% endif %}">{% trans %}title_fines{% endtrans %}</a>
<a href="jail" class="btn btn-outline-primary w-100{% if type=="jail" %} disabled{% endif %}">{% trans %}title_jail_time{% endtrans %}</a>
<a href="community_work" class="btn btn-outline-primary w-100{% if type=="community_work" %} disabled{% endif %}">{% trans %}title_community_work{% endtrans %}</a>
</div>
<div class="row">
<div class="col-lg-12"><hr><p>{{ 'title_count'|trans }}: {{ count }}</p>
{% if pagination[0].directory is not defined %}{% set nodirectorylink = true %}{% endif %}
{% set slicelimit = (limit is defined)? limit : null %}
{% set counter = 0 %}
{% if pagination|length > 0 %}
<div class="table-responsive">
<table class="table table-dark table-striped table-hover align-middle">
<thead>
<tr>
<th scope="col">{% trans %}title_name{% endtrans %}</th>
<th scope="col">{% trans %}title_missing{% endtrans %}</th>
<th scope="col">{% trans %}title_date{% endtrans %}</th>
{% if noaction is not defined %}
<th scope="col">{% trans %}tooltip_view{% endtrans %}</th>
{% endif %}
</tr>
</thead>
<tbody>
{% for i in pagination |slice(0, slicelimit) %}
{% set counter = counter + 1 %}
{% include 'sentence/line.html.twig' with {'sentence': i, 'type': type } %}
{% endfor %}
</tbody>
</table>
</div>
{% if slicelimit is not null and pagination|length > slicelimit %}
<div class="row my-2">
<div class="col">
{% if nodirectorylink is not defined %}
<a class="btn btn-primary btn-sm" href="{{ path('document_list', {'type': pagination[0].classShort, 'directory': pagination[0].directory.id}) }}">{% trans %}button_view_more{% endtrans %}</a>
{% else %}
<a class="btn btn-primary btn-sm" href="{{ path('document_list', {'type': pagination[0].classShort}) }}">{% trans %}button_view_more{% endtrans %}</a>
{% endif %}
</div>
</div>
{% endif %}
{% else %}
<p>{% trans %}no_data{% endtrans %}</p>
{% endif %}
</div>
</div>
<div class="row">
{{ knp_pagination_render(pagination) }}
</div>
{% endblock %}