{% load ecatcher %}
<p>
    Exception count: {{ list_reports.count }}
</p>
<form method="POST" action="{% url 'except_catcher:update_reports' %}"
        style="width:100%;">
    {% csrf_token %}
    <label for="id_action">action</label>
    <select name="action" id="id_action">
        <option value="resolve">Mark resolved</option>
        <option value="unsolve">Mark unsolved</option>
        <option value="delete">Delete</option>
    </select>
    <input type="hidden" name="redirect" value="{{ request.path }}" />
    <input type="submit" value="go" />
    <br>
    <a href="javascript:select_all(this);">select all</a>
    <ul>
    {% for report in list_reports %}
        <li>
            <input type="checkbox" name="report_ids" id="repid{{ report.id }}"
                value="{{ report.id }}" />
            {{ report.date_time }} -
            <a href="{% url 'except_catcher:view_error' report.id %}">
                {{ report.subject }}
            </a>
            -
            <a href="{% url 'except_catcher:mark_resolved' report.id %}">
                {{ report|is_solved  }}
            </a>
            -
            <a href="{% url 'except_catcher:delete_error' report.id %}">
                delete
            </a>
        </li>
    {% endfor %}
    </ul>
</form>
