# 70 Tab title EMA
* adds ema tab titles * adds/updates translations
This commit is contained in:
		
							parent
							
								
									2f65caf6b1
								
							
						
					
					
						commit
						9e8d4fc753
					
				
							
								
								
									
										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 ema.models import Ema, EmaDocument
 | 
				
			||||||
from konova.forms import RemoveModalForm, SimpleGeomForm, RecordModalForm
 | 
					from konova.forms import RemoveModalForm, SimpleGeomForm, RecordModalForm
 | 
				
			||||||
from konova.settings import DEFAULT_GROUP, ZB_GROUP, ETS_GROUP
 | 
					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.documents import get_document, remove_document
 | 
				
			||||||
from konova.utils.generators import generate_qr_code
 | 
					from konova.utils.generators import generate_qr_code
 | 
				
			||||||
from konova.utils.message_templates import IDENTIFIER_REPLACED, FORM_INVALID, DATA_UNSHARED, DATA_UNSHARED_EXPLANATION
 | 
					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 = {
 | 
					    context = {
 | 
				
			||||||
        "table": table,
 | 
					        "table": table,
 | 
				
			||||||
 | 
					        TAB_TITLE_IDENTIFIER: _("EMAs - Overview"),
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    context = BaseContext(request, context).context
 | 
					    context = BaseContext(request, context).context
 | 
				
			||||||
    return render(request, template, context)
 | 
					    return render(request, template, context)
 | 
				
			||||||
@ -86,6 +88,7 @@ def new_view(request: HttpRequest):
 | 
				
			|||||||
    context = {
 | 
					    context = {
 | 
				
			||||||
        "form": data_form,
 | 
					        "form": data_form,
 | 
				
			||||||
        "geom_form": geom_form,
 | 
					        "geom_form": geom_form,
 | 
				
			||||||
 | 
					        TAB_TITLE_IDENTIFIER: _("New EMA"),
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    context = BaseContext(request, context).context
 | 
					    context = BaseContext(request, context).context
 | 
				
			||||||
    return render(request, template, 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_zb_member": in_group(_user, ZB_GROUP),
 | 
				
			||||||
        "is_ets_member": in_group(_user, ETS_GROUP),
 | 
					        "is_ets_member": in_group(_user, ETS_GROUP),
 | 
				
			||||||
        "LANIS_LINK": ema.get_LANIS_link(),
 | 
					        "LANIS_LINK": ema.get_LANIS_link(),
 | 
				
			||||||
 | 
					        TAB_TITLE_IDENTIFIER: f"{ema.identifier} - {ema.title}",
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    context = BaseContext(request, context).context
 | 
					    context = BaseContext(request, context).context
 | 
				
			||||||
    return render(request, template, context)
 | 
					    return render(request, template, context)
 | 
				
			||||||
@ -219,6 +223,7 @@ def edit_view(request: HttpRequest, id: str):
 | 
				
			|||||||
    context = {
 | 
					    context = {
 | 
				
			||||||
        "form": data_form,
 | 
					        "form": data_form,
 | 
				
			||||||
        "geom_form": geom_form,
 | 
					        "geom_form": geom_form,
 | 
				
			||||||
 | 
					        TAB_TITLE_IDENTIFIER: _("Edit {}").format(ema.identifier),
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    context = BaseContext(request, context).context
 | 
					    context = BaseContext(request, context).context
 | 
				
			||||||
    return render(request, template, context)
 | 
					    return render(request, template, context)
 | 
				
			||||||
@ -457,10 +462,15 @@ def report_view(request:HttpRequest, id: str):
 | 
				
			|||||||
    template = "ema/report/report.html"
 | 
					    template = "ema/report/report.html"
 | 
				
			||||||
    ema = get_object_or_404(Ema, id=id)
 | 
					    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 intervention is not recorded (yet or currently) we need to render another template without any data
 | 
				
			||||||
    if not ema.recorded:
 | 
					    if not ema.recorded:
 | 
				
			||||||
        template = "report/unavailable.html"
 | 
					        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
 | 
					    # Prepare data for map viewer
 | 
				
			||||||
    geom_form = SimpleGeomForm(
 | 
					    geom_form = SimpleGeomForm(
 | 
				
			||||||
@ -490,6 +500,7 @@ def report_view(request:HttpRequest, id: str):
 | 
				
			|||||||
        "geom_form": geom_form,
 | 
					        "geom_form": geom_form,
 | 
				
			||||||
        "parcels": parcels,
 | 
					        "parcels": parcels,
 | 
				
			||||||
        "actions": actions,
 | 
					        "actions": actions,
 | 
				
			||||||
 | 
					        TAB_TITLE_IDENTIFIER: tab_title,
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    context = BaseContext(request, context).context
 | 
					    context = BaseContext(request, context).context
 | 
				
			||||||
    return render(request, template, context)
 | 
					    return render(request, template, context)
 | 
				
			||||||
 | 
				
			|||||||
										
											Binary file not shown.
										
									
								
							@ -26,7 +26,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: 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"
 | 
					"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"
 | 
				
			||||||
@ -1068,12 +1068,12 @@ msgid "Compensation {} edited"
 | 
				
			|||||||
msgstr "Kompensation {} bearbeitet"
 | 
					msgstr "Kompensation {} bearbeitet"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#: compensation/views/compensation.py:156 compensation/views/eco_account.py:159
 | 
					#: 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 {}"
 | 
					msgid "Edit {}"
 | 
				
			||||||
msgstr "Bearbeite {}"
 | 
					msgstr "Bearbeite {}"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#: compensation/views/compensation.py:235 compensation/views/eco_account.py:314
 | 
					#: 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"
 | 
					msgid "Log"
 | 
				
			||||||
msgstr "Log"
 | 
					msgstr "Log"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -1082,37 +1082,37 @@ msgid "Compensation removed"
 | 
				
			|||||||
msgstr "Kompensation entfernt"
 | 
					msgstr "Kompensation entfernt"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#: compensation/views/compensation.py:279 compensation/views/eco_account.py:466
 | 
					#: 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"
 | 
					msgid "Document added"
 | 
				
			||||||
msgstr "Dokument hinzugefügt"
 | 
					msgstr "Dokument hinzugefügt"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#: compensation/views/compensation.py:348 compensation/views/eco_account.py:360
 | 
					#: compensation/views/compensation.py:348 compensation/views/eco_account.py:360
 | 
				
			||||||
#: ema/views.py:288
 | 
					#: ema/views.py:293
 | 
				
			||||||
msgid "State added"
 | 
					msgid "State added"
 | 
				
			||||||
msgstr "Zustand hinzugefügt"
 | 
					msgstr "Zustand hinzugefügt"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#: compensation/views/compensation.py:369 compensation/views/eco_account.py:381
 | 
					#: compensation/views/compensation.py:369 compensation/views/eco_account.py:381
 | 
				
			||||||
#: ema/views.py:309
 | 
					#: ema/views.py:314
 | 
				
			||||||
msgid "Action added"
 | 
					msgid "Action added"
 | 
				
			||||||
msgstr "Maßnahme hinzugefügt"
 | 
					msgstr "Maßnahme hinzugefügt"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#: compensation/views/compensation.py:390 compensation/views/eco_account.py:446
 | 
					#: compensation/views/compensation.py:390 compensation/views/eco_account.py:446
 | 
				
			||||||
#: ema/views.py:330
 | 
					#: ema/views.py:335
 | 
				
			||||||
msgid "Deadline added"
 | 
					msgid "Deadline added"
 | 
				
			||||||
msgstr "Frist/Termin hinzugefügt"
 | 
					msgstr "Frist/Termin hinzugefügt"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#: compensation/views/compensation.py:412 compensation/views/eco_account.py:403
 | 
					#: compensation/views/compensation.py:412 compensation/views/eco_account.py:403
 | 
				
			||||||
#: ema/views.py:420
 | 
					#: ema/views.py:425
 | 
				
			||||||
msgid "State removed"
 | 
					msgid "State removed"
 | 
				
			||||||
msgstr "Zustand gelöscht"
 | 
					msgstr "Zustand gelöscht"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#: compensation/views/compensation.py:434 compensation/views/eco_account.py:425
 | 
					#: compensation/views/compensation.py:434 compensation/views/eco_account.py:425
 | 
				
			||||||
#: ema/views.py:442
 | 
					#: ema/views.py:447
 | 
				
			||||||
msgid "Action removed"
 | 
					msgid "Action removed"
 | 
				
			||||||
msgstr "Maßnahme entfernt"
 | 
					msgstr "Maßnahme entfernt"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#: compensation/views/compensation.py:452 compensation/views/eco_account.py:554
 | 
					#: 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 {}"
 | 
					msgid "Report {}"
 | 
				
			||||||
msgstr "Bericht {}"
 | 
					msgstr "Bericht {}"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -1136,12 +1136,12 @@ msgstr "Ökokonto entfernt"
 | 
				
			|||||||
msgid "Deduction removed"
 | 
					msgid "Deduction removed"
 | 
				
			||||||
msgstr "Abbuchung entfernt"
 | 
					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
 | 
					#: intervention/views.py:524
 | 
				
			||||||
msgid "{} unrecorded"
 | 
					msgid "{} unrecorded"
 | 
				
			||||||
msgstr "{} entzeichnet"
 | 
					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
 | 
					#: intervention/views.py:524
 | 
				
			||||||
msgid "{} recorded"
 | 
					msgid "{} recorded"
 | 
				
			||||||
msgstr "{} verzeichnet"
 | 
					msgstr "{} verzeichnet"
 | 
				
			||||||
@ -1150,22 +1150,22 @@ msgstr "{} verzeichnet"
 | 
				
			|||||||
msgid "Deduction added"
 | 
					msgid "Deduction added"
 | 
				
			||||||
msgstr "Abbuchung hinzugefügt"
 | 
					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
 | 
					#: intervention/views.py:380
 | 
				
			||||||
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"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#: compensation/views/eco_account.py:632 ema/views.py:525
 | 
					#: compensation/views/eco_account.py:632 ema/views.py:536
 | 
				
			||||||
#: intervention/views.py:385
 | 
					#: intervention/views.py:385
 | 
				
			||||||
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"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#: compensation/views/eco_account.py:639 ema/views.py:532
 | 
					#: compensation/views/eco_account.py:639 ema/views.py:543
 | 
				
			||||||
#: intervention/views.py:392
 | 
					#: intervention/views.py:392
 | 
				
			||||||
msgid "Share link invalid"
 | 
					msgid "Share link invalid"
 | 
				
			||||||
msgstr "Freigabelink ungültig"
 | 
					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
 | 
					#: intervention/views.py:415
 | 
				
			||||||
msgid "Share settings updated"
 | 
					msgid "Share settings updated"
 | 
				
			||||||
msgstr "Freigabe Einstellungen aktualisiert"
 | 
					msgstr "Freigabe Einstellungen aktualisiert"
 | 
				
			||||||
@ -1178,7 +1178,7 @@ msgstr "Zahlung hinzugefügt"
 | 
				
			|||||||
msgid "Payment removed"
 | 
					msgid "Payment removed"
 | 
				
			||||||
msgstr "Zahlung gelöscht"
 | 
					msgstr "Zahlung gelöscht"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#: ema/forms.py:40
 | 
					#: ema/forms.py:40 ema/views.py:91
 | 
				
			||||||
msgid "New EMA"
 | 
					msgid "New EMA"
 | 
				
			||||||
msgstr "Neue EMA hinzufügen"
 | 
					msgstr "Neue EMA hinzufügen"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -1206,15 +1206,19 @@ msgstr ""
 | 
				
			|||||||
msgid "Payment funded compensation"
 | 
					msgid "Payment funded compensation"
 | 
				
			||||||
msgstr "Ersatzzahlungsmaßnahme"
 | 
					msgstr "Ersatzzahlungsmaßnahme"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#: ema/views.py:79
 | 
					#: ema/views.py:48
 | 
				
			||||||
 | 
					msgid "EMAs - Overview"
 | 
				
			||||||
 | 
					msgstr "EMAs - Übersicht"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#: ema/views.py:81
 | 
				
			||||||
msgid "EMA {} added"
 | 
					msgid "EMA {} added"
 | 
				
			||||||
msgstr "EMA {} hinzugefügt"
 | 
					msgstr "EMA {} hinzugefügt"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#: ema/views.py:212
 | 
					#: ema/views.py:216
 | 
				
			||||||
msgid "EMA {} edited"
 | 
					msgid "EMA {} edited"
 | 
				
			||||||
msgstr "EMA {} bearbeitet"
 | 
					msgstr "EMA {} bearbeitet"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#: ema/views.py:244
 | 
					#: ema/views.py:249
 | 
				
			||||||
msgid "EMA removed"
 | 
					msgid "EMA removed"
 | 
				
			||||||
msgstr "EMA entfernt"
 | 
					msgstr "EMA entfernt"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user