#26 Annual conservation report
* adds new templatetag default_if_zero in ksp_filters.py * adds/updates translations
This commit is contained in:
parent
92155fb742
commit
33de71d554
@ -1,4 +1,4 @@
|
||||
{% load i18n fontawesome_5 %}
|
||||
{% load i18n fontawesome_5 ksp_filters %}
|
||||
|
||||
<h3>{% trans 'Amount' %}</h3>
|
||||
<strong>
|
||||
@ -21,9 +21,9 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>{{report.intervention_report.queryset.count}}</td>
|
||||
<td>{{report.intervention_report.queryset_checked.count}}</td>
|
||||
<td>{{report.intervention_report.queryset_recorded.count}}</td>
|
||||
<td>{{report.intervention_report.queryset.count|default_if_zero:"-"}}</td>
|
||||
<td>{{report.intervention_report.queryset_checked.count|default_if_zero:"-"}}</td>
|
||||
<td>{{report.intervention_report.queryset_recorded.count|default_if_zero:"-"}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
@ -16,9 +16,9 @@
|
||||
<div class="card-body">
|
||||
{% include 'analysis/reports/includes/intervention/amount.html' %}
|
||||
<hr>
|
||||
{% include 'analysis/reports/includes/intervention/laws.html' %}
|
||||
<hr>
|
||||
{% include 'analysis/reports/includes/intervention/compensated_by.html' %}
|
||||
<hr>
|
||||
{% include 'analysis/reports/includes/intervention/laws.html' %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,4 +1,4 @@
|
||||
{% load i18n fontawesome_5 %}
|
||||
{% load i18n fontawesome_5 ksp_filters %}
|
||||
<h3>{% trans 'Compensated by' %}</h3>
|
||||
<div class="table-container scroll-300">
|
||||
<table class="table table-hover">
|
||||
@ -13,21 +13,21 @@
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>{% trans 'Compensation' %}</th>
|
||||
<td>{{report.intervention_report.compensation_sum}}</td>
|
||||
<td>{{report.intervention_report.compensation_sum_checked}}</td>
|
||||
<td>{{report.intervention_report.compensation_sum_recorded}}</td>
|
||||
<td>{{report.intervention_report.compensation_sum|default_if_zero:"-"}}</td>
|
||||
<td>{{report.intervention_report.compensation_sum_checked|default_if_zero:"-"}}</td>
|
||||
<td>{{report.intervention_report.compensation_sum_recorded|default_if_zero:"-"}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{% trans 'Payment' %}</th>
|
||||
<td>{{report.intervention_report.payment_sum}}</td>
|
||||
<td>{{report.intervention_report.payment_sum_checked}}</td>
|
||||
<td>{{report.intervention_report.payment_sum_recorded}}</td>
|
||||
<td>{{report.intervention_report.payment_sum|default_if_zero:"-"}}</td>
|
||||
<td>{{report.intervention_report.payment_sum_checked|default_if_zero:"-"}}</td>
|
||||
<td>{{report.intervention_report.payment_sum_recorded|default_if_zero:"-"}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{% trans 'Deductions' %}</th>
|
||||
<td>{{report.intervention_report.deduction_sum}}</td>
|
||||
<td>{{report.intervention_report.deduction_sum_checked}}</td>
|
||||
<td>{{report.intervention_report.deduction_sum_recorded}}</td>
|
||||
<td>{{report.intervention_report.deduction_sum|default_if_zero:"-"}}</td>
|
||||
<td>{{report.intervention_report.deduction_sum_checked|default_if_zero:"-"}}</td>
|
||||
<td>{{report.intervention_report.deduction_sum_recorded|default_if_zero:"-"}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
@ -1,4 +1,4 @@
|
||||
{% load i18n fontawesome_5 %}
|
||||
{% load i18n fontawesome_5 ksp_filters %}
|
||||
<h3>{% trans 'Law usage' %}</h3>
|
||||
<strong>
|
||||
{% blocktrans %}
|
||||
@ -34,16 +34,16 @@
|
||||
{{law.long_name}}
|
||||
</small>
|
||||
</td>
|
||||
<td>{{law.num_checked}}</td>
|
||||
<td>{{law.num_recorded}}</td>
|
||||
<td>{{law.num}}</td>
|
||||
<td>{{law.num_checked|default_if_zero:"-"}}</td>
|
||||
<td>{{law.num_recorded|default_if_zero:"-"}}</td>
|
||||
<td>{{law.num|default_if_zero:"-"}}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
<tr>
|
||||
<td><strong>{% trans 'Total' %}</strong></td>
|
||||
<td><strong>{{report.intervention_report.law_sum_checked}}</strong></td>
|
||||
<td><strong>{{report.intervention_report.law_sum_recorded}}</strong></td>
|
||||
<td><strong>{{report.intervention_report.law_sum}}</strong></td>
|
||||
<td><strong>{{report.intervention_report.law_sum_checked|default_if_zero:"-"}}</strong></td>
|
||||
<td><strong>{{report.intervention_report.law_sum_recorded|default_if_zero:"-"}}</strong></td>
|
||||
<td><strong>{{report.intervention_report.law_sum|default_if_zero:"-"}}</strong></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
@ -34,3 +34,19 @@ def bootstrap_cls(value):
|
||||
|
||||
"""
|
||||
return SVI_BOOTSTRAP_CLS_MAP.get(value, "")
|
||||
|
||||
|
||||
@register.filter("default_if_zero")
|
||||
def default_if_zero(val1, val2):
|
||||
""" Returns val2 if val1 is 0
|
||||
|
||||
Similar to default_if_none
|
||||
|
||||
Args:
|
||||
val1 (int): The numerical value
|
||||
val2 (str): The alternative
|
||||
|
||||
Returns:
|
||||
|
||||
"""
|
||||
return val1 if val1 > 0 else val2
|
||||
|
Binary file not shown.
@ -19,7 +19,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2021-10-18 14:59+0200\n"
|
||||
"POT-Creation-Date: 2021-10-19 08:40+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"
|
||||
@ -48,39 +48,54 @@ msgstr "Kompensationen"
|
||||
msgid "Eco-Accounts"
|
||||
msgstr "Ökokonten"
|
||||
|
||||
#: analysis/templates/analysis/reports/includes/card_intervention.html:10
|
||||
#: intervention/tables.py:66
|
||||
msgid "Interventions"
|
||||
msgstr "Eingriffe"
|
||||
#: analysis/templates/analysis/reports/includes/card_old_interventions.html:11
|
||||
msgid "Old interventions"
|
||||
msgstr "Altfälle"
|
||||
|
||||
#: analysis/templates/analysis/reports/includes/card_intervention.html:17
|
||||
msgid "Total interventions"
|
||||
#: analysis/templates/analysis/reports/includes/card_old_interventions.html:13
|
||||
msgid "Before"
|
||||
msgstr "Vor"
|
||||
|
||||
#: analysis/templates/analysis/reports/includes/intervention/amount.html:3
|
||||
#: compensation/forms/modalForms.py:351
|
||||
#: compensation/templates/compensation/detail/eco_account/includes/deductions.html:34
|
||||
#: intervention/templates/intervention/detail/includes/deductions.html:31
|
||||
msgid "Amount"
|
||||
msgstr "Menge"
|
||||
|
||||
#: analysis/templates/analysis/reports/includes/intervention/amount.html:5
|
||||
msgid ""
|
||||
"\n"
|
||||
" Checked = Has been checked by the registration office according to "
|
||||
"LKompVzVo\n"
|
||||
" "
|
||||
msgstr ""
|
||||
"\n"
|
||||
" Geprüft = Wurde von der zuständigen Zulassungsbehörde überprüft\n"
|
||||
" "
|
||||
|
||||
#: analysis/templates/analysis/reports/includes/intervention/amount.html:9
|
||||
msgid ""
|
||||
"\n"
|
||||
" Recorded = Has been checked and published by the conservation office\n"
|
||||
" "
|
||||
msgstr ""
|
||||
"\n"
|
||||
" Verzeichnet = Wurde von der Eintragungsstelle überprüft und veröffentlicht\n"
|
||||
" "
|
||||
|
||||
#: analysis/templates/analysis/reports/includes/intervention/amount.html:17
|
||||
#: analysis/templates/analysis/reports/includes/intervention/compensated_by.html:8
|
||||
#: analysis/templates/analysis/reports/includes/intervention/laws.html:23
|
||||
#: analysis/templates/analysis/reports/includes/intervention/laws.html:43
|
||||
#: konova/templates/konova/home.html:23 konova/templates/konova/home.html:61
|
||||
#: konova/templates/konova/home.html:100
|
||||
msgid "Total"
|
||||
msgstr "Insgesamt"
|
||||
|
||||
#: analysis/templates/analysis/reports/includes/card_intervention.html:22
|
||||
msgid "Amount total"
|
||||
msgstr "Anzahl insgesamt"
|
||||
|
||||
#: analysis/templates/analysis/reports/includes/card_intervention.html:26
|
||||
msgid "Amount checked"
|
||||
msgstr "Anzahl geprüft"
|
||||
|
||||
#: analysis/templates/analysis/reports/includes/card_intervention.html:30
|
||||
msgid "Amount recorded"
|
||||
msgstr "Anzahl verzeichnet"
|
||||
|
||||
#: analysis/templates/analysis/reports/includes/card_intervention.html:37
|
||||
msgid "Law usage"
|
||||
msgstr "Gesetzesanwendungen"
|
||||
|
||||
#: analysis/templates/analysis/reports/includes/card_intervention.html:43
|
||||
#: intervention/forms/forms.py:68
|
||||
#: intervention/templates/intervention/detail/view.html:39
|
||||
#: intervention/templates/intervention/report/report.html:20
|
||||
msgid "Law"
|
||||
msgstr "Gesetz"
|
||||
|
||||
#: analysis/templates/analysis/reports/includes/card_intervention.html:46
|
||||
#: analysis/templates/analysis/reports/includes/intervention/amount.html:18
|
||||
#: analysis/templates/analysis/reports/includes/intervention/compensated_by.html:9
|
||||
#: analysis/templates/analysis/reports/includes/intervention/laws.html:17
|
||||
#: compensation/tables.py:35
|
||||
#: compensation/templates/compensation/detail/compensation/view.html:43
|
||||
#: intervention/tables.py:33
|
||||
@ -88,7 +103,9 @@ msgstr "Gesetz"
|
||||
msgid "Checked"
|
||||
msgstr "Geprüft"
|
||||
|
||||
#: analysis/templates/analysis/reports/includes/card_intervention.html:49
|
||||
#: analysis/templates/analysis/reports/includes/intervention/amount.html:19
|
||||
#: analysis/templates/analysis/reports/includes/intervention/compensated_by.html:10
|
||||
#: analysis/templates/analysis/reports/includes/intervention/laws.html:20
|
||||
#: compensation/tables.py:41 compensation/tables.py:181
|
||||
#: compensation/templates/compensation/detail/compensation/view.html:57
|
||||
#: compensation/templates/compensation/detail/eco_account/includes/deductions.html:31
|
||||
@ -99,29 +116,58 @@ msgstr "Geprüft"
|
||||
msgid "Recorded"
|
||||
msgstr "Verzeichnet"
|
||||
|
||||
#: analysis/templates/analysis/reports/includes/card_intervention.html:52
|
||||
#: analysis/templates/analysis/reports/includes/card_intervention.html:72
|
||||
#: konova/templates/konova/home.html:23 konova/templates/konova/home.html:61
|
||||
#: konova/templates/konova/home.html:100
|
||||
msgid "Total"
|
||||
msgstr "Insgesamt"
|
||||
#: analysis/templates/analysis/reports/includes/intervention/card_intervention.html:10
|
||||
#: intervention/tables.py:66
|
||||
msgid "Interventions"
|
||||
msgstr "Eingriffe"
|
||||
|
||||
#: analysis/templates/analysis/reports/includes/card_intervention.html:81
|
||||
#: analysis/templates/analysis/reports/includes/intervention/compensated_by.html:2
|
||||
msgid "Compensated by"
|
||||
msgstr "Kompensiert durch"
|
||||
|
||||
#: analysis/templates/analysis/reports/includes/intervention/compensated_by.html:7
|
||||
msgid "Compensation type"
|
||||
msgstr "Kompensationsart"
|
||||
|
||||
#: analysis/templates/analysis/reports/includes/intervention/compensated_by.html:15
|
||||
#: compensation/tables.py:84
|
||||
#: compensation/templates/compensation/detail/compensation/view.html:19
|
||||
#: konova/templates/konova/home.html:49 templates/navbars/navbar.html:28
|
||||
msgid "Compensation"
|
||||
msgstr "Kompensation"
|
||||
|
||||
#: analysis/templates/analysis/reports/includes/intervention/compensated_by.html:21
|
||||
#: compensation/forms/modalForms.py:75
|
||||
msgid "Payment"
|
||||
msgstr "Zahlung"
|
||||
|
||||
#: analysis/templates/analysis/reports/includes/intervention/compensated_by.html:27
|
||||
msgid "Deductions"
|
||||
msgstr "Abbuchungen"
|
||||
|
||||
#: analysis/templates/analysis/reports/includes/intervention/laws.html:2
|
||||
msgid "Law usage"
|
||||
msgstr "Gesetzesanwendungen"
|
||||
|
||||
#: analysis/templates/analysis/reports/includes/intervention/laws.html:4
|
||||
msgid ""
|
||||
"\n"
|
||||
" Please note: One intervention can be based on "
|
||||
"multiple laws. This table therefore does not\n"
|
||||
" count\n"
|
||||
" "
|
||||
" Please note: One intervention can be based on multiple laws. This table "
|
||||
"therefore does not\n"
|
||||
" count\n"
|
||||
" "
|
||||
msgstr ""
|
||||
"\n"
|
||||
" Beachten Sie: Ein Eingriff kann mehreren Gesetzen zugeordnet worden sein. Diese Tabelle zählt daher nicht die Eingriffe selbst "
|
||||
", sondern wie oft ein Gesetz Anwendung fand.\n"
|
||||
" "
|
||||
|
||||
#: analysis/templates/analysis/reports/includes/card_old_interventions.html:11
|
||||
msgid "Old interventions"
|
||||
msgstr "Altfälle"
|
||||
|
||||
#: analysis/templates/analysis/reports/includes/card_old_interventions.html:13
|
||||
msgid "Before"
|
||||
msgstr "Vor"
|
||||
#: analysis/templates/analysis/reports/includes/intervention/laws.html:14
|
||||
#: intervention/forms/forms.py:68
|
||||
#: intervention/templates/intervention/detail/view.html:39
|
||||
#: intervention/templates/intervention/report/report.html:20
|
||||
msgid "Law"
|
||||
msgstr "Gesetz"
|
||||
|
||||
#: analysis/templates/analysis/reports/index.html:6
|
||||
#: templates/navbars/navbar.html:46
|
||||
@ -306,10 +352,6 @@ msgstr "Zahlung wird an diesem Datum erwartet"
|
||||
msgid "Additional comment, maximum {} letters"
|
||||
msgstr "Zusätzlicher Kommentar, maximal {} Zeichen"
|
||||
|
||||
#: compensation/forms/modalForms.py:75
|
||||
msgid "Payment"
|
||||
msgstr "Zahlung"
|
||||
|
||||
#: compensation/forms/modalForms.py:76
|
||||
msgid "Add a payment for intervention '{}'"
|
||||
msgstr "Neue Ersatzzahlung zu Eingriff '{}' hinzufügen"
|
||||
@ -435,12 +477,6 @@ msgstr "Einheit"
|
||||
msgid "Select the unit"
|
||||
msgstr "Einheit wählen"
|
||||
|
||||
#: compensation/forms/modalForms.py:351
|
||||
#: compensation/templates/compensation/detail/eco_account/includes/deductions.html:34
|
||||
#: intervention/templates/intervention/detail/includes/deductions.html:31
|
||||
msgid "Amount"
|
||||
msgstr "Menge"
|
||||
|
||||
#: compensation/forms/modalForms.py:354
|
||||
msgid "Insert the amount"
|
||||
msgstr "Menge eingeben"
|
||||
@ -511,12 +547,6 @@ msgstr "Zuletzt bearbeitet"
|
||||
msgid "Open {}"
|
||||
msgstr "Öffne {}"
|
||||
|
||||
#: compensation/tables.py:84
|
||||
#: compensation/templates/compensation/detail/compensation/view.html:19
|
||||
#: konova/templates/konova/home.html:49 templates/navbars/navbar.html:28
|
||||
msgid "Compensation"
|
||||
msgstr "Kompensation"
|
||||
|
||||
#: compensation/tables.py:105 intervention/tables.py:107
|
||||
msgid "Not checked yet"
|
||||
msgstr "Noch nicht geprüft"
|
||||
@ -781,7 +811,7 @@ msgstr "Gefördert mit"
|
||||
#: intervention/templates/intervention/report/report.html:57
|
||||
#: intervention/templates/intervention/report/report.html:78
|
||||
msgid "None"
|
||||
msgstr ""
|
||||
msgstr "-"
|
||||
|
||||
#: compensation/templates/compensation/detail/compensation/view.html:84
|
||||
#: compensation/templates/compensation/detail/eco_account/view.html:83
|
||||
@ -834,8 +864,6 @@ msgid "Created"
|
||||
msgstr "Erstellt"
|
||||
|
||||
#: compensation/templates/compensation/detail/eco_account/includes/deductions.html:54
|
||||
#, fuzzy
|
||||
#| msgid "Recorded on "
|
||||
msgid "Recorded on"
|
||||
msgstr "Verzeichnet am"
|
||||
|
||||
@ -3001,6 +3029,18 @@ msgstr ""
|
||||
msgid "A fontawesome icon field"
|
||||
msgstr ""
|
||||
|
||||
#~ msgid "Total interventions"
|
||||
#~ msgstr "Insgesamt"
|
||||
|
||||
#~ msgid "Amount total"
|
||||
#~ msgstr "Anzahl insgesamt"
|
||||
|
||||
#~ msgid "Amount checked"
|
||||
#~ msgstr "Anzahl geprüft"
|
||||
|
||||
#~ msgid "Amount recorded"
|
||||
#~ msgstr "Anzahl verzeichnet"
|
||||
|
||||
#~ msgid "Funding by..."
|
||||
#~ msgstr "Gefördert mit..."
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user