{% extends "participant/base_participant.html" %}

{% load i18n %}
{% load tags %}

{% block title %}{{ block.super }} – {{ shown_user }}{% endblock %}

{% block content %}

<h1>{{ shown_user }}</h1>

<p>{{ shown_user.email }}</p>

<h2>{% trans "Groups" %}</h2>
<p>
    {% if shown_user.groups.all %}
        {{ shown_user.groups.all|join:", " }}
    {% else %}
        {% trans "The participant is not member of any group." %}
    {% endif %}
</p>

{% if shown_user.get_gender_display %}
    <h2>{% trans "Gender" %}</h2>
    <p>{{ shown_user.get_gender_display }}</p>
{% endif %}

{% if shown_user.get_type_display %}
<h2>{% trans "Type" %}</h2>
<p>{{ shown_user.get_type_display }}</p>
{% endif %}

{% if shown_user.committee %}
<h2>{% trans "Committee" %}</h2>
<p>{{ shown_user.committee }}</p>
{% endif %}

{% if shown_user.about_me %}
    <h2>{% trans "About me" %}</h2>
    <p>{{ shown_user.about_me }}</p>
{% endif %}

{% if perms.participant.can_manage_participant %}
    {% if shown_user.comment %}
    <h2>{% trans "Comment" %}</h2>
    <p>{{ shown_user.comment }}</p>
    {% endif %}

    <h2>{% trans "Last Login" %}</h2>
    {% if shown_user.last_login > shown_user.date_joined %}
        <p>{{ shown_user.last_login }}</p>
    {% else %}
        <p>{% trans "The participant has not logged in yet." %}</p>
    {% endif %}
{% endif %}

{% endblock %}
