mirror of
https://github.com/r4sas/py-i2phosts
synced 2025-01-08 22:07:55 +00:00
84836a5079
Our old pagination is incompatible with new class-based generic views, so switch to internal django pagination for some time.
36 lines
1.1 KiB
HTML
36 lines
1.1 KiB
HTML
{% extends "base.html" %}
|
|
{% load i18n %}
|
|
|
|
{% block header %}
|
|
<h3>{% trans "All active hosts in I2P" %}
|
|
<a href={% url browse-rss %}><img src="/static/rss-grey-18.png" border="0" width="18" height="18" alt="rss"></a></h3>
|
|
{% endblock %}
|
|
|
|
{% block content %}
|
|
<table>
|
|
<tr><td>{% trans "Host" %}</td><td>{% trans "Last seen" %}</td><td>{% trans "Date added" %}</td><td>{% trans "Description" %}</td></tr>
|
|
{% for host in host_list %}
|
|
<tr><td><a href="http://{{ host.name }}/?i2paddresshelper={{host.b64hash}}">{{ host.name }}</a></td><td>{{ host.last_seen }}</td>
|
|
<td>{{ host.date_added }}</td><td>{{ host.description }}</td></tr>
|
|
{% endfor %}
|
|
</table>
|
|
|
|
{% if is_paginated %}
|
|
<div class="pager">
|
|
{% if page_obj.has_previous %}
|
|
<span class="page">
|
|
<a href="?page={{ page_obj.previous_page_number }}">< Prev</a>
|
|
</span>
|
|
{% endif %}
|
|
|
|
<span class="current">Page {{ page_obj.number }} of {{ paginator.num_pages }}</span>
|
|
|
|
{% if page_obj.has_next %}
|
|
<span class="page"><a href="?page={{ page_obj.next_page_number }}">Next ></a></span>
|
|
{% endif %}
|
|
{{ paginator.count }} {% trans "hosts total" %}
|
|
|
|
{% endif %}
|
|
|
|
{% endblock %}
|