Compare commits

...

2 Commits

Author SHA1 Message Date
ac17d953c6 #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
2021-10-13 14:03:34 +02:00
af0fe655b3 Intervention template adjustments
* renames intervention variable to obj to match other template style
* renames open routes to detail routes
2021-10-13 09:26:46 +02:00
35 changed files with 454 additions and 141 deletions

View File

@ -12,7 +12,7 @@ urlpatterns = [
path("", index_view, name="acc-index"), path("", index_view, name="acc-index"),
path('new/', new_view, name='acc-new'), path('new/', new_view, name='acc-new'),
path('new/id', new_id_view, name='acc-new-id'), path('new/id', new_id_view, name='acc-new-id'),
path('<id>', open_view, name='acc-open'), path('<id>', detail_view, name='acc-detail'),
path('<id>/log', log_view, name='acc-log'), path('<id>/log', log_view, name='acc-log'),
path('<id>/record', record_view, name='acc-record'), path('<id>/record', record_view, name='acc-record'),
path('<id>/edit', edit_view, name='acc-edit'), path('<id>/edit', edit_view, name='acc-edit'),

View File

@ -14,7 +14,7 @@ urlpatterns = [
path('new/id', new_id_view, name='new-id'), path('new/id', new_id_view, name='new-id'),
path('new/<intervention_id>', new_view, name='new'), path('new/<intervention_id>', new_view, name='new'),
path('new', new_view, name='new'), path('new', new_view, name='new'),
path('<id>', open_view, name='open'), path('<id>', detail_view, name='detail'),
path('<id>/log', log_view, name='log'), path('<id>/log', log_view, name='log'),
path('<id>/edit', edit_view, name='edit'), path('<id>/edit', edit_view, name='edit'),
path('<id>/remove', remove_view, name='remove'), path('<id>/remove', remove_view, name='remove'),

View File

@ -179,7 +179,7 @@ class NewCompensationForm(AbstractCompensationForm):
self.initialize_form_field("intervention", intervention_id) self.initialize_form_field("intervention", intervention_id)
self.disable_form_field("intervention") self.disable_form_field("intervention")
self.action_url = reverse("compensation:new", args=(intervention_id,)) self.action_url = reverse("compensation:new", args=(intervention_id,))
self.cancel_redirect = reverse("intervention:open", args=(intervention_id,)) self.cancel_redirect = reverse("intervention:detail", args=(intervention_id,))
else: else:
self.action_url = reverse("compensation:new") self.action_url = reverse("compensation:new")
self.cancel_redirect = reverse("compensation:index") self.cancel_redirect = reverse("compensation:index")
@ -230,7 +230,7 @@ class EditCompensationForm(NewCompensationForm):
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
self.form_title = _("Edit compensation") self.form_title = _("Edit compensation")
self.action_url = reverse("compensation:edit", args=(self.instance.id,)) self.action_url = reverse("compensation:edit", args=(self.instance.id,))
self.cancel_redirect = reverse("compensation:open", args=(self.instance.id,)) self.cancel_redirect = reverse("compensation:detail", args=(self.instance.id,))
# Initialize form data # Initialize form data
form_data = { form_data = {
@ -384,7 +384,7 @@ class EditEcoAccountForm(NewEcoAccountForm):
self.form_title = _("Edit Eco-Account") self.form_title = _("Edit Eco-Account")
self.action_url = reverse("compensation:acc-edit", args=(self.instance.id,)) self.action_url = reverse("compensation:acc-edit", args=(self.instance.id,))
self.cancel_redirect = reverse("compensation:acc-open", args=(self.instance.id,)) self.cancel_redirect = reverse("compensation:acc-detail", args=(self.instance.id,))
# Initialize form data # Initialize form data
form_data = { form_data = {

View File

@ -82,7 +82,7 @@ class CompensationTable(BaseTable):
html = "" html = ""
html += self.render_link( html += self.render_link(
tooltip=_("Open {}").format(_("Compensation")), tooltip=_("Open {}").format(_("Compensation")),
href=reverse("compensation:open", args=(record.id,)), href=reverse("compensation:detail", args=(record.id,)),
txt=value, txt=value,
new_tab=False, new_tab=False,
) )
@ -223,7 +223,7 @@ class EcoAccountTable(BaseTable):
html = "" html = ""
html += self.render_link( html += self.render_link(
tooltip=_("Open {}").format(_("Eco-account")), tooltip=_("Open {}").format(_("Eco-account")),
href=reverse("compensation:acc-open", args=(record.id,)), href=reverse("compensation:acc-detail", args=(record.id,)),
txt=value, txt=value,
new_tab=False, new_tab=False,
) )

View File

@ -33,7 +33,7 @@
<tr> <tr>
<th scope="row">{% trans 'compensates intervention' %}</th> <th scope="row">{% trans 'compensates intervention' %}</th>
<td class="align-middle"> <td class="align-middle">
<a href="{% url 'intervention:open' obj.intervention.id %}"> <a href="{% url 'intervention:detail' obj.intervention.id %}">
{{obj.intervention.identifier}} {{obj.intervention.identifier}}
</a> </a>
</td> </td>

View File

@ -45,7 +45,7 @@
{% for deduction in deductions %} {% for deduction in deductions %}
<tr> <tr>
<td class="align-middle"> <td class="align-middle">
<a href="{% url 'intervention:open' deduction.intervention.id %}"> <a href="{% url 'intervention:detail' deduction.intervention.id %}">
{{ deduction.intervention.identifier }} {{ deduction.intervention.identifier }}
</a> </a>
</td> </td>

View File

@ -74,7 +74,7 @@ def new_view(request: HttpRequest, intervention_id: str = None):
) )
) )
messages.success(request, _("Compensation {} added").format(comp.identifier)) messages.success(request, _("Compensation {} added").format(comp.identifier))
return redirect("compensation:open", id=comp.id) return redirect("compensation:detail", id=comp.id)
else: else:
messages.error(request, FORM_INVALID) messages.error(request, FORM_INVALID)
else: else:
@ -129,7 +129,7 @@ def edit_view(request: HttpRequest, id: str):
# The data form takes the geom form for processing, as well as the performing user # The data form takes the geom form for processing, as well as the performing user
comp = data_form.save(request.user, geom_form) comp = data_form.save(request.user, geom_form)
messages.success(request, _("Compensation {} edited").format(comp.identifier)) messages.success(request, _("Compensation {} edited").format(comp.identifier))
return redirect("compensation:open", id=comp.id) return redirect("compensation:detail", id=comp.id)
else: else:
messages.error(request, FORM_INVALID) messages.error(request, FORM_INVALID)
else: else:
@ -145,7 +145,7 @@ def edit_view(request: HttpRequest, id: str):
@login_required @login_required
@any_group_check @any_group_check
def open_view(request: HttpRequest, id: str): def detail_view(request: HttpRequest, id: str):
""" Renders a detail view for a compensation """ Renders a detail view for a compensation
Args: Args:

View File

@ -84,7 +84,7 @@ def new_view(request: HttpRequest):
) )
) )
messages.success(request, _("Eco-Account {} added").format(acc.identifier)) messages.success(request, _("Eco-Account {} added").format(acc.identifier))
return redirect("compensation:acc-open", id=acc.id) return redirect("compensation:acc-detail", id=acc.id)
else: else:
messages.error(request, FORM_INVALID) messages.error(request, FORM_INVALID)
else: else:
@ -139,7 +139,7 @@ def edit_view(request: HttpRequest, id: str):
# The data form takes the geom form for processing, as well as the performing user # The data form takes the geom form for processing, as well as the performing user
acc = data_form.save(request.user, geom_form) acc = data_form.save(request.user, geom_form)
messages.success(request, _("Eco-Account {} edited").format(acc.identifier)) messages.success(request, _("Eco-Account {} edited").format(acc.identifier))
return redirect("compensation:acc-open", id=acc.id) return redirect("compensation:acc-detail", id=acc.id)
else: else:
messages.error(request, FORM_INVALID) messages.error(request, FORM_INVALID)
else: else:
@ -155,7 +155,7 @@ def edit_view(request: HttpRequest, id: str):
@login_required @login_required
@any_group_check @any_group_check
def open_view(request: HttpRequest, id: str): def detail_view(request: HttpRequest, id: str):
""" Renders a detail view for a compensation """ Renders a detail view for a compensation
Args: Args:

