70_Tab_title_too_long #81

Merged
mpeltriaux merged 5 commits from 70_Tab_title_too_long into master 2022-01-20 12:31:49 +01:00
14 changed files with 164 additions and 79 deletions

View File

@ -13,6 +13,7 @@ from intervention.models import Intervention
from konova.contexts import BaseContext
from konova.decorators import *
from konova.forms import RemoveModalForm, SimpleGeomForm
from konova.sub_settings.context_settings import TAB_TITLE_IDENTIFIER
from konova.utils.documents import get_document, remove_document
from konova.utils.generators import generate_qr_code
from konova.utils.message_templates import FORM_INVALID, IDENTIFIER_REPLACED, DATA_UNSHARED_EXPLANATION, \
@ -43,6 +44,7 @@ def index_view(request: HttpRequest):
)
context = {
"table": table,
TAB_TITLE_IDENTIFIER: _("Compensations - Overview"),
}
context = BaseContext(request, context).context
return render(request, template, context)
@ -86,6 +88,7 @@ def new_view(request: HttpRequest, intervention_id: str = None):
context = {
"form": data_form,
"geom_form": geom_form,
TAB_TITLE_IDENTIFIER: _("New compensation"),
}
context = BaseContext(request, context).context
return render(request, template, context)
@ -150,6 +153,7 @@ def edit_view(request: HttpRequest, id: str):
context = {
"form": data_form,
"geom_form": geom_form,
TAB_TITLE_IDENTIFIER: _("Edit {}").format(comp.identifier),
}
context = BaseContext(request, context).context
return render(request, template, context)
@ -202,6 +206,7 @@ def detail_view(request: HttpRequest, id: str):
"is_zb_member": in_group(_user, ZB_GROUP),
"is_ets_member": in_group(_user, ETS_GROUP),
"LANIS_LINK": comp.get_LANIS_link(),
TAB_TITLE_IDENTIFIER: f"{comp.identifier} - {comp.title}",
}
context = BaseContext(request, context).context
return render(request, template, context)
@ -444,10 +449,15 @@ def report_view(request: HttpRequest, id: str):
template = "compensation/report/compensation/report.html"
comp = get_object_or_404(Compensation, id=id)
tab_title = _("Report {}").format(comp.identifier)
# If intervention is not recorded (yet or currently) we need to render another template without any data
if not comp.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(
@ -477,6 +487,7 @@ def report_view(request: HttpRequest, id: str):
"geom_form": geom_form,
"parcels": parcels,
"actions": actions,
TAB_TITLE_IDENTIFIER: tab_title,
}
context = BaseContext(request, context).context
return render(request, template, context)

View File

@ -25,6 +25,7 @@ from konova.decorators import any_group_check, default_group_required, conservat
shared_access_required
from konova.forms import RemoveModalForm, SimpleGeomForm, NewDocumentForm, RecordModalForm
from konova.settings import DEFAULT_GROUP, ZB_GROUP, ETS_GROUP
from konova.sub_settings.context_settings import TAB_TITLE_IDENTIFIER
from konova.utils.documents import get_document, remove_document
from konova.utils.generators import generate_qr_code
from konova.utils.message_templates import IDENTIFIER_REPLACED, FORM_INVALID, DATA_UNSHARED, DATA_UNSHARED_EXPLANATION, \
@ -54,6 +55,7 @@ def index_view(request: HttpRequest):
)
context = {
"table": table,
TAB_TITLE_IDENTIFIER: _("Eco-account - Overview"),
}
context = BaseContext(request, context).context
return render(request, template, context)
@ -96,6 +98,7 @@ def new_view(request: HttpRequest):
context = {
"form": data_form,
"geom_form": geom_form,
TAB_TITLE_IDENTIFIER: _("New Eco-Account"),
}
context = BaseContext(request, context).context
return render(request, template, context)
@ -153,6 +156,7 @@ def edit_view(request: HttpRequest, id: str):
context = {
"form": data_form,
"geom_form": geom_form,
TAB_TITLE_IDENTIFIER: _("Edit {}").format(acc.identifier),
}
context = BaseContext(request, context).context
return render(request, template, context)
@ -223,6 +227,7 @@ def detail_view(request: HttpRequest, id: str):
"LANIS_LINK": acc.get_LANIS_link(),
"deductions": deductions,
"actions": actions,
TAB_TITLE_IDENTIFIER: f"{acc.identifier} - {acc.title}",
}
context = BaseContext(request, context).context
return render(request, template, context)
@ -546,10 +551,15 @@ def report_view(request:HttpRequest, id: str):
template = "compensation/report/eco_account/report.html"
acc = get_object_or_404(EcoAccount, id=id)
tab_title = _("Report {}").format(acc.identifier)
# If intervention is not recorded (yet or currently) we need to render another template without any data
if not acc.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(
@ -586,6 +596,7 @@ def report_view(request:HttpRequest, id: str):
"parcels": parcels,
"actions": actions,
"deductions": deductions,
TAB_TITLE_IDENTIFIER: tab_title,
}
context = BaseContext(request, context).context
return render(request, template, context)

