mirror of
https://gitlab.com/animath/si/plateforme.git
synced 2025-06-21 14:38:24 +02:00
Connect as other people
This commit is contained in:
@ -141,6 +141,11 @@
|
||||
{% endif %}
|
||||
</ul>
|
||||
<ul class="navbar-nav">
|
||||
{% if "_fake_user_id" in request.session %}
|
||||
<li class="nav-item active">
|
||||
<a class="nav-link" href="{% url "member:reset_admin" %}?path={{ request.path }}"><i class="fas fa-cog"></i> {% trans "Return to admin view" %}</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if not user.is_authenticated %}
|
||||
<li class="nav-item active">
|
||||
<a class="nav-link" href="{% url "login" %}"><i class="fas fa-sign-in-alt"></i> {% trans "Log in" %}</a>
|
||||
|
@ -10,52 +10,52 @@
|
||||
<div class="card-body">
|
||||
<dl class="row">
|
||||
<dt class="col-xl-6 text-right">{% trans 'role'|capfirst %}</dt>
|
||||
<dd class="col-xl-6">{{ user.get_role_display }}</dd>
|
||||
<dd class="col-xl-6">{{ tfjmuser.get_role_display }}</dd>
|
||||
|
||||
<dt class="col-xl-6 text-right">{% trans 'team'|capfirst %}</dt>
|
||||
<dd class="col-xl-6"><a href="{% url "tournament:team_detail" pk=user.team.pk %}">{{ user.team }}</a></dd>
|
||||
<dd class="col-xl-6"><a href="{% url "tournament:team_detail" pk=tfjmuser.team.pk %}">{{ tfjmuser.team }}</a></dd>
|
||||
|
||||
<dt class="col-xl-6 text-right">{% trans 'birth date'|capfirst %}</dt>
|
||||
<dd class="col-xl-6">{{ user.birth_date }}</dd>
|
||||
<dd class="col-xl-6">{{ tfjmuser.birth_date }}</dd>
|
||||
|
||||
<dt class="col-xl-6 text-right">{% trans 'gender'|capfirst %}</dt>
|
||||
<dd class="col-xl-6">{{ user.get_gender_display }}</dd>
|
||||
<dd class="col-xl-6">{{ tfjmuser.get_gender_display }}</dd>
|
||||
|
||||
<dt class="col-xl-6 text-right">{% trans 'address'|capfirst %}</dt>
|
||||
<dd class="col-xl-6">{{ user.address }}, {{ user.postal_code }}, {{ user.city }}{% if user.country != "France" %}, {{ user.country }}{% endif %}</dd>
|
||||
<dd class="col-xl-6">{{ tfjmuser.address }}, {{ tfjmuser.postal_code }}, {{ tfjmuser.city }}{% if tfjmuser.country != "France" %}, {{ tfjmuser.country }}{% endif %}</dd>
|
||||
|
||||
<dt class="col-xl-6 text-right">{% trans 'email'|capfirst %}</dt>
|
||||
<dd class="col-xl-6"><a href="mailto:{{ user.email }}">{{ user.email }}</a></dd>
|
||||
<dd class="col-xl-6"><a href="mailto:{{ tfjmuser.email }}">{{ tfjmuser.email }}</a></dd>
|
||||
|
||||
<dt class="col-xl-6 text-right">{% trans 'phone number'|capfirst %}</dt>
|
||||
<dd class="col-xl-6">{{ user.phone_number }}</dd>
|
||||
<dd class="col-xl-6">{{ tfjmuser.phone_number }}</dd>
|
||||
|
||||
{% if user.role == '3participant' %}
|
||||
{% if tfjmuser.role == '3participant' %}
|
||||
<dt class="col-xl-6 text-right">{% trans 'school'|capfirst %}</dt>
|
||||
<dd class="col-xl-6">{{ user.school }}</dd>
|
||||
<dd class="col-xl-6">{{ tfjmuser.school }}</dd>
|
||||
|
||||
<dt class="col-xl-6 text-right">{% trans 'class'|capfirst %}</dt>
|
||||
<dd class="col-xl-6">{{ user.get_student_class_display }}</dd>
|
||||
<dd class="col-xl-6">{{ tfjmuser.get_student_class_display }}</dd>
|
||||
|
||||
{% if user.responsible_name %}
|
||||
{% if tfjmuser.responsible_name %}
|
||||
<dt class="col-xl-6 text-right">{% trans 'responsible name'|capfirst %}</dt>
|
||||
<dd class="col-xl-6">{{ user.responsible_name }}</dd>
|
||||
<dd class="col-xl-6">{{ tfjmuser.responsible_name }}</dd>
|
||||
{% endif %}
|
||||
|
||||
{% if user.responsible_phone %}
|
||||
{% if tfjmuser.responsible_phone %}
|
||||
<dt class="col-xl-6 text-right">{% trans 'responsible phone'|capfirst %}</dt>
|
||||
<dd class="col-xl-6">{{ user.responsible_phone }}</dd>
|
||||
<dd class="col-xl-6">{{ tfjmuser.responsible_phone }}</dd>
|
||||
{% endif %}
|
||||
|
||||
{% if user.responsible_email %}
|
||||
{% if tfjmuser.responsible_email %}
|
||||
<dt class="col-xl-6 text-right">{% trans 'responsible email'|capfirst %}</dt>
|
||||
<dd class="col-xl-6"><a href="{{ user.responsible_email }}">{{ user.responsible_email }}</a></dd>
|
||||
<dd class="col-xl-6"><a href="{{ tfjmuser.responsible_email }}">{{ tfjmuser.responsible_email }}</a></dd>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% if user.role == '2coach' %}
|
||||
{% if tfjmuser.role == '2coach' %}
|
||||
<dt class="col-xl-6 text-right">{% trans 'description'|capfirst %}</dt>
|
||||
<dd class="col-xl-6">{{ user.description }}</dd>
|
||||
<dd class="col-xl-6">{{ tfjmuser.description }}</dd>
|
||||
{% endif %}
|
||||
</dl>
|
||||
</div>
|
||||
@ -66,4 +66,12 @@
|
||||
<h4>{% trans "Documents" %}</h4>
|
||||
|
||||
{# TODO Display documents #}
|
||||
|
||||
{% 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 %}
|
||||
{% endblock %}
|
||||
|
Reference in New Issue
Block a user