2021-04-02 17:20:02 +00:00
|
|
|
<?= $this->extend('podcast/_layout') ?>
|
|
|
|
|
|
|
|
<?= $this->section('content') ?>
|
|
|
|
|
2021-10-18 16:44:07 +00:00
|
|
|
<?php if ($episodes): ?>
|
|
|
|
<div class="flex items-center justify-between px-2">
|
|
|
|
<h1 class="font-semibold">
|
|
|
|
<?php if ($activeQuery['type'] === 'year'): ?>
|
|
|
|
<?= lang('Podcast.list_of_episodes_year', [
|
2023-06-12 14:47:38 +00:00
|
|
|
'year' => $activeQuery['value'],
|
2021-10-18 16:44:07 +00:00
|
|
|
'episodeCount' => count($episodes),
|
2021-10-04 15:56:43 +00:00
|
|
|
]) ?>
|
2021-10-18 16:44:07 +00:00
|
|
|
<?php elseif ($activeQuery['type'] === 'season'): ?>
|
|
|
|
<?= lang('Podcast.list_of_episodes_season', [
|
2023-06-12 14:47:38 +00:00
|
|
|
'seasonNumber' => $activeQuery['value'],
|
2021-10-18 16:44:07 +00:00
|
|
|
'episodeCount' => count($episodes),
|
2021-10-04 15:56:43 +00:00
|
|
|
]) ?>
|
2021-10-18 16:44:07 +00:00
|
|
|
<?php endif; ?>
|
|
|
|
</h1>
|
|
|
|
<?php if ($activeQuery): ?>
|
2024-05-09 17:55:41 +00:00
|
|
|
<button id="episode-lists-dropdown" type="button" class="inline-flex items-center px-2 py-1 text-sm font-semibold" data-dropdown="button" data-dropdown-target="episode-lists-dropdown-menu" aria-label="<?= lang('Common.more') ?>" aria-haspopup="true" aria-expanded="false">
|
2024-04-26 17:57:25 +00:00
|
|
|
<?= $activeQuery['label'] . icon('arrow-drop-down-fill', [
|
|
|
|
'class' => 'ml-2 text-xl',
|
|
|
|
]) ?>
|
2021-10-18 16:44:07 +00:00
|
|
|
</button>
|
2021-11-05 14:36:34 +00:00
|
|
|
<nav id="episode-lists-dropdown-menu" class="flex flex-col py-2 rounded-lg shadow border-3 border-contrast bg-elevated" aria-labelledby="episode-lists-dropdown" data-dropdown="menu" data-dropdown-placement="bottom-end">
|
2021-10-18 16:44:07 +00:00
|
|
|
<?php foreach ($episodesNav as $link): ?>
|
|
|
|
<?= anchor(
|
2023-02-22 16:29:45 +00:00
|
|
|
$link['route'],
|
|
|
|
$link['label'] . ' (' . $link['number_of_episodes'] . ')',
|
|
|
|
[
|
2023-06-12 14:47:38 +00:00
|
|
|
'class' => 'px-2 py-1 whitespace-nowrap hover:bg-highlight ' .
|
2023-02-22 16:29:45 +00:00
|
|
|
($link['is_active']
|
|
|
|
? 'font-semibold'
|
|
|
|
: 'text-skin-muted hover:text-skin-base'),
|
|
|
|
],
|
|
|
|
) ?>
|
2021-10-18 16:44:07 +00:00
|
|
|
<?php endforeach; ?>
|
|
|
|
</nav>
|
|
|
|
<?php endif; ?>
|
|
|
|
</div>
|
|
|
|
<div class="flex flex-col mt-4 gap-y-4">
|
2021-04-02 17:20:02 +00:00
|
|
|
<?php foreach ($episodes as $episode): ?>
|
2021-10-13 15:43:40 +00:00
|
|
|
<?= view('episode/_partials/card', [
|
2024-04-26 17:57:25 +00:00
|
|
|
'episode' => $episode,
|
|
|
|
'podcast' => $podcast,
|
|
|
|
]) ?>
|
2021-04-02 17:20:02 +00:00
|
|
|
<?php endforeach; ?>
|
2021-10-18 16:44:07 +00:00
|
|
|
</div>
|
|
|
|
<?php else: ?>
|
|
|
|
<h1 class="px-4 mb-2 text-xl text-center"><?= lang(
|
2023-02-22 16:29:45 +00:00
|
|
|
'Podcast.no_episode',
|
|
|
|
) ?></h1>
|
2021-10-18 16:44:07 +00:00
|
|
|
<?php endif; ?>
|
2021-04-02 17:20:02 +00:00
|
|
|
|
2021-05-03 17:39:58 +00:00
|
|
|
<?= $this->endSection()
|
|
|
|
?>
|