View File

@ -99,7 +99,7 @@ class EditEmaForm(NewEmaForm):
self.form_title = _("Edit EMA") self.form_title = _("Edit EMA")
self.action_url = reverse("ema:edit", args=(self.instance.id,)) self.action_url = reverse("ema:edit", args=(self.instance.id,))
self.cancel_redirect = reverse("ema:open", args=(self.instance.id,)) self.cancel_redirect = reverse("ema:detail", args=(self.instance.id,))
self.fields["identifier"].widget.attrs["url"] = reverse_lazy("ema:new-id") self.fields["identifier"].widget.attrs["url"] = reverse_lazy("ema:new-id")
self.fields["title"].widget.attrs["placeholder"] = _("Compensation XY; Location ABC") self.fields["title"].widget.attrs["placeholder"] = _("Compensation XY; Location ABC")

View File

@ -80,7 +80,7 @@ class EmaTable(BaseTable):
html = "" html = ""
html += self.render_link( html += self.render_link(
tooltip=_("Open {}").format(_("EMA")), tooltip=_("Open {}").format(_("EMA")),
href=reverse("ema:open", args=(record.id,)), href=reverse("ema:detail", args=(record.id,)),
txt=value, txt=value,
new_tab=False, new_tab=False,
) )

View File

@ -13,7 +13,7 @@ urlpatterns = [
path("", index_view, name="index"), path("", index_view, name="index"),
path("new/", new_view, name="new"), path("new/", new_view, name="new"),
path("new/id", new_id_view, name="new-id"), path("new/id", new_id_view, name="new-id"),
path("<id>", open_view, name="open"), path("<id>", detail_view, name="detail"),
path('<id>/log', log_view, name='log'), path('<id>/log', log_view, name='log'),
path('<id>/edit', edit_view, name='edit'), path('<id>/edit', edit_view, name='edit'),
path('<id>/remove', remove_view, name='remove'), path('<id>/remove', remove_view, name='remove'),

View File

@ -75,7 +75,7 @@ def new_view(request: HttpRequest):
) )
) )
messages.success(request, _("EMA {} added").format(ema.identifier)) messages.success(request, _("EMA {} added").format(ema.identifier))
return redirect("ema:open", id=ema.id) return redirect("ema:detail", id=ema.id)
else: else:
messages.error(request, FORM_INVALID) messages.error(request, FORM_INVALID)
else: else:
@ -108,7 +108,7 @@ def new_id_view(request: HttpRequest):
@login_required @login_required
def open_view(request: HttpRequest, id: str): def detail_view(request: HttpRequest, id: str):
""" Renders the detail view of an EMA """ Renders the detail view of an EMA
Args: Args:
@ -199,7 +199,7 @@ def edit_view(request: HttpRequest, id: str):
# The data form takes the geom form for processing, as well as the performing user # The data form takes the geom form for processing, as well as the performing user
ema = data_form.save(request.user, geom_form) ema = data_form.save(request.user, geom_form)
messages.success(request, _("EMA {} edited").format(ema.identifier)) messages.success(request, _("EMA {} edited").format(ema.identifier))
return redirect("ema:open", id=ema.id) return redirect("ema:detail", id=ema.id)
else: else:
messages.error(request, FORM_INVALID) messages.error(request, FORM_INVALID)
else: else:

