From 3faf7d58ac68ddfd521623964731d83f1be75d6a Mon Sep 17 00:00:00 2001 From: moanos Date: Sun, 7 Apr 2024 09:03:20 +0200 Subject: [PATCH] feat: Add basic modqueue view --- .../templates/fellchensammlung/modqueue.html | 10 ++++++++++ src/fellchensammlung/urls.py | 1 + src/fellchensammlung/views.py | 8 +++++++- 3 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 src/fellchensammlung/templates/fellchensammlung/modqueue.html diff --git a/src/fellchensammlung/templates/fellchensammlung/modqueue.html b/src/fellchensammlung/templates/fellchensammlung/modqueue.html new file mode 100644 index 0000000..3a3ac4d --- /dev/null +++ b/src/fellchensammlung/templates/fellchensammlung/modqueue.html @@ -0,0 +1,10 @@ +{% extends "fellchensammlung/base_generic.html" %} +{% load i18n %} + +{% block content %} +

{% translate "Modqueue" %}

+

{% translate "Erlaube oder blockiere Vermittlungsanzeigen die bisher noch zurückgehaltemn werden " %}

+ {% for report in reports %} + {% include "fellchensammlung/partials/partial-report.html" %} + {% endfor %} +{% endblock %} \ No newline at end of file diff --git a/src/fellchensammlung/urls.py b/src/fellchensammlung/urls.py index 79773ca..d0e9d2a 100644 --- a/src/fellchensammlung/urls.py +++ b/src/fellchensammlung/urls.py @@ -27,6 +27,7 @@ urlpatterns = [ path("melden//", views.report_adoption, name="report-adoption-notice"), path("meldung//", views.report_detail, name="report-detail"), path("meldung//sucess", views.report_detail_success, name="report-detail-success"), + path("modqueue/", views.modqueue, name="modqueue"), ########### ## USERS ## diff --git a/src/fellchensammlung/views.py b/src/fellchensammlung/views.py index d6d4d21..9de3512 100644 --- a/src/fellchensammlung/views.py +++ b/src/fellchensammlung/views.py @@ -124,4 +124,10 @@ def report_detail_success(request, report_id): def member_detail(request, user): member = Member.objects.get(user=user) context = {"member": member} - return render(request, 'fellchensammlung/details/detail-member.html', context=context) \ No newline at end of file + return render(request, 'fellchensammlung/details/detail-member.html', context=context) + + +def modqueue(request): + open_reports = Report.objects.filter(status=Report.WAITING) + context = {"reports": open_reports} + return render(request, 'fellchensammlung/modqueue.html', context=context)