{# Public project listing
 # Copyright (C) 2020-2021  Nguyễn Gia Phong
 # Copyright (C) 2020  Đào Dương Hoàng Long
 # Copyright (C) 2020  Ngô Xuân Minh
 # 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 %}Projects{% endblock %}
{% block content %}
<div class=col-wide>
  {% block abstract %}
  <a href="/p/create"><button>Create Project</button></a>
  {% endblock %}
  {% for project in projects %}
  <div class=block>
    <h2><a href=/p/{{ project.id }}>{{ project.name }}</a></h2>
    <p><b>Created on:</b> {{ project.created_on.strftime('%Y-%m-%d') }}</p>
    <p><b>Deadline:</b> {{ project.deadline.strftime('%Y-%m-%d') }}</p>
    <p><b>Supervisors:</b> {{ project.supervisors | map('userlink')
                              | join(', ') | safe }}</p>
    <p><b>Students:</b> {{ project.students | map('userlink')
                           | join(', ') | safe }}</p>
    <p><b>Description:</b> {{ project.description }}</p>
  </div>
  {% endfor %}
</div>
{% endblock %}
