<!-- User profile page
Copyright (C) 2020  Ngô Ngọc Đức Huy

This file is part of Acanban.

Acanban is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published
by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

Acanban is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License
along with Acanban.  If not, see <https://www.gnu.org/licenses/>. -->

{% extends 'base.html' %}

{% block title %}{{ user.name }}{% endblock %}

{% block content %}
<div class=col-wide>
  <div><b>Role:</b> {{ user.role }}</div>
  <div><b>Username:</b> {{ user.username }}</div>
  <div><b>Email:</b> {{ user.email }}</div>
  {% if user['student-id'] %}
  <div><b>Student ID:</b> {{ user['student-id'] }}</div>
  {% endif %}
  {% if user.department %}
  <div><b>Department:</b> {{ user.department }}</div>
  {% endif %}

  {% if user.username == current_user.key %}
  <a href=/u/{{ user.username }}/edit>
    <button>Edit profile</button>
  </a>
  {% endif %}
</div>
{% endblock%}
