feat: Add option to switch between normal and dq

This commit is contained in:
2025-07-20 13:42:56 +02:00
parent 7f7c5a3b04
commit 36c90531a8
2 changed files with 10 additions and 2 deletions

View File

@@ -2,7 +2,7 @@
{% load i18n %}
{% block content %}
<h1 class="title is-1">{% translate "Aktualitätscheck" %}</h1>
<p class="subtitle is-2">{% translate "Überprüfe ob es in Tierheimen neue Tiere gibt die ein Zuhause suchen" %}</p>
<p class="subtitle is-3">{% translate "Überprüfe ob es in Tierheimen neue Tiere gibt die ein Zuhause suchen" %}</p>
<div class="block">
<div class="columns">
@@ -15,6 +15,13 @@
<div class="column">
<strong>Geprüft sind {{ percentage_checked|stringformat:"0.2f" }}%</strong>
</div>
<div class="column">
{% if dq %}
<a class="button is-info" href="{% url 'organization-check' %}">{% translate 'Datenergänzung deaktivieren' %}</a>
{% else %}
<a class="button is-info is-light" href="{% url 'organization-check-dq' %}">{% translate 'Datenergänzung aktivieren' %}</a>
{% endif %}
</div>
</div>
</div>

View File

@@ -848,6 +848,7 @@ def rescue_organization_check(request, context=None):
context["percentage_checked"] = percentage_checked
context["num_rescue_orgs_checked"] = num_rescue_orgs_checked
context["rescue_orgs_with_ongoing_communication"] = rescue_orgs_with_ongoing_communication
context["set_internal_comment_available"] = True
return render(request, 'fellchensammlung/rescue-organization-check.html', context=context)
@@ -858,7 +859,7 @@ def rescue_organization_check_dq(request):
DQ = data quality
"""
context = {"set_species_url_available": True,
"set_internal_comment_available": True,
"dq": True,
"species_url_form": SpeciesURLForm,
"internal_comment_form": RescueOrgInternalComment}
return rescue_organization_check(request, context)