View File

@ -269,7 +269,7 @@ class EditInterventionForm(NewInterventionForm):
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
if self.instance is not None: if self.instance is not None:
self.action_url = reverse("intervention:edit", args=(self.instance.id,)) self.action_url = reverse("intervention:edit", args=(self.instance.id,))
self.cancel_redirect = reverse("intervention:open", args=(self.instance.id,)) self.cancel_redirect = reverse("intervention:detail", args=(self.instance.id,))
self.form_title = _("Edit intervention") self.form_title = _("Edit intervention")
self.form_caption = "" self.form_caption = ""

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

@ -86,7 +86,7 @@ class InterventionTable(BaseTable):
html = "" html = ""
html += self.render_link( html += self.render_link(
tooltip=_("Open {}").format(_("Intervention")), tooltip=_("Open {}").format(_("Intervention")),
href=reverse("intervention:open", args=(record.id,)), href=reverse("intervention:detail", args=(record.id,)),
txt=value, txt=value,
new_tab=False, new_tab=False,
) )

View File

@ -1,6 +1,6 @@
{% load i18n fontawesome_5 %} {% load i18n fontawesome_5 %}
{% if intervention.comment %} {% if obj.comment %}
<div class="w-100"> <div class="w-100">
<div class="card mt-3"> <div class="card mt-3">
<div class="card-header rlp-gd"> <div class="card-header rlp-gd">
@ -15,7 +15,7 @@
</div> </div>
<div class="card-body"> <div class="card-body">
<div class="card-text font-italic"> <div class="card-text font-italic">
{{intervention.comment}} {{obj.comment}}
</div> </div>
</div> </div>
</div> </div>

View File

@ -11,7 +11,7 @@
<div class="col-sm-6"> <div class="col-sm-6">
<div class="d-flex justify-content-end"> <div class="d-flex justify-content-end">
{% if is_default_member and has_access %} {% if is_default_member and has_access %}
<a href="{% url 'compensation:new' intervention.id %}" title="{% trans 'Add new compensation' %}"> <a href="{% url 'compensation:new' obj.id %}" title="{% trans 'Add new compensation' %}">
<button class="btn btn-outline-default"> <button class="btn btn-outline-default">
{% fa5_icon 'plus' %} {% fa5_icon 'plus' %}
{% fa5_icon 'leaf' %} {% fa5_icon 'leaf' %}
@ -41,7 +41,7 @@
{% for comp in compensations %} {% for comp in compensations %}
<tr> <tr>
<td class="align-middle"> <td class="align-middle">
<a href="{% url 'compensation:open' comp.id %}"> <a href="{% url 'compensation:detail' comp.id %}">
{{ comp.identifier }} {{ comp.identifier }}
</a> </a>
</td> </td>

