Allow to override the feedback link

This commit is contained in:
Yohan Boniface 2014-08-25 09:42:17 +02:00
parent 1e6431146b
commit 3ae4b86893
3 changed files with 9 additions and 1 deletions

View file

@ -0,0 +1,6 @@
from django.conf import settings
def feedback_link(request):
return {
'UMAP_FEEDBACK_LINK': settings.UMAP_FEEDBACK_LINK
}

View file

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

View file

@ -14,7 +14,7 @@
<li><a href="{% url 'login' %}" class="login">{% trans "Log in" %} / {% trans "Sign in" %}</a></li>
{% endif %}
<li><a href="{% url 'about' %}">{% trans "About" %}</a></li>
<li class="mhide"><a href="mailto:yb@fluv.io">{% trans "Feedback" %}</a></li>
<li class="mhide"><a href="{{ UMAP_FEEDBACK_LINK }}">{% trans "Feedback" %}</a></li>
{% if user.is_authenticated %}
<li><a href="{% url 'logout' %}" class="logout">{% trans "Log out" %}</a></li>
{% endif %}