{% extends 'djiki/base.html' %}
{% load i18n djiki_tags %}
{% block title %}{% trans "Latest changes" %} | {{ block.super }}{% endblock %}
{% block djiki_main %}
<div class="djiki-common djiki-common--latest-changes">
  <div class="djiki-latest-changes">
    <h1 class="djiki-common-title">{% trans "Latest changes" %}</h1>
    <table>
      <thead>
        <tr>
          <th>{% trans "Page" %}</th>
          <th>{% trans "Modification time" %}</th>
          <th>{% trans "Author" %}</th>
          <th>{% trans "Description" %}</th>
        </tr>
      </thead>
      <tbody>
        {% for page in latest %}
        <tr>
          <td>
            <a href="{% url 'djiki-page-view' page.title|urlize_title %}">{{ page.title }}</a>
          </td>
          <td>
            {% blocktrans with page.latest_change|timesince as timesince %}{{ timesince }} ago{% endblocktrans %}
          </td>
          <td>
            {% if page.last_author %}{{ page.last_author }}
            {% else %}<em>{% trans "anonymous" %}</em>{% endif %}
          </td>
          <td>{{ page.last_revision.description }}</td>
        </tr>
        {% endfor %}
      </tbody>
    </table>
  </div>
</div>
{% endblock %}
