# 70 Tab titles interventions
* adds content related tab title * adds/updates translations
This commit is contained in:
parent
951bbef480
commit
dc42278943
@ -10,11 +10,12 @@ from intervention.models import Intervention, Revocation, InterventionDocument,
|
||||
from intervention.tables import InterventionTable
|
||||
from konova.contexts import BaseContext
|
||||
from konova.decorators import *
|
||||
from konova.forms import SimpleGeomForm, NewDocumentForm, RemoveModalForm, RecordModalForm
|
||||
from konova.forms import SimpleGeomForm, RemoveModalForm, RecordModalForm
|
||||
from konova.sub_settings.context_settings import TAB_TITLE_IDENTIFIER
|
||||
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, \
|
||||
DATA_UNSHARED_EXPLANATION, CHECKED_RECORDED_RESET
|
||||
CHECKED_RECORDED_RESET
|
||||
from konova.utils.user_checks import in_group
|
||||
|
||||
|
||||
@ -44,6 +45,7 @@ def index_view(request: HttpRequest):
|
||||
)
|
||||
context = {
|
||||
"table": table,
|
||||
TAB_TITLE_IDENTIFIER: _("Interventions - Overview"),
|
||||
}
|
||||
context = BaseContext(request, context).context
|
||||
return render(request, template, context)
|
||||
@ -86,6 +88,7 @@ def new_view(request: HttpRequest):
|
||||
context = {
|
||||
"form": data_form,
|
||||
"geom_form": geom_form,
|
||||
TAB_TITLE_IDENTIFIER: _("New intervention"),
|
||||
}
|
||||
context = BaseContext(request, context).context
|
||||
return render(request, template, context)
|
||||
@ -255,7 +258,8 @@ def detail_view(request: HttpRequest, id: str):
|
||||
"is_default_member": in_group(_user, DEFAULT_GROUP),
|
||||
"is_zb_member": in_group(_user, ZB_GROUP),
|
||||
"is_ets_member": in_group(_user, ETS_GROUP),
|
||||
"LANIS_LINK": intervention.get_LANIS_link()
|
||||
"LANIS_LINK": intervention.get_LANIS_link(),
|
||||
TAB_TITLE_IDENTIFIER: f"{intervention.identifier} - {intervention.title}",
|
||||
}
|
||||
|
||||
request = intervention.set_status_messages(request)
|
||||
@ -302,6 +306,7 @@ def edit_view(request: HttpRequest, id: str):
|
||||
context = {
|
||||
"form": data_form,
|
||||
"geom_form": geom_form,
|
||||
TAB_TITLE_IDENTIFIER: _("Edit {}").format(intervention.identifier),
|
||||
}
|
||||
context = BaseContext(request, context).context
|
||||
return render(request, template, context)
|
||||
@ -538,10 +543,15 @@ def report_view(request:HttpRequest, id: str):
|
||||
template = "intervention/report/report.html"
|
||||
intervention = get_object_or_404(Intervention, id=id)
|
||||
|
||||
tab_title = _("Report {}").format(intervention.identifier)
|
||||
# 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, {})
|
||||
context = {
|
||||
TAB_TITLE_IDENTIFIER: tab_title,
|
||||
}
|
||||
context = BaseContext(request, context).context
|
||||
return render(request, template, context)
|
||||
|
||||
# Prepare data for map viewer
|
||||
geom_form = SimpleGeomForm(
|
||||
@ -567,6 +577,7 @@ def report_view(request:HttpRequest, id: str):
|
||||
"qrcode_lanis": qrcode_img_lanis,
|
||||
"geom_form": geom_form,
|
||||
"parcels": parcels,
|
||||
TAB_TITLE_IDENTIFIER: tab_title,
|
||||
}
|
||||
context = BaseContext(request, context).context
|
||||
return render(request, template, context)
|
||||
|
@ -7,7 +7,7 @@ Created on: 16.11.20
|
||||
"""
|
||||
from django.http import HttpRequest
|
||||
|
||||
from konova.sub_settings.context_settings import BASE_TITLE, HELP_LINK, BASE_FRONTEND_TITLE
|
||||
from konova.sub_settings.context_settings import BASE_TITLE, HELP_LINK, BASE_FRONTEND_TITLE, TAB_TITLE_IDENTIFIER
|
||||
from konova.sub_settings.django_settings import EMAIL_REPLY_TO
|
||||
|
||||
|
||||
@ -20,7 +20,7 @@ class BaseContext:
|
||||
def __init__(self, request: HttpRequest, additional_context: dict = {}):
|
||||
self.context = {
|
||||
"base_title": BASE_TITLE,
|
||||
"base_frontend_title": BASE_FRONTEND_TITLE,
|
||||
TAB_TITLE_IDENTIFIER: BASE_FRONTEND_TITLE,
|
||||
"language": request.LANGUAGE_CODE,
|
||||
"user": request.user,
|
||||
"current_role": None,
|
||||
|
@ -9,4 +9,5 @@ Created on: 16.11.20
|
||||
BASE_TITLE_SHORT = "KSP"
|
||||
BASE_TITLE = "KSP - Kompensationsverzeichnis Service Portal"
|
||||
BASE_FRONTEND_TITLE = "Kompensationsverzeichnis Service Portal"
|
||||
TAB_TITLE_IDENTIFIER = "tab_title"
|
||||
HELP_LINK = "https://dienste.naturschutz.rlp.de/doku/doku.php?id=ksp:start"
|
||||
|
Binary file not shown.
@ -26,7 +26,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2022-01-12 16:43+0100\n"
|
||||
"POT-Creation-Date: 2022-01-20 12:07+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
@ -1064,7 +1064,7 @@ msgid "Compensation {} edited"
|
||||
msgstr "Kompensation {} bearbeitet"
|
||||
|
||||
#: compensation/views/compensation.py:230 compensation/views/eco_account.py:309
|
||||
#: ema/views.py:183 intervention/views.py:478
|
||||
#: ema/views.py:183 intervention/views.py:482
|
||||
msgid "Log"
|
||||
msgstr "Log"
|
||||
|
||||
@ -1073,7 +1073,7 @@ msgid "Compensation removed"
|
||||
msgstr "Kompensation entfernt"
|
||||
|
||||
#: compensation/views/compensation.py:274 compensation/views/eco_account.py:461
|
||||
#: ema/views.py:350 intervention/views.py:129
|
||||
#: ema/views.py:350 intervention/views.py:132
|
||||
msgid "Document added"
|
||||
msgstr "Dokument hinzugefügt"
|
||||
|
||||
@ -1119,36 +1119,36 @@ msgid "Deduction removed"
|
||||
msgstr "Abbuchung entfernt"
|
||||
|
||||
#: compensation/views/eco_account.py:330 ema/views.py:263
|
||||
#: intervention/views.py:520
|
||||
#: intervention/views.py:524
|
||||
msgid "{} unrecorded"
|
||||
msgstr "{} entzeichnet"
|
||||
|
||||
#: compensation/views/eco_account.py:330 ema/views.py:263
|
||||
#: intervention/views.py:520
|
||||
#: intervention/views.py:524
|
||||
msgid "{} recorded"
|
||||
msgstr "{} verzeichnet"
|
||||
|
||||
#: compensation/views/eco_account.py:531 intervention/views.py:501
|
||||
#: compensation/views/eco_account.py:531 intervention/views.py:505
|
||||
msgid "Deduction added"
|
||||
msgstr "Abbuchung hinzugefügt"
|
||||
|
||||
#: compensation/views/eco_account.py:616 ema/views.py:520
|
||||
#: intervention/views.py:376
|
||||
#: intervention/views.py:380
|
||||
msgid "{} has already been shared with you"
|
||||
msgstr "{} wurde bereits für Sie freigegeben"
|
||||
|
||||
#: compensation/views/eco_account.py:621 ema/views.py:525
|
||||
#: intervention/views.py:381
|
||||
#: intervention/views.py:385
|
||||
msgid "{} has been shared with you"
|
||||
msgstr "{} ist nun für Sie freigegeben"
|
||||
|
||||
#: compensation/views/eco_account.py:628 ema/views.py:532
|
||||
#: intervention/views.py:388
|
||||
#: intervention/views.py:392
|
||||
msgid "Share link invalid"
|
||||
msgstr "Freigabelink ungültig"
|
||||
|
||||
#: compensation/views/eco_account.py:651 ema/views.py:555
|
||||
#: intervention/views.py:411
|
||||
#: intervention/views.py:415
|
||||
msgid "Share settings updated"
|
||||
msgstr "Freigabe Einstellungen aktualisiert"
|
||||
|
||||
@ -1257,7 +1257,7 @@ msgstr "Datum Zulassung bzw. Satzungsbeschluss"
|
||||
msgid "Binding on"
|
||||
msgstr "Datum Bestandskraft"
|
||||
|
||||
#: intervention/forms/forms.py:191
|
||||
#: intervention/forms/forms.py:191 intervention/views.py:91
|
||||
msgid "New intervention"
|
||||
msgstr "Neuer Eingriff"
|
||||
|
||||
@ -1459,38 +1459,50 @@ msgstr ""
|
||||
"Kein Ausgleich jeglicher Art gefunden (Kompensation, Ersatzzahlung, "
|
||||
"Abbuchung)"
|
||||
|
||||
#: intervention/views.py:79
|
||||
#: intervention/views.py:48
|
||||
msgid "Interventions - Overview"
|
||||
msgstr "Eingriffe - Übersicht"
|
||||
|
||||
#: intervention/views.py:81
|
||||
msgid "Intervention {} added"
|
||||
msgstr "Eingriff {} hinzugefügt"
|
||||
|
||||
#: intervention/views.py:246
|
||||
#: intervention/views.py:248
|
||||
msgid "This intervention has {} revocations"
|
||||
msgstr "Dem Eingriff liegen {} Widersprüche vor"
|
||||
|
||||
#: intervention/views.py:294
|
||||
#: intervention/views.py:297
|
||||
msgid "Intervention {} edited"
|
||||
msgstr "Eingriff {} bearbeitet"
|
||||
|
||||
#: intervention/views.py:329
|
||||
#: intervention/views.py:309
|
||||
msgid "Edit {}"
|
||||
msgstr "Bearbeite {}"
|
||||
|
||||
#: intervention/views.py:333
|
||||
msgid "{} removed"
|
||||
msgstr "{} entfernt"
|
||||
|
||||
#: intervention/views.py:350
|
||||
#: intervention/views.py:354
|
||||
msgid "Revocation removed"
|
||||
msgstr "Widerspruch entfernt"
|
||||
|
||||
#: intervention/views.py:432
|
||||
#: intervention/views.py:436
|
||||
msgid "Check performed"
|
||||
msgstr "Prüfung durchgeführt"
|
||||
|
||||
#: intervention/views.py:454
|
||||
#: intervention/views.py:458
|
||||
msgid "Revocation added"
|
||||
msgstr "Widerspruch hinzugefügt"
|
||||
|
||||
#: intervention/views.py:525
|
||||
#: intervention/views.py:529
|
||||
msgid "There are errors on this intervention:"
|
||||
msgstr "Es liegen Fehler in diesem Eingriff vor:"
|
||||
|
||||
#: intervention/views.py:546
|
||||
msgid "Report {}"
|
||||
msgstr "Bericht {}"
|
||||
|
||||
#: konova/decorators.py:30
|
||||
msgid "You need to be staff to perform this action!"
|
||||
msgstr "Hierfür müssen Sie Mitarbeiter sein!"
|
||||
@ -2165,22 +2177,14 @@ msgid "More"
|
||||
msgstr "Mehr"
|
||||
|
||||
#: templates/navbars/navbar.html:44
|
||||
msgid "Import..."
|
||||
msgstr ""
|
||||
|
||||
#: templates/navbars/navbar.html:45
|
||||
msgid "Export..."
|
||||
msgstr ""
|
||||
|
||||
#: templates/navbars/navbar.html:46
|
||||
msgid "Reports"
|
||||
msgstr "Berichte"
|
||||
|
||||
#: templates/navbars/navbar.html:58 user/templates/user/index.html:31
|
||||
#: templates/navbars/navbar.html:56 user/templates/user/index.html:31
|
||||
msgid "Settings"
|
||||
msgstr "Einstellungen"
|
||||
|
||||
#: templates/navbars/navbar.html:59
|
||||
#: templates/navbars/navbar.html:57
|
||||
msgid "Logout"
|
||||
msgstr "Abmelden"
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>{{ base_frontend_title }}</title>
|
||||
<title>{{ tab_title }}</title>
|
||||
<link rel="icon" type="image/ico" href="{% static 'images/ksp-favicon.ico' %}">
|
||||
{% bootstrap_css %}
|
||||
{% bootstrap_javascript jquery='full' %}
|
||||
|
@ -4,7 +4,7 @@
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>{{ base_frontend_title }}</title>
|
||||
<title>{{ tab_title }}</title>
|
||||
<link rel="icon" type="image/ico" href="{% static 'images/ksp-favicon.ico' %}">
|
||||
{% bootstrap_css %}
|
||||
{% bootstrap_javascript jquery='full' %}
|
||||
|
Loading…
Reference in New Issue
Block a user