* renames intervention variable to obj to match other template style * renames open routes to detail routes
73 lines
3.0 KiB
HTML
73 lines
3.0 KiB
HTML
{% load i18n l10n fontawesome_5 humanize %}
|
|
<div id="eco-account-deductions" class="card">
|
|
<div class="card-header rlp-r">
|
|
<div class="row">
|
|
<div class="col-sm-6">
|
|
<h5>
|
|
<span class="badge badge-light">{{deductions.count}}</span>
|
|
{% trans 'Eco Account Deductions' %}
|
|
</h5>
|
|
</div>
|
|
<div class="col-sm-6">
|
|
<div class="d-flex justify-content-end">
|
|
{% if is_default_member and has_access %}
|
|
<button class="btn btn-outline-default btn-modal" data-form-url="{% url 'compensation:acc-new-deduction' obj.id %}" title="{% trans 'Add new deduction' %}">
|
|
{% fa5_icon 'plus' %}
|
|
{% fa5_icon 'tree' %}
|
|
</button>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="card-body scroll-300">
|
|
<table class="table table-hover">
|
|
<thead>
|
|
<tr>
|
|
<th scope="col">
|
|
{% trans 'Intervention Identifier' %}
|
|
</th>
|
|
<th scope="col">
|
|
{% trans 'Recorded' %}
|
|
</th>
|
|
<th scope="col">
|
|
{% trans 'Amount' %}
|
|
</th>
|
|
<th scope="col">
|
|
{% trans 'Created' %}
|
|
</th>
|
|
<th scope="col">
|
|
{% trans 'Action' %}
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for deduction in deductions %}
|
|
<tr>
|
|
<td class="align-middle">
|
|
<a href="{% url 'intervention:detail' deduction.intervention.id %}">
|
|
{{ deduction.intervention.identifier }}
|
|
</a>
|
|
</td>
|
|
<td class="align-middle">
|
|
{% if deduction.intervention.recorded %}
|
|
<em title='{{ deduction.intervention.recorded_tooltip }}' class='fas fa-bookmark registered-bookmark'></em>
|
|
{% else %}
|
|
<em title='{{ deduction.intervention.recorded_tooltip }}' class='far fa-bookmark'></em>
|
|
{% endif %}
|
|
</td>
|
|
<td class="align-middle">{{ deduction.surface|floatformat:2|intcomma }} m²</td>
|
|
<td class="align-middle">{{ deduction.created.timestamp|default_if_none:""|naturalday}}</td>
|
|
<td>
|
|
{% if is_default_member and has_access %}
|
|
<button data-form-url="{% url 'compensation:deduction-remove' deduction.account.id deduction.id %}" class="btn btn-default btn-modal" title="{% trans 'Remove Deduction' %}">
|
|
{% fa5_icon 'trash' %}
|
|
</button>
|
|
{% endif %}
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div> |