plateforme-tfjm2/templates/member/tfjmuser_detail.html

88 lines
3.9 KiB
HTML
Raw Normal View History

2020-05-04 18:21:53 +00:00
{% extends "base.html" %}
{% load getconfig i18n django_tables2 static %}
{% block content %}
<div class="card bg-light shadow">
<div class="card-header text-center">
2020-05-11 12:21:55 +00:00
<h4>{{ tfjmuser }}</h4>
2020-05-04 18:21:53 +00:00
</div>
<div class="card-body">
<dl class="row">
<dt class="col-xl-6 text-right">{% trans 'role'|capfirst %}</dt>
2020-05-04 19:02:57 +00:00
<dd class="col-xl-6">{{ tfjmuser.get_role_display }}</dd>
2020-05-04 18:21:53 +00:00
2020-05-04 22:11:38 +00:00
{% if tfjmuser.team %}
<dt class="col-xl-6 text-right">{% trans 'team'|capfirst %}</dt>
<dd class="col-xl-6"><a href="{% url "tournament:team_detail" pk=tfjmuser.team.pk %}">{{ tfjmuser.team }}</a></dd>
{% endif %}
2020-05-04 18:21:53 +00:00
2020-05-04 22:11:38 +00:00
{% if tfjmuser.birth_date %}
<dt class="col-xl-6 text-right">{% trans 'birth date'|capfirst %}</dt>
<dd class="col-xl-6">{{ tfjmuser.birth_date }}</dd>
{% endif %}
2020-05-04 18:21:53 +00:00
2020-05-04 22:11:38 +00:00
{% if tfjmuser.participates %}
<dt class="col-xl-6 text-right">{% trans 'gender'|capfirst %}</dt>
<dd class="col-xl-6">{{ tfjmuser.get_gender_display }}</dd>
{% endif %}
2020-05-04 18:21:53 +00:00
2020-05-04 22:11:38 +00:00
{% if tfjmuser.address %}
<dt class="col-xl-6 text-right">{% trans 'address'|capfirst %}</dt>
<dd class="col-xl-6">{{ tfjmuser.address }}, {{ tfjmuser.postal_code }}, {{ tfjmuser.city }}{% if tfjmuser.country != "France" %}, {{ tfjmuser.country }}{% endif %}</dd>
{% endif %}
2020-05-04 18:21:53 +00:00
<dt class="col-xl-6 text-right">{% trans 'email'|capfirst %}</dt>
2020-05-04 19:02:57 +00:00
<dd class="col-xl-6"><a href="mailto:{{ tfjmuser.email }}">{{ tfjmuser.email }}</a></dd>
2020-05-04 18:21:53 +00:00
2020-05-04 22:11:38 +00:00
{% if tfjmuser.phone_number %}
<dt class="col-xl-6 text-right">{% trans 'phone number'|capfirst %}</dt>
<dd class="col-xl-6">{{ tfjmuser.phone_number }}</dd>
{% endif %}
2020-05-04 18:21:53 +00:00
2020-05-04 19:02:57 +00:00
{% if tfjmuser.role == '3participant' %}
2020-05-04 18:21:53 +00:00
<dt class="col-xl-6 text-right">{% trans 'school'|capfirst %}</dt>
2020-05-04 19:02:57 +00:00
<dd class="col-xl-6">{{ tfjmuser.school }}</dd>
2020-05-04 18:21:53 +00:00
<dt class="col-xl-6 text-right">{% trans 'class'|capfirst %}</dt>
2020-05-04 19:02:57 +00:00
<dd class="col-xl-6">{{ tfjmuser.get_student_class_display }}</dd>
2020-05-04 18:21:53 +00:00
2020-05-04 19:02:57 +00:00
{% if tfjmuser.responsible_name %}
2020-05-04 18:21:53 +00:00
<dt class="col-xl-6 text-right">{% trans 'responsible name'|capfirst %}</dt>
2020-05-04 19:02:57 +00:00
<dd class="col-xl-6">{{ tfjmuser.responsible_name }}</dd>
2020-05-04 18:21:53 +00:00
{% endif %}
2020-05-04 19:02:57 +00:00
{% if tfjmuser.responsible_phone %}
2020-05-04 18:21:53 +00:00
<dt class="col-xl-6 text-right">{% trans 'responsible phone'|capfirst %}</dt>
2020-05-04 19:02:57 +00:00
<dd class="col-xl-6">{{ tfjmuser.responsible_phone }}</dd>
2020-05-04 18:21:53 +00:00
{% endif %}
2020-05-04 19:02:57 +00:00
{% if tfjmuser.responsible_email %}
2020-05-04 18:21:53 +00:00
<dt class="col-xl-6 text-right">{% trans 'responsible email'|capfirst %}</dt>
2020-05-04 19:02:57 +00:00
<dd class="col-xl-6"><a href="{{ tfjmuser.responsible_email }}">{{ tfjmuser.responsible_email }}</a></dd>
2020-05-04 18:21:53 +00:00
{% endif %}
{% endif %}
2020-05-04 22:11:38 +00:00
{% if tfjmuser.role != '3participant' %}
2020-05-04 18:21:53 +00:00
<dt class="col-xl-6 text-right">{% trans 'description'|capfirst %}</dt>
2020-05-04 22:11:38 +00:00
<dd class="col-xl-6">{{ tfjmuser.description|default_if_none:"" }}</dd>
2020-05-04 18:21:53 +00:00
{% endif %}
</dl>
</div>
</div>
<hr>
<h4>{% trans "Documents" %}</h4>
{# TODO Display documents #}
2020-05-04 19:02:57 +00:00
{% if request.user.is_superuser %}
<hr>
<form method="post">
{% csrf_token %}
<button name="view_as" class="btn btn-block btn-warning">{% blocktrans %}View site as {{ tfjmuser }}{% endblocktrans %}</button>
</form>
{% endif %}
2020-05-04 18:21:53 +00:00
{% endblock %}