{%extends "admin/base_site.html"%}

{%block breadcrumbs%}
<div class="breadcrumbs"><a href="/admin/">Home</a> &rsaquo; Pending</div>
{%endblock%}

{% block bodyclass %}change-list{% endblock %}
{% block coltype %}flex{% endblock %}

{%block content%}
<h1>Purge URL from Varnish</h1>

<div id="content-main">
{%if purge_completed %}
  <div class="module">
    Purge completed: {{purge_completed}}
  </div>
{%endif%}

 <form method="POST" action=".">{% csrf_token %}
URL (regex, ^ is auto-added): <input type="text" name="url">
  <input type="submit" value="Purge" />
 </form>

{%if latest_purges %}
  <div class="module">
    <table summary="Latest purges" width="100%">
      <caption><a class="section">Latest purges</a></caption>
      {%for p in latest_purges%}
      <tr class="row{%cycle '1' '2'%}">
	<td>{{p.t|date:"c"}}</td>
	<td>{{p.ty}}</td>
	<td>{{p.u}}</td>
      </tr>
      {%endfor%}
    </table>
  </div>
{%endif%}
</div>
{%endblock%}
