refactor(bulma): convert instance healthcheck

This commit is contained in:
2025-05-25 00:15:55 +02:00
parent ada194122d
commit b0887ab731

View File

@@ -1,12 +1,11 @@
{% extends "fellchensammlung/base_generic.html" %} {% extends "fellchensammlung/base_bulma.html" %}
{% load i18n %} {% load i18n %}
{% block title %}<title>{% translate "Instanz-Check" %}</title> {% endblock %} {% block title %}<title>{% translate "Instanz-Check" %}</title> {% endblock %}
{% block content %} {% block content %}
<div class="card"> <h1 class="title is-1">{% translate "Instanz-Check" %}</h1>
<h1>{% translate "Instanz-Check" %}</h1> {% if missing_texts|length > 0 %}
{% if missing_texts|length > 0 %} <h2 class="title is-2">{% trans "Fehlende Texte" %}</h2>
<h2>{% trans "Fehlende Texte" %}</h2> <div class="block">
<p>
<table> <table>
<tr> <tr>
<th>{% translate "Text Code" %}</th> <th>{% translate "Text Code" %}</th>
@@ -19,14 +18,14 @@
</tr> </tr>
{% endfor %} {% endfor %}
</table> </table>
</p> </div>
{% else %} {% else %}
<p>{% translate "Texte scheinen vollständig" %}</p> <p>{% translate "Texte scheinen vollständig" %}</p>
{% endif %} {% endif %}
<h2>{% trans "Zeitstempel" %}</h2> <h2 class="title is-2">{% trans "Zeitstempel" %}</h2>
{% if timestamps|length > 0 %} {% if timestamps|length > 0 %}
<p> <div class="block">
<table> <table>
<tr> <tr>
<th>{% translate "Key" %}</th> <th>{% translate "Key" %}</th>
@@ -41,79 +40,81 @@
</tr> </tr>
{% endfor %} {% endfor %}
</table> </table>
</p> </div>
{% else %} {% else %}
<p>{% translate "Keine Zeitstempel geloggt." %}</p> <p>{% translate "Keine Zeitstempel geloggt." %}</p>
{% endif %} {% endif %}
<h2>{% translate "Nicht-lokalisierte Vermittlungen" %}</h2> <h2 class="title is-2">{% translate "Nicht-lokalisierte Vermittlungen" %}</h2>
{% if number_not_geocoded_adoption_notices > 0 %} {% if number_not_geocoded_adoption_notices > 0 %}
<details> <details>
<summary>{{ number_not_geocoded_adoption_notices }}/{{ number_of_adoption_notices }}</summary> <summary>{{ number_not_geocoded_adoption_notices }}/{{ number_of_adoption_notices }}</summary>
<ul> <ul>
{% for adoption_notice in none_geocoded_adoption_notices %} {% for adoption_notice in none_geocoded_adoption_notices %}
<li> <li>
<a href="{{ adoption_notice.get_absolute_url }}">{{ adoption_notice.name }}</a> <a href="{{ adoption_notice.get_absolute_url }}">{{ adoption_notice.name }}</a>
</li> </li>
{% endfor %} {% endfor %}
</ul> </ul>
</details> </details>
{% else %} {% else %}
<p>{{ number_not_geocoded_adoption_notices }}/{{ number_of_adoption_notices }}</p> <p>{{ number_not_geocoded_adoption_notices }}/{{ number_of_adoption_notices }}</p>
{% endif %} {% endif %}
<h2>{% translate "Nicht-lokalisierte Tierschutzorganisationen" %}</h2> <h2 class="title is-2">{% translate "Nicht-lokalisierte Tierschutzorganisationen" %}</h2>
{% if number_not_geocoded_rescue_orgs > 0 %} {% if number_not_geocoded_rescue_orgs > 0 %}
<details> <details>
<summary>{{ number_not_geocoded_rescue_orgs }}/{{ number_of_rescue_orgs }}</summary> <summary>{{ number_not_geocoded_rescue_orgs }}/{{ number_of_rescue_orgs }}</summary>
<ul> <ul>
{% for rescue_org in none_geocoded_rescue_orgs %} {% for rescue_org in none_geocoded_rescue_orgs %}
<li> <li>
<a href="{{ rescue_org.get_absolute_url }}">{{ rescue_org.name }}</a> <a href="{{ rescue_org.get_absolute_url }}">{{ rescue_org.name }}</a>
</li> </li>
{% endfor %} {% endfor %}
</ul> </ul>
</details> </details>
{% else %} {% else %}
<p>{{ number_not_geocoded_rescue_orgs }}/{{ number_of_rescue_orgs }}</p> <p>{{ number_not_geocoded_rescue_orgs }}/{{ number_of_rescue_orgs }}</p>
{% endif %} {% endif %}
<h2>{% translate "Nicht-geprüfte Vermittlungen" %}</h2> <h2 class="title is-2">{% translate "Nicht-geprüfte Vermittlungen" %}</h2>
{% if number_unchecked_ans > 0 %} {% if number_unchecked_ans > 0 %}
<details> <details>
<summary>{{ number_unchecked_ans }}</summary> <summary>{{ number_unchecked_ans }}</summary>
<ul> <ul>
{% for unchecked_an in unchecked_ans %} {% for unchecked_an in unchecked_ans %}
<li> <li>
<a href="{{ unchecked_an.get_absolute_url }}">{{ unchecked_an.name }}</a> <a href="{{ unchecked_an.get_absolute_url }}">{{ unchecked_an.name }}</a>
</li> </li>
{% endfor %} {% endfor %}
</ul> </ul>
</details> </details>
{% else %} {% else %}
<p>{{ number_unchecked_ans }}</p> <p>{{ number_unchecked_ans }}</p>
{% endif %} {% endif %}
<form class="notification-card-mark-read" method="post"> <div class="grid">
<form class="cell" method="post">
{% csrf_token %} {% csrf_token %}
<input type="hidden" name="action" value="clean_locations"> <input type="hidden" name="action" value="clean_locations">
<button class="btn" type="submit" id="submit"> <button class="button is-primary" type="submit" id="submit">
<i class="fa-solid fa-broom"></i> {% translate "Erneut lokalisieren" %} <i class="fa-solid fa-broom"></i> {% translate "Erneut lokalisieren" %}
</button> </button>
</form> </form>
<form class="notification-card-mark-read" method="post"> <form class="cell" method="post">
{% csrf_token %} {% csrf_token %}
<input type="hidden" name="action" value="deactivate_unchecked_adoption_notices"> <input type="hidden" name="action" value="deactivate_unchecked_adoption_notices">
<button class="btn" type="submit" id="submit"> <button class="button is-primary" type="submit" id="submit">
<i class="fa-solid fa-broom"></i> {% translate "Deaktiviere ungeprüfte Vermittlungen" %} <i class="fa-solid fa-broom"></i> {% translate "Deaktiviere ungeprüfte Vermittlungen" %}
</button> </button>
</form> </form>
<form class="notification-card-mark-read" method="post"> <form class="cell" method="post">
{% csrf_token %} {% csrf_token %}
<input type="hidden" name="action" value="deactivate_404"> <input type="hidden" name="action" value="deactivate_404">
<button class="btn" type="submit" id="submit"> <button class="button is-primary" type="submit" id="submit">
<i class="fa-solid fa-broom"></i> {% translate "Deaktiviere 404 Vermittlungen" %} <i class="fa-solid fa-broom"></i> {% translate "Deaktiviere 404 Vermittlungen" %}
</button> </button>
</form> </form>