View File

@ -6,41 +6,41 @@
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>
</a> </a>
{% if has_access %} {% if has_access %}
<button class="btn btn-default btn-modal mr-2" title="{% trans 'Share' %}" data-form-url="{% url 'intervention:share-create' intervention.id %}"> <button class="btn btn-default btn-modal mr-2" title="{% trans 'Share' %}" data-form-url="{% url 'intervention:share-create' obj.id %}">
{% fa5_icon 'share-alt' %} {% fa5_icon 'share-alt' %}
</button> </button>
{% if is_zb_member %} {% if is_zb_member %}
<button class="btn btn-default btn-modal mr-2" title="{% trans 'Run check' %}" data-form-url="{% url 'intervention:run-check' intervention.id %}"> <button class="btn btn-default btn-modal mr-2" title="{% trans 'Run check' %}" data-form-url="{% url 'intervention:run-check' obj.id %}">
{% fa5_icon 'star' %} {% fa5_icon 'star' %}
</button> </button>
{% endif %} {% endif %}
{% if is_ets_member %} {% if is_ets_member %}
{% if intervention.recorded %} {% if obj.recorded %}
<button class="btn btn-default btn-modal mr-2" title="{% trans 'Unrecord' %}" data-form-url="{% url 'intervention:record' intervention.id %}"> <button class="btn btn-default btn-modal mr-2" title="{% trans 'Unrecord' %}" data-form-url="{% url 'intervention:record' obj.id %}">
{% fa5_icon 'bookmark' 'far' %} {% fa5_icon 'bookmark' 'far' %}
</button> </button>
{% else %} {% else %}
<button class="btn btn-default btn-modal mr-2" title="{% trans 'Record' %}" data-form-url="{% url 'intervention:record' intervention.id %}"> <button class="btn btn-default btn-modal mr-2" title="{% trans 'Record' %}" data-form-url="{% url 'intervention:record' obj.id %}">
{% fa5_icon 'bookmark' %} {% fa5_icon 'bookmark' %}
</button> </button>
{% endif %} {% endif %}
{% endif %} {% endif %}
{% if is_default_member %} {% if is_default_member %}
<a href="{% url 'intervention:edit' intervention.id %}" class="mr-2"> <a href="{% url 'intervention:edit' obj.id %}" class="mr-2">
<button class="btn btn-default" title="{% trans 'Edit' %}"> <button class="btn btn-default" title="{% trans 'Edit' %}">
{% fa5_icon 'edit' %} {% fa5_icon 'edit' %}
</button> </button>
</a> </a>
<button class="btn btn-default btn-modal mr-2" data-form-url="{% url 'intervention:log' intervention.id %}" title="{% trans 'Show log' %}"> <button class="btn btn-default btn-modal mr-2" data-form-url="{% url 'intervention:log' obj.id %}" title="{% trans 'Show log' %}">
{% fa5_icon 'history' %} {% fa5_icon 'history' %}
</button> </button>
<button class="btn btn-default btn-modal" data-form-url="{% url 'intervention:remove' intervention.id %}" title="{% trans 'Delete' %}"> <button class="btn btn-default btn-modal" data-form-url="{% url 'intervention:remove' obj.id %}" title="{% trans 'Delete' %}">
{% fa5_icon 'trash' %} {% fa5_icon 'trash' %}
</button> </button>
{% endif %} {% endif %}

View File

@ -4,14 +4,14 @@
<div class="row"> <div class="row">
<div class="col-sm-6"> <div class="col-sm-6">
<h5> <h5>
<span class="badge badge-light">{{intervention.deductions.count}}</span> <span class="badge badge-light">{{obj.deductions.count}}</span>
{% trans 'Eco Account Deductions' %} {% trans 'Eco Account Deductions' %}
</h5> </h5>
</div> </div>
<div class="col-sm-6"> <div class="col-sm-6">
<div class="d-flex justify-content-end"> <div class="d-flex justify-content-end">
{% if is_default_member and has_access %} {% if is_default_member and has_access %}
<button class="btn btn-outline-default btn-modal" data-form-url="{% url 'intervention:acc-new-deduction' intervention.id %}" title="{% trans 'Add new deduction' %}"> <button class="btn btn-outline-default btn-modal" data-form-url="{% url 'intervention:acc-new-deduction' obj.id %}" title="{% trans 'Add new deduction' %}">
{% fa5_icon 'plus' %} {% fa5_icon 'plus' %}
{% fa5_icon 'tree' %} {% fa5_icon 'tree' %}
</button> </button>
@ -39,10 +39,10 @@
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
{% for deduction in intervention.deductions.all %} {% for deduction in obj.deductions.all %}
<tr {% if deduction.account.deleted %}class="align-middle alert-danger" title="{% trans 'Eco-account deleted! Deduction invalid!' %}" {% elif not deduction.account.recorded %}class="align-middle alert-danger" title="{% trans 'Eco-account not recorded! Deduction invalid!' %}" {% endif %}> <tr {% if deduction.account.deleted %}class="align-middle alert-danger" title="{% trans 'Eco-account deleted! Deduction invalid!' %}" {% elif not deduction.account.recorded %}class="align-middle alert-danger" title="{% trans 'Eco-account not recorded! Deduction invalid!' %}" {% endif %}>
<td class="align-middle"> <td class="align-middle">
<a href="{% url 'compensation:acc-open' deduction.account.id %}"> <a href="{% url 'compensation:acc-detail' deduction.account.id %}">
{% if deduction.account.deleted or not deduction.account.recorded %} {% if deduction.account.deleted or not deduction.account.recorded %}
{% fa5_icon 'exclamation-triangle' %} {% fa5_icon 'exclamation-triangle' %}
{% endif %} {% endif %}

