From 3ae4b8689304773a01f78d18444cd29924436c98 Mon Sep 17 00:00:00 2001 From: Yohan Boniface Date: Mon, 25 Aug 2014 09:42:17 +0200 Subject: [PATCH] Allow to override the feedback link --- umap/context_processors.py | 6 ++++++ umap/settings/base.py | 2 ++ umap/templates/umap/navigation.html | 2 +- 3 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 umap/context_processors.py diff --git a/umap/context_processors.py b/umap/context_processors.py new file mode 100644 index 00000000..f973e7c1 --- /dev/null +++ b/umap/context_processors.py @@ -0,0 +1,6 @@ +from django.conf import settings + +def feedback_link(request): + return { + 'UMAP_FEEDBACK_LINK': settings.UMAP_FEEDBACK_LINK + } diff --git a/umap/settings/base.py b/umap/settings/base.py index 7498a940..a5065500 100644 --- a/umap/settings/base.py +++ b/umap/settings/base.py @@ -109,6 +109,7 @@ TEMPLATE_CONTEXT_PROCESSORS += ( 'django.core.context_processors.request', 'social.apps.django_app.context_processors.backends', 'social.apps.django_app.context_processors.login_redirect', + 'umap.context_processors.feedback_link' ) TEMPLATE_LOADERS = ( @@ -148,6 +149,7 @@ SITE_URL = "http://umap.org" UMAP_DEMO_SITE = False MAP_SHORT_URL_NAME = "umap_short_url" UMAP_USE_UNACCENT = False +UMAP_FEEDBACK_LINK = "http://wiki.openstreetmap.org/wiki/UMap#Feedback_and_help" #============================================================================== # Third party app settings diff --git a/umap/templates/umap/navigation.html b/umap/templates/umap/navigation.html index 5307c85f..970d3c1b 100644 --- a/umap/templates/umap/navigation.html +++ b/umap/templates/umap/navigation.html @@ -14,7 +14,7 @@
  • {% endif %}
  • {% trans "About" %}
  • -
  • {% trans "Feedback" %}
  • +
  • {% trans "Feedback" %}
  • {% if user.is_authenticated %}
  • {% trans "Log out" %}
  • {% endif %}