feat: Add option to switch between normal and dq
This commit is contained in:
		@@ -2,7 +2,7 @@
 | 
				
			|||||||
{% load i18n %}
 | 
					{% load i18n %}
 | 
				
			||||||
{% block content %}
 | 
					{% block content %}
 | 
				
			||||||
    <h1 class="title is-1">{% translate "Aktualitätscheck" %}</h1>
 | 
					    <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="block">
 | 
				
			||||||
        <div class="columns">
 | 
					        <div class="columns">
 | 
				
			||||||
@@ -15,6 +15,13 @@
 | 
				
			|||||||
            <div class="column">
 | 
					            <div class="column">
 | 
				
			||||||
                <strong>Geprüft sind {{ percentage_checked|stringformat:"0.2f" }}%</strong>
 | 
					                <strong>Geprüft sind {{ percentage_checked|stringformat:"0.2f" }}%</strong>
 | 
				
			||||||
            </div>
 | 
					            </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>
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -848,6 +848,7 @@ def rescue_organization_check(request, context=None):
 | 
				
			|||||||
    context["percentage_checked"] = percentage_checked
 | 
					    context["percentage_checked"] = percentage_checked
 | 
				
			||||||
    context["num_rescue_orgs_checked"] = num_rescue_orgs_checked
 | 
					    context["num_rescue_orgs_checked"] = num_rescue_orgs_checked
 | 
				
			||||||
    context["rescue_orgs_with_ongoing_communication"] = rescue_orgs_with_ongoing_communication
 | 
					    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)
 | 
					    return render(request, 'fellchensammlung/rescue-organization-check.html', context=context)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -858,7 +859,7 @@ def rescue_organization_check_dq(request):
 | 
				
			|||||||
    DQ = data quality
 | 
					    DQ = data quality
 | 
				
			||||||
    """
 | 
					    """
 | 
				
			||||||
    context = {"set_species_url_available": True,
 | 
					    context = {"set_species_url_available": True,
 | 
				
			||||||
               "set_internal_comment_available": True,
 | 
					               "dq": True,
 | 
				
			||||||
               "species_url_form": SpeciesURLForm,
 | 
					               "species_url_form": SpeciesURLForm,
 | 
				
			||||||
               "internal_comment_form": RescueOrgInternalComment}
 | 
					               "internal_comment_form": RescueOrgInternalComment}
 | 
				
			||||||
    return rescue_organization_check(request, context)
 | 
					    return rescue_organization_check(request, context)
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user