50 lines
1.1 KiB
HTML
50 lines
1.1 KiB
HTML
{% extends "base.html" %}
|
|
|
|
{% block head_title %}{{ object.get_full_name }} | {% endblock head_title %}
|
|
|
|
{% block content %}
|
|
<header class="page-header">
|
|
<h3>{{ object.get_full_name }}</h3>
|
|
|
|
{% if request.user.is_superuser or request.user == object%}
|
|
<a href="{% url 'account-update' object.pk %}">Update account</a>
|
|
{% endif %}
|
|
</header>
|
|
|
|
<section>
|
|
<table>
|
|
<tbody>
|
|
<tr>
|
|
<th>Email:</th>
|
|
<td>{{ object.email }}</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</section>
|
|
<br><br>
|
|
|
|
<section>
|
|
<h4>Students</h4>
|
|
<table class="index">
|
|
<thead>
|
|
<tr>
|
|
<th>Student</th>
|
|
<th>Membership</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for student in object.student_set.all %}
|
|
<tr>
|
|
<td><a href="{{ student.get_absolute_url }}">{{ student.full_name }}</a></td>
|
|
<td {% if not student.membership %}class="text-danger"{% endif %}>{{ student.membership }}</td>
|
|
</tr>
|
|
{% empty %}
|
|
<tr>
|
|
<td colspan="2">Could not find any students</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</section>
|
|
{% endblock %}
|