102 lines
3.5 KiB
HTML
102 lines
3.5 KiB
HTML
{% extends 'base.html' %}
|
|
|
|
{% block title %}ucast - {{ channel.name }}{% endblock %}
|
|
|
|
{% block content %}
|
|
<div class="level">
|
|
<div>
|
|
<h1 class="title">{{ channel.name }}</h1>
|
|
<p>Last update: {{ channel.last_update }}</p>
|
|
</div>
|
|
|
|
<div class="tags">
|
|
<span class="tag"><i
|
|
class="fas fa-user-group"></i> {{ channel.subscribers }}</span>
|
|
<span class="tag"><i
|
|
class="fas fa-video"></i> {{ videos.paginator.count }}
|
|
{% if n_pending %}
|
|
({{ n_pending }})
|
|
{% endif %}
|
|
</span>
|
|
<span class="tag"><i
|
|
class="fas fa-database"></i> {{ channel.download_size|filesizeformat }}</span>
|
|
<a class="tag" href="{{ channel.get_absolute_url }}" target="_blank"><i
|
|
class="fa-brands fa-youtube"></i> {{ channel.channel_id }}</a>
|
|
</div>
|
|
|
|
<form method="post">
|
|
<div class="field has-addons">
|
|
<div class="control">
|
|
<a href="{{ site_url }}/feed/{{ channel.slug }}?key={{ user.get_feed_key }}"
|
|
class="button">
|
|
<i class="fas fa-rss"></i>
|
|
</a>
|
|
</div>
|
|
<div class="control">
|
|
{% if channel.active %}
|
|
<button type="submit" name="deactivate" class="button is-success">
|
|
<i class="fas fa-power-off"></i>
|
|
</button>
|
|
{% else %}
|
|
<button type="submit" name="activate" class="button is-danger">
|
|
<i class="fas fa-power-off"></i>
|
|
</button>
|
|
{% endif %}
|
|
</div>
|
|
<div class="control">
|
|
<a class="button is-info" href="{% url 'channel_edit' channel.slug %}">
|
|
<i class="fas fa-edit"></i>
|
|
</a>
|
|
</div>
|
|
<div class="control">
|
|
<a class="button is-info" href="{% url 'channel_download' channel.slug %}">
|
|
<i class="fas fa-download"></i>
|
|
</a>
|
|
</div>
|
|
<div class="control">
|
|
<button type="submit" name="delete_channel"
|
|
class="button is-danger dialog-confirm"
|
|
confirm-msg="Do you want to delete the channel '{{ channel.name }}' including {{ videos|length }} videos?">
|
|
<i class="fas fa-trash"></i>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
{% csrf_token %}
|
|
</form>
|
|
</div>
|
|
|
|
{% if not videos %}
|
|
{% if n_pending %}
|
|
<p>There are {{ n_pending }} videos waiting to be downloaded.
|
|
Please wait a few minutes and refesh this page.
|
|
You can see the current status in the <i>Downloads</i> tab.
|
|
</p>
|
|
{% else %}
|
|
<p>No videos. If you have just added this channel,
|
|
you have to wait a minute for ucast to start looking for videos.</p>
|
|
{% endif %}
|
|
{% else %}
|
|
<div class="video-grid">
|
|
{% include "ucast/videos_items.html" %}
|
|
</div>
|
|
{% endif %}
|
|
|
|
{% if videos.has_previous or videos.has_next %}
|
|
<noscript>
|
|
<nav class="pagination is-centered mt-4" role="navigation"
|
|
aria-label="pagination">
|
|
{% if videos.has_previous %}
|
|
<a class="pagination-previous" href="?page={{ videos.previous_page_number }}">Previous</a>
|
|
{% else %}
|
|
<a class="pagination-previous" disabled>Previous</a>
|
|
{% endif %}
|
|
{% if videos.has_next %}
|
|
<a class="pagination-next" href="?page={{ videos.next_page_number }}">Next
|
|
page</a>
|
|
{% else %}
|
|
<a class="pagination-previous" disabled>Previous</a>
|
|
{% endif %}
|
|
</nav>
|
|
</noscript>
|
|
{% endif %}
|
|
{% endblock content %}
|