{% extends "django_mailman3/base.html" %}
{% load i18n %}
{% load socialaccount %}

{% block head_title %}
{% trans "User Profile" %} - {{ block.super }}
{% endblock %}

{% block content %}

<div class="user-profile">

    <h1>{% trans "User profile" %} <small>{% trans "for" %} {{ user }}</small></h1>

    <nav>
    <ul class="nav nav-pills">
        <li class="nav-item">
            <a class="nav-link {% if form.first_name %}active{% endif %}" href="{% url "mm_user_profile" %}">{% trans "Account" %}</a>
        </li>
        <li class="nav-item">
          <a class="nav-link {% if form.password2 %}active{% endif %}" href="{% url "account_change_password" %}">{% trans "Change Password" %}</a>
        </li>
        <li class="nav-item">
            <a class="nav-link {% if form.email %}active{% endif %}" href="{% url "account_email" %}">{% trans "E-mail Addresses" %}</a>
        </li>

        {% get_providers as socialaccount_providers %}
        {% if socialaccount_providers %}
        <li class="nav-item">
          <a class="nav-link {% if not form.first_name and not form.password2 and not form.email and not delete_page %}active{% endif %}"
             href="{% url "socialaccount_connections" %}">{% trans "Account Connections" %}
          </a>
        </li>
        {% endif %}
        <li class="nav-item">
            <a class="nav-link {% if delete_page %}active{% endif %}" href="{% url "mm_user_account_delete" %}">{% trans "Delete Account" %}</a>
        </li>
    </ul>
    </nav>

    <div class="user-profile-content">
        {% block user_profile_content %}{% endblock %}
    </div>

</div>

{% endblock %}
