{% extends "base.html" %}
<!DOCTYPE html>
{% block head %}
    {{ super() }}
    <link rel="stylesheet" type= "text/css" href= "{{ url_for('static', filename='styles/general.css') }}">
    <link rel="stylesheet" type= "text/css" href= "{{ url_for('static', filename='styles/content_overview.css') }}">
{% endblock %}

{% block title %}Content Overview{% endblock %}

{% block headline %}Report Booklet Writer{% endblock %}

{% block second_title %}Here is all you've ever edited!{% endblock %}

{% block content %}

<form class="form" action="" method="post" id="contentform">
    <input class="button" type="submit" name="export" value="Export all" form=contentform>
</form>
<section class="card_list">
    <!-- TODO: display cards group by years  -->
    {% for cont in content: %}
        <article class="card">
            <header class="card_head">
                <div class="left_wrapper">
                    <a class="card_link left_item" href="/edit?id={{ cont.get('id', '') }}">Week: {{ cont.get('week', '') }}</a>
                    <a class="left_item" href="/content-overview?delete={{ cont.get('id', '') }}&week={{ cont.get('week', '') }}">Delete</a>
                </div>
                <div class="right_wrapper">
                    <h2 class="card_header">Unit: {{ cont.get('unit', '') }}</h2>
                    <h2 class="card_header">Year: {{ cont.get('year', '') }}</h2>
                </div>
            </header>
        </article>
    {% endfor %}
</section>

{% endblock %}
