Added page navigation buttons to the gallery view.
This commit is contained in:
@@ -20,24 +20,44 @@
|
||||
<div class="mb-2">
|
||||
{% for page in pages %}<a href="./?page={{page}}">{{page}}</a>{% if not forloop.last %}<span> </span>{% endif %}{% endfor %}
|
||||
</div>
|
||||
<table class="mauto">
|
||||
<tbody>
|
||||
{% for row in images %}
|
||||
<tr>
|
||||
{% for cell in row %}
|
||||
<td class="column">
|
||||
<a href="{{cell.path}}">
|
||||
<img src="{{cell.thumbnail}}">
|
||||
<br>
|
||||
<span>
|
||||
{{cell.path|truncatechars:15}}
|
||||
</span>
|
||||
</a>
|
||||
</td>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
<table class="fc mauto">
|
||||
<tr>
|
||||
{% if page != 1 %}
|
||||
<td class="fc">
|
||||
<a href="./?page={{prev_page}}">
|
||||
<img src="{% static 'imgs/back.png' %}" class="navigation-icon">
|
||||
</a>
|
||||
</td>
|
||||
{% endif %}
|
||||
<td class="fc">
|
||||
<table class="mauto">
|
||||
<tbody>
|
||||
{% for row in images %}
|
||||
<tr>
|
||||
{% for cell in row %}
|
||||
<td class="column">
|
||||
<a href="{{cell.path}}">
|
||||
<img src="{{cell.thumbnail}}">
|
||||
<br>
|
||||
<span>
|
||||
{{cell.path|truncatechars:15}}
|
||||
</span>
|
||||
</a>
|
||||
</td>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
{% if page != num_pages %}
|
||||
<td class="fc">
|
||||
<a href="./?page={{next_page}}">
|
||||
<img src="{% static 'imgs/forward.png' %}" class="navigation-icon">
|
||||
</a>
|
||||
</td>
|
||||
{% endif %}
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
Reference in New Issue
Block a user