{% extends "base.html" %}
{% load i18n static wger_extras django_bootstrap_breadcrumbs %}

{% block title %}{{new_user|format_username}}{% endblock %}


{% block breadcrumbs %}
    {{ block.super }}

    {% if perms.gym.manage_gyms %}
        {% breadcrumb "Gyms" "gym:gym:list" %}
    {% endif %}
    {% breadcrumb_raw new_user.userprofile.gym "gym:gym:user-list" new_user.userprofile.gym.pk %}
    {% breadcrumb_raw new_user|format_username "core:user:overview" new_user.pk %}
    {% breadcrumb "User" "gym:document:list" new_user.pk %}
{% endblock %}


{% block content %}
<table class="table">
    <tr>
        <th>{% trans "User" %}</th>
        <td>{{new_user.get_full_name}} ({{new_user}})</td>
    </tr>
    <tr>
        <th>{% trans "Password" %}</th>
        <td>{{password}}</td>
    </tr>
    <tr>
        <th>{% trans "Email" %}</th>
        <td>{{new_user.email|default:'-/-'}}</td>
    </tr>
    <tr>
        <th>{% trans "Gym" %}</th>
        <td>{{new_user.userprofile.gym}}</td>
    </tr>
    <tr>
        <th>{% trans "Date of Birth" %}</th>
        <td>{{new_user.userprofile.birthdate}}</td>
    </tr>
</table>
{% endblock %}




{% block sidebar %}
<h4>{% trans "Info" %}</h4>
<p>
    {% blocktrans %}Please write down the user password or save the exported
file, which contains all the user data, and keep it in a safe place. The password
cannot be recovered later.{% endblocktrans %}
</p>

<p>
    <a href="{% url 'gym:gym:new-user-data-export' %}" {% auto_link_css request.user_agent.is_mobile %}>
        {% trans "Export user data" %}
    </a>
</p>
{% endblock %}
