Files
radiosync/templates/episodes.html
T
karol 76f5d30db1 Initial commit
Co-authored-by: GitHub Copilot <noreply@github.com>
2026-09-03 11:57:16 +02:00

54 lines
2.4 KiB
HTML

{% extends "base.html" %}
{% block content %}
<nav aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="/programs/{{ program.station }}">{{ program.station }}</a></li>
<li class="breadcrumb-item active">{{ program.name }}</li>
</ol>
</nav>
{% if msg %}
<div class="alert alert-info alert-dismissible fade show" role="alert">
<strong>Info:</strong> {{ msg }}
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
</div>
{% endif %}
<div class="page-toolbar d-flex justify-content-between align-items-center gap-3">
<div><div class="eyebrow mb-2">Odcinki</div><h1 class="page-title">{{ program.name }}</h1></div>
<a href="/feeds/{{ program.station }}/{{ program.slug }}.xml" class="btn btn-warning" target="_blank">Skopiuj URL Feedu (RSS)</a>
</div>
<div class="list-group">
{% for ep in episodes %}
<div class="list-group-item episode-item list-group-item-dark text-white mb-2">
<div class="d-flex w-100 justify-content-between">
<h5 class="episode-title mb-1">{{ ep.title }}</h5>
<small>{{ ep.pub_date }}</small>
</div>
<p class="mb-1 small">{{ (ep.description or '')[:200] }}{% if ep.description and ep.description|length > 200 %}...{% endif %}</p>
<div class="d-flex justify-content-between align-items-center mt-3">
<div>
{% if ep.url %}
<audio controls preload="none" style="height: 35px; width: 300px;">
<source src="{{ ep.url }}" type="audio/mpeg">
Twoja przeglądarka nie obsługuje tagu audio.
</audio>
{% else %}
<span class="badge bg-danger">Brak pliku audio (lub oznaczony jako błąd)</span>
{% endif %}
</div>
{% if ep.url %}
<form method="POST" action="/episodes/delete-url" style="margin:0;">
<input type="hidden" name="csrf" value="{{ csrf_token }}">
<input type="hidden" name="ep_id" value="{{ ep.id }}">
<button class="btn btn-danger btn-sm" onclick="return confirm('Czy na pewno chcesz usunąć ten link z bazy? Zostanie podjęta próba ponownego pobrania przy kolejnej synchronizacji.')">Usuń link audio</button>
</form>
{% endif %}
</div>
</div>
{% endfor %}
</div>
{% endblock %}