70_Tab_title_too_long #81
13
ema/views.py
13
ema/views.py
@ -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)
|
||||
|
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-20 12:22+0100\n"
|
||||
"POT-Creation-Date: 2022-01-20 12:25+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"
|
||||
@ -1068,12 +1068,12 @@ msgid "Compensation {} edited"
|
||||
msgstr "Kompensation {} bearbeitet"
|
||||
|
||||
#: compensation/views/compensation.py:156 compensation/views/eco_account.py:159
|
||||
#: intervention/views.py:309
|
||||
#: 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:183 intervention/views.py:482
|
||||
#: ema/views.py:187 intervention/views.py:482
|
||||
msgid "Log"
|
||||
msgstr "Log"
|
||||
|
||||
@ -1082,37 +1082,37 @@ msgid "Compensation removed"
|
||||
msgstr "Kompensation entfernt"
|
||||
|
||||
#: compensation/views/compensation.py:279 compensation/views/eco_account.py:466
|
||||
#: ema/views.py:350 intervention/views.py:132
|
||||
#: ema/views.py:355 intervention/views.py:132
|
||||
msgid "Document added"
|
||||
msgstr "Dokument hinzugefügt"
|
||||
|
||||
#: compensation/views/compensation.py:348 compensation/views/eco_account.py:360
|
||||
#: ema/views.py:288
|
||||
#: ema/views.py:293
|
||||
msgid "State added"
|
||||
msgstr "Zustand hinzugefügt"
|
||||
|
||||
#: compensation/views/compensation.py:369 compensation/views/eco_account.py:381
|
||||
#: ema/views.py:309
|
||||
#: ema/views.py:314
|
||||
msgid "Action added"
|
||||
msgstr "Maßnahme hinzugefügt"
|
||||
|
||||
#: compensation/views/compensation.py:390 compensation/views/eco_account.py:446
|
||||
#: ema/views.py:330
|
||||
#: ema/views.py:335
|
||||
msgid "Deadline added"
|
||||
msgstr "Frist/Termin hinzugefügt"
|
||||
|
||||
#: compensation/views/compensation.py:412 compensation/views/eco_account.py:403
|
||||
#: ema/views.py:420
|
||||
#: ema/views.py:425
|
||||
msgid "State removed"
|
||||
msgstr "Zustand gelöscht"
|
||||
|
||||
#: compensation/views/compensation.py:434 compensation/views/eco_account.py:425
|
||||
#: ema/views.py:442
|
||||
#: ema/views.py:447
|
||||
msgid "Action removed"
|
||||
msgstr "Maßnahme entfernt"
|
||||
|
||||
#: compensation/views/compensation.py:452 compensation/views/eco_account.py:554
|
||||
#: intervention/views.py:546
|
||||
#: ema/views.py:465 intervention/views.py:546
|
||||
msgid "Report {}"
|
||||
msgstr "Bericht {}"
|
||||
|
||||
@ -1136,12 +1136,12 @@ msgstr "Ökokonto entfernt"
|
||||
msgid "Deduction removed"
|
||||
msgstr "Abbuchung entfernt"
|
||||
|
||||
#: compensation/views/eco_account.py:335 ema/views.py:263
|
||||
#: compensation/views/eco_account.py:335 ema/views.py:268
|
||||
#: intervention/views.py:524
|
||||
msgid "{} unrecorded"
|
||||
msgstr "{} entzeichnet"
|
||||
|
||||
#: compensation/views/eco_account.py:335 ema/views.py:263
|
||||
#: compensation/views/eco_account.py:335 ema/views.py:268
|
||||
#: intervention/views.py:524
|
||||
msgid "{} recorded"
|
||||
msgstr "{} verzeichnet"
|
||||
@ -1150,22 +1150,22 @@ msgstr "{} verzeichnet"
|
||||
msgid "Deduction added"
|
||||
msgstr "Abbuchung hinzugefügt"
|
||||
|
||||
#: compensation/views/eco_account.py:627 ema/views.py:520
|
||||
#: 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:632 ema/views.py:525
|
||||
#: 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:639 ema/views.py:532
|
||||
#: 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:662 ema/views.py:555
|
||||
#: compensation/views/eco_account.py:662 ema/views.py:566
|
||||
#: intervention/views.py:415
|
||||
msgid "Share settings updated"
|
||||
msgstr "Freigabe Einstellungen aktualisiert"
|
||||
@ -1178,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"
|
||||
|
||||
@ -1206,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"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user