Adding a page to list all non executed sentences
This commit is contained in:
@@ -152,7 +152,10 @@
|
||||
<li class="pc-item">
|
||||
<a href="{{ path('document_list', {type: 'medical'}) }}" class="pc-link"><span class="pc-micon"><i class="material-icons-two-tone">vaccines</i></span><span class="pc-mtext">{% trans %}title_medicals{% endtrans %}</span></a>
|
||||
</li>
|
||||
|
||||
<li class="pc-item">
|
||||
<a href="{{ path('unsettled_sentence_list', {type: 'fine'}) }}" class="pc-link"><span class="pc-micon"><i class="material-icons-two-tone">sports</i></span><span class="pc-mtext">{% trans %}title_unsettled_sentence_list{% endtrans %}</span></a>
|
||||
</li>
|
||||
|
||||
{% if app.user.hasPermission('group_administrate') %}
|
||||
<li class="pc-item pc-caption">
|
||||
<label>{% trans %}title_management{% endtrans %}</label>
|
||||
|
||||
31
templates/sentence/line.html.twig
Normal file
31
templates/sentence/line.html.twig
Normal file
@@ -0,0 +1,31 @@
|
||||
<tr>
|
||||
<td>
|
||||
<a href="{{ path('directory_view', {'id': i.directory.id}) }}" >{{ i.directory.firstname }} {{ i.directory.lastname }} {% if i.directory.dead %}, {% trans %}title_dead{% endtrans %}{% endif %}</a>
|
||||
</td>
|
||||
<td>
|
||||
{% trans %}title_missing{% endtrans %}:
|
||||
{% if type == 'fine' %}
|
||||
{{ i.amountMoney - i.amountMoneySettled }} {{'currency_symbol'|trans}}
|
||||
{% elseif type == 'jail' %}
|
||||
{{ i.amountTime - i.amountTimeSettled }} {{'title_hours'|trans}}
|
||||
{% elseif type == 'community_work' %}
|
||||
{{ i.amountCommunityWork - i.amountCommunityWorkSettled }} {{'title_hours'|trans}}
|
||||
{% endif %}
|
||||
<br/>
|
||||
{{ form_start(i.form) }}
|
||||
<span class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">{{ form_label(i.form.amount) }}</span>
|
||||
</div>
|
||||
{{ form_widget(i.form.amount) }}
|
||||
{{ form_widget(i.form.submit, { 'label': 'button_ok' }) }}
|
||||
</span>
|
||||
{{ form_end(i.form) }}
|
||||
</td>
|
||||
<td>
|
||||
{{i.createdAt |date('_datetime.format'|trans)}}
|
||||
</td>
|
||||
<td>
|
||||
{% include '_cells/documentActions.html.twig' with {'document': i, 'noedit': true, 'nodelete': true, 'noarchive': true} %}
|
||||
</td>
|
||||
</tr>
|
||||
63
templates/sentence/list.html.twig
Normal file
63
templates/sentence/list.html.twig
Normal file
@@ -0,0 +1,63 @@
|
||||
{% 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 %}
|
||||
Reference in New Issue
Block a user