Intervention Detail View
* adds related object overview in detail view * adds comment field to payment model for 'Verwendungszweck' * simplifies intervention urls * adds translations
This commit is contained in:
parent
4d651aec24
commit
a304f8d42e
@ -23,6 +23,12 @@ class Payment(BaseResource):
|
||||
"""
|
||||
amount = models.FloatField(validators=[MinValueValidator(limit_value=0.00)])
|
||||
due_on = models.DateField(null=True)
|
||||
comment = models.CharField(
|
||||
max_length=1000,
|
||||
null=True,
|
||||
blank=True,
|
||||
help_text="Refers to german money transfer 'Verwendungszweck'",
|
||||
)
|
||||
|
||||
|
||||
class CompensationControl(BaseResource):
|
||||
|
@ -13,7 +13,17 @@
|
||||
LANIS
|
||||
</button>
|
||||
</a>
|
||||
<a href="{% url 'home' %}" class="mr-2">
|
||||
<button class="btn btn-default" title="{% trans 'Public report' %}">
|
||||
{% fa5_icon 'file-alt' %}
|
||||
</button>
|
||||
</a>
|
||||
{% if has_access %}
|
||||
<a href="{% url 'home' %}" class="mr-2">
|
||||
<button class="btn btn-default" title="{% trans 'Share' %}">
|
||||
{% fa5_icon 'share-alt' %}
|
||||
</button>
|
||||
</a>
|
||||
<a href="{% url 'home' %}" class="mr-2">
|
||||
<button class="btn btn-default" title="{% trans 'Run check' %}">
|
||||
{% fa5_icon 'star' %}
|
||||
@ -116,6 +126,107 @@
|
||||
{{geom_form.geom}}
|
||||
</div>
|
||||
</div>
|
||||
<div id="related-objects" class="row"></div>
|
||||
<hr>
|
||||
|
||||
<div id="related-objects" class="row mb-5">
|
||||
<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">
|
||||
<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>
|
||||
<a href="{% url 'compensation:open' comp.id %}">
|
||||
{{ comp.identifier }}
|
||||
</a>
|
||||
</td>
|
||||
<td>{{ 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">
|
||||
<a href="{% url 'compensation:new' %}" title="{% trans 'Add new payment' %}">
|
||||
<button class="btn btn-outline-default">
|
||||
{% fa5_icon 'plus' %}
|
||||
{% fa5_icon 'money-bill-wave' %}
|
||||
</button>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<table class="table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">
|
||||
{% trans 'Amount' %}
|
||||
</th>
|
||||
<th scope="col">
|
||||
{% trans 'Transfer comment' %}
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for pay in intervention.payments.all %}
|
||||
<a href="{% url 'payment:open' pay.id %}">
|
||||
<tr>
|
||||
<td>{{ pay.amount }}</td>
|
||||
<td>{{ pay.comment }}</td>
|
||||
</tr>
|
||||
</a>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
@ -13,7 +13,7 @@ app_name = "intervention"
|
||||
urlpatterns = [
|
||||
path("", index_view, name="index"),
|
||||
path('new/', new_view, name='new'),
|
||||
path('open/<id>', open_view, name='open'),
|
||||
path('edit/<id>', edit_view, name='edit'),
|
||||
path('remove/<id>', remove_view, name='remove'),
|
||||
path('<id>', open_view, name='open'),
|
||||
path('<id>/edit', edit_view, name='edit'),
|
||||
path('<id>/remove', remove_view, name='remove'),
|
||||
]
|
@ -143,6 +143,21 @@ a {
|
||||
*/
|
||||
box-shadow: 1px 1px 3px var(--rlp-gray-dark);
|
||||
}
|
||||
.btn-outline-default{
|
||||
color: white;
|
||||
border: 1px solid white;
|
||||
}
|
||||
.btn-outline-default:hover{
|
||||
/*
|
||||
color: var(--rlp-gray-light);
|
||||
color: var(--rlp-red);;
|
||||
background-color: unset;
|
||||
border: 1px solid var(--rlp-red);
|
||||
*/
|
||||
box-shadow: 1px 1px 3px var(--rlp-gray-light);
|
||||
color: var(--rlp-red);
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
.cursor-pointer{
|
||||
cursor: pointer;
|
||||
|
Binary file not shown.
@ -11,7 +11,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2021-07-22 13:15+0200\n"
|
||||
"POT-Creation-Date: 2021-07-22 14:57+0200\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
@ -23,14 +23,16 @@ msgstr ""
|
||||
|
||||
#: compensation/tables.py:18 compensation/tables.py:71 intervention/forms.py:26
|
||||
#: intervention/tables.py:23
|
||||
#: intervention/templates/intervention/detail-view.html:159
|
||||
msgid "Identifier"
|
||||
msgstr "Kennung"
|
||||
|
||||
#: compensation/tables.py:23 compensation/tables.py:76 intervention/forms.py:33
|
||||
#: intervention/tables.py:28
|
||||
#: intervention/templates/intervention/detail-view.html:47
|
||||
#: intervention/templates/intervention/detail-view.html:57
|
||||
#: intervention/templates/intervention/detail-view.html:162
|
||||
msgid "Title"
|
||||
msgstr "Titel"
|
||||
msgstr "Bezeichnung"
|
||||
|
||||
#: compensation/tables.py:28 compensation/tables.py:81
|
||||
msgid "Created on"
|
||||
@ -41,6 +43,7 @@ msgid "Actions"
|
||||
msgstr "Aktionen"
|
||||
|
||||
#: compensation/tables.py:44
|
||||
#: intervention/templates/intervention/detail-view.html:139
|
||||
msgid "Compensations"
|
||||
msgstr "Kompensationen"
|
||||
|
||||
@ -153,12 +156,12 @@ msgid "Edit intervention"
|
||||
msgstr "Eingriff bearbeiten"
|
||||
|
||||
#: intervention/tables.py:33
|
||||
#: intervention/templates/intervention/detail-view.html:67
|
||||
#: intervention/templates/intervention/detail-view.html:77
|
||||
msgid "Checked"
|
||||
msgstr "Geprüft"
|
||||
|
||||
#: intervention/tables.py:39
|
||||
#: intervention/templates/intervention/detail-view.html:81
|
||||
#: intervention/templates/intervention/detail-view.html:91
|
||||
msgid "Recorded"
|
||||
msgstr "Verzeichnet"
|
||||
|
||||
@ -206,57 +209,85 @@ msgstr "Nicht freigegeben - Datensatz nur lesbar"
|
||||
|
||||
#: intervention/templates/intervention/detail-view.html:12
|
||||
msgid "Open in LANIS"
|
||||
msgstr ""
|
||||
msgstr "In LANIS öffnen"
|
||||
|
||||
#: intervention/templates/intervention/detail-view.html:18
|
||||
msgid "Run check"
|
||||
msgstr ""
|
||||
#: intervention/templates/intervention/detail-view.html:17
|
||||
msgid "Public report"
|
||||
msgstr "Öffentlicher Bericht"
|
||||
|
||||
#: intervention/templates/intervention/detail-view.html:23
|
||||
msgid "Share"
|
||||
msgstr "Freigabe"
|
||||
|
||||
#: intervention/templates/intervention/detail-view.html:28
|
||||
msgid "Run check"
|
||||
msgstr "Prüfung vornehmen"
|
||||
|
||||
#: intervention/templates/intervention/detail-view.html:33
|
||||
msgid "Record"
|
||||
msgstr "Verzeichnen"
|
||||
|
||||
#: intervention/templates/intervention/detail-view.html:28
|
||||
#: intervention/templates/intervention/detail-view.html:38
|
||||
msgid "Edit"
|
||||
msgstr "Bearbeiten"
|
||||
|
||||
#: intervention/templates/intervention/detail-view.html:33
|
||||
#: intervention/templates/intervention/detail-view.html:43
|
||||
#: venv/lib/python3.7/site-packages/django/forms/formsets.py:391
|
||||
msgid "Delete"
|
||||
msgstr "Löschen"
|
||||
|
||||
#: intervention/templates/intervention/detail-view.html:51
|
||||
#: intervention/templates/intervention/detail-view.html:61
|
||||
msgid "Registration office"
|
||||
msgstr "Zulassungsbehörde"
|
||||
|
||||
#: intervention/templates/intervention/detail-view.html:55
|
||||
#: intervention/templates/intervention/detail-view.html:65
|
||||
msgid "Registration office file number"
|
||||
msgstr "Aktenzeichen Zulassungsbehörde"
|
||||
|
||||
#: intervention/templates/intervention/detail-view.html:59
|
||||
#: intervention/templates/intervention/detail-view.html:69
|
||||
msgid "Conservation office"
|
||||
msgstr "Naturschutzbehörde"
|
||||
|
||||
#: intervention/templates/intervention/detail-view.html:63
|
||||
#: intervention/templates/intervention/detail-view.html:73
|
||||
msgid "Conversation office file number"
|
||||
msgstr "Aktenzeichen Naturschutzbehörde"
|
||||
|
||||
#: intervention/templates/intervention/detail-view.html:95
|
||||
#: intervention/templates/intervention/detail-view.html:105
|
||||
msgid "Registration date"
|
||||
msgstr "Datum Zulassung bzw. Satzungsbeschluss"
|
||||
|
||||
#: intervention/templates/intervention/detail-view.html:99
|
||||
#: intervention/templates/intervention/detail-view.html:109
|
||||
msgid "Binding on"
|
||||
msgstr "Datum Bestandskraft"
|
||||
|
||||
#: intervention/templates/intervention/detail-view.html:103
|
||||
#: intervention/templates/intervention/detail-view.html:113
|
||||
msgid "Last modified"
|
||||
msgstr "Zuletzt bearbeitet"
|
||||
|
||||
#: intervention/templates/intervention/detail-view.html:107
|
||||
#: intervention/templates/intervention/detail-view.html:117
|
||||
msgid "by"
|
||||
msgstr "von"
|
||||
|
||||
#: intervention/templates/intervention/detail-view.html:144
|
||||
msgid "Add new compensation"
|
||||
msgstr "Neue Kompensation hinzufügen"
|
||||
|
||||
#: intervention/templates/intervention/detail-view.html:189
|
||||
msgid "Payments"
|
||||
msgstr "Ersatzzahlungen"
|
||||
|
||||
#: intervention/templates/intervention/detail-view.html:194
|
||||
msgid "Add new payment"
|
||||
msgstr "Neue Zahlung hinzufügen"
|
||||
|
||||
#: intervention/templates/intervention/detail-view.html:209
|
||||
msgid "Amount"
|
||||
msgstr "Betrag"
|
||||
|
||||
#: intervention/templates/intervention/detail-view.html:212
|
||||
msgid "Transfer comment"
|
||||
msgstr "Verwendungszweck"
|
||||
|
||||
#: intervention/views.py:62
|
||||
msgid "Intervention {} added"
|
||||
msgstr "Eingriff {} hinzugefügt"
|
||||
@ -1744,9 +1775,6 @@ msgstr ""
|
||||
#~ msgid "Delete intervention"
|
||||
#~ msgstr "Eingriff löschen"
|
||||
|
||||
#~ msgid "Add new compensation"
|
||||
#~ msgstr "Neue Kompensation hinzufügen"
|
||||
|
||||
#~ msgid "Delete compensation"
|
||||
#~ msgstr "Kompensation löschen"
|
||||
|
||||
@ -1816,9 +1844,6 @@ msgstr ""
|
||||
#~ msgid "New action"
|
||||
#~ msgstr "Neue Maßnahme"
|
||||
|
||||
#~ msgid "Annual report"
|
||||
#~ msgstr "Jahresbericht"
|
||||
|
||||
#~ msgid "You are currently working as "
|
||||
#~ msgstr "Sie arbeiten gerade als "
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user