View File

@ -16,6 +16,7 @@ from konova.decorators import conservation_office_group_required, shared_access_
from ema.models import Ema, EmaDocument
from konova.forms import RemoveModalForm, SimpleGeomForm, RecordModalForm
from konova.settings import DEFAULT_GROUP, ZB_GROUP, ETS_GROUP
from konova.sub_settings.context_settings import TAB_TITLE_IDENTIFIER
from konova.utils.documents import get_document, remove_document
from konova.utils.generators import generate_qr_code
from konova.utils.message_templates import IDENTIFIER_REPLACED, FORM_INVALID, DATA_UNSHARED, DATA_UNSHARED_EXPLANATION
@ -44,6 +45,7 @@ def index_view(request: HttpRequest):
)
context = {
"table": table,
TAB_TITLE_IDENTIFIER: _("EMAs - 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 EMA"),
}
context = BaseContext(request, context).context
return render(request, template, context)
@ -155,6 +158,7 @@ def detail_view(request: HttpRequest, id: str):
"is_zb_member": in_group(_user, ZB_GROUP),
"is_ets_member": in_group(_user, ETS_GROUP),
"LANIS_LINK": ema.get_LANIS_link(),
TAB_TITLE_IDENTIFIER: f"{ema.identifier} - {ema.title}",
}
context = BaseContext(request, context).context
return render(request, template, context)
@ -219,6 +223,7 @@ def edit_view(request: HttpRequest, id: str):
context = {
"form": data_form,
"geom_form": geom_form,
TAB_TITLE_IDENTIFIER: _("Edit {}").format(ema.identifier),
}
context = BaseContext(request, context).context
return render(request, template, context)
@ -457,10 +462,15 @@ def report_view(request:HttpRequest, id: str):
template = "ema/report/report.html"
ema = get_object_or_404(Ema, id=id)
tab_title = _("Report {}").format(ema.identifier)
# If intervention is not recorded (yet or currently) we need to render another template without any data
if not ema.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(
@ -490,6 +500,7 @@ def report_view(request:HttpRequest, id: str):
"geom_form": geom_form,
"parcels": parcels,
"actions": actions,
TAB_TITLE_IDENTIFIER: tab_title,
}
context = BaseContext(request, context).context
return render(request, template, context)

View File

@ -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)

View File

@ -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,

View File

@ -182,7 +182,12 @@ class BaseObject(BaseResource):
return generate_random_string(10)
_now = now()
curr_month = str(_now.month)
curr_month = _now.month
if curr_month < 10:
# Make sure month part has two digits to have same length identifiers by default
curr_month = f"0{curr_month}"
else:
curr_month = str(curr_month)
curr_year = str(_now.year)
rand_str = generate_random_string(
length=definitions[self.__class__]["length"],

View File

@ -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"

View File

@ -18,6 +18,7 @@ from konova.contexts import BaseContext
from konova.decorators import any_group_check
from konova.forms import RemoveModalForm
from konova.models import Deadline
from konova.sub_settings.context_settings import TAB_TITLE_IDENTIFIER
from news.models import ServerMessage
from konova.settings import SSO_SERVER_BASE
@ -92,6 +93,7 @@ def home_view(request: HttpRequest):
"user_compensation_count": user_comps.count(),
"total_eco_count": eco_accs.count(),
"user_eco_count": user_ecco_accs.count(),
TAB_TITLE_IDENTIFIER: _("Home"),
}
context = BaseContext(request, additional_context).context
return render(request, template, context)

Binary file not shown.

View File

