#25 Public reports

* adds public report rendering for intervention model
* adds new routes for report
* adds new public_base.html and public_navbar.html
* adds lookup table for zoom levels for lanis link generating
* moves qr code generating into utils/generators.py
This commit is contained in:
mpeltriaux 2021-10-13 14:03:34 +02:00
parent af0fe655b3
commit ac17d953c6
14 changed files with 367 additions and 54 deletions

View File

@ -18,7 +18,7 @@ from codelist.settings import CODELIST_REGISTRATION_OFFICE_ID, CODELIST_CONSERVA
CODELIST_PROCESS_TYPE_ID CODELIST_PROCESS_TYPE_ID
from konova.models import BaseObject, Geometry, UuidModel, BaseResource, AbstractDocument, \ from konova.models import BaseObject, Geometry, UuidModel, BaseResource, AbstractDocument, \
generate_document_file_upload_path generate_document_file_upload_path
from konova.settings import DEFAULT_SRID_RLP, LANIS_LINK_TEMPLATE from konova.settings import DEFAULT_SRID_RLP, LANIS_LINK_TEMPLATE, LANIS_ZOOM_LUT
from konova.sub_settings.django_settings import DEFAULT_DATE_TIME_FORMAT from konova.sub_settings.django_settings import DEFAULT_DATE_TIME_FORMAT
from konova.utils import generators from konova.utils import generators
from user.models import UserActionLogEntry from user.models import UserActionLogEntry
@ -361,7 +361,13 @@ class Intervention(BaseObject):
geom = self.geometry.geom.transform(DEFAULT_SRID_RLP, clone=True) geom = self.geometry.geom.transform(DEFAULT_SRID_RLP, clone=True)
x = geom.centroid.x x = geom.centroid.x
y = geom.centroid.y y = geom.centroid.y
zoom_lvl = 16 area = int(geom.envelope.area)
z_l = 16
for k_area, v_zoom in LANIS_ZOOM_LUT.items():
if k_area < area:
z_l = v_zoom
break
zoom_lvl = z_l
except AttributeError: except AttributeError:
# If no geometry has been added, yet. # If no geometry has been added, yet.
x = 1 x = 1

View File

@ -6,7 +6,7 @@
LANIS LANIS
</button> </button>
</a> </a>
<a href="{% url 'home' %}" class="mr-2"> <a href="{% url 'intervention:report' obj.id %}" class="mr-2" target="_blank">
<button class="btn btn-default" title="{% trans 'Public report' %}"> <button class="btn btn-default" title="{% trans 'Public report' %}">
{% fa5_icon 'file-alt' %} {% fa5_icon 'file-alt' %}
</button> </button>

View File

@ -0,0 +1,119 @@
{% extends 'public_base.html' %}
{% load i18n fontawesome_5 humanize %}
{% block body %}
<div class="row">
<div class="col-sm-12 col-md-12 col-lg-6">
<h3>{{obj.identifier}}</h3>
<div class="table-container">
<table class="table table-hover">
<tr>
<th class="w-25" scope="row">{% trans 'Title' %}</th>
<td class="align-middle">{{obj.title|default_if_none:""}}</td>
</tr>
<tr>
<th scope="row">{% trans 'Process type' %}</th>
<td class="align-middle">{{obj.legal.process_type|default_if_none:""}}</td>
</tr>
<tr>
<th scope="row">{% trans 'Law' %}</th>
<td class="align-middle">
{% for law in obj.legal.laws.all %}
<div class="badge pill-badge rlp-r-outline">{{law.short_name}} - {{law.long_name}}</div>
<br>
{% endfor %}
</td>
</tr>
<tr>
<th scope="row">{% trans 'Registration office' %}</th>
<td class="align-middle">{{obj.responsible.registration_office.str_as_office|default_if_none:""}}</td>
</tr>
<tr>
<th scope="row">{% trans 'Registration office file number' %}</th>
<td class="align-middle">{{obj.responsible.registration_file_number|default_if_none:""}}</td>
</tr>
<tr>
<th scope="row">{% trans 'Conservation office' %}</th>
<td class="align-middle">{{obj.responsible.conservation_office.str_as_office|default_if_none:""}}</td>
</tr>
<tr>
<th scope="row">{% trans 'Conservation office file number' %}</th>
<td class="align-middle">{{obj.responsible.conservation_file_number|default_if_none:""}}</td>
</tr>
<tr>
<th scope="row">{% trans 'Intervention handler' %}</th>
<td class="align-middle">{{obj.responsible.handler|default_if_none:""}}</td>
</tr>
<tr>
<th scope="row">{% trans 'Compensations' %}</th>
<td class="align-middle">
{% for comp in obj.compensations.all %}
<a href="{% url 'compensation:detail' comp.id %}" target="_blank">
{{comp.identifier}}
</a>
<br>
{% empty %}
{% trans 'None' %}
{% endfor %}
</td>
</tr>
<tr>
<th scope="row">{% trans 'Deductions of eco-accounts' %}</th>
<td class="align-middle">
{% for deduction in deductions %}
<a href="{% url 'compensation:acc-detail' deduction.account.id %}">
{{deduction.account.identifier}}
</a>
<br>
{% endfor %}
</td>
</tr>
<tr>
<th scope="row">{% trans 'Payments' %}</th>
<td class="align-middle">
{% if obj.payments.all %}
{% trans 'Exist' %}
{% else %}
{% trans 'None' %}
{% endif %}
</td>
</tr>
<tr>
<th scope="row">{% trans 'Registration date' %}</th>
<td class="align-middle">{{obj.legal.registration_date|default_if_none:""}}</td>
</tr>
<tr>
<th scope="row">{% trans 'Binding on' %}</th>
<td class="align-middle">{{obj.legal.binding_date|default_if_none:""}}</td>
</tr>
<tr>
<th scope="row">{% trans 'Last modified' %}</th>
<td class="align-middle">
{{obj.created.timestamp|default_if_none:""|naturalday}}
</td>
</tr>
</table>
</div>
</div>
<div class="col-sm-12 col-md-12 col-lg-6">
<div class="row">
{% include 'map/geom_form.html' %}
</div>
<div class="row">
{% include 'intervention/detail/includes/comment.html' %}
</div>
<div class="row">
<div class="col-sm-6 col-md-6 col-lg-6">
<h4>{% trans 'Open in browser' %}</h4>
{{ qrcode|safe }}
</div>
<div class="col-sm-6 col-md-6 col-lg-6">
<h4>{% trans 'View in LANIS' %}</h4>
{{ qrcode_lanis|safe }}
</div>
</div>
</div>
</div>
{% endblock %}

