{% extends "./base_site.html" %}
{% load i18n static %}

{% block extrastyle %}{{ block.super }}<link rel="stylesheet" type="text/css" href="{% static "admin/css/dashboard.css" %}" />
<link rel="stylesheet" type="text/css" href="{% static "css/main.css" %}" />{% endblock %}

{% block coltype %}colMS{% endblock %}

{% block bodyclass %}{{ block.super }} dashboard{% endblock %}

{% block breadcrumbs %}
    <div class="breadcrumbs">
    <a href="{% url 'home' %}">Accueil</a>
    <a href="{% url 'upload' %}">Document</a>
    </div>
    {% endblock %}

{% block content %}

<div id="content-main">
<h1>Enregistrements de documents</h1>
{% if documents %}
        <ul class="liste-verticale">
        {% for document in documents %}
            <li><a href="download/{{ document.docfile.name }}">{{document.docfile.name}}</a></li>
        {% endfor %}
        </ul>
    {% else %}
        <p>No documents.</p>
    {% endif %}
<!-- Upload form. Note enctype attribute! -->
<div class="clear-booth">&nbsp;
        <form action="{% url 'upload' %}" method="post" enctype="multipart/form-data">
            {% csrf_token %}
            <p>{{ form.non_field_errors }}</p>
            <p>{{ form.docfile.label_tag }} {{ form.docfile.help_text }}</p>
            <p>
                {{ form.docfile.errors }}
                {{ form.docfile }}                                            
            </p>

            <p><input type="submit" value="Upload" /></p>
        </form>
        </div>
</div>
{% endblock %}



