60 lines
1.7 KiB
HTML
60 lines
1.7 KiB
HTML
{% extends 'base.html' %}
|
|
|
|
{% block content %}
|
|
<div class="anatomy">
|
|
<h1>Profile</h1>
|
|
<div>
|
|
Username: {{ user.username }}
|
|
</div>
|
|
<div>
|
|
Email: {{ user.email }}
|
|
</div>
|
|
<div>
|
|
Name: {{ user.first_name }}
|
|
{{ user.last_name }}
|
|
</div>
|
|
<div>
|
|
Grade: {{ user.userprofile.grade }}
|
|
</div>
|
|
<div>
|
|
Supervisor: {{ user.userprofile.supervisor }}<br/>
|
|
</div>
|
|
<div>
|
|
Registration number: {{ user.userprofile.registration_number }}
|
|
</div>
|
|
|
|
|
|
<h3>Groups</h3>
|
|
|
|
<ul>
|
|
{% for group in user.user_groups.all %}
|
|
<li><a href="{% url 'generic:user_group_detail' group.pk %}">{{group}}</a></li>
|
|
{% empty %}
|
|
<li>No groups.</li>
|
|
{% endfor %}
|
|
</ul>
|
|
|
|
<h3>Exams</h3>
|
|
<p>
|
|
{% with user.userprofile.get_exams as exam_map %}
|
|
{% for exam_type, exams in exam_map.items %}
|
|
<h4>{{exam_type}}</h4>
|
|
<ul>
|
|
{% for exam in exams %}
|
|
<li>
|
|
<a href="{{exam.get_absolute_url}}">{{exam}}</a>
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|
|
{% empty %}
|
|
No exams.
|
|
{% endfor %}
|
|
{% endwith %}
|
|
</p>
|
|
|
|
|
|
<a href="{% url 'password_change'%}">Change password</a>
|
|
<a href="{% url 'account_update' user.username %}">Update user details</a>
|
|
<a href="{% url 'account_profile_update' user.username %}">Update user profile</a>
|
|
</div>
|
|
{% endblock %} |