Files
new_vk_parser/src/vk_parser_app/templates/sources_content.html
T

58 lines
2.7 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<div class="p-4 border-b border-base-200 flex justify-between items-center bg-base-100/50">
<div class="text-sm text-base-content/70">
Всего: <span class="font-bold">{{ pagination.total }}</span>
</div>
<div class="flex items-center gap-2">
<span class="text-sm">На странице:</span>
<form id="pagination-form" hx-get="/sources" hx-target="#content-area" hx-push-url="true" class="m-0">
<input type="hidden" name="q" value="{{ q }}">
<input type="hidden" name="status_filter" value="{{ status_filter }}">
<select name="per_page" class="select select-bordered select-sm" onchange="this.form.requestSubmit()">
{% for n in [25,50,100,200] %}
<option value="{{ n }}" {% if pagination.per_page == n %}selected{% endif %}>{{ n }}</option>
{% endfor %}
</select>
</form>
</div>
</div>
<div class="overflow-x-auto">
<table class="table table-zebra w-full text-sm">
<thead>
<tr class="bg-base-200 text-base-content">
<th class="w-16">#</th>
<th class="w-24">Площадка</th>
<th>Название</th>
<th class="w-32">Тэг</th>
<th class="w-48">Ссылка</th>
<th class="w-32">Статус</th>
<th class="w-24 text-right">Посты</th>
<th class="w-40 text-right">Последний парсинг</th>
<th class="w-24 text-center"></th>
</tr>
</thead>
<tbody>
{% for s in sources %}
{% include "source_row.html" %}
{% else %}
<tr>
<td colspan="9" class="text-center p-8 text-base-content/50">Нет источников, удовлетворяющих фильтрам.</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
<!-- Pagination bottom -->
{% if pagination.pages > 1 %}
<div class="flex justify-center p-4 border-t border-base-200">
<div class="join">
<button class="join-item btn btn-sm" form="pagination-form" name="page" value="1" {% if pagination.page == 1 %}disabled{% endif %}>«</button>
<button class="join-item btn btn-sm" form="pagination-form" name="page" value="{{ pagination.page - 1 }}" {% if pagination.page == 1 %}disabled{% endif %}>‹</button>
<button class="join-item btn btn-sm btn-disabled">Стр. {{ pagination.page }} из {{ pagination.pages }}</button>
<button class="join-item btn btn-sm" form="pagination-form" name="page" value="{{ pagination.page + 1 }}" {% if pagination.page >= pagination.pages %}disabled{% endif %}>›</button>
<button class="join-item btn btn-sm" form="pagination-form" name="page" value="{{ pagination.pages }}" {% if pagination.page >= pagination.pages %}disabled{% endif %}>»</button>
</div>
</div>
{% endif %}