2021-09-02 16:34:25 +00:00
|
|
|
<?= $this->extend('_layout') ?>
|
2021-04-02 17:20:02 +00:00
|
|
|
|
|
|
|
<?= $this->section('title') ?>
|
2021-06-22 17:59:33 +00:00
|
|
|
<?= lang('Episode.publish_edit') ?>
|
2021-04-02 17:20:02 +00:00
|
|
|
<?= $this->endSection() ?>
|
|
|
|
|
|
|
|
<?= $this->section('pageTitle') ?>
|
2021-06-22 17:59:33 +00:00
|
|
|
<?= lang('Episode.publish_edit') ?>
|
2021-04-02 17:20:02 +00:00
|
|
|
<?= $this->endSection() ?>
|
|
|
|
|
|
|
|
<?= $this->section('content') ?>
|
|
|
|
|
2021-06-22 17:59:33 +00:00
|
|
|
<?= anchor(
|
|
|
|
route_to('episode-view', $podcast->id, $episode->id),
|
|
|
|
icon('arrow-left', 'mr-2 text-lg') . lang('Episode.publish_form.back_to_episode_dashboard'),
|
2021-09-08 15:51:33 +00:00
|
|
|
[
|
|
|
|
'class' => 'inline-flex items-center font-semibold mr-4 text-sm',
|
|
|
|
],
|
2021-06-22 17:59:33 +00:00
|
|
|
) ?>
|
|
|
|
|
2022-01-23 16:53:23 +00:00
|
|
|
<form action="<?= route_to('episode-publish_edit', $podcast->id, $episode->id) ?>" method="POST" class="flex flex-col items-start w-full max-w-lg mx-auto mt-4" data-submit="validate-message">
|
2021-04-02 17:20:02 +00:00
|
|
|
<?= csrf_field() ?>
|
2021-09-15 15:58:21 +00:00
|
|
|
<input type="hidden" name="client_timezone" value="UTC" />
|
|
|
|
<input type="hidden" name="post_id" value="<?= $post->id ?>" />
|
2021-04-02 17:20:02 +00:00
|
|
|
|
|
|
|
<label for="message" class="text-lg font-semibold"><?= lang(
|
2021-09-08 15:51:33 +00:00
|
|
|
'Episode.publish_form.post',
|
|
|
|
) ?></label>
|
2021-11-05 14:36:34 +00:00
|
|
|
<small class="max-w-md mb-2 text-skin-muted"><?= lang('Episode.publish_form.post_hint') ?></small>
|
|
|
|
<div class="mb-8 overflow-hidden shadow-md bg-elevated rounded-xl">
|
2021-10-22 14:35:11 +00:00
|
|
|
<div class="flex px-4 py-3 gap-x-2">
|
2022-03-04 14:33:48 +00:00
|
|
|
<img src="<?= $podcast->actor->avatar_image_url ?>" alt="<?= esc($podcast->actor->display_name) ?>" class="w-10 h-10 rounded-full aspect-square" loading="lazy" />
|
2021-04-02 17:20:02 +00:00
|
|
|
<div class="flex flex-col min-w-0">
|
|
|
|
<p class="flex items-baseline min-w-0">
|
2022-03-04 14:33:48 +00:00
|
|
|
<span class="mr-2 font-semibold truncate"><?= esc($podcast->actor->display_name) ?></span>
|
|
|
|
<span class="text-sm truncate text-skin-muted">@<?= esc($podcast->actor->username) ?></span>
|
2021-04-02 17:20:02 +00:00
|
|
|
</p>
|
2021-11-05 14:36:34 +00:00
|
|
|
<?= relative_time($post->published_at, 'text-xs text-skin-muted') ?>
|
2021-04-02 17:20:02 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="px-4 mb-2">
|
2022-03-25 14:37:14 +00:00
|
|
|
<Forms.Textarea name="message" placeholder="<?= lang('Episode.publish_form.message_placeholder') ?>" autofocus="" value="<?= esc($post->message) ?>" rows="2" />
|
2021-04-02 17:20:02 +00:00
|
|
|
</div>
|
2021-11-12 16:31:35 +00:00
|
|
|
<div class="flex border-y">
|
2021-11-01 17:12:03 +00:00
|
|
|
<img src="<?= $episode->cover
|
2022-03-04 14:33:48 +00:00
|
|
|
->thumbnail_url ?>" alt="<?= esc($episode->title) ?>" class="w-24 h-24 aspect-square" loading="lazy" />
|
2021-04-02 17:20:02 +00:00
|
|
|
<div class="flex flex-col flex-1">
|
2021-09-15 15:58:21 +00:00
|
|
|
<a href="<?= $episode->link ?>" class="flex-1 px-4 py-2">
|
2021-04-02 17:20:02 +00:00
|
|
|
<div class="flex items-baseline">
|
2022-03-04 14:33:48 +00:00
|
|
|
<span class="flex-1 w-0 mr-2 text-sm font-semibold truncate"><?= esc($episode->title) ?></span>
|
2021-04-02 17:20:02 +00:00
|
|
|
<?= episode_numbering(
|
2021-09-15 15:58:21 +00:00
|
|
|
$episode->number,
|
|
|
|
$episode->season_number,
|
2021-11-05 14:36:34 +00:00
|
|
|
'text-xs font-semibold text-skin-muted !no-underline border px-1 border-gray-500',
|
2021-09-15 15:58:21 +00:00
|
|
|
true,
|
|
|
|
) ?>
|
2021-04-02 17:20:02 +00:00
|
|
|
</div>
|
2021-11-05 14:36:34 +00:00
|
|
|
<div class="text-xs text-skin-muted">
|
2021-08-09 15:56:59 +00:00
|
|
|
<?= relative_time($episode->published_at) ?>
|
2021-04-02 17:20:02 +00:00
|
|
|
<span class="mx-1">•</span>
|
2022-03-15 10:14:29 +00:00
|
|
|
<time datetime="PT<?= round($episode->audio->duration, 3) ?>S">
|
|
|
|
<?= format_duration((int) $episode->audio->duration) ?>
|
2021-04-02 17:20:02 +00:00
|
|
|
</time>
|
|
|
|
</div>
|
|
|
|
</a>
|
2021-12-17 17:14:37 +00:00
|
|
|
<?= audio_player($episode->audio->file_url, $episode->audio->file_mimetype, 'mt-auto') ?>
|
2021-04-02 17:20:02 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<footer class="flex justify-around px-6 py-3">
|
2021-11-05 14:36:34 +00:00
|
|
|
<span class="inline-flex items-center"><Icon glyph="chat" class="mr-1 text-xl opacity-40" />0</span>
|
|
|
|
<span class="inline-flex items-center"><Icon glyph="repeat" class="mr-1 text-xl opacity-40" />0</span>
|
|
|
|
<span class="inline-flex items-center"><Icon glyph="heart" class="mr-1 text-xl opacity-40" />0</span>
|
2021-04-02 17:20:02 +00:00
|
|
|
</footer>
|
|
|
|
</div>
|
|
|
|
|
2021-09-15 15:58:21 +00:00
|
|
|
<fieldset class="flex flex-col">
|
2021-04-02 17:20:02 +00:00
|
|
|
<legend class="text-lg font-semibold"><?= lang(
|
2021-09-15 15:58:21 +00:00
|
|
|
'Episode.publish_form.publication_date',
|
|
|
|
) ?></legend>
|
2021-10-01 09:49:56 +00:00
|
|
|
<Forms.Radio value="now" name="publication_method" isChecked="<?= old('publication_method') && old('publish') === 'now' ?>"><?= lang('Episode.publish_form.publication_method.now') ?></Forms.Radio>
|
2021-09-15 15:58:21 +00:00
|
|
|
<div class="inline-flex flex-wrap items-center radio-toggler">
|
2021-10-01 09:49:56 +00:00
|
|
|
<input
|
2021-11-05 14:36:34 +00:00
|
|
|
class="w-6 h-6 border-contrast text-accent-base border-3 focus:ring-accent"
|
2021-10-01 09:49:56 +00:00
|
|
|
type="radio" id="schedule" name="publication_method" value="schedule" <?= old('publication_method') ? old('publication_method') === 'schedule' : 'checked' ?> />
|
2021-09-15 15:58:21 +00:00
|
|
|
<Label for="schedule" class="pl-2 leading-8"><?= lang('Episode.publish_form.publication_method.schedule') ?></label>
|
|
|
|
<div class="w-full mt-2 radio-toggler-element">
|
|
|
|
<Forms.Field
|
|
|
|
as="DatetimePicker"
|
|
|
|
name="scheduled_publication_date"
|
|
|
|
label="<?= lang('Episode.publish_form.scheduled_publication_date') ?>"
|
2021-09-20 15:45:38 +00:00
|
|
|
hint="<?= lang('Episode.publish_form.scheduled_publication_date_hint') ?>"
|
2021-09-15 15:58:21 +00:00
|
|
|
value="<?= $episode->published_at ?>"
|
|
|
|
/>
|
2021-04-02 17:20:02 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2021-09-15 15:58:21 +00:00
|
|
|
</fieldset>
|
2021-04-02 17:20:02 +00:00
|
|
|
|
2021-09-15 15:58:21 +00:00
|
|
|
<Alert id="publish-warning" variant="warning" glyph="alert" class="hidden mt-2" title="<?= lang('Episode.publish_form.message_warning') ?>"><?= lang('Episode.publish_form.message_warning_hint') ?></Alert>
|
2021-06-22 17:59:33 +00:00
|
|
|
|
|
|
|
<div class="flex items-center justify-between w-full mt-4">
|
2021-09-15 15:58:21 +00:00
|
|
|
<Button uri="<?= route_to('episode-publish-cancel', $podcast->id, $episode->id) ?>" variant="danger"><?= lang('Episode.publish_form.cancel_publication') ?></Button>
|
|
|
|
<Button variant="primary" type="submit" data-btn-text-warning="<?= lang('Episode.publish_form.message_warning_submit') ?>" data-btn-text="<?= lang('Episode.publish_form.submit_edit') ?>"><?= lang('Episode.publish_form.submit_edit') ?></Button>
|
2021-04-02 17:20:02 +00:00
|
|
|
</div>
|
|
|
|
|
2021-09-15 15:58:21 +00:00
|
|
|
</form>
|
2021-04-02 17:20:02 +00:00
|
|
|
|
2021-08-27 10:58:22 +00:00
|
|
|
<?= $this->endSection() ?>
|