diff --git a/intervention/models.py b/intervention/models.py index 6b1fda72..e2a6c44e 100644 --- a/intervention/models.py +++ b/intervention/models.py @@ -18,7 +18,7 @@ from codelist.settings import CODELIST_REGISTRATION_OFFICE_ID, CODELIST_CONSERVA CODELIST_PROCESS_TYPE_ID from konova.models import BaseObject, Geometry, UuidModel, BaseResource, AbstractDocument, \ 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.utils import generators from user.models import UserActionLogEntry @@ -361,7 +361,13 @@ class Intervention(BaseObject): geom = self.geometry.geom.transform(DEFAULT_SRID_RLP, clone=True) x = geom.centroid.x 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: # If no geometry has been added, yet. x = 1 diff --git a/intervention/templates/intervention/detail/includes/controls.html b/intervention/templates/intervention/detail/includes/controls.html index 176d743b..4a64e5fb 100644 --- a/intervention/templates/intervention/detail/includes/controls.html +++ b/intervention/templates/intervention/detail/includes/controls.html @@ -6,7 +6,7 @@ LANIS - + diff --git a/intervention/templates/intervention/report/report.html b/intervention/templates/intervention/report/report.html new file mode 100644 index 00000000..7eac63f7 --- /dev/null +++ b/intervention/templates/intervention/report/report.html @@ -0,0 +1,119 @@ +{% extends 'public_base.html' %} +{% load i18n fontawesome_5 humanize %} + +{% block body %} +
+
+

{{obj.identifier}}

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
{% trans 'Title' %}{{obj.title|default_if_none:""}}
{% trans 'Process type' %}{{obj.legal.process_type|default_if_none:""}}
{% trans 'Law' %} + {% for law in obj.legal.laws.all %} +
{{law.short_name}} - {{law.long_name}}
+
+ {% endfor %} +
{% trans 'Registration office' %}{{obj.responsible.registration_office.str_as_office|default_if_none:""}}
{% trans 'Registration office file number' %}{{obj.responsible.registration_file_number|default_if_none:""}}
{% trans 'Conservation office' %}{{obj.responsible.conservation_office.str_as_office|default_if_none:""}}
{% trans 'Conservation office file number' %}{{obj.responsible.conservation_file_number|default_if_none:""}}
{% trans 'Intervention handler' %}{{obj.responsible.handler|default_if_none:""}}
{% trans 'Compensations' %} + {% for comp in obj.compensations.all %} + + {{comp.identifier}} + +
+ {% empty %} + {% trans 'None' %} + {% endfor %} +
{% trans 'Deductions of eco-accounts' %} + {% for deduction in deductions %} + + {{deduction.account.identifier}} + +
+ {% endfor %} +
{% trans 'Payments' %} + {% if obj.payments.all %} + {% trans 'Exist' %} + {% else %} + {% trans 'None' %} + {% endif %} +
{% trans 'Registration date' %}{{obj.legal.registration_date|default_if_none:""}}
{% trans 'Binding on' %}{{obj.legal.binding_date|default_if_none:""}}
{% trans 'Last modified' %} + {{obj.created.timestamp|default_if_none:""|naturalday}} +
+
+
+
+
+ {% include 'map/geom_form.html' %} +
+
+ {% include 'intervention/detail/includes/comment.html' %} +
+
+
+

{% trans 'Open in browser' %}

+ {{ qrcode|safe }} +
+
+

{% trans 'View in LANIS' %}

