{% extends "base.html" %}
{% load i18n %}
{% block base_content %}
{# FIXME is this the best markup to use? #}
<dl class="sub-nav">
<dd><a href="{{ view.create_url }}">
{% blocktrans with verbose_name=view.verbose_name %} Adicionar {{ verbose_name }} {% endblocktrans %}
</a></dd>
</dl>
{% if not rows %}
<p>{{ NO_ENTRIES_MSG }}</p>
{% else %}
<table class="table table-hover">
<thead>
<tr>
{% for name in headers %}
<th>{{ name }}</th>
{% endfor %}
</tr>
</thead>
<tbody>
{% for value_list in rows %}
{% for value, href in value_list %}
<td>
{% if href %}
<a href="{{ href }}">{{ value }}</a>
{{ value }}
{% endif %}
</td>
</tbody>
</table>
{% if is_paginated %}
<div class="pagination-centered">
<ul class="pagination" role="menubar" aria-label="Pagination">
{% if page_obj.has_previous %}
<li>
<a href="?page={{ page_obj.previous_page_number }}">
<span class="arrow">«</span>
</a>
</li>
<li class="arrow unavailable" aria-disabled="true"><a href="">«</a></li>
{% for page in page_range %}
{% if page %}
<li {% if page == page_obj.number %}class="current"{% endif %}>
<a href="?page={{ page }}">{{ page }}</a>
<li class="unavailable" aria-disabled="true"><a href="">…</a></li>
{% if page_obj.has_next %}
<a href="?page={{ page_obj.next_page_number }}">
<span class="arrow">»</span>
<li class="arrow unavailable" aria-disabled="true"><a href="">»</a></li>
</ul>
</div>
{% endblock %}