diff --git a/README.md b/README.md index c8c6a66..9d62f61 100644 --- a/README.md +++ b/README.md @@ -44,15 +44,16 @@ nf query_location There is a system for customizing texts in Notfellchen. Not every change of a tet should mean an update of the software. But this should also not become a CMS. Therefore, a solution is used where a number of predefined texts per site are supported. These markdown texts will then be included in the site, if defined. -| Textcode | Location | -|---------------------|----------| -| `how_to` | Index | -| `introduction` | Index | -| `privacy_statement` | About | -| `terms_of_service` | About | -| `imprint` | About | -| `about_us` | About | -| Any rule | About | +| Textcode | Location | +|-------------------------|-----------------------| +| `how_to` | Index | +| `introduction` | Index | +| `privacy_statement` | About | +| `terms_of_service` | About | +| `imprint` | About | +| `about_us` | About | +| `external_site_warning` | External Site Warning | +| Any rule | About | # Developer Notes diff --git a/src/fellchensammlung/templates/fellchensammlung/external_site_warning.html b/src/fellchensammlung/templates/fellchensammlung/external_site_warning.html index d533361..e2b27c2 100644 --- a/src/fellchensammlung/templates/fellchensammlung/external_site_warning.html +++ b/src/fellchensammlung/templates/fellchensammlung/external_site_warning.html @@ -1,10 +1,15 @@ {% extends "fellchensammlung/base_generic.html" %} {% load i18n %} + {% load custom_tags %} {% block content %}
- {% blocktranslate %} -

Achtung du verlässt notfellchen.org

- {% endblocktranslate %} - {% translate "Weiter" %} + {% if external_site_warning %} + {{ external_site_warning.content | render_markdown }} + {% else %} + {% blocktranslate %} +

Achtung du verlässt notfellchen.org

+ {% endblocktranslate %} + {% endif %} + {% translate "Weiter" %}
{% endblock content %} diff --git a/src/fellchensammlung/views.py b/src/fellchensammlung/views.py index 2eee058..f54f4e2 100644 --- a/src/fellchensammlung/views.py +++ b/src/fellchensammlung/views.py @@ -537,6 +537,7 @@ def external_site_warning(request): context = {"url": url} language_code = translation.get_language() lang = Language.objects.get(languagecode=language_code) - Text.get_texts(["external_site_warning", "good_adoption_practices"], language=lang) + texts = Text.get_texts(["external_site_warning", "good_adoption_practices"], language=lang) + context.update(texts) return render(request, 'fellchensammlung/external_site_warning.html', context=context)