{% extends "base/base.html" %}
{% import "widgets/user.html" as widget_member %}

{% block title %}
<h1>Profil de {{ member.name }}</h1>
{% endblock %}

{% block content %}
<section>
  {{ widget_member.profile(member) }}

  {% if current_user.is_authenticated and (current_user == member or current_user.priv('access-admin-panel')) %}
  <div><a href="{{ url_for('adm_edit_account', user_id=member.id) }}">Modifier</a></div>
  {% endif %}

  <h2>Trophées</h2>
  <div>
  {% if member.trophies %}
    <ul>
    {% for t in member.trophies %}
      <li>{{ t.name }}</li>
    {% endfor %}
    </ul>
  {% else %}
    Aucun trophée.
  {% endif %}
</div>
</section>
{% endblock %}
