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

{% block contents %}
    <h1>{% wikilink wiki "y" %} wiki pages</h1>
    {% if wiki.desc %}<h2 class="alt">{{ wiki.desc }}</h2>{% endif %}
    {% if wiki.long_desc %}<p>{{ wiki.long_desc|markdown }}</p>{% endif %}

{% if object_list %}
    <table>
	<tr>
	  <th>Name</th>
	  <th>Description</th>
	</tr>
        {% for obj in object_list %}
        <tr>
          <td><a href="{{ obj.get_absolute_url }}">{{ obj.name }}</a></td>
          <td>{{ obj.desc }}{% if obj.attachment_set.all %}&nbsp;<img style="vertical-align: top;" src="{{ images }}/page.png" title="Has attachments" />{% endif %}</td>
        </tr>
        {% endfor %}
    </table>
{% else %}
    <p>No pages available in the {{ wiki }} wiki.</p>
{% endif %}

<br>
{% paginator %}

{% endblock contents %}

{% block pagebottom %}
<a href="{% url wiki-edit wiki.fullname_url %}">Edit this wiki.</a><br />
<a href="{% url wiki-page-create wiki.fullname_url %}">Create a new wiki page.</a><br />
{% endblock pagebottom %}