View File

@ -9,7 +9,7 @@ from django.urls import path
from intervention.views import index_view, new_view, detail_view, edit_view, remove_view, new_document_view, share_view, \ from intervention.views import index_view, new_view, detail_view, edit_view, remove_view, new_document_view, share_view, \
create_share_view, remove_revocation_view, new_revocation_view, run_check_view, log_view, new_deduction_view, \ create_share_view, remove_revocation_view, new_revocation_view, run_check_view, log_view, new_deduction_view, \
record_view, remove_document_view, get_document_view, get_revocation_view, new_id_view record_view, remove_document_view, get_document_view, get_revocation_view, new_id_view, report_view
app_name = "intervention" app_name = "intervention"
urlpatterns = [ urlpatterns = [
@ -24,6 +24,7 @@ urlpatterns = [
path('<id>/share', create_share_view, name='share-create'), path('<id>/share', create_share_view, name='share-create'),
path('<id>/check', run_check_view, name='run-check'), path('<id>/check', run_check_view, name='run-check'),
path('<id>/record', record_view, name='record'), path('<id>/record', record_view, name='record'),
path('<id>/report', report_view, name='report'),
# Documents # Documents
path('<id>/document/new/', new_document_view, name='new-doc'), path('<id>/document/new/', new_document_view, name='new-doc'),

View File

@ -1,7 +1,7 @@
from django.contrib.auth.decorators import login_required from django.contrib.auth.decorators import login_required
from django.utils.translation import gettext_lazy as _ from django.utils.translation import gettext_lazy as _
from django.http import HttpRequest, JsonResponse from django.http import HttpRequest, JsonResponse
from django.shortcuts import render, get_object_or_404 from django.shortcuts import render
from intervention.forms.forms import NewInterventionForm, EditInterventionForm from intervention.forms.forms import NewInterventionForm, EditInterventionForm
from intervention.forms.modalForms import ShareInterventionModalForm, NewRevocationModalForm, \ from intervention.forms.modalForms import ShareInterventionModalForm, NewRevocationModalForm, \
@ -13,6 +13,7 @@ from konova.decorators import *
from konova.forms import SimpleGeomForm, NewDocumentForm, RemoveModalForm, RecordModalForm from konova.forms import SimpleGeomForm, NewDocumentForm, RemoveModalForm, RecordModalForm
from konova.sub_settings.django_settings import DEFAULT_DATE_FORMAT from konova.sub_settings.django_settings import DEFAULT_DATE_FORMAT
from konova.utils.documents import remove_document, get_document from konova.utils.documents import remove_document, get_document
from konova.utils.generators import generate_qr_code
from konova.utils.message_templates import INTERVENTION_INVALID, FORM_INVALID, IDENTIFIER_REPLACED from konova.utils.message_templates import INTERVENTION_INVALID, FORM_INVALID, IDENTIFIER_REPLACED
from konova.utils.user_checks import in_group from konova.utils.user_checks import in_group
@ -470,4 +471,43 @@ def record_view(request: HttpRequest, id: str):
request, request,
msg_succ, msg_succ,
msg_error=_("There are errors on this intervention:") msg_error=_("There are errors on this intervention:")
) )
def report_view(request:HttpRequest, id: str):
""" Renders the public report view
Args:
request (HttpRequest): The incoming request
id (str): The id of the intervention
Returns:
"""
template = "intervention/report/report.html"
intervention = get_object_or_404(Intervention, id=id)
# If intervention is not recorded (yet or currently) we need to render another template without any data
if not intervention.recorded:
template = "report/unavailable.html"
return render(request, template, {})
distinct_deductions = intervention.deductions.all().distinct(
"account"
)
qrcode_img = generate_qr_code(
request.build_absolute_uri(reverse("intervention:report", args=(id,))),
10
)
qrcode_img_lanis = generate_qr_code(
intervention.get_LANIS_link(),
7
)
context = {
"obj": intervention,
"deductions": distinct_deductions,
"qrcode": qrcode_img,
"qrcode_lanis": qrcode_img_lanis,
}
context = BaseContext(request, context).context
return render(request, template, context)

View File

@ -69,3 +69,14 @@ ETS_GROUP = "Conservation office"
# Needed to redirect to LANIS # Needed to redirect to LANIS
## Values to be inserted are [zoom_level, x_coord, y_coord] ## Values to be inserted are [zoom_level, x_coord, y_coord]
LANIS_LINK_TEMPLATE = "https://geodaten.naturschutz.rlp.de/kartendienste_naturschutz/index.php?lang=de&zl={}&x={}&y={}&bl=tk_rlp_tms_grau&bo=1&lo=0.8,0.8,0.8,0.6,0.8,0.8,0.8,0.8,0.8&layers=eiv_f,eiv_l,eiv_p,kom_f,kom_l,kom_p,oek_f,ema_f,mae&service=kartendienste_naturschutz" LANIS_LINK_TEMPLATE = "https://geodaten.naturschutz.rlp.de/kartendienste_naturschutz/index.php?lang=de&zl={}&x={}&y={}&bl=tk_rlp_tms_grau&bo=1&lo=0.8,0.8,0.8,0.6,0.8,0.8,0.8,0.8,0.8&layers=eiv_f,eiv_l,eiv_p,kom_f,kom_l,kom_p,oek_f,ema_f,mae&service=kartendienste_naturschutz"
## This look up table (LUT) defines different zoom levels on the size of the calculate area of a geometry.
LANIS_ZOOM_LUT = {
1000000000: 6,
100000000: 10,
10000000: 17,
1000000: 20,
100000: 25,
10000: 28,
1000: 30,
500: 31,
}

View File

@ -7,6 +7,10 @@ Created on: 09.11.20
""" """
import random import random
import string import string
import qrcode
import qrcode.image.svg
from io import BytesIO
def generate_random_string(length: int, use_numbers: bool = False, use_letters_lc: bool = False, use_letters_uc: bool = False) -> str: def generate_random_string(length: int, use_numbers: bool = False, use_letters_lc: bool = False, use_letters_uc: bool = False) -> str:
@ -24,3 +28,24 @@ def generate_random_string(length: int, use_numbers: bool = False, use_letters_l
elements = "".join(elements) elements = "".join(elements)
ret_val = "".join(random.choice(elements) for i in range(length)) ret_val = "".join(random.choice(elements) for i in range(length))
return ret_val return ret_val
def generate_qr_code(content: str, size: int = 20) -> str:
""" Generates a qr code from given content
Args:
content (str): The content for the qr code
size (int): The image size
Returns:
qrcode_svg (str): The qr code as svg
"""
qrcode_factory = qrcode.image.svg.SvgImage
qrcode_img = qrcode.make(
content,
image_factory=qrcode_factory,
box_size=size
)
stream = BytesIO()
qrcode_img.save(stream)
return stream.getvalue().decode()

Binary file not shown.

View File

@ -19,7 +19,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-10-13 08:46+0200\n" "POT-Creation-Date: 2021-10-13 13:55+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -55,7 +55,9 @@ msgstr "Automatisch generiert"
#: intervention/tables.py:28 #: intervention/tables.py:28
#: intervention/templates/intervention/detail/includes/compensations.html:33 #: intervention/templates/intervention/detail/includes/compensations.html:33
#: intervention/templates/intervention/detail/includes/documents.html:28 #: intervention/templates/intervention/detail/includes/documents.html:28
#: intervention/templates/intervention/detail/view.html:31 konova/forms.py:336 #: intervention/templates/intervention/detail/view.html:31
#: intervention/templates/intervention/report/report.html:11
#: konova/forms.py:336
msgid "Title" msgid "Title"
msgstr "Bezeichnung" msgstr "Bezeichnung"
@ -112,6 +114,7 @@ msgstr "Zusätzlicher Kommentar"
#: compensation/templates/compensation/detail/eco_account/view.html:58 #: compensation/templates/compensation/detail/eco_account/view.html:58
#: ema/templates/ema/detail/view.html:42 intervention/forms/forms.py:101 #: ema/templates/ema/detail/view.html:42 intervention/forms/forms.py:101
#: intervention/templates/intervention/detail/view.html:56 #: intervention/templates/intervention/detail/view.html:56
#: intervention/templates/intervention/report/report.html:36
msgid "Conservation office" msgid "Conservation office"
msgstr "Eintragungsstelle" msgstr "Eintragungsstelle"
@ -123,6 +126,7 @@ msgstr "Verantwortliche Stelle"
#: compensation/templates/compensation/detail/eco_account/view.html:62 #: compensation/templates/compensation/detail/eco_account/view.html:62
#: ema/templates/ema/detail/view.html:46 intervention/forms/forms.py:129 #: ema/templates/ema/detail/view.html:46 intervention/forms/forms.py:129
#: intervention/templates/intervention/detail/view.html:60 #: intervention/templates/intervention/detail/view.html:60
#: intervention/templates/intervention/report/report.html:40
msgid "Conservation office file number" msgid "Conservation office file number"
msgstr "Aktenzeichen Eintragungsstelle" msgstr "Aktenzeichen Eintragungsstelle"
@ -373,14 +377,14 @@ msgstr ""
msgid "Pieces" msgid "Pieces"
msgstr "Stück" msgstr "Stück"
#: compensation/models.py:312 #: compensation/models.py:311
msgid "" msgid ""
"Deductable surface can not be larger than existing surfaces in after states" "Deductable surface can not be larger than existing surfaces in after states"
msgstr "" msgstr ""
"Die abbuchbare Fläche darf die Gesamtfläche der Zielzustände nicht " "Die abbuchbare Fläche darf die Gesamtfläche der Zielzustände nicht "
"überschreiten" "überschreiten"
#: compensation/models.py:319 #: compensation/models.py:318
msgid "" msgid ""
"Deductable surface can not be smaller than the sum of already existing " "Deductable surface can not be smaller than the sum of already existing "
"deductions. Please contact the responsible users for the deductions!" "deductions. Please contact the responsible users for the deductions!"
@ -417,6 +421,7 @@ msgstr "Zuletzt bearbeitet"
#: compensation/tables.py:62 #: compensation/tables.py:62
#: intervention/templates/intervention/detail/includes/compensations.html:8 #: intervention/templates/intervention/detail/includes/compensations.html:8
#: intervention/templates/intervention/report/report.html:48
msgid "Compensations" msgid "Compensations"
msgstr "Kompensationen" msgstr "Kompensationen"
@ -427,7 +432,7 @@ msgstr "Öffne {}"
#: compensation/tables.py:84 #: compensation/tables.py:84
#: compensation/templates/compensation/detail/compensation/view.html:19 #: compensation/templates/compensation/detail/compensation/view.html:19
#: konova/templates/konova/home.html:49 templates/navbar.html:28 #: konova/templates/konova/home.html:49 templates/navbars/navbar.html:28
msgid "Compensation" msgid "Compensation"
msgstr "Kompensation" msgstr "Kompensation"
@ -443,13 +448,13 @@ msgstr "Am {} von {} geprüft worden"
#: compensation/templates/compensation/detail/compensation/view.html:60 #: compensation/templates/compensation/detail/compensation/view.html:60
#: compensation/templates/compensation/detail/eco_account/view.html:47 #: compensation/templates/compensation/detail/eco_account/view.html:47
#: ema/tables.py:101 ema/templates/ema/detail/view.html:31 #: ema/tables.py:101 ema/templates/ema/detail/view.html:31
#: intervention/models.py:379 intervention/tables.py:131 #: intervention/models.py:385 intervention/tables.py:131
#: intervention/templates/intervention/detail/view.html:85 #: intervention/templates/intervention/detail/view.html:85
msgid "Not recorded yet" msgid "Not recorded yet"
msgstr "Noch nicht verzeichnet" msgstr "Noch nicht verzeichnet"
#: compensation/tables.py:134 compensation/tables.py:263 ema/tables.py:106 #: compensation/tables.py:134 compensation/tables.py:263 ema/tables.py:106
#: intervention/models.py:384 intervention/tables.py:136 #: intervention/models.py:390 intervention/tables.py:136
msgid "Recorded on {} by {}" msgid "Recorded on {} by {}"
msgstr "Am {} von {} verzeichnet worden" msgstr "Am {} von {} verzeichnet worden"
@ -476,7 +481,7 @@ msgstr "Ökokonten"
#: compensation/tables.py:225 #: compensation/tables.py:225
#: compensation/templates/compensation/detail/eco_account/view.html:19 #: compensation/templates/compensation/detail/eco_account/view.html:19
#: intervention/forms/modalForms.py:258 intervention/forms/modalForms.py:265 #: intervention/forms/modalForms.py:258 intervention/forms/modalForms.py:265
#: konova/templates/konova/home.html:88 templates/navbar.html:34 #: konova/templates/konova/home.html:88 templates/navbars/navbar.html:34
msgid "Eco-account" msgid "Eco-account"
msgstr "Ökokonto" msgstr "Ökokonto"
@ -683,6 +688,8 @@ msgstr "Gefördert mit"
#: compensation/templates/compensation/detail/compensation/view.html:79 #: 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:78
#: ema/templates/ema/detail/view.html:62 #: ema/templates/ema/detail/view.html:62
#: intervention/templates/intervention/report/report.html:56
#: intervention/templates/intervention/report/report.html:77
msgid "None" msgid "None"
msgstr "" msgstr ""
@ -690,6 +697,7 @@ msgstr ""
#: compensation/templates/compensation/detail/eco_account/view.html:83 #: compensation/templates/compensation/detail/eco_account/view.html:83
#: ema/templates/ema/detail/view.html:67 #: ema/templates/ema/detail/view.html:67
#: intervention/templates/intervention/detail/view.html:108 #: intervention/templates/intervention/detail/view.html:108
#: intervention/templates/intervention/report/report.html:90
msgid "Last modified" msgid "Last modified"
msgstr "Zuletzt bearbeitet" msgstr "Zuletzt bearbeitet"
@ -762,6 +770,7 @@ msgstr "Fehlt"
#: compensation/templates/compensation/detail/eco_account/view.html:66 #: compensation/templates/compensation/detail/eco_account/view.html:66
#: ema/templates/ema/detail/view.html:50 intervention/forms/forms.py:141 #: ema/templates/ema/detail/view.html:50 intervention/forms/forms.py:141
#: intervention/templates/intervention/detail/view.html:64 #: intervention/templates/intervention/detail/view.html:64
#: intervention/templates/intervention/report/report.html:44
msgid "Intervention handler" msgid "Intervention handler"
msgstr "Eingriffsverursacher" msgstr "Eingriffsverursacher"
@ -775,7 +784,7 @@ msgstr "Kompensation {} bearbeitet"
#: compensation/views/compensation_views.py:210 #: compensation/views/compensation_views.py:210
#: compensation/views/eco_account_views.py:277 ema/views.py:174 #: compensation/views/eco_account_views.py:277 ema/views.py:174
#: intervention/views.py:427 #: intervention/views.py:428
msgid "Log" msgid "Log"
msgstr "Log" msgstr "Log"
@ -785,7 +794,7 @@ msgstr "Kompensation entfernt"
#: compensation/views/compensation_views.py:250 #: compensation/views/compensation_views.py:250
#: compensation/views/eco_account_views.py:376 ema/views.py:327 #: compensation/views/eco_account_views.py:376 ema/views.py:327
#: intervention/views.py:123 #: intervention/views.py:124
msgid "Document added" msgid "Document added"
msgstr "Dokument hinzugefügt" msgstr "Dokument hinzugefügt"
@ -829,16 +838,16 @@ msgid "Deduction removed"
msgstr "Abbuchung entfernt" msgstr "Abbuchung entfernt"
#: compensation/views/eco_account_views.py:297 ema/views.py:248 #: compensation/views/eco_account_views.py:297 ema/views.py:248
#: intervention/views.py:467 #: intervention/views.py:468
msgid "{} unrecorded" msgid "{} unrecorded"
msgstr "{} entzeichnet" msgstr "{} entzeichnet"
#: compensation/views/eco_account_views.py:297 ema/views.py:248 #: compensation/views/eco_account_views.py:297 ema/views.py:248
#: intervention/views.py:467 #: intervention/views.py:468
msgid "{} recorded" msgid "{} recorded"
msgstr "{} verzeichnet" msgstr "{} verzeichnet"
#: compensation/views/eco_account_views.py:433 intervention/views.py:449 #: compensation/views/eco_account_views.py:433 intervention/views.py:450
msgid "Deduction added" msgid "Deduction added"
msgstr "Abbuchung hinzugefügt" msgstr "Abbuchung hinzugefügt"
@ -858,7 +867,7 @@ msgstr "Neue EMA hinzufügen"
msgid "Edit EMA" msgid "Edit EMA"
msgstr "Bearbeite EMA" msgstr "Bearbeite EMA"
#: ema/tables.py:59 templates/navbar.html:43 #: ema/tables.py:59 templates/navbars/navbar.html:43
msgid "Payment funded compensations" msgid "Payment funded compensations"
msgstr "Ersatzzahlungsmaßnahmen (EMA)" msgstr "Ersatzzahlungsmaßnahmen (EMA)"
@ -870,7 +879,7 @@ msgstr ""
"Maßnahmen aus Ersatzzahlungen, die nach 2015 rechtskräftig wurden, werden " "Maßnahmen aus Ersatzzahlungen, die nach 2015 rechtskräftig wurden, werden "
"durch die Stiftung Natur und Umwelt verwaltet." "durch die Stiftung Natur und Umwelt verwaltet."
#: ema/tables.py:82 templates/navbar.html:43 #: ema/tables.py:82 templates/navbars/navbar.html:43
msgid "EMA" msgid "EMA"
msgstr "" msgstr ""
@ -912,11 +921,13 @@ msgstr "Bauvorhaben XY; Flur ABC"
#: intervention/forms/forms.py:51 #: intervention/forms/forms.py:51
#: intervention/templates/intervention/detail/view.html:35 #: intervention/templates/intervention/detail/view.html:35
#: intervention/templates/intervention/report/report.html:15
msgid "Process type" msgid "Process type"
msgstr "Verfahrenstyp" msgstr "Verfahrenstyp"
#: intervention/forms/forms.py:68 #: intervention/forms/forms.py:68
#: intervention/templates/intervention/detail/view.html:39 #: intervention/templates/intervention/detail/view.html:39
#: intervention/templates/intervention/report/report.html:19
msgid "Law" msgid "Law"
msgstr "Gesetz" msgstr "Gesetz"
@ -926,11 +937,13 @@ msgstr "Mehrfachauswahl möglich"
#: intervention/forms/forms.py:85 #: intervention/forms/forms.py:85
#: intervention/templates/intervention/detail/view.html:48 #: intervention/templates/intervention/detail/view.html:48
#: intervention/templates/intervention/report/report.html:28
msgid "Registration office" msgid "Registration office"
msgstr "Zulassungsbehörde" msgstr "Zulassungsbehörde"
#: intervention/forms/forms.py:117 #: intervention/forms/forms.py:117
#: intervention/templates/intervention/detail/view.html:52 #: intervention/templates/intervention/detail/view.html:52
#: intervention/templates/intervention/report/report.html:32
msgid "Registration office file number" msgid "Registration office file number"
msgstr "Aktenzeichen Zulassungsbehörde" msgstr "Aktenzeichen Zulassungsbehörde"
@ -944,11 +957,13 @@ msgstr "Wer führt den Eingriff durch"
#: intervention/forms/forms.py:154 #: intervention/forms/forms.py:154
#: intervention/templates/intervention/detail/view.html:96 #: intervention/templates/intervention/detail/view.html:96
#: intervention/templates/intervention/report/report.html:82
msgid "Registration date" msgid "Registration date"
msgstr "Datum Zulassung bzw. Satzungsbeschluss" msgstr "Datum Zulassung bzw. Satzungsbeschluss"
#: intervention/forms/forms.py:166 #: intervention/forms/forms.py:166
#: intervention/templates/intervention/detail/view.html:100 #: intervention/templates/intervention/detail/view.html:100
#: intervention/templates/intervention/report/report.html:86
msgid "Binding on" msgid "Binding on"
msgstr "Datum Bestandskraft" msgstr "Datum Bestandskraft"
@ -1027,7 +1042,7 @@ msgstr "Nur verzeichnete Ökokonten können für Abbuchungen verwendet werden."
#: intervention/forms/modalForms.py:285 intervention/forms/modalForms.py:292 #: intervention/forms/modalForms.py:285 intervention/forms/modalForms.py:292
#: intervention/tables.py:88 #: intervention/tables.py:88
#: intervention/templates/intervention/detail/view.html:19 #: intervention/templates/intervention/detail/view.html:19
#: konova/templates/konova/home.html:11 templates/navbar.html:22 #: konova/templates/konova/home.html:11 templates/navbars/navbar.html:22
msgid "Intervention" msgid "Intervention"
msgstr "Eingriff" msgstr "Eingriff"
@ -1127,6 +1142,7 @@ msgid "Eco-account not recorded! Deduction invalid!"
msgstr "Ökokonto nicht verzeichnet! Abbuchung ungültig!" msgstr "Ökokonto nicht verzeichnet! Abbuchung ungültig!"
#: intervention/templates/intervention/detail/includes/payments.html:8 #: intervention/templates/intervention/detail/includes/payments.html:8
#: intervention/templates/intervention/report/report.html:72
msgid "Payments" msgid "Payments"
msgstr "Ersatzzahlungen" msgstr "Ersatzzahlungen"
@ -1156,15 +1172,47 @@ msgstr "Widerspruch entfernen"
msgid "Exists" msgid "Exists"
msgstr "vorhanden" msgstr "vorhanden"
#: intervention/views.py:76 #: intervention/templates/intervention/report/report.html:61
msgid "Deductions of eco-accounts"
msgstr "Abbuchungen von Ökokonten"
#: intervention/templates/intervention/report/report.html:75
msgid "Exist"
msgstr "Vorhanden"
#: intervention/templates/intervention/report/report.html:107
msgid "Open in browser"
msgstr ""
#: intervention/templates/intervention/report/report.html:111
msgid "View in LANIS"
msgstr "In LANIS öffnen"
#: intervention/templates/intervention/report/unavailable.html:6
msgid "Unrecorded data"
msgstr "Daten nicht veröffentlicht"
#: intervention/templates/intervention/report/unavailable.html:9
msgid ""
"\n"
" The data you want to see is not recorded and might still be work "
"in progress. Please come back another time.\n"
" "
msgstr ""
"\n"
" Die Daten, die Sie einsehen möchten, sind in Bearbeitung und daher aktuell nicht öffentlich einsehbar. "
"Schauen Sie zu einem späteren Zeitpunkt wieder vorbei. \n"
" "
#: intervention/views.py:77
msgid "Intervention {} added" msgid "Intervention {} added"
msgstr "Eingriff {} hinzugefügt" msgstr "Eingriff {} hinzugefügt"
#: intervention/views.py:211 #: intervention/views.py:212
msgid "This intervention has a revocation from {}" msgid "This intervention has a revocation from {}"
msgstr "Es existiert ein Widerspruch vom {}" msgstr "Es existiert ein Widerspruch vom {}"
#: intervention/views.py:227 #: intervention/views.py:228
msgid "" msgid ""
"Remember: This data has not been shared with you, yet. This means you can " "Remember: This data has not been shared with you, yet. This means you can "
"only read but can not edit or perform any actions like running a check or " "only read but can not edit or perform any actions like running a check or "
@ -1174,43 +1222,43 @@ msgstr ""
"bedeutet, dass Sie nur lesenden Zugriff hierauf haben und weder bearbeiten, " "bedeutet, dass Sie nur lesenden Zugriff hierauf haben und weder bearbeiten, "
"noch Prüfungen durchführen oder verzeichnen können." "noch Prüfungen durchführen oder verzeichnen können."
#: intervention/views.py:254 #: intervention/views.py:255
msgid "Intervention {} edited" msgid "Intervention {} edited"
msgstr "Eingriff {} bearbeitet" msgstr "Eingriff {} bearbeitet"
#: intervention/views.py:286 #: intervention/views.py:287
msgid "{} removed" msgid "{} removed"
msgstr "{} entfernt" msgstr "{} entfernt"
#: intervention/views.py:307 #: intervention/views.py:308
msgid "Revocation removed" msgid "Revocation removed"
msgstr "Widerspruch entfernt" msgstr "Widerspruch entfernt"
#: intervention/views.py:333 #: intervention/views.py:334
msgid "{} has already been shared with you" msgid "{} has already been shared with you"
msgstr "{} wurde bereits für Sie freigegeben" msgstr "{} wurde bereits für Sie freigegeben"
#: intervention/views.py:338 #: intervention/views.py:339
msgid "{} has been shared with you" msgid "{} has been shared with you"
msgstr "{} ist nun für Sie freigegeben" msgstr "{} ist nun für Sie freigegeben"
#: intervention/views.py:345 #: intervention/views.py:346
msgid "Share link invalid" msgid "Share link invalid"
msgstr "Freigabelink ungültig" msgstr "Freigabelink ungültig"
#: intervention/views.py:366 #: intervention/views.py:367
msgid "Share settings updated" msgid "Share settings updated"
msgstr "Freigabe Einstellungen aktualisiert" msgstr "Freigabe Einstellungen aktualisiert"
#: intervention/views.py:385 #: intervention/views.py:386
msgid "Check performed" msgid "Check performed"
msgstr "Prüfung durchgeführt" msgstr "Prüfung durchgeführt"
#: intervention/views.py:405 #: intervention/views.py:406
msgid "Revocation added" msgid "Revocation added"
msgstr "Widerspruch hinzugefügt" msgstr "Widerspruch hinzugefügt"
#: intervention/views.py:472 #: intervention/views.py:473
msgid "There are errors on this intervention:" msgid "There are errors on this intervention:"
msgstr "Es liegen Fehler in diesem Eingriff vor:" msgstr "Es liegen Fehler in diesem Eingriff vor:"
@ -1293,27 +1341,27 @@ msgid "I, {} {}, confirm that this data must be unrecorded."
msgstr "" msgstr ""
"Ich, {} {}, bestätige, dass diese Daten wieder entzeichnet werden müssen." "Ich, {} {}, bestätige, dass diese Daten wieder entzeichnet werden müssen."
#: konova/management/commands/setup_data.py:41 #: konova/management/commands/setup_data.py:26
msgid "On new related data" msgid "On new related data"
msgstr "Wenn neue Daten für mich angelegt werden" msgstr "Wenn neue Daten für mich angelegt werden"
#: konova/management/commands/setup_data.py:42 #: konova/management/commands/setup_data.py:27
msgid "On disabled share link" msgid "On disabled share link"
msgstr "Wenn ein Freigabelink deaktiviert wird" msgstr "Wenn ein Freigabelink deaktiviert wird"
#: konova/management/commands/setup_data.py:43 #: konova/management/commands/setup_data.py:28
msgid "On shared access removed" msgid "On shared access removed"
msgstr "Wenn mir eine Freigabe zu Daten entzogen wird" msgstr "Wenn mir eine Freigabe zu Daten entzogen wird"
#: konova/management/commands/setup_data.py:44 #: konova/management/commands/setup_data.py:29
msgid "On shared data recorded" msgid "On shared data recorded"
msgstr "Wenn meine freigegebenen Daten verzeichnet wurden" msgstr "Wenn meine freigegebenen Daten verzeichnet wurden"
#: konova/management/commands/setup_data.py:45 #: konova/management/commands/setup_data.py:30
msgid "On shared data deleted" msgid "On shared data deleted"
msgstr "Wenn meine freigegebenen Daten gelöscht wurden" msgstr "Wenn meine freigegebenen Daten gelöscht wurden"
#: konova/management/commands/setup_data.py:46 #: konova/management/commands/setup_data.py:31
msgid "On registered data edited" msgid "On registered data edited"
msgstr "Wenn meine freigegebenen Daten bearbeitet wurden" msgstr "Wenn meine freigegebenen Daten bearbeitet wurden"
@ -1540,39 +1588,39 @@ msgstr "Keine Geometrie vorhanden"
msgid "Continue" msgid "Continue"
msgstr "Weiter" msgstr "Weiter"
#: templates/navbar.html:4 #: templates/navbars/navbar.html:4
msgid "Kompensationsverzeichnis Service Portal" msgid "Kompensationsverzeichnis Service Portal"
msgstr "" msgstr ""
#: templates/navbar.html:5 #: templates/navbars/navbar.html:5
msgid "KSP" msgid "KSP"
msgstr "" msgstr ""
#: templates/navbar.html:16 #: templates/navbars/navbar.html:16
msgid "Home" msgid "Home"
msgstr "Home" msgstr "Home"
#: templates/navbar.html:40 #: templates/navbars/navbar.html:40
msgid "More" msgid "More"
msgstr "Mehr" msgstr "Mehr"
#: templates/navbar.html:44 #: templates/navbars/navbar.html:44
msgid "Import..." msgid "Import..."
msgstr "" msgstr ""
#: templates/navbar.html:45 #: templates/navbars/navbar.html:45
msgid "Export..." msgid "Export..."
msgstr "" msgstr ""
#: templates/navbar.html:46 #: templates/navbars/navbar.html:46
msgid "Reports" msgid "Reports"
msgstr "Berichte" msgstr "Berichte"
#: templates/navbar.html:58 user/templates/user/index.html:31 #: templates/navbars/navbar.html:58 user/templates/user/index.html:31
msgid "Settings" msgid "Settings"
msgstr "Einstellungen" msgstr "Einstellungen"
#: templates/navbar.html:59 #: templates/navbars/navbar.html:59
msgid "Logout" msgid "Logout"
msgstr "Abmelden" msgstr "Abmelden"
@ -2953,9 +3001,6 @@ msgstr ""
#~ msgid "Show eco-accounts" #~ msgid "Show eco-accounts"
#~ msgstr "Zeige Ökokonten" #~ msgstr "Zeige Ökokonten"
#~ msgid "Deduct from eco-account"
#~ msgstr "Von Konto abbuchen"
#~ msgid "You are currently working as " #~ msgid "You are currently working as "
#~ msgstr "Sie arbeiten gerade als " #~ msgstr "Sie arbeiten gerade als "

View File

@ -20,7 +20,7 @@
<body> <body>
<header> <header>
{% block header %} {% block header %}
{% include 'navbar.html' %} {% include 'navbars/navbar.html' %}
{% endblock %} {% endblock %}
</header> </header>
<div class="container-fluid mt-3 px-5"> <div class="container-fluid mt-3 px-5">

View File

@ -0,0 +1,8 @@
<nav class="navbar navbar-expand-lg navbar-dark">
<a href="{% url 'home' %}">
<div class="nav-icon badge">
<strong>KSP</strong>
</div>
</a>
</nav>

View File

@ -0,0 +1,44 @@
<!DOCTYPE html>
{% load static i18n l10n fontawesome_5 bootstrap4 %}
<html lang="{{ language }}">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{{ base_frontend_title }}</title>
<link rel="icon" type="image/ico" href="{% static 'images/ksp-favicon.ico' %}">
{% bootstrap_css %}
{% bootstrap_javascript jquery='full' %}
{% fontawesome_5_static %}
<link rel="stylesheet" href="{% static 'css/konova.css' %}">
{% block head %}
{% endblock %}
</head>
<body>
<header>
{% block header %}
{% include 'navbars/public_navbar.html' %}
{% endblock %}
</header>
<div class="container-fluid mt-3 px-5">
<div class="">
{% for message in messages %}
<div class="row alert alert-{{ message.tags }}">
{{ message }}
</div>
{% endfor %}
</div>
{% block body %}
{% endblock %}
</div>
{% block footer %}
{% endblock %}
</body>
</html>

View File

@ -0,0 +1,14 @@
{% extends 'public_base.html' %}
{% load i18n %}
{% block body %}
<div class="jumbotron">
<h1 class="display-4">{% trans 'Unrecorded data' %}</h1>
<hr>
<p class="lead">
{% blocktrans %}
The data you want to see is not recorded and might still be work in progress. Please come back another time.
{% endblocktrans %}
</p>
</div>
{% endblock %}