@ -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:30+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"
@ -426,7 +426,7 @@ msgstr "kompensiert Eingriff"
msgid "Select the intervention for which this compensation compensates"
msgstr "Wählen Sie den Eingriff, für den diese Kompensation bestimmt ist"
#: compensation/forms/forms.py:184
#: compensation/forms/forms.py:184 compensation/views/compensation.py:91
msgid "New compensation"
msgstr "Neue Kompensation"
@ -452,7 +452,7 @@ msgstr "Vereinbarungsdatum"
msgid "When did the parties agree on this?"
msgstr "Wann wurde dieses Ökokonto offiziell vereinbart?"
#: compensation/forms/forms.py:340
#: compensation/forms/forms.py:340 compensation/views/eco_account.py:101
msgid "New Eco-Account"
msgstr "Neues Ökokonto"
@ -1055,100 +1055,118 @@ msgstr ""
msgid "Responsible data"
msgstr "Daten zu den verantwortlichen Stellen"
#: compensation/views/compensation.py:79
#: compensation/views/compensation.py:47
msgid "Compensations - Overview"
msgstr "Kompensationen - Übersicht"
#: compensation/views/compensation.py:81
msgid "Compensation {} added"
msgstr "Kompensation {} hinzugefügt"
#: compensation/views/compensation.py:143
#: compensation/views/compensation.py:146
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
#: compensation/views/compensation.py:156 compensation/views/eco_account.py:159
#: ema/views.py:226 intervention/views.py:309
msgid "Edit {}"
msgstr "Bearbeite {}"
#: compensation/views/compensation.py:235 compensation/views/eco_account.py:314
#: ema/views.py:187 intervention/views.py:482
msgid "Log"
msgstr "Log"
#: compensation/views/compensation.py:253
#: compensation/views/compensation.py:258
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
#: compensation/views/compensation.py:279 compensation/views/eco_account.py:466
#: ema/views.py:355 intervention/views.py:132
msgid "Document added"
msgstr "Dokument hinzugefügt"
#: compensation/views/compensation.py:343 compensation/views/eco_account.py:355
#: ema/views.py:288
#: compensation/views/compensation.py:348 compensation/views/eco_account.py:360
#: ema/views.py:293
msgid "State added"
msgstr "Zustand hinzugefügt"
#: compensation/views/compensation.py:364 compensation/views/eco_account.py:376
#: ema/views.py:309
#: compensation/views/compensation.py:369 compensation/views/eco_account.py:381
#: ema/views.py:314
msgid "Action added"
msgstr "Maßnahme hinzugefügt"
#: compensation/views/compensation.py:385 compensation/views/eco_account.py:441
#: ema/views.py:330
#: compensation/views/compensation.py:390 compensation/views/eco_account.py:446
#: ema/views.py:335
msgid "Deadline added"
msgstr "Frist/Termin hinzugefügt"
#: compensation/views/compensation.py:407 compensation/views/eco_account.py:398
#: ema/views.py:420
#: compensation/views/compensation.py:412 compensation/views/eco_account.py:403
#: ema/views.py:425
msgid "State removed"
msgstr "Zustand gelöscht"
#: compensation/views/compensation.py:429 compensation/views/eco_account.py:420
#: ema/views.py:442
#: compensation/views/compensation.py:434 compensation/views/eco_account.py:425
#: ema/views.py:447
msgid "Action removed"
msgstr "Maßnahme entfernt"
#: compensation/views/eco_account.py:89
#: compensation/views/compensation.py:452 compensation/views/eco_account.py:554
#: ema/views.py:465 intervention/views.py:546
msgid "Report {}"
msgstr "Bericht {}"
#: compensation/views/eco_account.py:58
msgid "Eco-account - Overview"
msgstr "Ökokonten - Übersicht"
#: compensation/views/eco_account.py:91
msgid "Eco-Account {} added"
msgstr "Ökokonto {} hinzugefügt"
#: compensation/views/eco_account.py:146
#: compensation/views/eco_account.py:149
msgid "Eco-Account {} edited"
msgstr "Ökokonto {} bearbeitet"
#: compensation/views/eco_account.py:257
#: compensation/views/eco_account.py:262
msgid "Eco-account removed"
msgstr "Ökokonto entfernt"
#: compensation/views/eco_account.py:285
#: compensation/views/eco_account.py:290
msgid "Deduction removed"
msgstr "Abbuchung entfernt"
#: compensation/views/eco_account.py:330 ema/views.py:263
#: intervention/views.py:520
#: compensation/views/eco_account.py:335 ema/views.py:268
#: intervention/views.py:524
msgid "{} unrecorded"
msgstr "{} entzeichnet"
#: compensation/views/eco_account.py:330 ema/views.py:263
#: intervention/views.py:520
#: compensation/views/eco_account.py:335 ema/views.py:268
#: intervention/views.py:524
msgid "{} recorded"
msgstr "{} verzeichnet"
#: compensation/views/eco_account.py:531 intervention/views.py:501
#: compensation/views/eco_account.py:536 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
#: compensation/views/eco_account.py:627 ema/views.py:531
#: 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
#: compensation/views/eco_account.py:632 ema/views.py:536
#: 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
#: compensation/views/eco_account.py:639 ema/views.py:543
#: 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
#: compensation/views/eco_account.py:662 ema/views.py:566
#: intervention/views.py:415
msgid "Share settings updated"
msgstr "Freigabe Einstellungen aktualisiert"
@ -1160,7 +1178,7 @@ msgstr "Zahlung hinzugefügt"
msgid "Payment removed"
msgstr "Zahlung gelöscht"
#: ema/forms.py:40
#: ema/forms.py:40 ema/views.py:91
msgid "New EMA"
msgstr "Neue EMA hinzufügen"
@ -1188,15 +1206,19 @@ msgstr ""
msgid "Payment funded compensation"
msgstr "Ersatzzahlungsmaßnahme"
#: ema/views.py:79
#: ema/views.py:48
msgid "EMAs - Overview"
msgstr "EMAs - Übersicht"
#: ema/views.py:81
msgid "EMA {} added"
msgstr "EMA {} hinzugefügt"
#: ema/views.py:212
#: ema/views.py:216
msgid "EMA {} edited"
msgstr "EMA {} bearbeitet"
#: ema/views.py:244
#: ema/views.py:249
msgid "EMA removed"
msgstr "EMA entfernt"
@ -1257,7 +1279,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,35 +1481,39 @@ 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: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:"
@ -1859,7 +1885,11 @@ msgstr "{} wurde erfolgreich vom Nutzer {} geprüft! {}"
msgid "missing"
msgstr "fehlt"
#: konova/views.py:115
#: konova/views.py:96 templates/navbars/navbar.html:16
msgid "Home"
msgstr "Home"
#: konova/views.py:117
msgid "Deadline removed"
msgstr "Frist gelöscht"
@ -1887,7 +1917,7 @@ msgstr "Ältere ..."
msgid "All"
msgstr "Alle"
#: news/templates/news/index.html:9
#: news/templates/news/index.html:9 news/views.py:34
msgid "News"
msgstr "Neuigkeiten"
@ -2156,31 +2186,19 @@ msgstr ""
msgid "KSP"
msgstr ""
#: templates/navbars/navbar.html:16
msgid "Home"
msgstr "Home"
#: templates/navbars/navbar.html:40
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"
@ -2282,10 +2300,18 @@ msgstr "Benachrichtigungseinstellungen ändern"
msgid "Notification settings"
msgstr "Benachrichtigungen"
#: user/views.py:52
#: user/views.py:29
msgid "User settings"
msgstr "Einstellungen"
#: user/views.py:55
msgid "Notifications edited"
msgstr "Benachrichtigungen bearbeitet"
#: user/views.py:67
msgid "User notifications"
msgstr "Benachrichtigungen"
#: venv/lib/python3.7/site-packages/bootstrap4/components.py:17
#: venv/lib/python3.7/site-packages/bootstrap4/templates/bootstrap4/form_errors.html:3
#: venv/lib/python3.7/site-packages/bootstrap4/templates/bootstrap4/messages.html:4

