{# Project basic information tab
 # Copyright (C) 2021  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/>.
 #}

{% macro tab(name, active=false) -%}
{% set endpoint = name|lower %}
<a href="/p/{{ project.id }}/{{ endpoint }}"><div
  class=tab {% if active %}id=tab-active{% endif %}>{{ name }}</div></a>
{%- endmacro %}

{% macro tabbar(current) -%}

{% set items = ['Info', 'Edit', 'Members', 'Tasks', 'Report', 'Slides'] %}

<div id=tabs>
  {% for item in items %}
  {% if item == current %}
  {{ tab(item, true) }}
  {% else %}
  {{ tab(item) }}
  {% endif %}
  {% endfor %}
</div>

{%- endmacro %}

{% extends "base.html" %}
{% block title %}{{ project.name }}{% endblock %}
{% block content %}
{% block tabbarlayout %}{% endblock %}
{% block tabcontent %}{% endblock %}
{% endblock %} 
