2020-08-27 10:05:44 +00:00
|
|
|
<?= $this->extend('admin/_layout') ?>
|
|
|
|
|
|
|
|
<?= $this->section('title') ?>
|
|
|
|
<?= lang('Platforms.title') ?>
|
|
|
|
<?= $this->endSection() ?>
|
|
|
|
|
2020-10-02 15:38:16 +00:00
|
|
|
<?= $this->section('pageTitle') ?>
|
|
|
|
<?= lang('Platforms.title') ?>
|
|
|
|
<?= $this->endSection() ?>
|
|
|
|
|
2020-08-27 10:05:44 +00:00
|
|
|
<?= $this->section('content') ?>
|
|
|
|
|
|
|
|
<?= form_open(route_to('platforms', $podcast->id), [
|
|
|
|
'class' => 'flex flex-col max-w-md',
|
|
|
|
]) ?>
|
|
|
|
<?= csrf_field() ?>
|
|
|
|
|
|
|
|
<?php foreach ($platforms as $platform): ?>
|
|
|
|
|
|
|
|
<div class="relative flex items-start mb-4">
|
|
|
|
<div class="flex flex-col w-12 mr-4">
|
2020-10-29 15:45:19 +00:00
|
|
|
<?= platform_icon($platform->name, 'w-full mb-1') ?>
|
2020-08-27 10:05:44 +00:00
|
|
|
<div class="inline-flex bg-gray-200">
|
|
|
|
<?= anchor($platform->home_url, icon('external-link', 'mx-auto'), [
|
|
|
|
'class' => 'flex-1 text-gray-600 hover:text-gray-900',
|
|
|
|
'target' => '_blank',
|
|
|
|
'rel' => 'noopener noreferrer',
|
|
|
|
'data-toggle' => 'tooltip',
|
|
|
|
'data-placement' => 'bottom',
|
|
|
|
'title' => lang('Platforms.home_url', [
|
|
|
|
'platformName' => $platform->label,
|
|
|
|
]),
|
|
|
|
]) ?>
|
|
|
|
<?= $platform->submit_url
|
|
|
|
? anchor($platform->submit_url, icon('upload', 'mx-auto'), [
|
|
|
|
'class' => 'flex-1 text-gray-600 hover:text-gray-900',
|
|
|
|
'target' => '_blank',
|
|
|
|
'rel' => 'noopener noreferrer',
|
|
|
|
'data-toggle' => 'tooltip',
|
|
|
|
'data-placement' => 'bottom',
|
|
|
|
'title' => lang('Platforms.submit_url', [
|
|
|
|
'platformName' => $platform->label,
|
|
|
|
]),
|
|
|
|
])
|
|
|
|
: '' ?>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="flex flex-col flex-1">
|
|
|
|
<?= $platform->link_url
|
|
|
|
? anchor(
|
|
|
|
route_to('platforms-remove', $podcast->id, $platform->id),
|
|
|
|
icon('delete-bin', 'mx-auto'),
|
|
|
|
[
|
|
|
|
'class' =>
|
|
|
|
'absolute right-0 p-1 bg-red-200 rounded-full text-red-700 hover:text-red-900',
|
|
|
|
'data-toggle' => 'tooltip',
|
|
|
|
'data-placement' => 'bottom',
|
|
|
|
'title' => lang('Platforms.remove', [
|
|
|
|
'platformName' => $platform->label,
|
|
|
|
]),
|
|
|
|
]
|
|
|
|
)
|
|
|
|
: '' ?>
|
|
|
|
<?= form_label($platform->label, $platform->name, [
|
|
|
|
'class' => 'font-semibold mb-2',
|
|
|
|
]) ?>
|
|
|
|
<?= form_input([
|
|
|
|
'id' => $platform->name,
|
|
|
|
'name' => 'platforms[' . $platform->name . '][url]',
|
|
|
|
'class' => 'form-input mb-1 w-full',
|
|
|
|
'value' => old($platform->name, $platform->link_url),
|
|
|
|
'type' => 'url',
|
|
|
|
'placeholder' => 'https://...',
|
|
|
|
]) ?>
|
2020-10-15 11:07:32 +00:00
|
|
|
<?= form_switch(
|
|
|
|
lang('Platforms.visible'),
|
|
|
|
[
|
|
|
|
'id' => $platform->name . '_visible',
|
|
|
|
'name' => 'platforms[' . $platform->name . '][visible]',
|
|
|
|
],
|
|
|
|
'yes',
|
|
|
|
old(
|
|
|
|
$platform->name . '_visible',
|
2020-10-29 15:45:19 +00:00
|
|
|
$platform->is_visible ? $platform->is_visible : false
|
2020-10-15 11:07:32 +00:00
|
|
|
),
|
|
|
|
'text-sm'
|
|
|
|
) ?>
|
2020-08-27 10:05:44 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<?php endforeach; ?>
|
|
|
|
|
2020-10-02 15:38:16 +00:00
|
|
|
<?= button(
|
|
|
|
lang('Platforms.submit'),
|
|
|
|
null,
|
|
|
|
['variant' => 'primary'],
|
|
|
|
['type' => 'submit', 'class' => 'self-end']
|
|
|
|
) ?>
|
2020-08-27 10:05:44 +00:00
|
|
|
|
|
|
|
<?= form_close() ?>
|
|
|
|
|
|
|
|
<?= $this->endSection() ?>
|