2020-07-10 14:20:25 +02:00
|
|
|
<?= $this->extend('admin/_layout') ?>
|
|
|
|
|
2020-07-16 12:08:23 +02:00
|
|
|
<?= $this->section('title') ?>
|
2020-10-02 17:38:16 +02:00
|
|
|
<?= lang('Episode.all_podcast_episodes') ?>
|
|
|
|
<?= $this->endSection() ?>
|
|
|
|
|
|
|
|
<?= $this->section('pageTitle') ?>
|
|
|
|
<?= lang('Episode.all_podcast_episodes') ?> (<?= $pager->getDetails()[
|
|
|
|
'total'
|
|
|
|
] ?>)
|
|
|
|
<?= $this->endSection() ?>
|
2020-07-16 12:08:23 +02:00
|
|
|
|
2020-10-02 17:38:16 +02:00
|
|
|
<?= $this->section('headerRight') ?>
|
2020-12-07 21:13:46 +01:00
|
|
|
<?= button(
|
|
|
|
lang('Episode.create'),
|
|
|
|
route_to('episode-create', $podcast->id),
|
|
|
|
|
|
|
|
['variant' => 'primary', 'iconLeft' => 'add']
|
|
|
|
) ?>
|
2020-07-16 12:08:23 +02:00
|
|
|
<?= $this->endSection() ?>
|
|
|
|
|
|
|
|
|
2020-07-10 14:20:25 +02:00
|
|
|
<?= $this->section('content') ?>
|
|
|
|
|
2020-10-02 17:38:16 +02:00
|
|
|
<p class="mb-4 text-sm italic text-gray-700"><?= lang('Common.pageInfo', [
|
|
|
|
'currentPage' => $pager->getDetails()['currentPage'],
|
|
|
|
'pageCount' => $pager->getDetails()['pageCount'],
|
|
|
|
]) ?></p>
|
|
|
|
<div class="flex flex-wrap mb-6">
|
|
|
|
<?php if ($episodes): ?>
|
|
|
|
<?php foreach ($episodes as $episode): ?>
|
|
|
|
<article class="flex w-full max-w-lg p-4 mx-auto">
|
|
|
|
<img
|
|
|
|
loading="lazy"
|
|
|
|
src="<?= $episode->image->thumbnail_url ?>"
|
|
|
|
alt="<?= $episode->title ?>" class="object-cover w-20 h-20 mr-2 rounded-lg" />
|
|
|
|
<div class="flex flex-col flex-1">
|
|
|
|
<div class="flex">
|
|
|
|
<a class="flex-1 text-sm hover:underline" href="<?= route_to(
|
|
|
|
'episode-view',
|
|
|
|
$podcast->id,
|
|
|
|
$episode->id
|
|
|
|
) ?>">
|
|
|
|
<h2 class="inline-flex justify-between w-full font-bold leading-none group">
|
|
|
|
<span class="mr-1 group-hover:underline"><?= $episode->title ?></span>
|
2020-10-29 18:25:15 +01:00
|
|
|
<?= episode_numbering(
|
|
|
|
$episode->number,
|
|
|
|
$episode->season_number,
|
|
|
|
'text-xs font-bold text-gray-600',
|
|
|
|
true
|
|
|
|
) ?>
|
2020-10-02 17:38:16 +02:00
|
|
|
</h2>
|
|
|
|
</a>
|
|
|
|
<div class="relative" data-toggle="dropdown">
|
|
|
|
<button type="button" class="inline-flex items-center p-1 outline-none focus:shadow-outline" id="moreDropdown" data-popper="button" aria-haspopup="true" aria-expanded="false">
|
|
|
|
<?= icon('more') ?>
|
|
|
|
</button>
|
|
|
|
<nav class="absolute z-10 flex-col hidden py-2 text-black whitespace-no-wrap bg-white border rounded shadow" aria-labelledby="moreDropdown" data-popper="menu" data-popper-placement="bottom-end" data-popper-offset-x="0" data-popper-offset-y="-24" >
|
|
|
|
<a class="px-4 py-1 hover:bg-gray-100" href="<?= route_to(
|
|
|
|
'episode-edit',
|
|
|
|
$podcast->id,
|
|
|
|
$episode->id
|
|
|
|
) ?>"><?= lang('Episode.edit') ?></a>
|
2020-12-07 21:13:46 +01:00
|
|
|
<a class="px-4 py-1 hover:bg-gray-100" href="<?= route_to(
|
|
|
|
'soundbites-edit',
|
|
|
|
$podcast->id,
|
|
|
|
$episode->id
|
2020-12-09 18:52:30 +01:00
|
|
|
) ?>"><?= lang('Episode.soundbites') ?></a>
|
2020-10-02 17:38:16 +02:00
|
|
|
<a class="px-4 py-1 hover:bg-gray-100" href="<?= route_to(
|
|
|
|
'episode',
|
|
|
|
$podcast->name,
|
|
|
|
$episode->slug
|
|
|
|
) ?>"><?= lang('Episode.go_to_page') ?></a>
|
|
|
|
<a class="px-4 py-1 hover:bg-gray-100" href="<?= route_to(
|
|
|
|
'episode-delete',
|
|
|
|
$podcast->id,
|
|
|
|
$episode->id
|
|
|
|
) ?>"><?= lang('Episode.delete') ?></a>
|
|
|
|
</nav>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="mb-2 text-xs">
|
2020-10-22 19:41:59 +02:00
|
|
|
<?= publication_pill(
|
2020-10-02 17:38:16 +02:00
|
|
|
$episode->published_at,
|
2020-12-09 18:52:30 +01:00
|
|
|
$episode->publication_status
|
2020-10-22 19:41:59 +02:00
|
|
|
) ?>
|
2020-10-02 17:38:16 +02:00
|
|
|
<span class="mx-1">•</span>
|
|
|
|
<time datetime="PT<?= $episode->enclosure_duration ?>S">
|
2020-10-22 19:41:59 +02:00
|
|
|
<?= format_duration($episode->enclosure_duration) ?>
|
2020-10-02 17:38:16 +02:00
|
|
|
</time>
|
|
|
|
</div>
|
|
|
|
<audio controls preload="none" class="w-full mt-auto">
|
|
|
|
<source src="/<?= $episode->enclosure_media_path ?>" type="<?= $episode->enclosure_type ?>">
|
|
|
|
Your browser does not support the audio tag.
|
|
|
|
</audio>
|
|
|
|
</div>
|
|
|
|
</article>
|
|
|
|
<?php endforeach; ?>
|
|
|
|
<?php else: ?>
|
|
|
|
<p class="italic"><?= lang('Podcast.no_episode') ?></p>
|
|
|
|
<?php endif; ?>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<?= $pager->links() ?>
|
2020-07-10 14:20:25 +02:00
|
|
|
|
2020-10-22 19:41:59 +02:00
|
|
|
<?= $this->endSection() ?>
|