View File

@ -4,14 +4,14 @@
<div class="row"> <div class="row">
<div class="col-sm-6"> <div class="col-sm-6">
<h5> <h5>
<span class="badge badge-light">{{intervention.documents.count}}</span> <span class="badge badge-light">{{obj.documents.count}}</span>
{% trans 'Documents' %} {% trans 'Documents' %}
</h5> </h5>
</div> </div>
<div class="col-sm-6"> <div class="col-sm-6">
<div class="d-flex justify-content-end"> <div class="d-flex justify-content-end">
{% if is_default_member and has_access %} {% if is_default_member and has_access %}
<button class="btn btn-outline-default btn-modal" data-form-url="{% url 'intervention:new-doc' intervention.id %}" title="{% trans 'Add new document' %}"> <button class="btn btn-outline-default btn-modal" data-form-url="{% url 'intervention:new-doc' obj.id %}" title="{% trans 'Add new document' %}">
{% fa5_icon 'plus' %} {% fa5_icon 'plus' %}
{% fa5_icon 'file' %} {% fa5_icon 'file' %}
</button> </button>
@ -36,7 +36,7 @@
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
{% for doc in intervention.documents.all %} {% for doc in obj.documents.all %}
<tr> <tr>
<td class="align-middle"> <td class="align-middle">
<a href="{% url 'intervention:get-doc' doc.id %}"> <a href="{% url 'intervention:get-doc' doc.id %}">

View File

@ -4,14 +4,14 @@
<div class="row"> <div class="row">
<div class="col-sm-6"> <div class="col-sm-6">
<h5> <h5>
<span class="badge badge-light">{{intervention.payments.count}}</span> <span class="badge badge-light">{{obj.payments.count}}</span>
{% trans 'Payments' %} {% trans 'Payments' %}
</h5> </h5>
</div> </div>
<div class="col-sm-6"> <div class="col-sm-6">
<div class="d-flex justify-content-end"> <div class="d-flex justify-content-end">
{% if is_default_member and has_access %} {% if is_default_member and has_access %}
<button class="btn btn-outline-default btn-modal" data-form-url="{% url 'compensation:pay-new' intervention.id %}" title="{% trans 'Add new payment' %}"> <button class="btn btn-outline-default btn-modal" data-form-url="{% url 'compensation:pay-new' obj.id %}" title="{% trans 'Add new payment' %}">
{% fa5_icon 'plus' %} {% fa5_icon 'plus' %}
{% fa5_icon 'money-bill-wave' %} {% fa5_icon 'money-bill-wave' %}
</button> </button>
@ -39,7 +39,7 @@
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
{% for pay in intervention.payments.all %} {% for pay in obj.payments.all %}
<tr> <tr>
<td class="align-middle"> <td class="align-middle">
{{ pay.amount|floatformat:2 }} € {{ pay.amount|floatformat:2 }} €

View File

