114 lines
5.1 KiB
Twig
114 lines
5.1 KiB
Twig
{###########################################################################
|
||
# Copyright (c) 2025, Антон Аксенов
|
||
# This file is part of iptv.axenov.dev web interface
|
||
# MIT License: https://git.axenov.dev/IPTV/web/src/branch/master/LICENSE
|
||
###########################################################################}
|
||
|
||
{% extends "template.twig" %}
|
||
|
||
{% block header %}
|
||
<div class="row text-muted small">
|
||
<div class="col-md">
|
||
Список изменён: {{ updatedAt }} МСК<br/>
|
||
Плейлистов в списке: <strong>{{ count }}</strong>
|
||
</div>
|
||
<div class="col-md">
|
||
Состояние проверки:<br />
|
||
<span class="me-1">
|
||
<span class="badge me-1 bg-success text-dark">online</span>{{ onlineCount }}
|
||
</span>
|
||
<span class="me-1">
|
||
<span class="badge me-1 bg-danger text-dark">offline</span>{{ offlineCount }}
|
||
</span>
|
||
<span class="me-1">
|
||
<span class="badge me-1 bg-secondary text-dark">unknown</span>{{ uncheckedCount }}
|
||
</span>
|
||
</div>
|
||
</div>
|
||
<hr/>
|
||
{% endblock %}
|
||
|
||
{% block content %}
|
||
<div class="table-responsive">
|
||
<table class="table table-responsive table-dark table-hover small">
|
||
<thead>
|
||
<tr>
|
||
<th class="col-1 text-center">ID</th>
|
||
<th class="col-8">Информация о плейлисте</th>
|
||
<th class="col-1 text-center">Каналов</th>
|
||
<th class="col-2 d-none d-sm-table-cell">Ссылка для ТВ</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
{% for code, playlist in playlists %}
|
||
<tr class="pls" data-playlist-code="{{ code }}">
|
||
<td class="text-center font-monospace code">{{ code }}</td>
|
||
<td class="info">
|
||
{% if playlist.isOnline is same as(true) %}
|
||
<span class="badge small bg-success text-dark">online</span>
|
||
{% elseif playlist.isOnline is same as(false) %}
|
||
<span class="badge small bg-danger text-dark">offline</span>
|
||
{% elseif playlist.isOnline is same as(null) %}
|
||
<span class="badge small bg-secondary text-dark" title="Не проверялся">unknown</span>
|
||
{% endif %}
|
||
{% if "adult" in playlist.tags %}
|
||
<span class="badge small bg-warning text-dark" title="Есть каналы для взрослых!">18+</span>
|
||
{% endif %}
|
||
<a href="/{{ code }}/details" class="text-light fw-bold text-decoration-none">{{ playlist.name }}</a>
|
||
<div class="small mt-2">
|
||
{% if playlist.description|length > 0 %}
|
||
<p class="my-1 d-none d-lg-block">{{ playlist.description }}</p>
|
||
{% endif %}
|
||
{% if playlist.tags|length > 0 %}
|
||
<p class="my-1 d-none d-lg-block text-muted" title="Теги, присвоенные каналам при проверке">
|
||
<ion-icon name="pricetag-outline" class="me-1"></ion-icon>
|
||
{% for tag in playlist.tags %}
|
||
<span class="chtag">#{{ tag }}</span>
|
||
{% endfor %}
|
||
</p>
|
||
{% endif %}
|
||
<a href="/{{ code }}/details" class="text-light">Подробнее...</a>
|
||
</div>
|
||
</td>
|
||
<td class="text-center">
|
||
{% if (playlist.isOnline is not same as(null)) %}
|
||
{{ playlist.channels|length }}
|
||
{% else %}
|
||
?
|
||
{% endif %}
|
||
</td>
|
||
<td class="d-none d-sm-table-cell">
|
||
<span onclick="prompt('Скопируй адрес плейлиста', 'm3u.su/{{ playlist.code }}')"
|
||
title="Нажми на ссылку, чтобы скопировать её в буфер обмена"
|
||
class="font-monospace cursor-pointer"
|
||
>
|
||
m3u.su/{{ playlist.code }}
|
||
</span>
|
||
</td>
|
||
</tr>
|
||
{% endfor %}
|
||
</tbody>
|
||
</table>
|
||
{% if pageCount > 1 %}
|
||
<div aria-label="pages">
|
||
<ul class="pagination justify-content-center">
|
||
{% for page in range(1, pageCount) %}
|
||
{% if page == pageCurrent %}
|
||
<li class="page-item active" aria-current="page">
|
||
<span class="page-link">{{ page }}</span>
|
||
</li>
|
||
{% else %}
|
||
<li class="page-item">
|
||
<a class="page-link bg-dark border-secondary text-light" href="page/{{ page }}">{{ page }}</a>
|
||
</li>
|
||
{% endif %}
|
||
{% endfor %}
|
||
</ul>
|
||
</div>
|
||
{% endif %}
|
||
</div>
|
||
{% endblock %}
|
||
|
||
{% block footer %}
|
||
{% endblock %}
|