feat: Convert detail user to bulma

This commit is contained in:
2025-06-18 12:55:40 +02:00
parent cc873d6029
commit 6798cf3477

View File

@@ -5,79 +5,73 @@
{% block content %} {% block content %}
<h1>{{ user.get_full_name }}</h1> <h1 class="title is-1"><i class="fas fa-user"></i> {{ user.get_full_name }}</h1>
<div class="spaced">
<div class="container-cards"> <div class="block">
<h2>{% trans 'Daten' %}</h2> <h2>{% trans 'Profil verwalten' %}</h2>
<div class="card"> <p><strong>{% translate "E-Mail" %}:</strong> {{ user.email }}</p>
<p><strong>{% translate "Username" %}:</strong> {{ user.username }}</p> <div class="">
<p><strong>{% translate "E-Mail" %}:</strong> {{ user.email }}</p> <p>
</div> <a class="button" href="{% url 'password_change' %}">{% translate "Change password" %}</a>
<a class="button" href="{% url 'user-me-export' %}">{% translate "Daten exportieren" %}</a>
</p>
</div> </div>
</div>
{% if user.id is request.user.id %}
<div class="container-cards"> <div class="block">
<h2>{% trans 'Profil verwalten' %}</h2> <h2 class="title is-2">{% trans 'Einstellungen' %}</h2>
<div class="container-comment-form"> <form class="block" action="" method="POST">
<p> {% csrf_token %}
<a class="btn2" href="{% url 'password_change' %}">{% translate "Change password" %}</a> {% if user.email_notifications %}
<a class="btn2" href="{% url 'user-me-export' %}">{% translate "Daten exportieren" %}</a> <label class="toggle">
</p> <input type="submit" class="toggle-checkbox checked" name="toggle_email_notifications">
</div> <div class="toggle-switch round "></div>
</div> <span class="slider-label">
{% if user.id is request.user.id %}
<div class="detail-animal-header"><h2>{% trans 'Einstellungen' %}</h2></div>
<div class="container-cards">
<form class="card" action="" method="POST">
{% csrf_token %}
{% if user.email_notifications %}
<label class="toggle">
<input type="submit" class="toggle-checkbox checked" name="toggle_email_notifications">
<div class="toggle-switch round "></div>
<span class="slider-label">
{% translate 'E-Mail Benachrichtigungen' %} {% translate 'E-Mail Benachrichtigungen' %}
</span> </span>
</label> </label>
{% else %} {% else %}
<label class="toggle"> <label class="toggle">
<input type="submit" class="toggle-checkbox" name="toggle_email_notifications"> <input type="submit" class="toggle-checkbox" name="toggle_email_notifications">
<div class="toggle-switch round"></div> <div class="toggle-switch round"></div>
<span class="slider-label"> <span class="slider-label">
{% translate 'E-Mail Benachrichtigungen' %} {% translate 'E-Mail Benachrichtigungen' %}
</span> </span>
</label> </label>
{% endif %} {% endif %}
</form> </form>
<div class="card"> <details>
<summary><strong>{% trans 'Erweiterte Einstellungen' %}</strong></summary>
<div class="block">
{% if token %} {% if token %}
<form action="" method="POST"> <form action="" method="POST">
{% csrf_token %} {% csrf_token %}
<p class="text-muted"><strong>{% translate "API token:" %}</strong> {{ token }}</p> <p class="text-muted"><strong>{% translate "API token:" %}</strong> {{ token }}</p>
<input class="btn" type="submit" name="delete_token" <input class="button is-danger" type="submit" name="delete_token"
value={% translate "Delete API token" %}> value={% translate "Delete API token" %}>
</form> </form>
{% else %} {% else %}
<p>{% translate "Kein API-Token vorhanden." %}</p> <p>{% translate "Kein API-Token vorhanden." %}</p>
<form action="" method="POST"> <form action="" method="POST">
{% csrf_token %} {% csrf_token %}
<input class="btn" type="submit" name="create_token" <input class="button is-primary" type="submit" name="create_token"
value={% translate "Create API token" %}> value={% translate "Create API token" %}>
</form> </form>
{% endif %} {% endif %}
</div> </div>
</div> </details>
<h2>{% translate 'Benachrichtigungen' %}</h2> </div>
{% include "fellchensammlung/lists/list-notifications.html" %}
<h2>{% translate 'Abonnierte Suchen' %}</h2> <h2 class="title is-2">{% translate 'Benachrichtigungen' %}</h2>
{% include "fellchensammlung/lists/list-search-subscriptions.html" %} {% include "fellchensammlung/lists/list-notifications.html" %}
<h2>{% translate 'Meine Vermittlungen' %}</h2> <h2 class="title is-2">{% translate 'Abonnierte Suchen' %}</h2>
{% include "fellchensammlung/lists/list-adoption-notices.html" %} {% include "fellchensammlung/lists/list-search-subscriptions.html" %}
{% endif %} <h2 class="title is-2">{% translate 'Meine Vermittlungen' %}</h2>
</div> {% include "fellchensammlung/lists/bulma-list-adoption-notices.html" %}
{% endif %}
{% endblock %} {% endblock %}