@ -4,7 +4,7 @@
<div class="row"> <div class="row">
<div class="col-sm-6"> <div class="col-sm-6">
<h5> <h5>
<span class="badge badge-light">{% if intervention.legal.revocation %}1{% else %}0{% endif %}</span> <span class="badge badge-light">{% if obj.legal.revocation %}1{% else %}0{% endif %}</span>
{% trans 'Revocation' %} {% trans 'Revocation' %}
</h5> </h5>
</div> </div>
@ -13,8 +13,8 @@
{% comment %} {% comment %}
Only show add-button if no revocation exists, yet. Only show add-button if no revocation exists, yet.
{% endcomment %} {% endcomment %}
{% if is_default_member and has_access and not intervention.legal.revocation %} {% if is_default_member and has_access and not obj.legal.revocation %}
<button class="btn btn-outline-default btn-modal" data-form-url="{% url 'intervention:new-revocation' intervention.id %}" title="{% trans 'Add revocation' %}"> <button class="btn btn-outline-default btn-modal" data-form-url="{% url 'intervention:new-revocation' obj.id %}" title="{% trans 'Add revocation' %}">
{% fa5_icon 'plus' %} {% fa5_icon 'plus' %}
{% fa5_icon 'ban' %} {% fa5_icon 'ban' %}
</button> </button>
@ -42,8 +42,8 @@
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
{% if intervention.legal.revocation %} {% if obj.legal.revocation %}
{% with intervention.legal.revocation as rev %} {% with obj.legal.revocation as rev %}
<tr> <tr>
<td class="align-middle"> <td class="align-middle">
{{ rev.date }} {{ rev.date }}

View File

