* adds eco-account own includes for simpler maintainability instead of refactoring to generic includes for compensation app and predefining urls and stuff on the backend * adds before-state, after-state, actions, deadlines, documents and withdraws to eco account detail view * adds hint for invalid withdraw in intervention detail view in case of deleted eco account * adds/updates translations
62 lines
2.3 KiB
HTML
62 lines
2.3 KiB
HTML
{% load i18n l10n fontawesome_5 %}
|
|
<div id="states-before" class="card">
|
|
<div class="card-header rlp-r">
|
|
<div class="row">
|
|
<div class="col-sm-6">
|
|
<h5>
|
|
<span class="badge badge-light">{{obj.before_states.count}}</span>
|
|
{% trans 'States before' %}
|
|
</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-state' obj.id %}?before=true" title="{% trans 'Add new state before' %}">
|
|
{% fa5_icon 'plus' %}
|
|
{% fa5_icon 'layer-group' %}
|
|
</button>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="card-body scroll-300">
|
|
{% if sum_before_states < sum_after_states %}
|
|
<div class="row alert alert-danger">
|
|
{% trans 'Missing surfaces according to states after: ' %}{{ diff_states|floatformat:2 }} m²
|
|
</div>
|
|
{% endif %}
|
|
<table class="table table-hover">
|
|
<thead>
|
|
<tr>
|
|
<th scope="col">
|
|
{% trans 'Biotope type' %}
|
|
</th>
|
|
<th scope="col">
|
|
{% trans 'Surface' %}
|
|
</th>
|
|
<th scope="col">
|
|
{% trans 'Action' %}
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for state in before_states %}
|
|
<tr>
|
|
<td class="align-middle">
|
|
{{ state.biotope_type }}
|
|
</td>
|
|
<td class="align-middle">{{ state.surface|floatformat:2 }} m²</td>
|
|
<td>
|
|
{% if is_default_member and has_access %}
|
|
<button data-form-url="{% url 'compensation:state-remove' state.id %}" class="btn btn-default btn-modal" title="{% trans 'Remove state' %}">
|
|
{% fa5_icon 'trash' %}
|
|
</button>
|
|
{% endif %}
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div> |