feat: Convert detail user to bulma
This commit is contained in:
		@@ -5,79 +5,73 @@
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
{% block content %}
 | 
			
		||||
    <h1>{{ user.get_full_name }}</h1>
 | 
			
		||||
    <div class="spaced">
 | 
			
		||||
    <h1 class="title is-1"><i class="fas fa-user"></i> {{ user.get_full_name }}</h1>
 | 
			
		||||
 | 
			
		||||
        <div class="container-cards">
 | 
			
		||||
            <h2>{% trans 'Daten' %}</h2>
 | 
			
		||||
            <div class="card">
 | 
			
		||||
                <p><strong>{% translate "Username" %}:</strong> {{ user.username }}</p>
 | 
			
		||||
                <p><strong>{% translate "E-Mail" %}:</strong> {{ user.email }}</p>
 | 
			
		||||
            </div>
 | 
			
		||||
    <div class="block">
 | 
			
		||||
        <h2>{% trans 'Profil verwalten' %}</h2>
 | 
			
		||||
        <p><strong>{% translate "E-Mail" %}:</strong> {{ user.email }}</p>
 | 
			
		||||
        <div class="">
 | 
			
		||||
            <p>
 | 
			
		||||
                <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 class="container-cards">
 | 
			
		||||
            <h2>{% trans 'Profil verwalten' %}</h2>
 | 
			
		||||
            <div class="container-comment-form">
 | 
			
		||||
                <p>
 | 
			
		||||
                    <a class="btn2" href="{% url 'password_change' %}">{% translate "Change password" %}</a>
 | 
			
		||||
                    <a class="btn2" href="{% url 'user-me-export' %}">{% translate "Daten exportieren" %}</a>
 | 
			
		||||
                </p>
 | 
			
		||||
            </div>
 | 
			
		||||
        </div>
 | 
			
		||||
 | 
			
		||||
        {% 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">
 | 
			
		||||
    {% if user.id is request.user.id %}
 | 
			
		||||
        <div class="block">
 | 
			
		||||
            <h2 class="title is-2">{% trans 'Einstellungen' %}</h2>
 | 
			
		||||
            <form class="block" 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' %}
 | 
			
		||||
                        </span>
 | 
			
		||||
                        </label>
 | 
			
		||||
                    {% else %}
 | 
			
		||||
                        <label class="toggle">
 | 
			
		||||
                            <input type="submit" class="toggle-checkbox" name="toggle_email_notifications">
 | 
			
		||||
                            <div class="toggle-switch round"></div>
 | 
			
		||||
                            <span class="slider-label">
 | 
			
		||||
                    </label>
 | 
			
		||||
                {% else %}
 | 
			
		||||
                    <label class="toggle">
 | 
			
		||||
                        <input type="submit" class="toggle-checkbox" name="toggle_email_notifications">
 | 
			
		||||
                        <div class="toggle-switch round"></div>
 | 
			
		||||
                        <span class="slider-label">
 | 
			
		||||
                        {% translate 'E-Mail Benachrichtigungen' %}
 | 
			
		||||
                        </span>
 | 
			
		||||
                        </label>
 | 
			
		||||
                    {% endif %}
 | 
			
		||||
                </form>
 | 
			
		||||
                <div class="card">
 | 
			
		||||
                    </label>
 | 
			
		||||
                {% endif %}
 | 
			
		||||
            </form>
 | 
			
		||||
            <details>
 | 
			
		||||
                <summary><strong>{% trans 'Erweiterte Einstellungen' %}</strong></summary>
 | 
			
		||||
                <div class="block">
 | 
			
		||||
                    {% if token %}
 | 
			
		||||
                        <form action="" method="POST">
 | 
			
		||||
                            {% csrf_token %}
 | 
			
		||||
                            <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" %}>
 | 
			
		||||
                        </form>
 | 
			
		||||
                    {% else %}
 | 
			
		||||
                        <p>{% translate "Kein API-Token vorhanden." %}</p>
 | 
			
		||||
                        <form action="" method="POST">
 | 
			
		||||
                            {% 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" %}>
 | 
			
		||||
                        </form>
 | 
			
		||||
                    {% endif %}
 | 
			
		||||
                </div>
 | 
			
		||||
            </div>
 | 
			
		||||
            </details>
 | 
			
		||||
 | 
			
		||||
            <h2>{% translate 'Benachrichtigungen' %}</h2>
 | 
			
		||||
            {% include "fellchensammlung/lists/list-notifications.html" %}
 | 
			
		||||
        </div>
 | 
			
		||||
 | 
			
		||||
            <h2>{% translate 'Abonnierte Suchen' %}</h2>
 | 
			
		||||
            {% include "fellchensammlung/lists/list-search-subscriptions.html" %}
 | 
			
		||||
        <h2 class="title is-2">{% translate 'Benachrichtigungen' %}</h2>
 | 
			
		||||
        {% include "fellchensammlung/lists/list-notifications.html" %}
 | 
			
		||||
 | 
			
		||||
            <h2>{% translate 'Meine Vermittlungen' %}</h2>
 | 
			
		||||
            {% include "fellchensammlung/lists/list-adoption-notices.html" %}
 | 
			
		||||
        <h2 class="title is-2">{% translate 'Abonnierte Suchen' %}</h2>
 | 
			
		||||
        {% include "fellchensammlung/lists/list-search-subscriptions.html" %}
 | 
			
		||||
 | 
			
		||||
        {% endif %}
 | 
			
		||||
    </div>
 | 
			
		||||
        <h2 class="title is-2">{% translate 'Meine Vermittlungen' %}</h2>
 | 
			
		||||
        {% include "fellchensammlung/lists/bulma-list-adoption-notices.html" %}
 | 
			
		||||
 | 
			
		||||
    {% endif %}
 | 
			
		||||
{% endblock %}
 | 
			
		||||
		Reference in New Issue
	
	Block a user