@ -15,7 +15,7 @@
<div id="detail-header" class="row"> <div id="detail-header" class="row">
<div class="col-sm-12 col-md-12 col-lg-6"> <div class="col-sm-12 col-md-12 col-lg-6">
<h3>{% trans 'Intervention' %}<br> {{intervention.identifier}}</h3> <h3>{% trans 'Intervention' %}<br> {{obj.identifier}}</h3>
</div> </div>
<div class="col-sm-12 col-md-12 col-lg-6"> <div class="col-sm-12 col-md-12 col-lg-6">
{% include 'intervention/detail/includes/controls.html' %} {% include 'intervention/detail/includes/controls.html' %}
@ -26,52 +26,52 @@
<div class="col-sm-12 col-md-12 col-lg-6"> <div class="col-sm-12 col-md-12 col-lg-6">
<div class="table-container"> <div class="table-container">
<table class="table table-hover"> <table class="table table-hover">
<tr {% if not intervention.title %}class="alert alert-danger" title="{% trans 'Missing' %}" {% endif %}> <tr {% if not obj.title %}class="alert alert-danger" title="{% trans 'Missing' %}" {% endif %}>
<th class="w-25" scope="row">{% trans 'Title' %}</th> <th class="w-25" scope="row">{% trans 'Title' %}</th>
<td class="align-middle">{{intervention.title|default_if_none:""}}</td> <td class="align-middle">{{obj.title|default_if_none:""}}</td>
</tr> </tr>
<tr {% if not intervention.legal.process_type %}class="alert alert-danger" title="{% trans 'Missing' %}" {% endif %}> <tr {% if not obj.legal.process_type %}class="alert alert-danger" title="{% trans 'Missing' %}" {% endif %}>
<th scope="row">{% trans 'Process type' %}</th> <th scope="row">{% trans 'Process type' %}</th>
<td class="align-middle">{{intervention.legal.process_type|default_if_none:""}}</td> <td class="align-middle">{{obj.legal.process_type|default_if_none:""}}</td>
</tr> </tr>
<tr {% if intervention.legal.laws.count == 0 %}class="alert alert-danger" title="{% trans 'Missing' %}" {% endif %}> <tr {% if obj.legal.laws.count == 0 %}class="alert alert-danger" title="{% trans 'Missing' %}" {% endif %}>
<th scope="row">{% trans 'Law' %}</th> <th scope="row">{% trans 'Law' %}</th>
<td class="align-middle"> <td class="align-middle">
{% for law in intervention.legal.laws.all %} {% for law in obj.legal.laws.all %}
<div class="badge pill-badge rlp-r-outline">{{law.short_name}} - {{law.long_name}}</div> <div class="badge pill-badge rlp-r-outline">{{law.short_name}} - {{law.long_name}}</div>
<br> <br>
{% endfor %} {% endfor %}
</td> </td>
</tr> </tr>
<tr {% if not intervention.responsible.registration_office %}class="alert alert-danger" title="{% trans 'Missing' %}" {% endif %}> <tr {% if not obj.responsible.registration_office %}class="alert alert-danger" title="{% trans 'Missing' %}" {% endif %}>
<th scope="row">{% trans 'Registration office' %}</th> <th scope="row">{% trans 'Registration office' %}</th>
<td class="align-middle">{{intervention.responsible.registration_office.str_as_office|default_if_none:""}}</td> <td class="align-middle">{{obj.responsible.registration_office.str_as_office|default_if_none:""}}</td>
</tr> </tr>
<tr {% if not intervention.responsible.registration_file_number %}class="alert alert-danger" title="{% trans 'Missing' %}" {% endif %}> <tr {% if not obj.responsible.registration_file_number %}class="alert alert-danger" title="{% trans 'Missing' %}" {% endif %}>
<th scope="row">{% trans 'Registration office file number' %}</th> <th scope="row">{% trans 'Registration office file number' %}</th>
<td class="align-middle">{{intervention.responsible.registration_file_number|default_if_none:""}}</td> <td class="align-middle">{{obj.responsible.registration_file_number|default_if_none:""}}</td>
</tr> </tr>
<tr {% if not intervention.responsible.conservation_office %}class="alert alert-danger" title="{% trans 'Missing' %}" {% endif %}> <tr {% if not obj.responsible.conservation_office %}class="alert alert-danger" title="{% trans 'Missing' %}" {% endif %}>
<th scope="row">{% trans 'Conservation office' %}</th> <th scope="row">{% trans 'Conservation office' %}</th>
<td class="align-middle">{{intervention.responsible.conservation_office.str_as_office|default_if_none:""}}</td> <td class="align-middle">{{obj.responsible.conservation_office.str_as_office|default_if_none:""}}</td>
</tr> </tr>
<tr {% if not intervention.responsible.conservation_file_number %}class="alert alert-danger" title="{% trans 'Missing' %}" {% endif %}> <tr {% if not obj.responsible.conservation_file_number %}class="alert alert-danger" title="{% trans 'Missing' %}" {% endif %}>
<th scope="row">{% trans 'Conservation office file number' %}</th> <th scope="row">{% trans 'Conservation office file number' %}</th>
<td class="align-middle">{{intervention.responsible.conservation_file_number|default_if_none:""}}</td> <td class="align-middle">{{obj.responsible.conservation_file_number|default_if_none:""}}</td>
</tr> </tr>
<tr {% if not intervention.responsible.handler %}class="alert alert-danger" title="{% trans 'Missing' %}" {% endif %}> <tr {% if not obj.responsible.handler %}class="alert alert-danger" title="{% trans 'Missing' %}" {% endif %}>
<th scope="row">{% trans 'Intervention handler' %}</th> <th scope="row">{% trans 'Intervention handler' %}</th>
<td class="align-middle">{{intervention.responsible.handler|default_if_none:""}}</td> <td class="align-middle">{{obj.responsible.handler|default_if_none:""}}</td>
</tr> </tr>
<tr> <tr>
<th scope="row">{% trans 'Checked' %}</th> <th scope="row">{% trans 'Checked' %}</th>
<td class="align-middle"> <td class="align-middle">
{% if intervention.checked is None %} {% if obj.checked is None %}
<span> <span>
{% fa5_icon 'star' 'far' %} {% fa5_icon 'star' 'far' %}
</span> </span>
{% else %} {% else %}
<span class="check-star" title="{% trans 'Checked on '%} {{intervention.checked.timestamp}} {% trans 'by' %} {{intervention.checked.user}}"> <span class="check-star" title="{% trans 'Checked on '%} {{obj.checked.timestamp}} {% trans 'by' %} {{obj.checked.user}}">
{% fa5_icon 'star' %} {% fa5_icon 'star' %}
</span> </span>
{% endif %} {% endif %}
@ -80,41 +80,41 @@
<tr> <tr>
<th scope="row">{% trans 'Recorded' %}</th> <th scope="row">{% trans 'Recorded' %}</th>
<td class="align-middle"> <td class="align-middle">
{% if intervention.recorded is None %} {% if obj.recorded is None %}
<span title="{% trans 'Not recorded yet' %}"> <span title="{% trans 'Not recorded yet' %}">
{% fa5_icon 'bookmark' 'far' %} {% fa5_icon 'bookmark' 'far' %}
</span> </span>
{% else %} {% else %}
<span class="registered-bookmark" title="{% trans 'Recorded on '%} {{intervention.recorded.timestamp}} {% trans 'by' %} {{intervention.recorded.user}}"> <span class="registered-bookmark" title="{% trans 'Recorded on '%} {{obj.recorded.timestamp}} {% trans 'by' %} {{obj.recorded.user}}">
{% fa5_icon 'bookmark' %} {% fa5_icon 'bookmark' %}
</span> </span>
{% endif %} {% endif %}
</td> </td>
</tr> </tr>
<tr {% if not intervention.legal.registration_date %}class="alert alert-danger" title="{% trans 'Missing' %}" {% endif %}> <tr {% if not obj.legal.registration_date %}class="alert alert-danger" title="{% trans 'Missing' %}" {% endif %}>
<th scope="row">{% trans 'Registration date' %}</th> <th scope="row">{% trans 'Registration date' %}</th>
<td class="align-middle">{{intervention.legal.registration_date|default_if_none:""}}</td> <td class="align-middle">{{obj.legal.registration_date|default_if_none:""}}</td>
</tr> </tr>
<tr {% if not intervention.legal.binding_date %}class="alert alert-danger" title="{% trans 'Missing' %}" {% endif %}> <tr {% if not obj.legal.binding_date %}class="alert alert-danger" title="{% trans 'Missing' %}" {% endif %}>
<th scope="row">{% trans 'Binding on' %}</th> <th scope="row">{% trans 'Binding on' %}</th>
<td class="align-middle">{{intervention.legal.binding_date|default_if_none:""}}</td> <td class="align-middle">{{obj.legal.binding_date|default_if_none:""}}</td>
</tr> </tr>
<tr {% if intervention.legal.revocation %}class="alert alert-danger" title="{% trans 'Exists' %}" {% endif %}> <tr {% if obj.legal.revocation %}class="alert alert-danger" title="{% trans 'Exists' %}" {% endif %}>
<th scope="row">{% trans 'Revocation' %}</th> <th scope="row">{% trans 'Revocation' %}</th>
<td class="align-middle">{{intervention.legal.revocation.date|naturalday|default_if_none:""}}</td> <td class="align-middle">{{obj.legal.revocation.date|naturalday|default_if_none:""}}</td>
</tr> </tr>
<tr> <tr>
<th scope="row">{% trans 'Last modified' %}</th> <th scope="row">{% trans 'Last modified' %}</th>
<td class="align-middle"> <td class="align-middle">
{{intervention.created.timestamp|default_if_none:""|naturalday}} {{obj.created.timestamp|default_if_none:""|naturalday}}
<br> <br>
{{intervention.created.user.username}} {{obj.created.user.username}}
</td> </td>
</tr> </tr>
<tr> <tr>
<th scope="row">{% trans 'Shared with' %}</th> <th scope="row">{% trans 'Shared with' %}</th>
<td class="align-middle"> <td class="align-middle">
{% for user in intervention.users.all %} {% for user in obj.users.all %}
{% include 'user/includes/contact_modal_button.html' %} {% include 'user/includes/contact_modal_button.html' %}
{% endfor %} {% endfor %}
</td> </td>

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

