Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision

Target

Select target project
  • adaures/castopod
  • mkljczk/castopod-host
  • spaetz/castopod-host
  • PatrykMis/castopod
  • jonas/castopod
  • ajeremias/castopod
  • misuzu/castopod
  • KrzysztofDomanczyk/castopod
  • Behel/castopod
  • nebulon/castopod
  • ewen/castopod
  • NeoluxConsulting/castopod
  • nateritter/castopod-og
  • prcutler/castopod
14 results
Select Git revision
Show changes
Showing
with 0 additions and 2121 deletions
<?= $this->extend('admin/_layout') ?>
<?= $this->section('title') ?>
<?= lang('Episode.unpublish') ?>
<?= $this->endSection() ?>
<?= $this->section('pageTitle') ?>
<?= lang('Episode.unpublish') ?>
<?= $this->endSection() ?>
<?= $this->section('content') ?>
<?= form_open(route_to('episode-unpublish', $podcast->id, $episode->id), [
'class' => 'flex flex-col max-w-xl mx-auto',
]) ?>
<p class="flex max-w-xl p-2 mb-4 font-semibold text-red-900 bg-red-100 border border-red-300"><?= icon(
'alert',
'mr-4 text-2xl flex-shrink-0 text-red-500',
) . lang('Episode.unpublish_form.disclaimer') ?></p>
<label for="understand" class="inline-flex items-center mb-4">
<?= form_checkbox(
[
'id' => 'understand',
'name' => 'understand',
'class' => 'text-pine-700',
'required' => 'required',
],
'yes',
old('understand', false),
) ?>
<span class="ml-2"><?= lang('Episode.unpublish_form.understand') ?></span>
</label>
<div class="self-end">
<?= button(
lang('Common.cancel'),
route_to('episode-view', $podcast->id, $episode->id),
) ?>
<?= button(
lang('Episode.unpublish_form.submit'),
'',
['variant' => 'danger'],
['type' => 'submit'],
) ?>
</div>
<?= form_close() ?>
<?= $this->endSection() ?>
<?= $this->extend('admin/_layout') ?>
<?= $this->section('title') ?>
<?= $episode->title ?>
<?= $this->endSection() ?>
<?= $this->section('pageTitle') ?>
<?= $episode->title ?>
<?= $this->endSection() ?>
<?= $this->section('headerLeft') ?>
<?= publication_pill(
$episode->published_at,
$episode->publication_status,
'text-sm ml-2 align-middle',
) ?>
<?= $this->endSection() ?>
<?= $this->section('headerRight') ?>
<?= publication_button(
$podcast->id,
$episode->id,
$episode->publication_status,
) ?>
<?= $this->endSection() ?>
<?= $this->section('content') ?>
<div class="flex flex-wrap">
<div class="w-full max-w-sm mb-6 md:mr-4">
<img
src="<?= $episode->image->medium_url ?>"
alt="Episode cover"
class="object-cover w-full"
/>
<audio controls preload="auto" class="w-full mb-6">
<source src="<?= $episode->audio_file_url ?>" type="<?= $episode->audio_file_mimetype ?>">
Your browser does not support the audio tag.
</audio>
<div class="flex justify-around">
<?= button(
lang('Episode.edit'),
route_to('episode-edit', $podcast->id, $episode->id),
['variant' => 'info', 'iconLeft' => 'edit'],
) ?>
<?= button(
lang('Episode.go_to_page'),
route_to('episode', $podcast->name, $episode->slug),
['variant' => 'secondary', 'iconLeft' => 'external-link'],
) ?>
<?= button(
lang('Episode.delete'),
route_to('episode-delete', $podcast->id, $episode->id),
['variant' => 'danger', 'iconLeft' => 'delete-bin'],
) ?>
</div>
</div>
<section class="w-full max-w-sm prose">
<?= location_link($episode->location, 'text-sm') ?>
<?= $episode->description_html ?>
</section>
</div>
<div class="mb-12">
<?= button(
lang('Episode.embeddable_player.add'),
route_to('embeddable-player-add', $podcast->id, $episode->id),
['variant' => 'info', 'iconLeft' => 'movie'],
['class' => 'mb-4'],
) ?>
<?= button(
lang('Episode.soundbites_form.title'),
route_to('soundbites-edit', $podcast->id, $episode->id),
['variant' => 'info', 'iconLeft' => 'edit'],
['class' => 'mb-4'],
) ?>
<?= button(
lang('Person.episode_form.title'),
route_to('episode-person-manage', $podcast->id, $episode->id),
['variant' => 'info', 'iconLeft' => 'folder-user'],
['class' => 'mb-4'],
) ?>
<?php if (count($episode->soundbites) > 0): ?>
<?= data_table(
[
[
'header' => 'Play',
'cell' => function ($soundbite): string {
return icon_button(
'play',
lang('Episode.soundbites_form.play'),
'',
['variant' => 'primary'],
[
'class' => 'mb-1 mr-1',
'data-type' => 'play-soundbite',
'data-soundbite-start-time' =>
$soundbite->start_time,
'data-soundbite-duration' => $soundbite->duration,
],
);
},
],
[
'header' => lang('Episode.soundbites_form.start_time'),
'cell' => function ($soundbite): string {
return format_duration($soundbite->start_time);
},
],
[
'header' => lang('Episode.soundbites_form.duration'),
'cell' => function ($soundbite): string {
return format_duration($soundbite->duration);
},
],
[
'header' => lang('Episode.soundbites_form.label'),
'cell' => function ($soundbite) {
return $soundbite->label;
},
],
],
$episode->soundbites,
) ?>
<?php endif; ?>
</div>
<div class="mb-12 text-center">
<h2><?= lang('Charts.episode_by_day') ?></h2>
<div class="chart-xy" id="by-day-graph" data-chart-type="xy-chart" data-chart-url="<?= route_to(
'analytics-filtered-data',
$podcast->id,
'PodcastByEpisode',
'ByDay',
$episode->id,
) ?>"></div>
</div>
<div class="mb-12 text-center">
<h2><?= lang('Charts.episode_by_month') ?></h2>
<div class="chart-xy" id="by-month-graph" data-chart-type="xy-chart" data-chart-url="<?= route_to(
'analytics-filtered-data',
$podcast->id,
'PodcastByEpisode',
'ByMonth',
$episode->id,
) ?>"></div>
</div>
<script src="/assets/charts.js" type="module"></script>
<?= $this->endSection() ?>
<?= $this->extend('admin/_layout') ?>
<?= $this->section('title') ?>
<?= lang('MyAccount.changePassword') ?>
<?= $this->endSection() ?>
<?= $this->section('pageTitle') ?>
<?= lang('MyAccount.changePassword') ?>
<?= $this->endSection() ?>
<?= $this->section('content') ?>
<?= form_open(route_to('change-password'), [
'class' => 'flex flex-col max-w-sm',
]) ?>
<?= csrf_field() ?>
<?= form_label(lang('User.form.password'), 'password') ?>
<?= form_input([
'id' => 'password',
'name' => 'password',
'class' => 'form-input mb-4',
'required' => 'required',
'type' => 'password',
]) ?>
<?= form_label(lang('User.form.new_password'), 'new_password') ?>
<?= form_input([
'id' => 'new_password',
'name' => 'new_password',
'class' => 'form-input mb-4',
'required' => 'required',
'type' => 'password',
'autocomplete' => 'new-password',
]) ?>
<?= button(
lang('User.form.submit_password_change'),
'',
['variant' => 'primary'],
['type' => 'submit', 'class' => 'self-end'],
) ?>
<?= form_close() ?>
<?= $this->endSection() ?>
<?= $this->extend('admin/_layout') ?>
<?= $this->section('title') ?>
<?= lang('Page.create') ?>
<?= $this->endSection() ?>
<?= $this->section('pageTitle') ?>
<?= lang('Page.create') ?>
<?= $this->endSection() ?>
<?= $this->section('content') ?>
<?= form_open(route_to('page-create'), [
'class' => 'flex flex-col max-w-3xl',
]) ?>
<?= csrf_field() ?>
<?= form_label(lang('Page.form.title'), 'title', ['class' => 'max-w-sm']) ?>
<?= form_input([
'id' => 'title',
'name' => 'title',
'class' => 'form-input mb-4 max-w-sm',
'value' => old('title'),
'required' => 'required',
'data-slugify' => 'title',
]) ?>
<?= form_label(lang('Page.form.slug'), 'slug', ['class' => 'max-w-sm']) ?>
<?= form_input([
'id' => 'slug',
'name' => 'slug',
'class' => 'form-input mb-4 max-w-sm',
'value' => old('slug'),
'required' => 'required',
'data-slugify' => 'slug',
]) ?>
<div class="mb-4">
<?= form_label(lang('Page.form.content'), 'content') ?>
<?= form_textarea(
[
'id' => 'content',
'name' => 'content',
'class' => 'form-textarea',
'required' => 'required',
],
old('content', '', false),
'data-editor="markdown"',
) ?>
</div>
<?= button(
lang('Page.form.submit_create'),
'',
['variant' => 'primary'],
['type' => 'submit', 'class' => 'self-end'],
) ?>
<?= form_close() ?>
<?= $this->endSection() ?>
<?= $this->extend('admin/_layout') ?>
<?= $this->section('title') ?>
<?= lang('Page.edit') ?>
<?= $this->endSection() ?>
<?= $this->section('pageTitle') ?>
<?= lang('Page.edit') ?>
<?= $this->endSection() ?>
<?= $this->section('content') ?>
<?= form_open(route_to('page-edit', $page->id), [
'class' => 'flex flex-col max-w-3xl',
]) ?>
<?= csrf_field() ?>
<?= form_label(lang('Page.form.title'), 'title', ['class' => 'max-w-sm']) ?>
<?= form_input([
'id' => 'title',
'name' => 'title',
'class' => 'form-input mb-4 max-w-sm',
'value' => old('title', $page->title),
'required' => 'required',
'data-slugify' => 'title',
]) ?>
<?= form_label(lang('Page.form.slug'), 'slug', ['class' => 'max-w-sm']) ?>
<?= form_input([
'id' => 'slug',
'name' => 'slug',
'class' => 'form-input mb-4 max-w-sm',
'value' => old('slug', $page->slug),
'required' => 'required',
'data-slugify' => 'slug',
]) ?>
<div class="mb-4">
<?= form_label(lang('Page.form.content'), 'content') ?>
<?= form_textarea(
[
'id' => 'content',
'name' => 'content',
'class' => 'form-textarea',
'required' => 'required',
],
old('content', $page->content, false),
'data-editor="markdown"',
) ?>
</div>
<?= button(
lang('Page.form.submit_edit'),
'',
['variant' => 'primary'],
['type' => 'submit', 'class' => 'self-end'],
) ?>
<?= form_close() ?>
<?= $this->endSection() ?>
<?= $this->extend('admin/_layout') ?>
<?= $this->section('title') ?>
<?= lang('Person.create') ?>
<?= $this->endSection() ?>
<?= $this->section('pageTitle') ?>
<?= lang('Person.create') ?>
<?= $this->endSection() ?>
<?= $this->section('content') ?>
<?= form_open_multipart(route_to('person-create'), [
'method' => 'post',
'class' => 'flex flex-col',
]) ?>
<?= csrf_field() ?>
<?= form_section(
lang('Person.form.identity_section_title'),
lang('Person.form.identity_section_subtitle'),
) ?>
<?= form_label(
lang('Person.form.full_name'),
'full_name',
[],
lang('Person.form.full_name_hint'),
) ?>
<?= form_input([
'id' => 'full_name',
'name' => 'full_name',
'class' => 'form-input mb-4',
'value' => old('full_name'),
'required' => 'required',
'data-slugify' => 'title',
]) ?>
<?= form_label(
lang('Person.form.unique_name'),
'unique_name',
[],
lang('Person.form.unique_name_hint'),
) ?>
<?= form_input([
'id' => 'unique_name',
'name' => 'unique_name',
'class' => 'form-input mb-4',
'value' => old('unique_name'),
'required' => 'required',
'data-slugify' => 'slug',
]) ?>
<?= form_label(
lang('Person.form.information_url'),
'information_url',
[],
lang('Person.form.information_url_hint'),
true,
) ?>
<?= form_input([
'id' => 'information_url',
'name' => 'information_url',
'class' => 'form-input mb-4',
'value' => old('information_url'),
]) ?>
<?= form_label(lang('Person.form.image'), 'image') ?>
<?= form_input([
'id' => 'image',
'name' => 'image',
'class' => 'form-input',
'required' => 'required',
'type' => 'file',
'accept' => '.jpg,.jpeg,.png',
]) ?>
<small class="mb-4 text-gray-600"><?= lang(
'Person.form.image_size_hint',
) ?></small>
<?= form_section_close() ?>
<?= button(
lang('Person.form.submit_create'),
'',
['variant' => 'primary'],
['type' => 'submit', 'class' => 'self-end'],
) ?>
<?= form_close() ?>
<?= $this->endSection() ?>
<?= $this->extend('admin/_layout') ?>
<?= $this->section('title') ?>
<?= lang('Person.edit') ?>
<?= $this->endSection() ?>
<?= $this->section('pageTitle') ?>
<?= lang('Person.edit') ?>
<?= $this->endSection() ?>
<?= $this->section('content') ?>
<?= form_open_multipart(route_to('person-edit', $person->id), [
'method' => 'post',
'class' => 'flex flex-col',
]) ?>
<?= csrf_field() ?>
<?= form_section(
lang('Person.form.identity_section_title'),
lang('Person.form.identity_section_subtitle') .
"<img src=\"{$person->image->thumbnail_url}\" alt=\"{$person->full_name}\" class=\"object-cover w-32 h-32 mt-3 rounded\" />",
) ?>
<?= form_label(
lang('Person.form.full_name'),
'full_name',
[],
lang('Person.form.full_name_hint'),
) ?>
<?= form_input([
'id' => 'full_name',
'name' => 'full_name',
'class' => 'form-input mb-4',
'value' => old('full_name', $person->full_name),
'required' => 'required',
'data-slugify' => 'title',
]) ?>
<?= form_label(
lang('Person.form.unique_name'),
'unique_name',
[],
lang('Person.form.unique_name_hint'),
) ?>
<?= form_input([
'id' => 'unique_name',
'name' => 'unique_name',
'class' => 'form-input mb-4',
'value' => old('unique_name', $person->unique_name),
'required' => 'required',
'data-slugify' => 'slug',
]) ?>
<?= form_label(
lang('Person.form.information_url'),
'information_url',
[],
lang('Person.form.information_url_hint'),
true,
) ?>
<?= form_input([
'id' => 'information_url',
'name' => 'information_url',
'class' => 'form-input mb-4',
'value' => old('information_url', $person->information_url),
]) ?>
<?= form_label(lang('Person.form.image'), 'image') ?>
<?= form_input([
'id' => 'image',
'name' => 'image',
'class' => 'form-input',
'type' => 'file',
'accept' => '.jpg,.jpeg,.png',
]) ?>
<small class="mb-4 text-gray-600"><?= lang(
'Person.form.image_size_hint',
) ?></small>
<?= form_section_close() ?>
<?= button(
lang('Person.form.submit_edit'),
'',
['variant' => 'primary'],
['type' => 'submit', 'class' => 'self-end'],
) ?>
<?= form_close() ?>
<?= $this->endSection() ?>
<?= $this->extend('admin/_layout') ?>
<?= $this->section('title') ?>
<?= lang('Person.all_persons') ?>
<?= $this->endSection() ?>
<?= $this->section('pageTitle') ?>
<?= lang('Person.all_persons') ?> (<?= count($persons) ?>)
<?= $this->endSection() ?>
<?= $this->section('headerRight') ?>
<?= button(
lang('Person.create'),
route_to('person-create'),
['variant' => 'primary', 'iconLeft' => 'add'],
['class' => 'mr-2'],
) ?>
<?= $this->endSection() ?>
<?= $this->section('content') ?>
<div class="flex flex-wrap">
<?php if ($persons !== null): ?>
<?php foreach ($persons as $person): ?>
<article class="w-48 h-full mb-4 mr-4 overflow-hidden bg-white border rounded shadow">
<img
alt="<?= $person->full_name ?>"
src="<?= $person->image
->thumbnail_url ?>" class="object-cover w-full" />
<div class="p-2">
<a href="<?= route_to(
'person-view',
$person->id,
) ?>" class="hover:underline">
<h2 class="font-semibold"><?= $person->full_name ?></h2>
</a>
</div>
<footer class="flex items-center justify-end p-2">
<a class="inline-flex p-2 mr-2 text-teal-700 bg-teal-100 rounded-full shadow-xs hover:bg-teal-200" href="<?= route_to(
'person-edit',
$person->id,
) ?>" data-toggle="tooltip" data-placement="bottom" title="<?= lang(
'Person.edit',
) ?>"><?= icon('edit') ?></a>
<a class="inline-flex p-2 mr-2 text-gray-700 bg-red-100 rounded-full shadow-xs hover:bg-gray-200" href="<?= route_to(
'person-delete',
$person->id,
) ?>" data-toggle="tooltip" data-placement="bottom" title="<?= lang(
'Person.delete',
) ?>"><?= icon('delete-bin') ?></a>
<a class="inline-flex p-2 text-gray-700 bg-gray-100 rounded-full shadow-xs hover:bg-gray-200" href="<?= route_to(
'person-view',
$person->id,
) ?>" data-toggle="tooltip" data-placement="bottom" title="<?= lang(
'Person.view',
) ?>"><?= icon('eye') ?></a>
</footer>
</article>
<?php endforeach; ?>
<?php else: ?>
<p class="italic"><?= lang('Person.no_person') ?></p>
<?php endif; ?>
</div>
<?= $this->endSection() ?>
<?= $this->extend('admin/_layout') ?>
<?= $this->section('title') ?>
<?= $person->full_name ?>
<?= $this->endSection() ?>
<?= $this->section('pageTitle') ?>
<?= $person->full_name ?>
<?= $this->endSection() ?>
<?= $this->section('headerRight') ?>
<?= button(
lang('Person.edit'),
route_to('person-edit', $person->id),
['variant' => 'secondary', 'iconLeft' => 'edit'],
['class' => 'mr-2'],
) ?>
<?= $this->endSection() ?>
<?= $this->section('content') ?>
<div class="flex flex-wrap">
<div class="w-full max-w-sm mb-6 md:mr-4">
<img
src="<?= $person->image->medium_url ?>"
alt="$person->full_name"
class="object-cover w-full rounded"
/>
</div>
<section class="w-full prose">
<?= $person->full_name ?><br />
<a href="<?= $person->information_url ?>"><?= $person->information_url ?></a>
</section>
</div>
<?= $this->endSection() ?>
<?php
$podcastNavigation = [
'dashboard' => [
'icon' => 'dashboard',
'items' => ['podcast-view', 'podcast-edit'],
],
'episodes' => [
'icon' => 'mic',
'items' => ['episode-list', 'episode-create'],
],
'persons' => [
'icon' => 'folder-user',
'items' => ['podcast-person-manage'],
],
'analytics' => [
'icon' => 'line-chart',
'items' => [
'podcast-analytics',
'podcast-analytics-unique-listeners',
'podcast-analytics-listening-time',
'podcast-analytics-players',
'podcast-analytics-locations',
'podcast-analytics-time-periods',
'podcast-analytics-webpages',
],
],
'contributors' => [
'icon' => 'group',
'items' => ['contributor-list', 'contributor-add'],
],
'platforms' => [
'icon' => 'link',
'items' => [
'platforms-podcasting',
'platforms-social',
'platforms-funding',
],
],
]; ?>
<a href="<?= route_to(
'admin',
) ?>" class="inline-flex items-center px-4 py-2 border-b">
<?= icon('arrow-left', 'mr-4 text-xl') ?>
<span class="inline-flex items-baseline text-2xl font-semibold font-display text-pine-700"> <?= 'castopod' .
svg('castopod-logo', 'h-5 ml-1') ?></span>
</a>
<div class="flex items-center border-b">
<img
src="<?= $podcast->image->thumbnail_url ?>"
alt="<?= $podcast->title ?>"
class="object-cover w-16 h-16"
/>
<div class="flex flex-col items-start flex-1 w-48 px-2">
<span class="w-40 text-sm font-semibold truncate" title="<?= $podcast->title ?>"><?= $podcast->title ?></span>
<a href="<?= route_to(
'podcast-activity',
$podcast->name,
) ?>" class="inline-flex items-center text-xs underline outline-none hover:no-underline focus:ring"
data-toggle="tooltip" data-placement="bottom" title="<?= lang(
'PodcastNavigation.go_to_page',
) ?>">@<?= $podcast->name ?>
<?= icon('external-link', 'ml-1 text-gray-500') ?>
</a>
</div>
</div>
<nav class="flex flex-col flex-1 py-6 overflow-y-auto">
<?php foreach ($podcastNavigation as $section => $data): ?>
<div class="mb-4">
<button class="inline-flex items-center w-full px-6 py-1 outline-none focus:ring" type="button">
<?= icon($data['icon'], 'text-gray-400 text-xl mr-3') .
lang('PodcastNavigation.' . $section) ?>
</button>
<ul class="flex flex-col">
<?php foreach ($data['items'] as $item): ?>
<?php $isActive = url_is(route_to($item, $podcast->id)); ?>
<li class="inline-flex">
<a class="w-full py-1 pl-14 pr-2 text-sm text-gray-600 outline-none hover:text-gray-900 focus:ring <?= $isActive
? 'font-semibold text-gray-900'
: '' ?>" href="<?= route_to(
$item,
$podcast->id,
) ?>"><?= lang('PodcastNavigation.' . $item) ?></a>
</li>
<?php endforeach; ?>
</ul>
</div>
<?php endforeach; ?>
</nav>
<button
type="button"
class="inline-flex items-center w-full px-6 py-2 mt-auto border-t outline-none focus:ring"
id="my-account-dropdown"
data-dropdown="button"
data-dropdown-target="my-account-dropdown-menu"
aria-haspopup="true"
aria-expanded="false">
<?= icon('user', 'text-gray-500 mr-2') ?>
<?= user()->username ?>
<?= icon('caret-right', 'ml-auto') ?>
</button>
<nav
id="my-account-dropdown-menu"
class="flex flex-col py-2 text-black whitespace-no-wrap bg-white border rounded shadow"
aria-labelledby="my-account-dropdown"
data-dropdown="menu"
data-dropdown-placement="right-end">
<a class="px-4 py-1 hover:bg-gray-100" href="<?= route_to(
'my-account',
) ?>"><?= lang('AdminNavigation.account.my-account') ?></a>
<a class="px-4 py-1 hover:bg-gray-100" href="<?= route_to(
'change-password',
) ?>"><?= lang('AdminNavigation.account.change-password') ?></a>
<a class="px-4 py-1 hover:bg-gray-100" href="<?= route_to(
'logout',
) ?>"><?= lang('AdminNavigation.account.logout') ?></a>
</nav>
</div>
<?= $this->extend('admin/_layout') ?>
<?= $this->section('title') ?>
<?= $podcast->title ?>
<?= $this->endSection() ?>
<?= $this->section('pageTitle') ?>
<?= $podcast->title ?>
<?= $this->endSection() ?>
<?= $this->section('content') ?>
<div class="mb-12 text-center">
<h2><?= lang('Charts.podcast_by_day') ?></h2>
<div class="chart-xy" id="by-day-graph" data-chart-type="xy-chart" data-chart-url="<?= route_to(
'analytics-data',
$podcast->id,
'Podcast',
'ByDay',
) ?>"></div>
</div>
<div class="mb-12 text-center">
<h2><?= lang('Charts.podcast_by_month') ?></h2>
<div class="chart-xy" id="by-month-graph" data-chart-type="xy-chart" data-chart-url="<?= route_to(
'analytics-data',
$podcast->id,
'Podcast',
'ByMonth',
) ?>"></div>
</div>
<div class="mb-12 text-center">
<h2><?= lang('Charts.podcast_by_bandwidth') ?></h2>
<div class="chart-xy" id="by-bandwidth-graph" data-chart-type="xy-chart" data-chart-url="<?= route_to(
'analytics-data',
$podcast->id,
'Podcast',
'BandwidthByDay',
) ?>"></div>
</div>
<script src="/assets/charts.js" type="module"></script>
<?= $this->endSection() ?>
<?= $this->extend('admin/_layout') ?>
<?= $this->section('title') ?>
<?= $podcast->title ?>
<?= $this->endSection() ?>
<?= $this->section('pageTitle') ?>
<?= $podcast->title ?>
<?= $this->endSection() ?>
<?= $this->section('content') ?>
<div class="mb-12 text-center">
<h2><?= lang('Charts.daily_listening_time') ?></h2>
<div class="chart-xy" id="by-day-listening-time-graph" data-chart-type="xy-duration-chart" data-chart-url="<?= route_to(
'analytics-data',
$podcast->id,
'Podcast',
'TotalListeningTimeByDay',
) ?>"></div>
</div>
<div class="mb-12 text-center">
<h2><?= lang('Charts.monthly_listening_time') ?></h2>
<div class="chart-xy" id="by-month-listening-time-graph" data-chart-type="xy-duration-chart" data-chart-url="<?= route_to(
'analytics-data',
$podcast->id,
'Podcast',
'TotalListeningTimeByMonth',
) ?>"></div>
</div>
<script src="/assets/charts.js" type="module"></script>
<?= $this->endSection() ?>
<?= $this->extend('admin/_layout') ?>
<?= $this->section('title') ?>
<?= $podcast->title ?>
<?= $this->endSection() ?>
<?= $this->section('pageTitle') ?>
<?= $podcast->title ?>
<?= $this->endSection() ?>
<?= $this->section('content') ?>
<div class="lg:divide-x lg:grid lg:grid-cols-2">
<div class="mb-12 mr-6 text-center">
<h2><?= lang('Charts.by_country_weekly') ?></h2>
<div class="chart-pie" id="by-country-pie" data-chart-type="pie-chart" data-chart-url="<?= route_to(
'analytics-data',
$podcast->id,
'PodcastByCountry',
'Weekly',
) ?>"></div>
</div>
<div class="mb-12 mr-6 text-center">
<h2><?= lang('Charts.by_country_yearly') ?></h2>
<div class="chart-pie" id="by-country-by-year-pie" data-chart-type="pie-chart" data-chart-url="<?= route_to(
'analytics-data',
$podcast->id,
'PodcastByCountry',
'Yearly',
) ?>"></div>
</div>
</div>
<div class="mb-12 mr-6 text-center">
<h2><?= lang('Charts.podcast_by_region') ?></h2>
<div class="chart-map" id="by-region-map" data-chart-type="map-chart" data-chart-url="<?= route_to(
'analytics-full-data',
$podcast->id,
'PodcastByRegion',
) ?>"></div>
</div>
<script src="/assets/charts.js" type="module"></script>
<?= $this->endSection() ?>
<?= $this->extend('admin/_layout') ?>
<?= $this->section('title') ?>
<?= $podcast->title ?>
<?= $this->endSection() ?>
<?= $this->section('pageTitle') ?>
<?= $podcast->title ?>
<?= $this->endSection() ?>
<?= $this->section('content') ?>
<div class="lg:divide-x lg:grid lg:grid-cols-2">
<div class="mb-12 mr-6 text-center">
<h2><?= lang('Charts.by_player_weekly') ?></h2>
<div class="chart-pie" id="by-app-weekly-pie" data-chart-type="pie-chart" data-chart-url="<?= route_to(
'analytics-data',
$podcast->id,
'PodcastByPlayer',
'ByAppWeekly',
) ?>"></div>
</div>
<div class="mb-12 mr-6 text-center">
<h2><?= lang('Charts.by_service_weekly') ?></h2>
<div class="chart-pie" id="by-service-weekly-pie" data-chart-type="pie-chart" data-chart-url="<?= route_to(
'analytics-data',
$podcast->id,
'PodcastByService',
'ByServiceWeekly',
) ?>"></div>
</div>
<div class="mb-12 mr-6 text-center">
<h2><?= lang('Charts.by_device_weekly') ?></h2>
<div class="chart-pie" id="by-device-weekly-pie" data-chart-type="pie-chart" data-chart-url="<?= route_to(
'analytics-data',
$podcast->id,
'PodcastByPlayer',
'ByDeviceWeekly',
) ?>"></div>
</div>
<div class="mb-12 mr-6 text-center">
<h2><?= lang('Charts.by_os_weekly') ?></h2>
<div class="chart-pie" id="by-os-yearly-pie" data-chart-type="pie-chart" data-chart-url="<?= route_to(
'analytics-data',
$podcast->id,
'PodcastByPlayer',
'ByOsWeekly',
) ?>"></div>
</div>
</div>
<div class="mb-12 mr-6 text-center">
<h2><?= lang('Charts.podcast_bots') ?></h2>
<div class="chart-xy" id="bots-graph" data-chart-type="xy-chart" data-chart-url="<?= route_to(
'analytics-data',
$podcast->id,
'PodcastByPlayer',
'Bots',
) ?>"></div>
</div>
<script src="/assets/charts.js" type="module"></script>
<?= $this->endSection() ?>
<?= $this->extend('admin/_layout') ?>
<?= $this->section('title') ?>
<?= $podcast->title ?>
<?= $this->endSection() ?>
<?= $this->section('pageTitle') ?>
<?= $podcast->title ?>
<?= $this->endSection() ?>
<?= $this->section('content') ?>
<div class="lg:divide-x lg:grid lg:grid-cols-2">
<div class="mb-12 mr-6 text-center">
<h2><?= lang('Charts.by_weekday') ?></h2>
<div class="chart-xy" id="by-weekday-barchart" data-chart-type="bar-chart" data-chart-url="<?= route_to(
'analytics-data',
$podcast->id,
'Podcast',
'ByWeekday',
) ?>"></div>
</div>
<div class="mb-12 mr-6 text-center">
<h2><?= lang('Charts.by_hour') ?></h2>
<div class="chart-xy" id="by-hour-barchart" data-chart-type="bar-chart" data-chart-url="<?= route_to(
'analytics-full-data',
$podcast->id,
'PodcastByHour',
) ?>"></div>
</div>
</div>
<script src="/assets/charts.js" type="module"></script>
<?= $this->endSection() ?>
<?= $this->extend('admin/_layout') ?>
<?= $this->section('title') ?>
<?= $podcast->title ?>
<?= $this->endSection() ?>
<?= $this->section('pageTitle') ?>
<?= $podcast->title ?>
<?= $this->endSection() ?>
<?= $this->section('content') ?>
<div class="mb-12 text-center">
<h2><?= lang('Charts.unique_daily_listeners') ?></h2>
<div class="chart-xy" id="by-day-listeners-graph" data-chart-type="xy-chart" data-chart-url="<?= route_to(
'analytics-data',
$podcast->id,
'Podcast',
'UniqueListenersByDay',
) ?>"></div>
</div>
<div class="mb-12 text-center">
<h2><?= lang('Charts.unique_monthly_listeners') ?></h2>
<div class="chart-xy" id="by-month-listeners-graph" data-chart-type="xy-chart" data-chart-url="<?= route_to(
'analytics-data',
$podcast->id,
'Podcast',
'UniqueListenersByMonth',
) ?>"></div>
</div>
<script src="/assets/charts.js" type="module"></script>
<?= $this->endSection() ?>
<?= $this->extend('admin/_layout') ?>
<?= $this->section('title') ?>
<?= $podcast->title ?>
<?= $this->endSection() ?>
<?= $this->section('pageTitle') ?>
<?= $podcast->title ?>
<?= $this->endSection() ?>
<?= $this->section('content') ?>
<div class="lg:divide-x lg:grid lg:grid-cols-2">
<div class="mb-12 mr-6 text-center">
<h2><?= lang('Charts.by_domain_weekly') ?></h2>
<div class="chart-pie" id="by-domain-weekly-pie" data-chart-type="pie-chart" data-chart-url="<?= route_to(
'analytics-data',
$podcast->id,
'WebsiteByReferer',
'ByDomainWeekly',
) ?>"></div>
</div>
<div class="mb-12 mr-6 text-center">
<h2><?= lang('Charts.by_domain_yearly') ?></h2>
<div class="chart-pie" id="by-domain-yearly-pie" data-chart-type="pie-chart" data-chart-url="<?= route_to(
'analytics-data',
$podcast->id,
'WebsiteByReferer',
'ByDomainYearly',
) ?>"></div>
</div>
<div class="mb-12 mr-6 text-center">
<h2><?= lang('Charts.by_entry_page') ?></h2>
<div class="chart-pie" id="by-entry-page-pie" data-chart-type="pie-chart" data-chart-url="<?= route_to(
'analytics-full-data',
$podcast->id,
'WebsiteByEntryPage',
) ?>"></div>
</div>
<div class="mb-12 mr-6 text-center">
<h2><?= lang('Charts.by_browser') ?></h2>
<div class="chart-pie" id="by-browser-pie" data-chart-type="pie-chart" data-chart-url="<?= route_to(
'analytics-full-data',
$podcast->id,
'WebsiteByBrowser',
) ?>"></div>
</div>
</div>
<script src="/assets/charts.js" type="module"></script>
<?= $this->endSection() ?>
<?= $this->extend('admin/_layout') ?>
<?= $this->section('title') ?>
<?= lang('Podcast.create') ?>
<?= $this->endSection() ?>
<?= $this->section('pageTitle') ?>
<?= lang('Podcast.create') ?>
<?= $this->endSection() ?>
<?= $this->section('content') ?>
<?= form_open_multipart(route_to('podcast-create'), [
'method' => 'post',
'class' => 'flex flex-col',
]) ?>
<?= csrf_field() ?>
<?= form_section(
lang('Podcast.form.identity_section_title'),
lang('Podcast.form.identity_section_subtitle'),
) ?>
<?= form_label(lang('Podcast.form.image'), 'image') ?>
<?= form_input([
'id' => 'image',
'name' => 'image',
'class' => 'form-input',
'required' => 'required',
'type' => 'file',
'accept' => '.jpg,.jpeg,.png',
]) ?>
<small class="mb-4 text-gray-600"><?= lang(
'Common.forms.image_size_hint',
) ?></small>
<?= form_label(lang('Podcast.form.title'), 'title') ?>
<?= form_input([
'id' => 'title',
'name' => 'title',
'class' => 'form-input mb-4',
'value' => old('title'),
'required' => 'required',
]) ?>
<?= form_label(
lang('Podcast.form.name'),
'name',
[],
lang('Podcast.form.name_hint'),
) ?>
<?= form_input([
'id' => 'name',
'name' => 'name',
'class' => 'form-input mb-4',
'value' => old('name'),
'required' => 'required',
]) ?>
<?= form_fieldset('', ['class' => 'mb-4']) ?>
<legend>
<?= lang('Podcast.form.type.label') .
hint_tooltip(lang('Podcast.form.type.hint'), 'ml-1') ?>
</legend>
<?= form_radio(
['id' => 'episodic', 'name' => 'type', 'class' => 'form-radio-btn'],
'episodic',
old('type') ? old('type') == 'episodic' : true,
) ?>
<label for="episodic"><?= lang('Podcast.form.type.episodic') ?></label>
<?= form_radio(
['id' => 'serial', 'name' => 'type', 'class' => 'form-radio-btn'],
'serial',
old('type') && old('type') == 'serial',
) ?>
<label for="serial"><?= lang('Podcast.form.type.serial') ?></label>
<?= form_fieldset_close() ?>
<div class="mb-4">
<?= form_label(lang('Podcast.form.description'), 'description') ?>
<?= form_textarea(
[
'id' => 'description',
'name' => 'description',
'class' => 'form-textarea',
'required' => 'required',
],
old('description', '', false),
'data-editor="markdown"',
) ?>
</div>
<?= form_section_close() ?>
<?= form_section(
lang('Podcast.form.classification_section_title'),
lang('Podcast.form.classification_section_subtitle'),
) ?>
<?= form_label(lang('Podcast.form.language'), 'language') ?>
<?= form_dropdown('language', $languageOptions, old('language', $browserLang), [
'id' => 'language',
'class' => 'form-select mb-4',
'required' => 'required',
]) ?>
<?= form_label(lang('Podcast.form.category'), 'category') ?>
<?= form_dropdown('category', $categoryOptions, old('category'), [
'id' => 'category',
'class' => 'form-select mb-4',
'required' => 'required',
]) ?>
<?= form_label(
lang('Podcast.form.other_categories'),
'other_categories',
[],
'',
true,
) ?>
<?= form_multiselect(
'other_categories[]',
$categoryOptions,
old('other_categories', []),
[
'id' => 'other_categories',
'class' => 'mb-4',
'data-max-item-count' => '2',
],
) ?>
<?= form_fieldset('', ['class' => 'mb-4']) ?>
<legend>
<?= lang('Podcast.form.parental_advisory.label') .
hint_tooltip(lang('Podcast.form.parental_advisory.hint'), 'ml-1') ?>
</legend>
<?= form_radio(
[
'id' => 'undefined',
'name' => 'parental_advisory',
'class' => 'form-radio-btn',
],
'undefined',
old('parental_advisory')
? old('parental_advisory') === 'undefined'
: true,
) ?>
<label for="undefined"><?= lang(
'Podcast.form.parental_advisory.undefined',
) ?></label>
<?= form_radio(
[
'id' => 'clean',
'name' => 'parental_advisory',
'class' => 'form-radio-btn',
],
'clean',
old('parental_advisory') && old('parental_advisory') === 'clean',
) ?>
<label for="clean"><?= lang(
'Podcast.form.parental_advisory.clean',
) ?></label>
<?= form_radio(
[
'id' => 'explicit',
'name' => 'parental_advisory',
'class' => 'form-radio-btn',
],
'explicit',
old('parental_advisory') && old('parental_advisory') === 'explicit',
) ?>
<label for="explicit"><?= lang(
'Podcast.form.parental_advisory.explicit',
) ?></label>
<?= form_fieldset_close() ?>
<?= form_section_close() ?>
<?= form_section(
lang('Podcast.form.author_section_title'),
lang('Podcast.form.author_section_subtitle'),
) ?>
<?= form_label(
lang('Podcast.form.owner_name'),
'owner_name',
[],
lang('Podcast.form.owner_name_hint'),
) ?>
<?= form_input([
'id' => 'owner_name',
'name' => 'owner_name',
'class' => 'form-input mb-4',
'value' => old('owner_name'),
'required' => 'required',
]) ?>
<?= form_label(
lang('Podcast.form.owner_email'),
'owner_email',
[],
lang('Podcast.form.owner_email_hint'),
) ?>
<?= form_input([
'id' => 'owner_email',
'name' => 'owner_email',
'class' => 'form-input mb-4',
'value' => old('owner_email'),
'type' => 'email',
'required' => 'required',
]) ?>
<?= form_label(
lang('Podcast.form.publisher'),
'publisher',
[],
lang('Podcast.form.publisher_hint'),
true,
) ?>
<?= form_input([
'id' => 'publisher',
'name' => 'publisher',
'class' => 'form-input mb-4',
'value' => old('publisher'),
]) ?>
<?= form_label(lang('Podcast.form.copyright'), 'copyright', [], '', true) ?>
<?= form_input([
'id' => 'copyright',
'name' => 'copyright',
'class' => 'form-input mb-4',
'value' => old('copyright'),
]) ?>
<?= form_section_close() ?>
<?= form_section(
lang('Podcast.form.location_section_title'),
lang('Podcast.form.location_section_subtitle'),
) ?>
<?= form_label(
lang('Podcast.form.location_name'),
'location_name',
[],
lang('Podcast.form.location_name_hint'),
true,
) ?>
<?= form_input([
'id' => 'location_name',
'name' => 'location_name',
'class' => 'form-input mb-4',
'value' => old('location_name'),
]) ?>
<?= form_section_close() ?>
<?= form_section(
lang('Podcast.form.monetization_section_title'),
lang('Podcast.form.monetization_section_subtitle'),
) ?>
<?= form_label(
lang('Podcast.form.payment_pointer'),
'payment_pointer',
[],
lang('Podcast.form.payment_pointer_hint'),
true,
) ?>
<?= form_input([
'id' => 'payment_pointer',
'name' => 'payment_pointer',
'class' => 'form-input mb-4',
'value' => old('payment_pointer'),
]) ?>
<?= form_label(lang('Podcast.form.partnership')) ?>
<div class="flex flex-col mb-4 gap-x-2 gap-y-4 md:flex-row">
<div class="flex flex-col flex-shrink w-32">
<?= form_label(
lang('Podcast.form.partner_id'),
'partner_id',
[],
lang('Podcast.form.partner_id_hint'),
true,
) ?>
<?= form_input([
'id' => 'partner_id',
'name' => 'partner_id',
'class' => 'form-input w-full',
'value' => old('partner_id'),
]) ?>
</div>
<div class="flex flex-col flex-1">
<?= form_label(
lang('Podcast.form.partner_link_url'),
'partner_link_url',
[],
lang('Podcast.form.partner_link_url_hint'),
true,
) ?>
<?= form_input([
'id' => 'partner_link_url',
'name' => 'partner_link_url',
'class' => 'form-input w-full',
'value' => old('partner_link_url'),
]) ?>
</div>
<div class="flex flex-col flex-1">
<?= form_label(
lang('Podcast.form.partner_image_url'),
'partner_image_url',
[],
lang('Podcast.form.partner_image_url_hint'),
true,
) ?>
<?= form_input([
'id' => 'partner_image_url',
'name' => 'partner_image_url',
'class' => 'form-input w-full',
'value' => old('partner_image_url'),
]) ?>
</div>
</div>
<?= form_section_close() ?>
<?= form_section(
lang('Podcast.form.advanced_section_title'),
lang('Podcast.form.advanced_section_subtitle'),
) ?>
<?= form_label(
lang('Podcast.form.custom_rss'),
'custom_rss',
[],
lang('Podcast.form.custom_rss_hint'),
true,
) ?>
<?= form_textarea([
'id' => 'custom_rss',
'name' => 'custom_rss',
'class' => 'form-textarea',
'value' => old('custom_rss'),
]) ?>
<?= form_section_close() ?>
<?= form_section(
lang('Podcast.form.status_section_title'),
lang('Podcast.form.status_section_subtitle'),
) ?>
<?= form_switch(
lang('Podcast.form.block'),
['id' => 'block', 'name' => 'block'],
'yes',
old('block', false),
'mb-2',
) ?>
<?= form_switch(
lang('Podcast.form.complete'),
['id' => 'complete', 'name' => 'complete'],
'yes',
old('complete', false),
'mb-2',
) ?>
<?= form_switch(
lang('Podcast.form.lock') .
hint_tooltip(lang('Podcast.form.lock_hint'), 'ml-1'),
['id' => 'lock', 'name' => 'lock'],
'yes',
old('lock', true),
) ?>
<?= form_section_close() ?>
<?= button(
lang('Podcast.form.submit_create'),
'',
['variant' => 'primary'],
['type' => 'submit', 'class' => 'self-end'],
) ?>
<?= form_close() ?>
<?= $this->endSection() ?>
<?= $this->extend('admin/_layout') ?>
<?= $this->section('title') ?>
<?= lang('Podcast.edit') ?>
<?= $this->endSection() ?>
<?= $this->section('pageTitle') ?>
<?= lang('Podcast.edit') ?>
<?= $this->endSection() ?>
<?= $this->section('content') ?>
<?= form_open_multipart(route_to('podcast-edit', $podcast->id), [
'method' => 'post',
'class' => 'flex flex-col',
]) ?>
<?= csrf_field() ?>
<?= form_section(
lang('Podcast.form.identity_section_title'),
lang('Podcast.form.identity_section_subtitle'),
) ?>
<?= form_label(lang('Podcast.form.image'), 'image') ?>
<img
src="<?= $podcast->image->thumbnail_url ?>"
alt="<?= $podcast->title ?>"
class="object-cover w-32 h-32"
/>
<?= form_input([
'id' => 'image',
'name' => 'image',
'class' => 'form-input',
'type' => 'file',
'accept' => '.jpg,.jpeg,.png',
]) ?>
<small class="mb-4 text-gray-600"><?= lang(
'Common.forms.image_size_hint',
) ?></small>
<?= form_label(lang('Podcast.form.title'), 'title') ?>
<?= form_input([
'id' => 'title',
'name' => 'title',
'class' => 'form-input mb-1',
'value' => old('title', $podcast->title),
'required' => 'required',
]) ?>
<span class="mb-4 text-sm"><?= $podcast->link ?></span>
<?= form_fieldset('', ['class' => 'mb-4']) ?>
<legend><?= lang('Podcast.form.type.label') .
hint_tooltip(lang('Podcast.form.type.hint'), 'ml-1') ?>
</legend>
<?= form_radio(
['id' => 'episodic', 'name' => 'type', 'class' => 'form-radio-btn'],
'episodic',
old('type') ? old('type') == 'episodic' : $podcast->type == 'episodic',
) ?>
<label for="episodic"><?= lang('Podcast.form.type.episodic') ?></label>
<?= form_radio(
['id' => 'serial', 'name' => 'type', 'class' => 'form-radio-btn'],
'serial',
old('type') ? old('type') == 'serial' : $podcast->type == 'serial',
) ?>
<label for="serial"><?= lang('Podcast.form.type.serial') ?></label>
<?= form_fieldset_close() ?>
<div class="mb-4">
<?= form_label(lang('Podcast.form.description'), 'description') ?>
<?= form_textarea(
[
'id' => 'description',
'name' => 'description',
'class' => 'form-textarea',
'required' => 'required',
],
old('description', $podcast->description_markdown, false),
'data-editor="markdown"',
) ?>
</div>
<?= form_section_close() ?>
<?= form_section(
lang('Podcast.form.classification_section_title'),
lang('Podcast.form.classification_section_subtitle'),
) ?>
<?= form_label(lang('Podcast.form.language'), 'language') ?>
<?= form_dropdown(
'language',
$languageOptions,
old('language', $podcast->language_code),
[
'id' => 'language',
'class' => 'form-select mb-4',
'required' => 'required',
],
) ?>
<?= form_label(lang('Podcast.form.category'), 'category') ?>
<?= form_dropdown(
'category',
$categoryOptions,
old('category', (string) $podcast->category_id),
[
'id' => 'category',
'class' => 'form-select mb-4',
'required' => 'required',
],
) ?>
<?= form_label(
lang('Podcast.form.other_categories'),
'other_categories',
[],
'',
true,
) ?>
<?= form_multiselect(
'other_categories[]',
$categoryOptions,
old('other_categories', $podcast->other_categories_ids),
[
'id' => 'other_categories',
'class' => 'mb-4',
'data-max-item-count' => '2',
],
) ?>
<?= form_fieldset('', ['class' => 'mb-4']) ?>
<legend><?= lang('Podcast.form.parental_advisory.label') .
hint_tooltip(lang('Podcast.form.parental_advisory.hint'), 'ml-1') ?>
</legend>
<?= form_radio(
[
'id' => 'undefined',
'name' => 'parental_advisory',
'class' => 'form-radio-btn',
],
'undefined',
old('parental_advisory')
? old('parental_advisory') === 'undefined'
: $podcast->parental_advisory === null,
) ?>
<label for="undefined"><?= lang(
'Podcast.form.parental_advisory.undefined',
) ?></label>
<?= form_radio(
[
'id' => 'clean',
'name' => 'parental_advisory',
'class' => 'form-radio-btn',
],
'clean',
old('parental_advisory')
? old('parental_advisory') === 'clean'
: $podcast->parental_advisory === 'clean',
) ?>
<label for="clean"><?= lang(
'Podcast.form.parental_advisory.clean',
) ?></label>
<?= form_radio(
[
'id' => 'explicit',
'name' => 'parental_advisory',
'class' => 'form-radio-btn',
],
'explicit',
old('parental_advisory')
? old('parental_advisory') === 'explicit'
: $podcast->parental_advisory === 'explicit',
) ?>
<label for="explicit"><?= lang(
'Podcast.form.parental_advisory.explicit',
) ?></label>
<?= form_fieldset_close() ?>
<?= form_section_close() ?>
<?= form_section(
lang('Podcast.form.author_section_title'),
lang('Podcast.form.author_section_subtitle'),
) ?>
<?= form_label(
lang('Podcast.form.owner_name'),
'owner_name',
[],
lang('Podcast.form.owner_name_hint'),
) ?>
<?= form_input([
'id' => 'owner_name',
'name' => 'owner_name',
'class' => 'form-input mb-4',
'value' => old('owner_name', $podcast->owner_name),
'required' => 'required',
]) ?>
<?= form_label(
lang('Podcast.form.owner_email'),
'owner_email',
[],
lang('Podcast.form.owner_email_hint'),
) ?>
<?= form_input([
'id' => 'owner_email',
'name' => 'owner_email',
'class' => 'form-input mb-4',
'value' => old('owner_email', $podcast->owner_email),
'type' => 'email',
'required' => 'required',
]) ?>
<?= form_label(
lang('Podcast.form.publisher'),
'publisher',
[],
lang('Podcast.form.publisher_hint'),
true,
) ?>
<?= form_input([
'id' => 'publisher',
'name' => 'publisher',
'class' => 'form-input mb-4',
'value' => old('publisher', $podcast->publisher),
]) ?>
<?= form_label(lang('Podcast.form.copyright'), 'copyright', [], '', true) ?>
<?= form_input([
'id' => 'copyright',
'name' => 'copyright',
'class' => 'form-input mb-4',
'value' => old('copyright', $podcast->copyright),
]) ?>
<?= form_section_close() ?>
<?= form_section(
lang('Podcast.form.location_section_title'),
lang('Podcast.form.location_section_subtitle'),
) ?>
<?= form_label(
lang('Podcast.form.location_name'),
'location_name',
[],
lang('Podcast.form.location_name_hint'),
true,
) ?>
<?= form_input([
'id' => 'location_name',
'name' => 'location_name',
'class' => 'form-input mb-4',
'value' => old('location_name', $podcast->location->name),
]) ?>
<?= form_section_close() ?>
<?= form_section(
lang('Podcast.form.monetization_section_title'),
lang('Podcast.form.monetization_section_subtitle'),
) ?>
<?= form_label(
lang('Podcast.form.payment_pointer'),
'payment_pointer',
[],
lang('Podcast.form.payment_pointer_hint'),
true,
) ?>
<?= form_input([
'id' => 'payment_pointer',
'name' => 'payment_pointer',
'class' => 'form-input mb-4',
'value' => old('payment_pointer', $podcast->payment_pointer),
]) ?>
<?= form_label(lang('Podcast.form.partnership')) ?>
<div class="flex flex-col mb-4 gap-x-2 gap-y-4 md:flex-row">
<div class="flex flex-col flex-shrink w-32">
<?= form_label(
lang('Podcast.form.partner_id'),
'partner_id',
[],
lang('Podcast.form.partner_id_hint'),
true,
) ?>
<?= form_input([
'id' => 'partner_id',
'name' => 'partner_id',
'class' => 'form-input w-full',
'value' => old('partner_id', $podcast->partner_id),
]) ?>
</div>
<div class="flex flex-col flex-1">
<?= form_label(
lang('Podcast.form.partner_link_url'),
'partner_link_url',
[],
lang('Podcast.form.partner_link_url_hint'),
true,
) ?>
<?= form_input([
'id' => 'partner_link_url',
'name' => 'partner_link_url',
'class' => 'form-input w-full',
'value' => old('partner_link_url', $podcast->partner_link_url),
]) ?>
</div>
<div class="flex flex-col flex-1">
<?= form_label(
lang('Podcast.form.partner_image_url'),
'partner_image_url',
[],
lang('Podcast.form.partner_image_url_hint'),
true,
) ?>
<?= form_input([
'id' => 'partner_image_url',
'name' => 'partner_image_url',
'class' => 'form-input w-full',
'value' => old('partner_image_url', $podcast->partner_image_url),
]) ?>
</div>
</div>
<?= form_section_close() ?>
<?= form_section(
lang('Podcast.form.advanced_section_title'),
lang('Podcast.form.advanced_section_subtitle'),
) ?>
<?= form_label(
lang('Podcast.form.custom_rss'),
'custom_rss',
[],
lang('Podcast.form.custom_rss_hint'),
true,
) ?>
<?= form_textarea([
'id' => 'custom_rss',
'name' => 'custom_rss',
'class' => 'form-textarea',
'value' => old('custom_rss', $podcast->custom_rss_string),
]) ?>
<?= form_section_close() ?>
<?= form_section(
lang('Podcast.form.status_section_title'),
lang('Podcast.form.status_section_subtitle'),
) ?>
<?= form_switch(
lang('Podcast.form.block'),
['id' => 'block', 'name' => 'block'],
'yes',
old('block', $podcast->is_blocked),
'mb-2',
) ?>
<?= form_switch(
lang('Podcast.form.complete'),
['id' => 'complete', 'name' => 'complete'],
'yes',
old('complete', $podcast->is_completed),
'mb-2',
) ?>
<?= form_switch(
lang('Podcast.form.lock') .
hint_tooltip(lang('Podcast.form.lock_hint'), 'ml-1'),
['id' => 'lock', 'name' => 'lock'],
'yes',
old('lock', $podcast->is_locked),
) ?>
<?= form_section_close() ?>
<?= button(
lang('Podcast.form.submit_edit'),
'',
['variant' => 'primary'],
['type' => 'submit', 'class' => 'self-end'],
) ?>
<?= form_close() ?>
<?= $this->endSection() ?>
<?= $this->extend('admin/_layout') ?>
<?= $this->section('title') ?>
<?= lang('Podcast.import') ?>
<?= $this->endSection() ?>
<?= $this->section('pageTitle') ?>
<?= lang('Podcast.import') ?>
<?= $this->endSection() ?>
<?= $this->section('content') ?>
<?= form_open_multipart(route_to('podcast-import'), [
'method' => 'post',
'class' => 'flex flex-col items-start',
]) ?>
<?= csrf_field() ?>
<div class="inline-flex w-full p-2 mb-6 text-sm font-semibold text-yellow-800 bg-red-100 border border-red-300 rounded" role="alert">
<?= icon('alert', 'mr-2 text-lg flex-shrink-0') .
lang('PodcastImport.warning') ?>
</div>
<?= form_section(
lang('PodcastImport.old_podcast_section_title'),
icon('scales', 'mr-2 text-lg flex-shrink-0') .
lang('PodcastImport.old_podcast_section_subtitle'),
[],
'inline-flex text-xs p-2 text-blue-800 font-semibold bg-blue-100 border border-blue-300 rounded',
) ?>
<?= form_label(
lang('PodcastImport.imported_feed_url'),
'imported_feed_url',
[],
lang('PodcastImport.imported_feed_url_hint'),
) ?>
<?= form_input([
'id' => 'imported_feed_url',
'name' => 'imported_feed_url',
'class' => 'form-input',
'value' => old('imported_feed_url'),
'placeholder' => 'https://...',
'type' => 'url',
'required' => 'required',
]) ?>
<?= form_section_close() ?>
<?= form_section(lang('PodcastImport.new_podcast_section_title'), '') ?>
<?= form_label(
lang('PodcastImport.name'),
'name',
[],
lang('PodcastImport.name_hint'),
) ?>
<?= form_input([
'id' => 'name',
'name' => 'name',
'class' => 'form-input mb-4',
'value' => old('name'),
'required' => 'required',
]) ?>
<?= form_label(lang('Podcast.form.language'), 'language') ?>
<?= form_dropdown('language', $languageOptions, old('language', $browserLang), [
'id' => 'language',
'class' => 'form-select mb-4',
'required' => 'required',
]) ?>
<?= form_label(lang('Podcast.form.category'), 'category') ?>
<?= form_dropdown('category', $categoryOptions, old('category'), [
'id' => 'category',
'class' => 'form-select mb-4',
'required' => 'required',
]) ?>
<?= form_section_close() ?>
<?= form_section(
lang('PodcastImport.advanced_params_section_title'),
lang('PodcastImport.advanced_params_section_subtitle'),
) ?>
<?= form_fieldset('', ['class' => 'flex flex-col mb-4']) ?>
<legend><?= lang('PodcastImport.slug_field.label') ?></legend>
<label for="link" class="inline-flex items-center">
<?= form_radio(
[
'id' => 'link',
'name' => 'slug_field',
'class' => 'form-radio text-pine-700',
],
'link',
old('slug_field') ? old('slug_field') == 'link' : true,
) ?>
<span class="ml-2"><?= lang('PodcastImport.slug_field.link') ?></span>
</label>
<label for="title" class="inline-flex items-center">
<?= form_radio(
[
'id' => 'title',
'name' => 'slug_field',
'class' => 'form-radio text-pine-700',
],
'title',
old('slug_field') && old('slug_field') == 'title',
) ?>
<span class="ml-2"><?= lang('PodcastImport.slug_field.title') ?></span>
</label>
<?= form_fieldset_close() ?>
<?= form_fieldset('', ['class' => 'flex flex-col mb-4']) ?>
<legend><?= lang('PodcastImport.description_field') ?></legend>
<label for="description" class="inline-flex items-center">
<?= form_radio(
[
'id' => 'description',
'name' => 'description_field',
'class' => 'form-radio text-pine-700',
],
'description',
old('description_field')
? old('description_field') == 'description'
: true,
) ?>
<span class="ml-2">&lt;description&gt;</span>
</label>
<label for="summary" class="inline-flex items-center">
<?= form_radio(
[
'id' => 'summary',
'name' => 'description_field',
'class' => 'form-radio text-pine-600',
],
'summary',
old('description_field') && old('description_field') == 'summary',
) ?>
<span class="ml-2">&lt;itunes:summary&gt;</span>
</label>
<label for="subtitle_summary" class="inline-flex items-center">
<?= form_radio(
[
'id' => 'subtitle_summary',
'name' => 'description_field',
'class' => 'form-radio text-pine-700',
],
'subtitle_summary',
old('description_field') &&
old('description_field') == 'subtitle_summary',
) ?>
<span class="ml-2">&lt;itunes:subtitle&gt; + &lt;itunes:summary&gt;</span>
</label>
<label for="content" class="inline-flex items-center">
<?= form_radio(
[
'id' => 'content',
'name' => 'description_field',
'class' => 'form-radio text-pine-700',
],
'content',
old('description_field') && old('description_field') == 'content',
) ?>
<span class="ml-2">&lt;content:encoded&gt;</span>
</label>
<?= form_fieldset_close() ?>
<label class="inline-flex items-center mb-4">
<?= form_checkbox(
[
'id' => 'force_renumber',
'name' => 'force_renumber',
'class' => 'form-checkbox text-pine-700',
],
'yes',
old('force_renumber', false),
) ?>
<span class="ml-2"><?= lang('PodcastImport.force_renumber') ?></span>
<?= hint_tooltip(lang('PodcastImport.force_renumber_hint'), 'ml-1') ?>
</label>
<?= form_label(
lang('PodcastImport.season_number'),
'season_number',
[],
lang('PodcastImport.season_number_hint'),
) ?>
<?= form_input([
'id' => 'season_number',
'name' => 'season_number',
'class' => 'form-input mb-4',
'value' => old('season_number'),
'type' => 'number',
]) ?>
<?= form_label(
lang('PodcastImport.max_episodes'),
'max_episodes',
[],
lang('PodcastImport.max_episodes_hint'),
) ?>
<?= form_input([
'id' => 'max_episodes',
'name' => 'max_episodes',
'class' => 'form-input mb-4',
'value' => old('max_episodes'),
'type' => 'number',
]) ?>
<?= form_section_close() ?>
<?= button(
lang('PodcastImport.submit'),
'',
['variant' => 'primary'],
['type' => 'submit', 'class' => 'self-end'],
) ?>
<?= form_close() ?>
<?= $this->endSection() ?>