Skip to content

armgit / wger

Public Imported from GitHub
0

Self hosted FLOSS fitness/workout, nutrition and weight tracker

Add page with contact info to comply with German "Impressumspflicht"

Roland Geider744fd01eb2ab
diff --git a/wger/manager/context_processor.py b/wger/manager/context_processor.py
index 5461ff5f6..d3fbd7a15 100644
--- a/wger/manager/context_processor.py
+++ b/wger/manager/context_processor.py
@@ -28,9 +28,6 @@ def processor(request):
# Application version
'version': get_version(),
- # Do not track header
- 'DNT': request.META.get('HTTP_DNT', False),
-
# User language
'language': load_language(),
@@ -40,6 +37,9 @@ def processor(request):
# Translation links
'i18n_path': {'de': '/de' + full_path[3:],
'en': '/en' + full_path[3:]},
+
+ # Contact email
+ 'contact_email': 'roland @ geider.net',
}
# Pseudo-intelligent navigation here
diff --git a/wger/manager/templates/misc/about.html b/wger/manager/templates/misc/about.html
new file mode 100644
index 000000000..692621eaf
--- /dev/null
+++ b/wger/manager/templates/misc/about.html
@@ -0,0 +1,16 @@
+{% extends "base.html" %}
+{% load i18n %}
+{% load staticfiles %}
+
+{% block title %}{% trans "About us" %}{% endblock %}
+
+{% block content %}
+<p>{% trans "Responsible for the content of this site as per German law §5 TMG:" %}</p>
+<p>
+Roland Geider<br>
+Achtermannstr. 25<br>
+48143<br>
+Münster<br>
+<a href="mailto:{{contact_email}}">{{contact_email}}</a>
+</p>
+{% endblock %}
diff --git a/wger/manager/templates/template.html b/wger/manager/templates/template.html
index aed22441a..8de66aebd 100644
--- a/wger/manager/templates/template.html
+++ b/wger/manager/templates/template.html
@@ -96,6 +96,9 @@
<a href="{% url 'index' %}">{% trans "Dashboard" %}</a>
{% endif %}
</li>
+ {% if not user.is_authenticated %}
+ <li><a href="{% url 'demo-account' %}">{% trans "Demo account" %} </a></li>
+ {% endif %}
{% if user.is_authenticated %}
<li {% if active_tab == 'workout' %}class="active"{% endif %}><a href="{% url 'wger.manager.views.workout.overview' %}">{% trans "Workouts" %}</a></li>
@@ -150,9 +153,6 @@
data-toggle="dropdown">{% trans "About this software" %} <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="{% url 'software:features' %}">{% trans "Features" %}</a></li>
- {% if not user.is_authenticated %}
- <li><a href="{% url 'demo-account' %}">{% trans "Demo account" %} </a></li>
- {% endif %}
<li><a href="{% url 'software:contribute' %}">{% trans "Contribute!" %} </a></li>
<li class="divider"></li>
<li class="nav-header">{% trans "Developers" %}</li>
@@ -264,12 +264,12 @@
</div>
<div class="ym-g80 ym-gl">
<div class="ym-gbox-left">
- © <a href="mailto:roland @ geider.net">Roland Geider</a>
+ © <a href="mailto:{{contact_email}}">Roland Geider</a>
<!--
– {% trans "Layout based on <a href='http://www.yaml.de'>YAML</a>" %}
-->
| <a href="{% url 'software:contribute' %}">{% trans "Contribute!" %}</a>
- | <a href="{% url 'software:contribute' %}">{% trans "Impressum" %}</a>
+ | <a href="{% url 'about' %}">{% trans "About" %}</a>
| <a href="{% url 'software:contribute' %}">{% trans "Feedback" %}</a>
</div>
diff --git a/wger/manager/urls.py b/wger/manager/urls.py
index 5043cd206..323efc3cc 100644
--- a/wger/manager/urls.py
+++ b/wger/manager/urls.py
@@ -1,6 +1,7 @@
from django.conf.urls import patterns, url
from django.contrib.auth.decorators import login_required
from django.core.urlresolvers import reverse_lazy
+from django.views.generic import TemplateView
from wger.manager.views.workout import WorkoutEditView
from wger.manager.views.workout import WorkoutDeleteView
@@ -91,6 +92,11 @@ urlpatterns = patterns('wger.manager.views',
url(r'^workout/api/edit-set$', 'set.api_edit_set'),
url(r'^workout/api/edit-settting$', 'setting.api_edit_setting'),
url(r'^workout/api/user-preferences$', 'user.api_user_preferences'),
+
+ # Others
+ url(r'^about$',
+ TemplateView.as_view(template_name="misc/about.html"),
+ name='about'),
)
# PDF stuff is in a different file