2020-07-10 12:20:25 +00:00
|
|
|
<?= $this->extend('admin/_layout') ?>
|
|
|
|
|
2020-07-16 10:08:23 +00:00
|
|
|
<?= $this->section('title') ?>
|
2020-10-02 15:38:16 +00:00
|
|
|
<?= lang('Episode.all_podcast_episodes') ?>
|
|
|
|
<?= $this->endSection() ?>
|
|
|
|
|
|
|
|
<?= $this->section('pageTitle') ?>
|
|
|
|
<?= lang('Episode.all_podcast_episodes') ?> (<?= $pager->getDetails()[
|
|
|
|
'total'
|
|
|
|
] ?>)
|
|
|
|
<?= $this->endSection() ?>
|
2020-07-16 10:08:23 +00:00
|
|
|
|
2020-10-02 15:38:16 +00:00
|
|
|
<?= $this->section('headerRight') ?>
|
2021-04-02 17:20:02 +00:00
|
|
|
<?= button(lang('Episode.create'), route_to('episode-create', $podcast->id), [
|
|
|
|
'variant' => 'accent',
|
|
|
|
'iconLeft' => 'add',
|
|
|
|
]) ?>
|
2020-07-16 10:08:23 +00:00
|
|
|
<?= $this->endSection() ?>
|
|
|
|
|
|
|
|
|
2020-07-10 12:20:25 +00:00
|
|
|
<?= $this->section('content') ?>
|
|
|
|
|
2020-10-02 15:38:16 +00: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,
|
2021-04-02 17:20:02 +00:00
|
|
|
$episode->id,
|
2020-10-02 15:38:16 +00:00
|
|
|
) ?>">
|
2021-04-02 17:20:02 +00:00
|
|
|
<h2 class="inline-flex justify-between w-full font-semibold leading-none group">
|
2020-10-02 15:38:16 +00:00
|
|
|
<span class="mr-1 group-hover:underline"><?= $episode->title ?></span>
|
2020-10-29 17:25:15 +00:00
|
|
|
<?= episode_numbering(
|
|
|
|
$episode->number,
|
|
|
|
$episode->season_number,
|
2021-04-02 17:20:02 +00:00
|
|
|
'text-xs font-semibold text-gray-600',
|
|
|
|
true,
|
2020-10-29 17:25:15 +00:00
|
|
|
) ?>
|
2020-10-02 15:38:16 +00:00
|
|
|
</h2>
|
|
|
|
</a>
|
2021-04-02 17:20:02 +00:00
|
|
|
<button
|
|
|
|
id="more-dropdown-<?= $episode->id ?>"
|
|
|
|
type="button"
|
|
|
|
class="inline-flex items-center p-1 outline-none focus:ring"
|
|
|
|
data-dropdown="button"
|
|
|
|
data-dropdown-target="more-dropdown-<?= $episode->id ?>-menu"
|
|
|
|
aria-haspopup="true"
|
|
|
|
aria-expanded="false">
|
|
|
|
<?= icon('more') ?>
|
|
|
|
</button>
|
|
|
|
<nav
|
|
|
|
id="more-dropdown-<?= $episode->id ?>-menu"
|
|
|
|
class="flex flex-col py-2 text-black whitespace-no-wrap bg-white border rounded shadow"
|
|
|
|
aria-labelledby="more-dropdown-<?= $episode->id ?>"
|
|
|
|
data-dropdown="menu"
|
|
|
|
data-dropdown-placement="bottom-start"
|
|
|
|
data-dropdown-offset-x="0"
|
|
|
|
data-dropdown-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>
|
|
|
|
<a class="px-4 py-1 hover:bg-gray-100" href="<?= route_to(
|
|
|
|
'embeddable-player-add',
|
|
|
|
$podcast->id,
|
|
|
|
$episode->id,
|
|
|
|
) ?>"><?= lang(
|
|
|
|
'Episode.embeddable_player.add',
|
2021-02-27 21:21:26 +00:00
|
|
|
) ?></a>
|
2021-04-02 17:20:02 +00:00
|
|
|
<a class="px-4 py-1 hover:bg-gray-100" href="<?= route_to(
|
|
|
|
'episode-person-manage',
|
|
|
|
$podcast->id,
|
|
|
|
$episode->id,
|
|
|
|
) ?>"><?= lang('Person.persons') ?></a>
|
|
|
|
<a class="px-4 py-1 hover:bg-gray-100" href="<?= route_to(
|
|
|
|
'soundbites-edit',
|
|
|
|
$podcast->id,
|
|
|
|
$episode->id,
|
|
|
|
) ?>"><?= lang('Episode.soundbites') ?></a>
|
|
|
|
<a class="px-4 py-1 hover:bg-gray-100" href="<?= route_to(
|
|
|
|
'episode',
|
2021-07-26 13:10:46 +00:00
|
|
|
$podcast->handle,
|
2021-04-02 17:20:02 +00:00
|
|
|
$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>
|
2020-10-02 15:38:16 +00:00
|
|
|
</div>
|
|
|
|
<div class="mb-2 text-xs">
|
2020-10-22 17:41:59 +00:00
|
|
|
<?= publication_pill(
|
2020-10-02 15:38:16 +00:00
|
|
|
$episode->published_at,
|
2021-04-02 17:20:02 +00:00
|
|
|
$episode->publication_status,
|
2020-10-22 17:41:59 +00:00
|
|
|
) ?>
|
2020-10-02 15:38:16 +00:00
|
|
|
<span class="mx-1">•</span>
|
2021-05-03 17:39:58 +00:00
|
|
|
<time datetime="PT<?= $episode->audio_file_duration ?>S">
|
|
|
|
<?= format_duration(
|
|
|
|
$episode->audio_file_duration,
|
|
|
|
) ?>
|
2020-10-02 15:38:16 +00:00
|
|
|
</time>
|
|
|
|
</div>
|
|
|
|
<audio controls preload="none" class="w-full mt-auto">
|
2021-05-03 17:39:58 +00:00
|
|
|
<source src="<?= $episode->audio_file_url ?>" type="<?= $episode->audio_file_mimetype ?>">
|
2020-10-02 15:38:16 +00:00
|
|
|
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 12:20:25 +00:00
|
|
|
|
2020-10-22 17:41:59 +00:00
|
|
|
<?= $this->endSection() ?>
|