@ -7,16 +7,16 @@ Created on: 30.11.20
""" """
from django.urls import path from django.urls import path
from intervention.views import index_view, new_view, open_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 = [
path("", index_view, name="index"), path("", index_view, name="index"),
path('new/', new_view, name='new'), path('new/', new_view, name='new'),
path('new/id', new_id_view, name='new-id'), path('new/id', new_id_view, name='new-id'),
path('<id>', open_view, name='open'), path('<id>', detail_view, name='detail'),
path('<id>/log', log_view, name='log'), path('<id>/log', log_view, name='log'),
path('<id>/edit', edit_view, name='edit'), path('<id>/edit', edit_view, name='edit'),
path('<id>/remove', remove_view, name='remove'), path('<id>/remove', remove_view, name='remove'),
@ -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
@ -74,7 +75,7 @@ def new_view(request: HttpRequest):
) )
) )
messages.success(request, _("Intervention {} added").format(intervention.identifier)) messages.success(request, _("Intervention {} added").format(intervention.identifier))
return redirect("intervention:open", id=intervention.id) return redirect("intervention:detail", id=intervention.id)
else: else:
messages.error(request, FORM_INVALID) messages.error(request, FORM_INVALID)
else: else:
@ -180,7 +181,7 @@ def remove_document_view(request: HttpRequest, doc_id: str):
@login_required @login_required
@any_group_check @any_group_check
def open_view(request: HttpRequest, id: str): def detail_view(request: HttpRequest, id: str):
""" Renders a detail view for viewing an intervention's data """ Renders a detail view for viewing an intervention's data
Args: Args:
@ -213,7 +214,7 @@ def open_view(request: HttpRequest, id: str):
) )
context = { context = {
"intervention": intervention, "obj": intervention,
"compensations": compensations, "compensations": compensations,
"has_access": is_data_shared, "has_access": is_data_shared,
"geom_form": geom_form, "geom_form": geom_form,
@ -252,7 +253,7 @@ def edit_view(request: HttpRequest, id: str):
# The data form takes the geom form for processing, as well as the performing user # The data form takes the geom form for processing, as well as the performing user
intervention = data_form.save(request.user, geom_form) intervention = data_form.save(request.user, geom_form)
messages.success(request, _("Intervention {} edited").format(intervention.identifier)) messages.success(request, _("Intervention {} edited").format(intervention.identifier))
return redirect("intervention:open", id=intervention.id) return redirect("intervention:detail", id=intervention.id)
else: else:
messages.error(request, FORM_INVALID) messages.error(request, FORM_INVALID)
else: else:
@ -338,7 +339,7 @@ def share_view(request: HttpRequest, id: str, token: str):
_("{} has been shared with you").format(intervention.identifier) _("{} has been shared with you").format(intervention.identifier)
) )
intervention.users.add(user) intervention.users.add(user)
return redirect("intervention:open", id=id) return redirect("intervention:detail", id=id)
else: else:
messages.error( messages.error(
request, request,
@ -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 %}