13_EcoAccount_funding #22

Merged
mpeltriaux merged 3 commits from 13_EcoAccount_funding into master 2021-09-20 13:16:16 +02:00
5 changed files with 60 additions and 15 deletions
Showing only changes of commit 251f88526e - Show all commits

View File

@ -15,7 +15,8 @@ from django.db.models import Sum, QuerySet
from django.utils.translation import gettext_lazy as _
from codelist.models import KonovaCode
from codelist.settings import CODELIST_COMPENSATION_ACTION_ID, CODELIST_BIOTOPES_ID
from codelist.settings import CODELIST_COMPENSATION_ACTION_ID, CODELIST_BIOTOPES_ID, \
CODELIST_COMPENSATION_COMBINATION_ID
from intervention.models import Intervention, ResponsibilityData
from konova.models import BaseObject, BaseResource, Geometry, UuidModel, AbstractDocument, \
generate_document_file_upload_path
@ -138,6 +139,18 @@ class AbstractCompensation(BaseObject):
after_states = models.ManyToManyField(CompensationState, blank=True, related_name='+', help_text="Refers to 'Zielzustand Biotop'")
actions = models.ManyToManyField(CompensationAction, blank=True, help_text="Refers to 'Maßnahmen'")
fundings = models.ManyToManyField(
KonovaCode,
null=True,
blank=True,
limit_choices_to={
"code_lists__in": [CODELIST_COMPENSATION_COMBINATION_ID],
"is_selectable": True,
"is_archived": False,
},
help_text="List of funding project codes",
)
deadlines = models.ManyToManyField("konova.Deadline", blank=True, related_name="+")
geometry = models.ForeignKey(Geometry, null=True, blank=True, on_delete=models.SET_NULL)

View File

@ -66,6 +66,19 @@
{% endif %}
</td>
</tr>
<tr>
<th scope="row">{% trans 'Funded by' %}</th>
<td class="align-middle">
{% for funding in obj.fundings.all %}
<div class="badge badge-pill rlp-r-outline">
{{ funding.short_name}}
</div>
<br>
{% empty %}
None
{% endfor %}
</td>
</tr>
<tr>
<th scope="row">{% trans 'Last modified' %}</th>
<td class="align-middle">

View File

@ -65,6 +65,19 @@
<th scope="row">{% trans 'Intervention handler' %}</th>
<td class="align-middle">{{obj.responsible.handler|default_if_none:""}}</td>
</tr>
<tr>
<th scope="row">{% trans 'Funded by' %}</th>
<td class="align-middle">
{% for funding in obj.fundings.all %}
<div class="badge badge-pill rlp-r-outline">
{{ funding.short_name}}
</div>
<br>
{% empty %}
{% trans 'None' %}
{% endfor %}
</td>
</tr>
<tr>
<th scope="row">{% trans 'Last modified' %}</th>
<td class="align-middle">

Binary file not shown.

View File

@ -16,7 +16,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-09-20 08:55+0200\n"
"POT-Creation-Date: 2021-09-20 12:44+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"
@ -217,43 +217,44 @@ msgstr "Geben Sie die Daten der neuen Maßnahme ein"
msgid "Added action"
msgstr "Maßnahme hinzugefügt"
#: compensation/models.py:77
#: compensation/models.py:78
msgid "cm"
msgstr ""
#: compensation/models.py:78
#: compensation/models.py:79
msgid "m"
msgstr ""
#: compensation/models.py:79
#: compensation/models.py:80
msgid "km"
msgstr ""
#: compensation/models.py:80
#: compensation/models.py:81
msgid "m²"
msgstr ""
#: compensation/models.py:81
#: compensation/models.py:82
msgid "ha"
msgstr ""
#: compensation/models.py:82
#: compensation/models.py:83
msgid "Pieces"
msgstr "Stück"
#: compensation/models.py:299
#: compensation/models.py:312
msgid ""
"Deductable surface can not be larger than existing surfaces in after states"
msgstr ""
"Die abbuchbare Fläche darf die Gesamtfläche der Zielzustände nicht überschreiten"
"Die abbuchbare Fläche darf die Gesamtfläche der Zielzustände nicht "
"überschreiten"
#: compensation/models.py:306
#: compensation/models.py:319
msgid ""
"Deductable surface can not be smaller than the sum of already existing "
"deductions. Please contact the responsible users for the deductions!"
msgstr ""
"Es wurde bereits mehr Fläche abgebucht, als Sie nun als abbuchbar einstellen wollen. "
"Kontaktieren Sie die für die Abbuchungen verantwortlichen Nutzer!"
"Es wurde bereits mehr Fläche abgebucht, als Sie nun als abbuchbar einstellen "
"wollen. Kontaktieren Sie die für die Abbuchungen verantwortlichen Nutzer!"
#: compensation/tables.py:24 compensation/tables.py:164 ema/tables.py:28
#: intervention/forms.py:30 intervention/tables.py:23
@ -566,14 +567,14 @@ msgid "Recorded on "
msgstr "Verzeichnet am"
#: compensation/templates/compensation/detail/compensation/view.html:71
#: compensation/templates/compensation/detail/eco_account/view.html:70
#: compensation/templates/compensation/detail/eco_account/view.html:83
#: ema/templates/ema/detail/view.html:54
#: intervention/templates/intervention/detail/view.html:103
msgid "Last modified"
msgstr "Zuletzt bearbeitet"
#: compensation/templates/compensation/detail/compensation/view.html:79
#: compensation/templates/compensation/detail/eco_account/view.html:78
#: compensation/templates/compensation/detail/eco_account/view.html:91
#: ema/templates/ema/detail/view.html:69 intervention/forms.py:255
#: intervention/templates/intervention/detail/view.html:111
msgid "Shared with"
@ -652,6 +653,11 @@ msgstr "Aktenzeichen Naturschutzbehörde"
msgid "Intervention handler"
msgstr "Eingriffsverursacher"
#: compensation/templates/compensation/detail/eco_account/view.html:70
msgid "Funded by"
msgstr "Gefördert mit"
#: compensation/views/compensation_views.py:123
#: compensation/views/eco_account_views.py:190 ema/views.py:128
#: intervention/views.py:391