From 1ff1a35ce841c268913caf21f8b6d3763bb9291f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Laura=20Kl=C3=BCnder?= Date: Thu, 1 Dec 2016 12:42:51 +0100 Subject: [PATCH] editor: fix title of mapitem edit view --- src/c3nav/editor/templates/editor/mapitem.html | 2 +- src/c3nav/editor/views.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/c3nav/editor/templates/editor/mapitem.html b/src/c3nav/editor/templates/editor/mapitem.html index 1c32a223..2e58856f 100644 --- a/src/c3nav/editor/templates/editor/mapitem.html +++ b/src/c3nav/editor/templates/editor/mapitem.html @@ -1,6 +1,6 @@ {% load bootstrap3 %} -

{% if new %}New{% else %}Edit{% endif %} {{ mapitem_type.title }}

+

{% if new %}New{% else %}Edit{% endif %} {{ title }}

{% csrf_token %} {% bootstrap_form form %} diff --git a/src/c3nav/editor/views.py b/src/c3nav/editor/views.py index c50af845..57db6c7e 100644 --- a/src/c3nav/editor/views.py +++ b/src/c3nav/editor/views.py @@ -149,6 +149,7 @@ def edit_mapitem(request, mapitem_type, name=None): return render(request, 'editor/mapitem.html', { 'form': form, 'mapitem_type': mapitem_type, + 'title': mapitemtype._meta.verbose_name, 'has_geometry': hasattr(mapitemtype, 'geometry'), 'name': orig_name, 'geomtype': getattr(mapitemtype, 'geomtype', None),