{# 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 'project-list.html' %}
{% block title %}{{ user.name }}{% endblock %}

{% block abstract %}
<dl>
  <dt>Role</dt>
  <dd>{{ user.role }}</dd>
  <dt>Username</dt>
  <dd>{{ user.username }}</dd>
  <dt>Email</dt>
  <dd>{{ user.email }}</dd>
  {% if user['student-id'] %}
  <dt>Student ID</dt>
  <dd>{{ user['student-id'] }}</dd>
  {% endif %}
  {% if user.department %}
  <dt>Department</dt>
  <dd>{{ user.department }}</dd>
  {% endif %}
</dl>

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

<h1>{{ user.name }}'s projects</h1>
{% endblock%}