+ {{ qrcode_lanis|safe }} +
+
+ +
+
+ +{% endblock %} \ No newline at end of file diff --git a/intervention/urls.py b/intervention/urls.py index 03c7c1d3..022c3c9f 100644 --- a/intervention/urls.py +++ b/intervention/urls.py @@ -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, \ 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" urlpatterns = [ @@ -24,6 +24,7 @@ urlpatterns = [ path('/share', create_share_view, name='share-create'), path('/check', run_check_view, name='run-check'), path('/record', record_view, name='record'), + path('/report', report_view, name='report'), # Documents path('/document/new/', new_document_view, name='new-doc'), diff --git a/intervention/views.py b/intervention/views.py index a5c7e928..7449085d 100644 --- a/intervention/views.py +++ b/intervention/views.py @@ -1,7 +1,7 @@ from django.contrib.auth.decorators import login_required from django.utils.translation import gettext_lazy as _ 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.modalForms import ShareInterventionModalForm, NewRevocationModalForm, \ @@ -13,6 +13,7 @@ from konova.decorators import * from konova.forms import SimpleGeomForm, NewDocumentForm, RemoveModalForm, RecordModalForm from konova.sub_settings.django_settings import DEFAULT_DATE_FORMAT 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.user_checks import in_group @@ -470,4 +471,43 @@ def record_view(request: HttpRequest, id: str): request, msg_succ, msg_error=_("There are errors on this intervention:") - ) \ No newline at end of file + ) + + +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) diff --git a/konova/settings.py b/konova/settings.py index 3ed751a7..51e5bade 100644 --- a/konova/settings.py +++ b/konova/settings.py @@ -69,3 +69,14 @@ ETS_GROUP = "Conservation office" # Needed to redirect to LANIS ## 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" +## 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, +} diff --git a/konova/utils/generators.py b/konova/utils/generators.py index dfae78f7..e8cc9d2d 100644 --- a/konova/utils/generators.py +++ b/konova/utils/generators.py @@ -7,6 +7,10 @@ Created on: 09.11.20 """ import random 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: @@ -24,3 +28,24 @@ def generate_random_string(length: int, use_numbers: bool = False, use_letters_l elements = "".join(elements) ret_val = "".join(random.choice(elements) for i in range(length)) 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() diff --git a/locale/de/LC_MESSAGES/django.mo b/locale/de/LC_MESSAGES/django.mo index 4e29c29e..dfe0ba35 100644 Binary files a/locale/de/LC_MESSAGES/django.mo and b/locale/de/LC_MESSAGES/django.mo differ diff --git a/locale/de/LC_MESSAGES/django.po b/locale/de/LC_MESSAGES/django.po index d50cd07e..ec0217f0 100644 --- a/locale/de/LC_MESSAGES/django.po +++ b/locale/de/LC_MESSAGES/django.po @@ -19,7 +19,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\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" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -55,7 +55,9 @@ msgstr "Automatisch generiert" #: intervention/tables.py:28 #: intervention/templates/intervention/detail/includes/compensations.html:33 #: 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" msgstr "Bezeichnung" @@ -112,6 +114,7 @@ msgstr "Zusätzlicher Kommentar" #: compensation/templates/compensation/detail/eco_account/view.html:58 #: ema/templates/ema/detail/view.html:42 intervention/forms/forms.py:101 #: intervention/templates/intervention/detail/view.html:56 +#: intervention/templates/intervention/report/report.html:36 msgid "Conservation office" msgstr "Eintragungsstelle" @@ -123,6 +126,7 @@ msgstr "Verantwortliche Stelle" #: compensation/templates/compensation/detail/eco_account/view.html:62 #: ema/templates/ema/detail/view.html:46 intervention/forms/forms.py:129 #: intervention/templates/intervention/detail/view.html:60 +#: intervention/templates/intervention/report/report.html:40 msgid "Conservation office file number" msgstr "Aktenzeichen Eintragungsstelle" @@ -373,14 +377,14 @@ msgstr "" msgid "Pieces" msgstr "Stück" -#: compensation/models.py:312 +#: compensation/models.py:311 msgid "" "Deductable surface can not be larger than existing surfaces in after states" msgstr "" "Die abbuchbare Fläche darf die Gesamtfläche der Zielzustände nicht " "überschreiten" -#: compensation/models.py:319 +#: compensation/models.py:318 msgid "" "Deductable surface can not be smaller than the sum of already existing " "deductions. Please contact the responsible users for the deductions!" @@ -417,6 +421,7 @@ msgstr "Zuletzt bearbeitet" #: compensation/tables.py:62 #: intervention/templates/intervention/detail/includes/compensations.html:8 +#: intervention/templates/intervention/report/report.html:48 msgid "Compensations" msgstr "Kompensationen" @@ -427,7 +432,7 @@ msgstr "Öffne {}" #: compensation/tables.py:84 #: 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" msgstr "Kompensation" @@ -443,13 +448,13 @@ msgstr "Am {} von {} geprüft worden" #: compensation/templates/compensation/detail/compensation/view.html:60 #: compensation/templates/compensation/detail/eco_account/view.html:47 #: 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 msgid "Not recorded yet" msgstr "Noch nicht verzeichnet" #: 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 {}" msgstr "Am {} von {} verzeichnet worden" @@ -476,7 +481,7 @@ msgstr "Ökokonten" #: compensation/tables.py:225 #: compensation/templates/compensation/detail/eco_account/view.html:19 #: 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" msgstr "Ökokonto" @@ -683,6 +688,8 @@ msgstr "Gefördert mit" #: compensation/templates/compensation/detail/compensation/view.html:79 #: compensation/templates/compensation/detail/eco_account/view.html:78 #: ema/templates/ema/detail/view.html:62 +#: intervention/templates/intervention/report/report.html:56 +#: intervention/templates/intervention/report/report.html:77 msgid "None" msgstr "" @@ -690,6 +697,7 @@ msgstr "" #: compensation/templates/compensation/detail/eco_account/view.html:83 #: ema/templates/ema/detail/view.html:67 #: intervention/templates/intervention/detail/view.html:108 +#: intervention/templates/intervention/report/report.html:90 msgid "Last modified" msgstr "Zuletzt bearbeitet" @@ -762,6 +770,7 @@ msgstr "Fehlt" #: compensation/templates/compensation/detail/eco_account/view.html:66 #: ema/templates/ema/detail/view.html:50 intervention/forms/forms.py:141 #: intervention/templates/intervention/detail/view.html:64 +#: intervention/templates/intervention/report/report.html:44 msgid "Intervention handler" msgstr "Eingriffsverursacher" @@ -775,7 +784,7 @@ msgstr "Kompensation {} bearbeitet" #: compensation/views/compensation_views.py:210 #: compensation/views/eco_account_views.py:277 ema/views.py:174 -#: intervention/views.py:427 +#: intervention/views.py:428 msgid "Log" msgstr "Log" @@ -785,7 +794,7 @@ msgstr "Kompensation entfernt" #: compensation/views/compensation_views.py:250 #: compensation/views/eco_account_views.py:376 ema/views.py:327 -#: intervention/views.py:123 +#: intervention/views.py:124 msgid "Document added" msgstr "Dokument hinzugefügt" @@ -829,16 +838,16 @@ msgid "Deduction removed" msgstr "Abbuchung entfernt" #: compensation/views/eco_account_views.py:297 ema/views.py:248 -#: intervention/views.py:467 +#: intervention/views.py:468 msgid "{} unrecorded" msgstr "{} entzeichnet" #: compensation/views/eco_account_views.py:297 ema/views.py:248 -#: intervention/views.py:467 +#: intervention/views.py:468 msgid "{} recorded" 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" msgstr "Abbuchung hinzugefügt" @@ -858,7 +867,7 @@ msgstr "Neue EMA hinzufügen" msgid "Edit 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" msgstr "Ersatzzahlungsmaßnahmen (EMA)" @@ -870,7 +879,7 @@ msgstr "" "Maßnahmen aus Ersatzzahlungen, die nach 2015 rechtskräftig wurden, werden " "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" msgstr "" @@ -912,11 +921,13 @@ msgstr "Bauvorhaben XY; Flur ABC" #: intervention/forms/forms.py:51 #: intervention/templates/intervention/detail/view.html:35 +#: intervention/templates/intervention/report/report.html:15 msgid "Process type" msgstr "Verfahrenstyp" #: intervention/forms/forms.py:68 #: intervention/templates/intervention/detail/view.html:39 +#: intervention/templates/intervention/report/report.html:19 msgid "Law" msgstr "Gesetz" @@ -926,11 +937,13 @@ msgstr "Mehrfachauswahl möglich" #: intervention/forms/forms.py:85 #: intervention/templates/intervention/detail/view.html:48 +#: intervention/templates/intervention/report/report.html:28 msgid "Registration office" msgstr "Zulassungsbehörde" #: intervention/forms/forms.py:117 #: intervention/templates/intervention/detail/view.html:52 +#: intervention/templates/intervention/report/report.html:32 msgid "Registration office file number" msgstr "Aktenzeichen Zulassungsbehörde" @@ -944,11 +957,13 @@ msgstr "Wer führt den Eingriff durch" #: intervention/forms/forms.py:154 #: intervention/templates/intervention/detail/view.html:96 +#: intervention/templates/intervention/report/report.html:82 msgid "Registration date" msgstr "Datum Zulassung bzw. Satzungsbeschluss" #: intervention/forms/forms.py:166 #: intervention/templates/intervention/detail/view.html:100 +#: intervention/templates/intervention/report/report.html:86 msgid "Binding on" 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/tables.py:88 #: 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" msgstr "Eingriff" @@ -1127,6 +1142,7 @@ msgid "Eco-account not recorded! Deduction invalid!" msgstr "Ökokonto nicht verzeichnet! Abbuchung ungültig!" #: intervention/templates/intervention/detail/includes/payments.html:8 +#: intervention/templates/intervention/report/report.html:72 msgid "Payments" msgstr "Ersatzzahlungen" @@ -1156,15 +1172,47 @@ msgstr "Widerspruch entfernen" msgid "Exists" 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" msgstr "Eingriff {} hinzugefügt" -#: intervention/views.py:211 +#: intervention/views.py:212 msgid "This intervention has a revocation from {}" msgstr "Es existiert ein Widerspruch vom {}" -#: intervention/views.py:227 +#: intervention/views.py:228 msgid "" "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 " @@ -1174,43 +1222,43 @@ msgstr "" "bedeutet, dass Sie nur lesenden Zugriff hierauf haben und weder bearbeiten, " "noch Prüfungen durchführen oder verzeichnen können." -#: intervention/views.py:254 +#: intervention/views.py:255 msgid "Intervention {} edited" msgstr "Eingriff {} bearbeitet" -#: intervention/views.py:286 +#: intervention/views.py:287 msgid "{} removed" msgstr "{} entfernt" -#: intervention/views.py:307 +#: intervention/views.py:308 msgid "Revocation removed" msgstr "Widerspruch entfernt" -#: intervention/views.py:333 +#: intervention/views.py:334 msgid "{} has already been shared with you" msgstr "{} wurde bereits für Sie freigegeben" -#: intervention/views.py:338 +#: intervention/views.py:339 msgid "{} has been shared with you" msgstr "{} ist nun für Sie freigegeben" -#: intervention/views.py:345 +#: intervention/views.py:346 msgid "Share link invalid" msgstr "Freigabelink ungültig" -#: intervention/views.py:366 +#: intervention/views.py:367 msgid "Share settings updated" msgstr "Freigabe Einstellungen aktualisiert" -#: intervention/views.py:385 +#: intervention/views.py:386 msgid "Check performed" msgstr "Prüfung durchgeführt" -#: intervention/views.py:405 +#: intervention/views.py:406 msgid "Revocation added" msgstr "Widerspruch hinzugefügt" -#: intervention/views.py:472 +#: intervention/views.py:473 msgid "There are errors on this intervention:" msgstr "Es liegen Fehler in diesem Eingriff vor:" @@ -1293,27 +1341,27 @@ msgid "I, {} {}, confirm that this data must be unrecorded." msgstr "" "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" 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" 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" 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" 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" 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" msgstr "Wenn meine freigegebenen Daten bearbeitet wurden" @@ -1540,39 +1588,39 @@ msgstr "Keine Geometrie vorhanden" msgid "Continue" msgstr "Weiter" -#: templates/navbar.html:4 +#: templates/navbars/navbar.html:4 msgid "Kompensationsverzeichnis Service Portal" msgstr "" -#: templates/navbar.html:5 +#: templates/navbars/navbar.html:5 msgid "KSP" msgstr "" -#: templates/navbar.html:16 +#: templates/navbars/navbar.html:16 msgid "Home" msgstr "Home" -#: templates/navbar.html:40 +#: templates/navbars/navbar.html:40 msgid "More" msgstr "Mehr" -#: templates/navbar.html:44 +#: templates/navbars/navbar.html:44 msgid "Import..." msgstr "" -#: templates/navbar.html:45 +#: templates/navbars/navbar.html:45 msgid "Export..." msgstr "" -#: templates/navbar.html:46 +#: templates/navbars/navbar.html:46 msgid "Reports" 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" msgstr "Einstellungen" -#: templates/navbar.html:59 +#: templates/navbars/navbar.html:59 msgid "Logout" msgstr "Abmelden" @@ -2953,9 +3001,6 @@ msgstr "" #~ msgid "Show eco-accounts" #~ msgstr "Zeige Ökokonten" -#~ msgid "Deduct from eco-account" -#~ msgstr "Von Konto abbuchen" - #~ msgid "You are currently working as " #~ msgstr "Sie arbeiten gerade als " diff --git a/templates/base.html b/templates/base.html index 1816e05a..e728405a 100644 --- a/templates/base.html +++ b/templates/base.html @@ -20,7 +20,7 @@
{% block header %} - {% include 'navbar.html' %} + {% include 'navbars/navbar.html' %} {% endblock %}
diff --git a/templates/navbar.html b/templates/navbars/navbar.html similarity index 100% rename from templates/navbar.html rename to templates/navbars/navbar.html diff --git a/templates/navbars/public_navbar.html b/templates/navbars/public_navbar.html new file mode 100644 index 00000000..ec6db7c6 --- /dev/null +++ b/templates/navbars/public_navbar.html @@ -0,0 +1,8 @@ + + \ No newline at end of file diff --git a/templates/public_base.html b/templates/public_base.html new file mode 100644 index 00000000..d09d74b8 --- /dev/null +++ b/templates/public_base.html @@ -0,0 +1,44 @@ + +{% load static i18n l10n fontawesome_5 bootstrap4 %} + + + + + {{ base_frontend_title }} + + {% bootstrap_css %} + {% bootstrap_javascript jquery='full' %} + {% fontawesome_5_static %} + + + {% block head %} + {% endblock %} + + + +
+ {% block header %} + {% include 'navbars/public_navbar.html' %} + {% endblock %} +
+
+
+ {% for message in messages %} +
+ {{ message }} +
+ {% endfor %} +
+ + {% block body %} + + {% endblock %} +
+ + {% block footer %} + + {% endblock %} + + + + \ No newline at end of file diff --git a/templates/report/unavailable.html b/templates/report/unavailable.html new file mode 100644 index 00000000..87b1ecb9 --- /dev/null +++ b/templates/report/unavailable.html @@ -0,0 +1,14 @@ +{% extends 'public_base.html' %} +{% load i18n %} + +{% block body %} +
+

{% trans 'Unrecorded data' %}

+
+

+ {% blocktrans %} + The data you want to see is not recorded and might still be work in progress. Please come back another time. + {% endblocktrans %} +

+
+{% endblock %} \ No newline at end of file