View File

@ -2,8 +2,10 @@ from django.contrib.auth.decorators import login_required
from django.http import HttpRequest
from django.shortcuts import render
from django.utils import timezone
from django.utils.translation import gettext_lazy as _
from konova.contexts import BaseContext
from konova.sub_settings.context_settings import TAB_TITLE_IDENTIFIER
from news.models import ServerMessage
@ -29,6 +31,7 @@ def index_view(request: HttpRequest):
context = {
"news": news,
TAB_TITLE_IDENTIFIER: _("News"),
}
context = BaseContext(request, context).context
return render(request, template, context)

View File

@ -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' %}

View File

@ -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' %}

View File

@ -1,5 +1,7 @@
from django.contrib import messages
from django.contrib.auth.decorators import login_required
from konova.sub_settings.context_settings import TAB_TITLE_IDENTIFIER
from user.models import User
from django.http import HttpRequest
from django.shortcuts import render, redirect, get_object_or_404
@ -24,6 +26,7 @@ def index_view(request: HttpRequest):
template = "user/index.html"
context = {
"user": request.user,
TAB_TITLE_IDENTIFIER: _("User settings"),
}
context = BaseContext(request, context).context
return render(request, template, context)
@ -61,6 +64,7 @@ def notifications_view(request: HttpRequest):
context = {
"user": user,
"form": form,
TAB_TITLE_IDENTIFIER: _("User notifications"),
}
context = BaseContext(request, context).context
return render(request, template, context)