{% extends "wiki/base.html" %}
{% load i18n %}
{% load markup %}
{% load paginator %}
{% load wiki %}
{% load pagelink %}

{% block contents %}
    <h3>{% pagelink wpage "n" %}</h3>

    <div class="info" id="page-info">
      {% if content %}<em>r{{ content.rev }}</em> &nbsp;&nbsp;&nbsp; {% endif %}created: <em>{{ wpage.created|date:"F j, Y H:i" }}</em> &nbsp;&nbsp;&nbsp; {% if content %}modified: <em>{{ content.modified|date:"F j, Y H:i" }}</em>{% endif %}<br />
    </div>

{% if object_list %}
    <table class="history">
	<tr>
	  <th width="10%">Revision</th>
	  <th width="15%">Date</th>
	  <th width="20%">Title</th>
	  <th>Text</th>
	</tr>
        {% for obj in object_list %}
        <tr>
          <td><a href="{{ obj.page.get_absolute_url }}?rev={{ obj.rev }}">r{{ obj.rev }}</a></td>
          <td>{{ obj.modified|date:"Y-m-d H:i" }}</td>
          <td>{{ obj.title|default:"--"|truncatewords_html:4 }}</td>
          <td><span style="align: center; font-size: 75%;">{{ obj|wiki|truncatewords_html:12 }}</span></td>
        </tr>
        {% endfor %}
    </table>
{% else %}
    <p>No revisions available for {{ wpage }}.</p>
{% endif %}

<br>
{% paginator %}

{% endblock contents %}
