{% extends "base/base.html" %}
{% import "widgets/poll.html" as poll_widget with context %}

{% block title %}
<h1>Gestion des sondages</h1>
{% endblock %}

{% block content %}
<section>
    <h1>Tous les sondages</h1>
    <div>
        {% for p in polls %}
        {{ poll_widget.wpoll(p) }}
        <span>Auteur : {{ p.author.name }}</span> |
        <a href="{{ url_for('poll_delete', poll_id=p.id) }}">Supprimer le sondage</a>
        {% endfor %}
    </div>
</section>
{% endblock %}
