feat: Add rules to TOS page

This commit is contained in:
moanos [he/him] 2025-05-11 13:42:51 +02:00
parent f085f5dcf5
commit 1dbfdccb89
4 changed files with 38 additions and 1 deletions

View File

@ -0,0 +1,17 @@
{% extends "fellchensammlung/base_bulma.html" %}
{% load i18n %}
{% load custom_tags %}
{% block title %}<title>{% translate "Über uns" %}</title>{% endblock %}
{% block content %}
<h2 class="title is-2">{% translate "Regeln" %}</h2>
{% include "fellchensammlung/lists/bulma-list-rules.html" %}
<div class="block">
<h1 class="title is-1">{{ text.title }}</h1>
<div class="content">
{{ text.content | render_markdown }}
</div>
</div>
{% endblock %}

View File

@ -0,0 +1,5 @@
<div class="container-cards">
{% for rule in rules %}
{% include "fellchensammlung/partials/bulma-partial-rule.html" %}
{% endfor %}
</div>

View File

@ -0,0 +1,9 @@
{% load custom_tags %}
<div class="card">
<div class="card-header">
<h2 class="card-header-title">{{ rule.title }}</h2>
</div>
<div class="card-content">
<p class="content">{{ rule.rule_text | render_markdown }}</p>
</div>
</div>

View File

@ -461,7 +461,13 @@ def privacy(request):
def terms_of_service(request):
text = i18n.get_text_by_language("terms_of_service")
return render_text(request, text)
rules = Rule.objects.all()
context = {"rules": rules, "text": text}
return render(
request,
"fellchensammlung/bulma-terms-of-service.html",
context=context
)
def report_adoption(request, adoption_notice_id):