{% extends "todo/base.html" %}

{% block title %}{{ list_title }} to-do items{% endblock %}

{% block content %}

    {% if user.is_staff %}
        <h1>Delete entire list: {{ list.name }} ?</h1>

        <p>Category tally:</p>

         <ul>
            <li>Incomplete: {{ item_count_undone }} </li>
            <li>Complete: {{ item_count_done }} </li>
            <li><strong>Total: {{ item_count_total }}</strong> </li>
         </ul>

        <p> ... all of which will be irretrievably <strong>blown away</strong>. Are you sure you want to do that?</p>

        <form action="" method="post" accept-charset="utf-8">
		    {% csrf_token %}
            <input type="hidden" name="list" value="{{ list.id }}" id="some_name">
            <p><input type="submit" name="delete-confirm" value="Do it! &rarr;" class="todo-button"> </p>
        </form>

        <a href="{% url 'todo-incomplete_tasks' list.id list_slug %}">Return to list: {{ list.name }}</a>

    {% else %}
        <p>Sorry, you don't have permission to delete lists. Please contact your group administrator.</p>
    {% endif %}

{% endblock %}
