Eco Accounts
* adds related eco account withdraw detail view to intervention detail view * adds new route for removing withdraws using RemoveModalForm * adds EcoAccountWithdraw model * adds admin interfaces for EcoAccount and EcoAccountWithdraw * adds message_templates.py to konova/utils for reusable messages * splits related-documents.html and related-objects.html into separate templates for each related object type: compensations.html, documents.html, eco-account-withdraws.html and payments.html * adds translationspull/9/head
parent
52600c9a16
commit
6a650d2021
@ -0,0 +1,49 @@
|
|||||||
|
{% load i18n l10n fontawesome_5 %}
|
||||||
|
<div id="related-compensations" class="card">
|
||||||
|
<div class="card-header rlp-r">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-6">
|
||||||
|
<h5>
|
||||||
|
<span class="badge badge-light">{{intervention.compensations.count}}</span>
|
||||||
|
{% trans 'Compensations' %}
|
||||||
|
</h5>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-6">
|
||||||
|
<div class="d-flex justify-content-end">
|
||||||
|
<a href="{% url 'compensation:new' %}" title="{% trans 'Add new compensation' %}">
|
||||||
|
<button class="btn btn-outline-default">
|
||||||
|
{% fa5_icon 'plus' %}
|
||||||
|
{% fa5_icon 'leaf' %}
|
||||||
|
</button>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="card-body scroll-300">
|
||||||
|
<table class="table table-hover">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th scope="col">
|
||||||
|
{% trans 'Identifier' %}
|
||||||
|
</th>
|
||||||
|
<th scope="col">
|
||||||
|
{% trans 'Title' %}
|
||||||
|
</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
{% for comp in intervention.compensations.all %}
|
||||||
|
<tr>
|
||||||
|
<td class="align-middle">
|
||||||
|
<a href="{% url 'compensation:open' comp.id %}">
|
||||||
|
{{ comp.identifier }}
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
<td class="align-middle">{{ comp.title }}</td>
|
||||||
|
</tr>
|
||||||
|
{% endfor %}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
@ -0,0 +1,55 @@
|
|||||||
|
{% load i18n l10n fontawesome_5 %}
|
||||||
|
<div id="related-documents" class="card">
|
||||||
|
<div class="card-header rlp-r">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-6">
|
||||||
|
<h5>
|
||||||
|
<span class="badge badge-light">{{intervention.documents.count}}</span>
|
||||||
|
{% trans 'Documents' %}
|
||||||
|
</h5>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-6">
|
||||||
|
<div class="d-flex justify-content-end">
|
||||||
|
<button class="btn btn-outline-default btn-modal" data-form-url="{% url 'intervention:new-doc' intervention.id %}" title="{% trans 'Add new document' %}">
|
||||||
|
{% fa5_icon 'plus' %}
|
||||||
|
{% fa5_icon 'file' %}
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="card-body scroll-300">
|
||||||
|
<table class="table table-hover">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th scope="col">
|
||||||
|
{% trans 'Title' %}
|
||||||
|
</th>
|
||||||
|
<th scope="col">
|
||||||
|
{% trans 'Comment' %}
|
||||||
|
</th>
|
||||||
|
<th scope="col">
|
||||||
|
{% trans 'Action' %}
|
||||||
|
</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
{% for doc in intervention.documents.all %}
|
||||||
|
<tr>
|
||||||
|
<td class="align-middle">
|
||||||
|
<a href="{% url 'doc-open' doc.id %}">
|
||||||
|
{{ doc.title }}
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
<td class="align-middle">{{ doc.comment }}</td>
|
||||||
|
<td>
|
||||||
|
<button data-form-url="{% url 'doc-remove' doc.id %}" class="btn btn-default btn-modal" title="{% trans 'Remove document' %}">
|
||||||
|
{% fa5_icon 'trash' %}
|
||||||
|
</button>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{% endfor %}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
@ -0,0 +1,57 @@
|
|||||||
|
{% load i18n l10n fontawesome_5 %}
|
||||||
|
<div id="related-eco-account-withdraws" class="card">
|
||||||
|
<div class="card-header rlp-r">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-6">
|
||||||
|
<h5>
|
||||||
|
<span class="badge badge-light">{{intervention.eco_withdraws.count}}</span>
|
||||||
|
{% trans 'Eco Account Withdraws' %}
|
||||||
|
</h5>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-6">
|
||||||
|
<div class="d-flex justify-content-end">
|
||||||
|
<a href="{% url 'compensation:new' %}" title="{% trans 'Add new withdraw' %}">
|
||||||
|
<button class="btn btn-outline-default">
|
||||||
|
{% fa5_icon 'plus' %}
|
||||||
|
{% fa5_icon 'tree' %}
|
||||||
|
</button>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="card-body scroll-300">
|
||||||
|
<table class="table table-hover">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th scope="col">
|
||||||
|
{% trans 'Account Identifier' %}
|
||||||
|
</th>
|
||||||
|
<th scope="col">
|
||||||
|
{% trans 'Amount' %}
|
||||||
|
</th>
|
||||||
|
<th scope="col">
|
||||||
|
{% trans 'Action' %}
|
||||||
|
</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
{% for withdraw in intervention.eco_withdraws.all %}
|
||||||
|
<tr>
|
||||||
|
<td class="align-middle">
|
||||||
|
<a href="{% url 'compensation:acc-open' withdraw.account.id %}">
|
||||||
|
{{ withdraw.account.identifier }}
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
<td class="align-middle">{{ withdraw.amount }} %</td>
|
||||||
|
<td>
|
||||||
|
<button data-form-url="{% url 'compensation:withdraw-remove' withdraw.account.id withdraw.id %}" class="btn btn-default btn-modal" title="{% trans 'Remove Withdraw' %}">
|
||||||
|
{% fa5_icon 'trash' %}
|
||||||
|
</button>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{% endfor %}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
@ -0,0 +1,59 @@
|
|||||||
|
{% load i18n l10n fontawesome_5 %}
|
||||||
|
<div id="related-payments" class="card">
|
||||||
|
<div class="card-header rlp-r">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-6">
|
||||||
|
<h5>
|
||||||
|
<span class="badge badge-light">{{intervention.payments.count}}</span>
|
||||||
|
{% trans 'Payments' %}
|
||||||
|
</h5>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-6">
|
||||||
|
<div class="d-flex justify-content-end">
|
||||||
|
<button class="btn btn-outline-default btn-modal" data-form-url="{% url 'compensation:pay-new' intervention.id %}" title="{% trans 'Add new payment' %}">
|
||||||
|
{% fa5_icon 'plus' %}
|
||||||
|
{% fa5_icon 'money-bill-wave' %}
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="card-body scroll-300">
|
||||||
|
<table class="table table-hover">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th scope="col">
|
||||||
|
{% trans 'Amount' context 'money' %}
|
||||||
|
</th>
|
||||||
|
<th scope="col">
|
||||||
|
{% trans 'Due on' %}
|
||||||
|
</th>
|
||||||
|
<th scope="col">
|
||||||
|
{% trans 'Transfer comment' %}
|
||||||
|
</th>
|
||||||
|
<th scope="col">
|
||||||
|
{% trans 'Action' %}
|
||||||
|
</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
{% for pay in intervention.payments.all %}
|
||||||
|
<tr>
|
||||||
|
<td class="align-middle">
|
||||||
|
<a href="{% url 'compensation:pay-open' pay.id %}">
|
||||||
|
{{ pay.amount|floatformat:2 }} €
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
<td class="align-middle">{{ pay.due_on }}</td>
|
||||||
|
<td class="align-middle">{{ pay.comment }}</td>
|
||||||
|
<td>
|
||||||
|
<button data-form-url="{% url 'compensation:pay-remove' pay.id %}" class="btn btn-default btn-modal" title="{% trans 'Remove payment' %}">
|
||||||
|
{% fa5_icon 'trash' %}
|
||||||
|
</button>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{% endfor %}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
@ -1,59 +0,0 @@
|
|||||||
{% load i18n l10n fontawesome_5 %}
|
|
||||||
<div id="related-documents" class="row">
|
|
||||||
<div class="col-sm-12 col-md-12 col-lg-6">
|
|
||||||
<div class="card">
|
|
||||||
<div class="card-header rlp-r">
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-sm-6">
|
|
||||||
<h5>
|
|
||||||
<span class="badge badge-light">{{intervention.documents.count}}</span>
|
|
||||||
{% trans 'Documents' %}
|
|
||||||
</h5>
|
|
||||||
</div>
|
|
||||||
<div class="col-sm-6">
|
|
||||||
<div class="d-flex justify-content-end">
|
|
||||||
<button class="btn btn-outline-default btn-modal" data-form-url="{% url 'intervention:new-doc' intervention.id %}" title="{% trans 'Add new document' %}">
|
|
||||||
{% fa5_icon 'plus' %}
|
|
||||||
{% fa5_icon 'file' %}
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="card-body scroll-300">
|
|
||||||
<table class="table table-hover">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th scope="col">
|
|
||||||
{% trans 'Title' %}
|
|
||||||
</th>
|
|
||||||
<th scope="col">
|
|
||||||
{% trans 'Comment' %}
|
|
||||||
</th>
|
|
||||||
<th scope="col">
|
|
||||||
{% trans 'Action' %}
|
|
||||||
</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
{% for doc in intervention.documents.all %}
|
|
||||||
<tr>
|
|
||||||
<td class="align-middle">
|
|
||||||
<a href="{% url 'doc-open' doc.id %}">
|
|
||||||
{{ doc.title }}
|
|
||||||
</a>
|
|
||||||
</td>
|
|
||||||
<td class="align-middle">{{ doc.comment }}</td>
|
|
||||||
<td>
|
|
||||||
<button data-form-url="{% url 'doc-remove' doc.id %}" class="btn btn-default btn-modal" title="{% trans 'Remove document' %}">
|
|
||||||
{% fa5_icon 'trash' %}
|
|
||||||
</button>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
{% endfor %}
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
@ -1,113 +0,0 @@
|
|||||||
{% load i18n l10n fontawesome_5 %}
|
|
||||||
<div id="related-objects" class="row">
|
|
||||||
<div class="col-sm-12 col-md-12 col-lg-6">
|
|
||||||
<div id="related-compensations" class="card">
|
|
||||||
<div class="card-header rlp-r">
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-sm-6">
|
|
||||||
<h5>
|
|
||||||
<span class="badge badge-light">{{intervention.compensations.count}}</span>
|
|
||||||
{% trans 'Compensations' %}
|
|
||||||
</h5>
|
|
||||||
</div>
|
|
||||||
<div class="col-sm-6">
|
|
||||||
<div class="d-flex justify-content-end">
|
|
||||||
<a href="{% url 'compensation:new' %}" title="{% trans 'Add new compensation' %}">
|
|
||||||
<button class="btn btn-outline-default">
|
|
||||||
{% fa5_icon 'plus' %}
|
|
||||||
{% fa5_icon 'leaf' %}
|
|
||||||
</button>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="card-body scroll-300">
|
|
||||||
<table class="table table-hover">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th scope="col">
|
|
||||||
{% trans 'Identifier' %}
|
|
||||||
</th>
|
|
||||||
<th scope="col">
|
|
||||||
{% trans 'Title' %}
|
|
||||||
</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
{% for comp in intervention.compensations.all %}
|
|
||||||
<tr>
|
|
||||||
<td class="align-middle">
|
|
||||||
<a href="{% url 'compensation:open' comp.id %}">
|
|
||||||
{{ comp.identifier }}
|
|
||||||
</a>
|
|
||||||
</td>
|
|
||||||
<td class="align-middle">{{ comp.title }}</td>
|
|
||||||
</tr>
|
|
||||||
{% endfor %}
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-sm-12 col-md-12 col-lg-6">
|
|
||||||
<div id="related-payments" class="card">
|
|
||||||
<div class="card-header rlp-r">
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-sm-6">
|
|
||||||
<h5>
|
|
||||||
<span class="badge badge-light">{{intervention.payments.count}}</span>
|
|
||||||
{% trans 'Payments' %}
|
|
||||||
</h5>
|
|
||||||
</div>
|
|
||||||
<div class="col-sm-6">
|
|
||||||
<div class="d-flex justify-content-end">
|
|
||||||
<button class="btn btn-outline-default btn-modal" data-form-url="{% url 'compensation:pay-new' intervention.id %}" title="{% trans 'Add new payment' %}">
|
|
||||||
{% fa5_icon 'plus' %}
|
|
||||||
{% fa5_icon 'money-bill-wave' %}
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="card-body scroll-300">
|
|
||||||
<table class="table table-hover">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th scope="col">
|
|
||||||
{% trans 'Amount' %}
|
|
||||||
</th>
|
|
||||||
<th scope="col">
|
|
||||||
{% trans 'Due on' %}
|
|
||||||
</th>
|
|
||||||
<th scope="col">
|
|
||||||
{% trans 'Transfer comment' %}
|
|
||||||
</th>
|
|
||||||
<th scope="col">
|
|
||||||
{% trans 'Action' %}
|
|
||||||
</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
{% for pay in intervention.payments.all %}
|
|
||||||
<tr>
|
|
||||||
<td class="align-middle">
|
|
||||||
<a href="{% url 'compensation:pay-open' pay.id %}">
|
|
||||||
{{ pay.amount|floatformat:2 }} €
|
|
||||||
</a>
|
|
||||||
</td>
|
|
||||||
<td class="align-middle">{{ pay.due_on }}</td>
|
|
||||||
<td class="align-middle">{{ pay.comment }}</td>
|
|
||||||
<td>
|
|
||||||
<button data-form-url="{% url 'compensation:pay-remove' pay.id %}" class="btn btn-default btn-modal" title="{% trans 'Remove payment' %}">
|
|
||||||
{% fa5_icon 'trash' %}
|
|
||||||
</button>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
{% endfor %}
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
@ -0,0 +1,11 @@
|
|||||||
|
"""
|
||||||
|
Author: Michel Peltriaux
|
||||||
|
Organization: Struktur- und Genehmigungsdirektion Nord, Rhineland-Palatinate, Germany
|
||||||
|
Contact: michel.peltriaux@sgdnord.rlp.de
|
||||||
|
Created on: 02.08.21
|
||||||
|
|
||||||
|
"""
|
||||||
|
from django.utils.translation import gettext_lazy as _
|
||||||
|
|
||||||
|
|
||||||
|
FORM_INVALID = _("There was an error on this form.")
|
Binary file not shown.
Loading…
Reference in New Issue