{% extends "base.html" %}

{% block content_title %}{{ page.title }}{% endblock %}

{% block vz_wiki_page_menu %}
<li><a href="{% url page_detail page.slug %}" title="return to page">Return to Page</a></li>
{% endblock %}

{% block content %}
<h3>History</h3>
<form method="GET" action="{% url compare_revisions page.pk %}">
<p><input type="submit" value="compare"></p>
<ul>
{% for revision in page.history %}
    <li>
    {% if forloop.first %}        
        <input type="radio" name="rev1" id="rev1" value="{{ revision.pk }}" checked="true"> 
    {% else %}
        <input type="radio" name="rev1" id="rev1" value="{{ revision.pk }}"> 
    {% endif %}
    {% ifequal forloop.counter 2 %}
        <input type="radio" name="rev2" id="rev2" value="{{ revision.pk }}" checked="true"> 
    {% else %}
        <input type="radio" name="rev2" id="rev2" value="{{ revision.pk }}"> 
    {% endifequal %}
         {{ revision }} by {{ revision.author }} on {{ revision.published_on|date }}
    </li>
{% endfor %}
</ul>
<p><input type="submit" value="compare"></p>
</form>
{% endblock %}
