Merge branch '17-paginate-ips' into 'config'

Add IP pagination

Closes #17

See merge request leftypol/leftypol!3
This commit is contained in:
Zankaria Auxa 2024-10-24 19:18:54 +00:00
commit 1a0054967b
6 changed files with 180 additions and 24 deletions

View file

@ -4,7 +4,7 @@
{% set notes_on_record = 'note' ~ (notes|count != 1 ? 's' : '') ~ ' on record' %}
<legend>{{ notes|count }} {% trans notes_on_record %}</legend>
</legend>
{% if notes and notes|length > 0 %}
<table class="modlog">
<tr>
@ -41,7 +41,7 @@
{% endfor %}
</table>
{% endif %}
{% if mod|hasPermission(config.mod.create_notes) %}
<form action="" method="post" style="margin:0">
<input type="hidden" name="token" value="{{ security_token }}">
@ -72,7 +72,7 @@
<fieldset id="bans">
{% set bans_on_record = 'ban' ~ (bans|count != 1 ? 's' : '') ~ ' on record' %}
<legend>{{ bans|count }} {% trans bans_on_record %}</legend>
{% for ban in bans %}
<form action="" method="post" style="text-align:center">
<input type="hidden" name="token" value="{{ security_token }}">
@ -206,10 +206,19 @@
<legend>
<a href="?/{{ config.board_path|sprintf(board_posts.board.uri) }}{{ config.file_index }}">
{{ config.board_abbreviation|sprintf(board_posts.board.uri) }}
-
-
{{ board_posts.board.title|e }}
</a>
</legend>
{{ board_posts.posts|join('<hr>') }}
</fieldset>
{% endfor %}
<div class="pages" style="margin-left: 50%">
<a href="?/IP/{{ ip }}">[Page 1]</a>
{% if cursor_prev %}
<a href="?/IP/{{ ip }}/cursor/{{ cursor_prev }}">[Previous Page]</a>
{% endif %}
{% if cursor_next %}
<a href="?/IP/{{ ip }}/cursor/{{ cursor_next }}">[Next Page]</a>
{% endif %}
</div>