forked from rc/aircox
continue migration: make website working
This commit is contained in:
51
aircox/templates/aircox/diffusion_list.html
Normal file
51
aircox/templates/aircox/diffusion_list.html
Normal file
@ -0,0 +1,51 @@
|
||||
{% extends "aircox/page.html" %}
|
||||
{% load i18n aircox %}
|
||||
|
||||
{% block title %}
|
||||
{% if program %}
|
||||
{% with program.name as program %}
|
||||
{% blocktrans %}Diffusions of {{ program }}{% endblocktrans %}
|
||||
{% endwith %}
|
||||
{% else %}
|
||||
{% trans "All diffusions" %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
|
||||
{% block content %}
|
||||
<section>
|
||||
{% for object in object_list %}
|
||||
{% include "aircox/diffusion_item.html" %}
|
||||
{% endfor %}
|
||||
</section>
|
||||
|
||||
|
||||
{% if is_paginated %}
|
||||
<nav class="pagination is-centered" role="pagination" aria-label="{% trans "pagination" %}">
|
||||
{% if page_obj.has_previous %}
|
||||
<a href="?page={{ page_obj.previous_page_number }}" class="pagination-previous">
|
||||
{% else %}
|
||||
<a class="pagination-previous" disabled>
|
||||
{% endif %}
|
||||
{% trans "Previous" %}</a>
|
||||
|
||||
{% if page_obj.has_next %}
|
||||
<a href="?page={{ page_obj.next_page_number }}" class="pagination-next">
|
||||
{% else %}
|
||||
<a class="pagination-next" disabled>
|
||||
{% endif %}
|
||||
{% trans "Next" %}</a>
|
||||
|
||||
<ul class="pagination-list">
|
||||
{% for i in paginator.page_range %}
|
||||
<li>
|
||||
<a class="pagination-link {% if page_obj.number == i %}is-current{% endif %}"
|
||||
href="?page={{ i }}">{{ i }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</nav>
|
||||
{% endif %}
|
||||
</section>
|
||||
{% endblock %}
|
||||
|
Reference in New Issue
Block a user