feat: UI improvements for user profile

This commit is contained in:
moanos [he/him] 2024-11-18 22:58:32 +01:00
parent 5dd1991af8
commit f1c79a5f94

View File

@ -13,27 +13,38 @@
<p>{% translate "Keine bevorzugte Sprache gesetzt." %}</p> <p>{% translate "Keine bevorzugte Sprache gesetzt." %}</p>
{% endif %} {% endif %}
{% if token %} <div class="container-cards">
<form action="" class="btn2" method="POST"> {% if user.id is request.user.id %}
{% csrf_token %} <div class="card">
<p class="text-muted"><strong>{% translate "API token:" %}</strong> {{ token }}</p> {% if token %}
<input class="create-token" type="submit" name="delete_token" value={% translate "Delete API token" %}> <form action="" method="POST">
</form> {% csrf_token %}
{% else %} <p class="text-muted"><strong>{% translate "API token:" %}</strong> {{ token }}</p>
<p>{% translate "No token set." %}</p> <input class="btn" type="submit" name="delete_token"
<form action="" method="POST"> value={% translate "Delete API token" %}>
{% csrf_token %} </form>
<input class="create-token" type="submit" name="create_token" value={% translate "Create API token" %}> {% else %}
</form> <p>{% translate "Kein API-Token vorhanden." %}</p>
{% endif %} <form action="" method="POST">
{% csrf_token %}
<input class="btn" type="submit" name="create_token"
value={% translate "Create API token" %}>
</form>
{% endif %}
</div>
</div><p>
<div class="container-comment-form">
<h2>{% trans 'Profil verwalten' %}</h2>
<p>
<a class="btn2" href="{% url 'password_change' %}">{% translate "Change password" %}</a>
<a class="btn2" href="{% url 'index' %}">{% translate "Daten exportieren" %}</a>
</p>
</div>
</p>
<h2>{% translate 'Benachrichtigungen' %}</h2>
{% include "fellchensammlung/lists/list-notifications.html" %}
<h2>{% translate 'Meine Vermittlungen' %}</h2>
{% include "fellchensammlung/lists/list-adoption-notices.html" %}
{% if user.id is request.user.id %} {% endif %}
<p><a href="{% url 'password_change' %}">{% translate "Change password here." %}</a></p>
<p><a href="{% url 'index' %}">{% translate "Export your data." %}</a></p>
<h2>{% translate 'Benachrichtigungen' %}</h2>
{% include "fellchensammlung/lists/list-notifications.html" %}
<h2>{% translate 'Meine Vermittlungen' %}</h2>
{% include "fellchensammlung/lists/list-adoption-notices.html" %}
{% endif %}
{% endblock %} {% endblock %}