From 223c9f2f9b19e44d449f307ca00d792884ad1708 Mon Sep 17 00:00:00 2001 From: moanos Date: Sun, 14 Apr 2024 14:03:18 +0200 Subject: [PATCH] feat: Add privacy statement, terms of service and imprint to about --- .../templates/fellchensammlung/about.html | 15 +++++++++++++++ src/fellchensammlung/views.py | 9 ++++++++- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/src/fellchensammlung/templates/fellchensammlung/about.html b/src/fellchensammlung/templates/fellchensammlung/about.html index 9c59bbf..9f9fe60 100644 --- a/src/fellchensammlung/templates/fellchensammlung/about.html +++ b/src/fellchensammlung/templates/fellchensammlung/about.html @@ -1,7 +1,22 @@ {% extends "fellchensammlung/base_generic.html" %} {% load i18n %} +{% load custom_tags %} {% block content %}

{% translate "Regeln" %}

{% include "fellchensammlung/lists/list-rules.html" %} + {% if privacy_statement %} +

{{ privacy_statement.title }}

+

{{ privacy.content | render_markdown }}

+ {% endif %} + + {% if terms_of_service %} +

{{ terms_of_service.title }}

+

{{ terms_of_service.content | render_markdown }}

+ {% endif %} + + {% if imprint %} +

{{ imprint.title }}

+

{{ imprint.content | render_markdown }}

+ {% endif %} {% endblock %} \ No newline at end of file diff --git a/src/fellchensammlung/views.py b/src/fellchensammlung/views.py index eb27d59..3636b48 100644 --- a/src/fellchensammlung/views.py +++ b/src/fellchensammlung/views.py @@ -111,8 +111,15 @@ def about(request): imprint = Text.objects.get(text_code="imprint", language=lang) except Text.DoesNotExist: imprint = None + try: + privacy_statement = Text.objects.get(text_code="privacy_statement", language=lang) + except Text.DoesNotExist: + privacy_statement = None - context = {"rules": rules, "terms_of_service": terms_of_service, "imprint": imprint} + context = {"rules": rules, + "terms_of_service": terms_of_service, + "imprint": imprint, + "privacy_statement": privacy_statement} return render( request, "fellchensammlung/about.html",