forked from rc/aircox
add download link; update player and pages layout
This commit is contained in:
@ -4,61 +4,33 @@
|
||||
|
||||
{% include "aircox/program_sidebar.html" %}
|
||||
|
||||
|
||||
{% block content %}
|
||||
<a-episode :page="{title: "{{ page.title }}", podcasts: {{ object.podcasts|json }}}">
|
||||
<template v-slot="{podcasts,page}">
|
||||
{{ block.super }}
|
||||
|
||||
<div class="columns is-desktop">
|
||||
<section class="column">
|
||||
<h5 class="title is-5">{% translate "Diffusions" %}</h5>
|
||||
<ul>
|
||||
{% for diffusion in object.diffusion_set.all %}
|
||||
<li>
|
||||
{% with diffusion.start as start %}
|
||||
{% with diffusion.end as end %}
|
||||
<time datetime="{{ start }}">{{ start|date:"D. d F Y, H:i" }}</time>
|
||||
—
|
||||
<time datetime="{{ end }}">{{ end|date:"H:i" }}</time>
|
||||
{% endwith %}
|
||||
{% endwith %}
|
||||
|
||||
<small>
|
||||
{% if diffusion.initial %}
|
||||
{% with diffusion.initial.date as date %}
|
||||
<span title="{% blocktranslate %}Rerun of {{ date }}{% endblocktranslate %}">
|
||||
({% translate "rerun" %})
|
||||
</span>
|
||||
{% endwith %}
|
||||
{% endif %}
|
||||
</small>
|
||||
<br>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
{% if object.podcasts %}
|
||||
<section class="column">
|
||||
<a-playlist v-if="page" :set="podcasts"
|
||||
name="{{ page.title }}"
|
||||
:player="player" :actions="['play']"
|
||||
@select="player.playItems('queue', $event.item)">
|
||||
<template v-slot:header>
|
||||
<h5 class="title is-5">{% translate "Podcasts" %}</h5>
|
||||
</template>
|
||||
</a-playlist>
|
||||
{% comment %}
|
||||
{% for object in podcasts %}
|
||||
{% include "aircox/widgets/podcast_item.html" %}
|
||||
{% endfor %}
|
||||
{% endcomment %}
|
||||
</section>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% if object.podcasts %}
|
||||
<section>
|
||||
<a-playlist v-if="page" :set="podcasts"
|
||||
name="{{ page.title }}"
|
||||
list-class="menu-list" item-class="menu-item"
|
||||
:player="player" :actions="['play']"
|
||||
@select="player.playItems('queue', $event.item)">
|
||||
<template v-slot:header>
|
||||
<h4 class="title is-4">{% translate "Podcasts" %}</h4>
|
||||
</template>
|
||||
</a-playlist>
|
||||
{% comment %}
|
||||
{% for object in podcasts %}
|
||||
{% include "aircox/widgets/podcast_item.html" %}
|
||||
{% endfor %}
|
||||
{% endcomment %}
|
||||
</section>
|
||||
{% endif %}
|
||||
|
||||
{% if tracks %}
|
||||
<section class="column">
|
||||
<section>
|
||||
<h4 class="title is-4">{% translate "Playlist" %}</h4>
|
||||
<ol>
|
||||
{% for track in tracks %}
|
||||
@ -76,3 +48,35 @@
|
||||
</template></a-episode>
|
||||
{% endblock %}
|
||||
|
||||
{% block sidebar %}
|
||||
<section>
|
||||
<h4 class="title is-4">{% translate "Diffusions" %}</h4>
|
||||
<ul>
|
||||
{% for diffusion in object.diffusion_set.all %}
|
||||
<li>
|
||||
{% with diffusion.start as start %}
|
||||
{% with diffusion.end as end %}
|
||||
<time datetime="{{ start }}">{{ start|date:"D. d F Y, H:i" }}</time>
|
||||
—
|
||||
<time datetime="{{ end }}">{{ end|date:"H:i" }}</time>
|
||||
{% endwith %}
|
||||
{% endwith %}
|
||||
|
||||
<small>
|
||||
{% if diffusion.initial %}
|
||||
{% with diffusion.initial.date as date %}
|
||||
<span title="{% blocktranslate %}Rerun of {{ date }}{% endblocktranslate %}">
|
||||
({% translate "rerun" %})
|
||||
</span>
|
||||
{% endwith %}
|
||||
{% endif %}
|
||||
</small>
|
||||
<br>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</section>
|
||||
{{ block.super }}
|
||||
{% endblock %}
|
||||
|
||||
|
||||
|
@ -32,7 +32,6 @@ Context:
|
||||
|
||||
{% block comments %}
|
||||
{% if comments or comment_form %}
|
||||
<hr>
|
||||
<section class="mt-6">
|
||||
<h4 class="title is-4">{% translate "Comments" %}</h4>
|
||||
|
||||
@ -51,8 +50,6 @@ Context:
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
{% if comments and comment_form %}<hr>{% endif %}
|
||||
|
||||
{% if comment_form %}
|
||||
<form method="POST">
|
||||
<h5 class="title is-5">{% translate "Post a comment" %}</h5>
|
||||
|
@ -13,56 +13,56 @@
|
||||
{{ block.super }}
|
||||
<br>
|
||||
{% with has_headline=False %}
|
||||
<div class="columns is-desktop">
|
||||
<section class="column">
|
||||
<h5 class="title is-5">{% translate "Diffusions" %}</h5>
|
||||
{% for schedule in program.schedule_set.all %}
|
||||
{{ schedule.get_frequency_verbose }}
|
||||
{% with schedule.start|date:"H:i" as start %}
|
||||
{% with schedule.end|date:"H:i" as end %}
|
||||
<time datetime="{{ start }}">{{ start }}</time>
|
||||
—
|
||||
<time datetime="{{ end }}">{{ end }}</time>
|
||||
{% endwith %}
|
||||
{% endwith %}
|
||||
<small>
|
||||
{% if schedule.initial %}
|
||||
{% with schedule.initial.date as date %}
|
||||
<span title="{% blocktranslate %}Rerun of {{ date }}{% endblocktranslate %}">
|
||||
({% translate "Rerun" %})
|
||||
</span>
|
||||
{% endwith %}
|
||||
{% endif %}
|
||||
</small>
|
||||
<br>
|
||||
{% endfor %}
|
||||
</section>
|
||||
{% if articles %}
|
||||
<section>
|
||||
<h4 class="title is-4">{% translate "Articles" %}</h4>
|
||||
|
||||
{% if articles %}
|
||||
<section class="column">
|
||||
<h4 class="title is-5">{% translate "Articles" %}</h4>
|
||||
{% for object in articles %}
|
||||
{% include "aircox/widgets/page_item.html" %}
|
||||
{% endfor %}
|
||||
|
||||
{% for object in articles %}
|
||||
{% include "aircox/widgets/page_item.html" %}
|
||||
{% endfor %}
|
||||
|
||||
<br>
|
||||
<nav class="pagination is-centered">
|
||||
<ul class="pagination-list">
|
||||
<li>
|
||||
<a href="{% url "article-list" parent_slug=program.slug %}"
|
||||
class="pagination-link"
|
||||
aria-label="{% translate "Show all program's articles" %}">
|
||||
{% translate "More articles" %}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</section>
|
||||
{% endif %}
|
||||
</div>
|
||||
<br>
|
||||
<nav class="pagination is-centered">
|
||||
<ul class="pagination-list">
|
||||
<li>
|
||||
<a href="{% url "article-list" parent_slug=program.slug %}"
|
||||
class="pagination-link"
|
||||
aria-label="{% translate "Show all program's articles" %}">
|
||||
{% translate "More articles" %}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</section>
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block sidebar %}
|
||||
<section>
|
||||
<h4 class="title is-4">{% translate "Diffusions" %}</h4>
|
||||
{% for schedule in program.schedule_set.all %}
|
||||
{{ schedule.get_frequency_verbose }}
|
||||
{% with schedule.start|date:"H:i" as start %}
|
||||
{% with schedule.end|date:"H:i" as end %}
|
||||
<time datetime="{{ start }}">{{ start }}</time>
|
||||
—
|
||||
<time datetime="{{ end }}">{{ end }}</time>
|
||||
{% endwith %}
|
||||
{% endwith %}
|
||||
<small>
|
||||
{% if schedule.initial %}
|
||||
{% with schedule.initial.date as date %}
|
||||
<span title="{% blocktranslate %}Rerun of {{ date }}{% endblocktranslate %}">
|
||||
({% translate "Rerun" %})
|
||||
</span>
|
||||
{% endwith %}
|
||||
{% endif %}
|
||||
</small>
|
||||
<br>
|
||||
{% endfor %}
|
||||
</section>
|
||||
{{ block.super }}
|
||||
{% endblock %}
|
||||
|
||||
|
Reference in New Issue
Block a user