mirror of
https://github.com/ad-aures/castopod.git
synced 2026-04-13 19:47:45 +02:00
feat(plugins): add html field type + CodeEditor component + rework html head generation
update php and js packages to latest
This commit is contained in:
parent
b869acb3a9
commit
8cf9c6dc83
227 changed files with 2991 additions and 2988 deletions
|
|
@ -25,6 +25,7 @@ class AboutController extends BaseController
|
|||
'languages' => implode(', ', config('App')->supportedLocales),
|
||||
];
|
||||
|
||||
$this->setHtmlHead(lang('AboutCastopod.title'));
|
||||
return view('settings/about', [
|
||||
'info' => $instanceInfo,
|
||||
]);
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ declare(strict_types=1);
|
|||
|
||||
namespace Modules\Admin\Controllers;
|
||||
|
||||
use App\Libraries\HtmlHead;
|
||||
use CodeIgniter\Controller;
|
||||
use CodeIgniter\HTTP\IncomingRequest;
|
||||
use CodeIgniter\HTTP\RequestInterface;
|
||||
|
|
@ -41,4 +42,16 @@ abstract class BaseController extends Controller
|
|||
|
||||
Theme::setTheme('admin');
|
||||
}
|
||||
|
||||
protected function setHtmlHead(string $title): void
|
||||
{
|
||||
/** @var HtmlHead $head */
|
||||
$head = service('html_head');
|
||||
|
||||
$head
|
||||
->title($title . ' | Castopod Admin')
|
||||
->description(
|
||||
'Castopod is an open-source hosting platform made for podcasters who want engage and interact with their audience.'
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -81,6 +81,7 @@ class DashboardController extends BaseController
|
|||
'onlyPodcastId' => $onlyPodcastId,
|
||||
];
|
||||
|
||||
$this->setHtmlHead(lang('Dashboard.home'));
|
||||
return view('dashboard', $data);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -115,6 +115,7 @@ class EpisodeController extends BaseController
|
|||
'query' => $query,
|
||||
];
|
||||
|
||||
$this->setHtmlHead(lang('Episode.all_podcast_episodes'));
|
||||
replace_breadcrumb_params([
|
||||
0 => $this->podcast->at_handle,
|
||||
]);
|
||||
|
|
@ -128,6 +129,7 @@ class EpisodeController extends BaseController
|
|||
'episode' => $this->episode,
|
||||
];
|
||||
|
||||
$this->setHtmlHead($this->episode->title);
|
||||
replace_breadcrumb_params([
|
||||
0 => $this->podcast->at_handle,
|
||||
1 => $this->episode->title,
|
||||
|
|
@ -148,6 +150,8 @@ class EpisodeController extends BaseController
|
|||
$currentSeasonNumber
|
||||
),
|
||||
];
|
||||
|
||||
$this->setHtmlHead(lang('Episode.create'));
|
||||
replace_breadcrumb_params([
|
||||
0 => $this->podcast->at_handle,
|
||||
]);
|
||||
|
|
@ -261,6 +265,7 @@ class EpisodeController extends BaseController
|
|||
'episode' => $this->episode,
|
||||
];
|
||||
|
||||
$this->setHtmlHead(lang('Episode.edit'));
|
||||
replace_breadcrumb_params([
|
||||
0 => $this->podcast->at_handle,
|
||||
1 => $this->episode->title,
|
||||
|
|
@ -409,6 +414,7 @@ class EpisodeController extends BaseController
|
|||
'episode' => $this->episode,
|
||||
];
|
||||
|
||||
$this->setHtmlHead(lang('Episode.publish'));
|
||||
replace_breadcrumb_params([
|
||||
0 => $this->podcast->at_handle,
|
||||
1 => $this->episode->title,
|
||||
|
|
@ -521,6 +527,7 @@ class EpisodeController extends BaseController
|
|||
->first(),
|
||||
];
|
||||
|
||||
$this->setHtmlHead(lang('Episode.publish_edit'));
|
||||
replace_breadcrumb_params([
|
||||
0 => $this->podcast->at_handle,
|
||||
1 => $this->episode->title,
|
||||
|
|
@ -670,11 +677,11 @@ class EpisodeController extends BaseController
|
|||
'episode' => $this->episode,
|
||||
];
|
||||
|
||||
$this->setHtmlHead(lang('Episode.publish_date_edit'));
|
||||
replace_breadcrumb_params([
|
||||
0 => $this->podcast->title,
|
||||
1 => $this->episode->title,
|
||||
]);
|
||||
|
||||
return view('episode/publish_date_edit', $data);
|
||||
}
|
||||
|
||||
|
|
@ -746,6 +753,7 @@ class EpisodeController extends BaseController
|
|||
'episode' => $this->episode,
|
||||
];
|
||||
|
||||
$this->setHtmlHead(lang('Episode.unpublish'));
|
||||
replace_breadcrumb_params([
|
||||
0 => $this->podcast->title,
|
||||
1 => $this->episode->title,
|
||||
|
|
@ -822,6 +830,7 @@ class EpisodeController extends BaseController
|
|||
'episode' => $this->episode,
|
||||
];
|
||||
|
||||
$this->setHtmlHead(lang('Episode.delete'));
|
||||
replace_breadcrumb_params([
|
||||
0 => $this->podcast->at_handle,
|
||||
1 => $this->episode->title,
|
||||
|
|
@ -928,6 +937,7 @@ class EpisodeController extends BaseController
|
|||
'themes' => EpisodeModel::$themes,
|
||||
];
|
||||
|
||||
$this->setHtmlHead(lang('Episode.embed.title'));
|
||||
replace_breadcrumb_params([
|
||||
0 => $this->podcast->at_handle,
|
||||
1 => $this->episode->title,
|
||||
|
|
|
|||
|
|
@ -58,6 +58,8 @@ class EpisodePersonController extends BaseController
|
|||
'personOptions' => (new PersonModel())->getPersonOptions(),
|
||||
'taxonomyOptions' => (new PersonModel())->getTaxonomyOptions(),
|
||||
];
|
||||
|
||||
$this->setHtmlHead(lang('Person.episode_form.title'));
|
||||
replace_breadcrumb_params([
|
||||
0 => $this->podcast->at_handle,
|
||||
1 => $this->episode->title,
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@ class FediverseController extends BaseController
|
|||
$blockedActors = model('ActorModel', false)
|
||||
->getBlockedActors();
|
||||
|
||||
$this->setHtmlHead(lang('Fediverse.blocked_actors'));
|
||||
return view('fediverse/blocked_actors', [
|
||||
'blockedActors' => $blockedActors,
|
||||
]);
|
||||
|
|
@ -38,6 +39,7 @@ class FediverseController extends BaseController
|
|||
$blockedDomains = model('BlockedDomainModel', false)
|
||||
->getBlockedDomains();
|
||||
|
||||
$this->setHtmlHead(lang('Fediverse.blocked_domains'));
|
||||
return view('fediverse/blocked_domains', [
|
||||
'blockedDomains' => $blockedDomains,
|
||||
]);
|
||||
|
|
|
|||
|
|
@ -66,10 +66,10 @@ class NotificationController extends BaseController
|
|||
'pager' => $notifications->pager,
|
||||
];
|
||||
|
||||
$this->setHtmlHead(lang('Notifications.title'));
|
||||
replace_breadcrumb_params([
|
||||
0 => $this->podcast->at_handle,
|
||||
]);
|
||||
|
||||
return view('podcast/notifications', $data);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@ class PageController extends BaseController
|
|||
|
||||
public function list(): string
|
||||
{
|
||||
$this->setHtmlHead(lang('Page.all_pages'));
|
||||
$data = [
|
||||
'pages' => (new PageModel())->findAll(),
|
||||
];
|
||||
|
|
@ -43,6 +44,7 @@ class PageController extends BaseController
|
|||
|
||||
public function view(): string
|
||||
{
|
||||
$this->setHtmlHead($this->page->title);
|
||||
return view('page/view', [
|
||||
'page' => $this->page,
|
||||
]);
|
||||
|
|
@ -52,6 +54,7 @@ class PageController extends BaseController
|
|||
{
|
||||
helper('form');
|
||||
|
||||
$this->setHtmlHead(lang('Page.create'));
|
||||
return view('page/create');
|
||||
}
|
||||
|
||||
|
|
@ -83,6 +86,7 @@ class PageController extends BaseController
|
|||
{
|
||||
helper('form');
|
||||
|
||||
$this->setHtmlHead(lang('Page.edit'));
|
||||
replace_breadcrumb_params([
|
||||
0 => $this->page->title,
|
||||
]);
|
||||
|
|
|
|||
|
|
@ -42,6 +42,7 @@ class PersonController extends BaseController
|
|||
->findAll(),
|
||||
];
|
||||
|
||||
$this->setHtmlHead(lang('Person.all_persons'));
|
||||
return view('person/list', $data);
|
||||
}
|
||||
|
||||
|
|
@ -51,6 +52,7 @@ class PersonController extends BaseController
|
|||
'person' => $this->person,
|
||||
];
|
||||
|
||||
$this->setHtmlHead($this->person->full_name);
|
||||
replace_breadcrumb_params([
|
||||
0 => $this->person->full_name,
|
||||
]);
|
||||
|
|
@ -61,6 +63,7 @@ class PersonController extends BaseController
|
|||
{
|
||||
helper(['form']);
|
||||
|
||||
$this->setHtmlHead(lang('Person.create'));
|
||||
return view('person/create');
|
||||
}
|
||||
|
||||
|
|
@ -112,6 +115,7 @@ class PersonController extends BaseController
|
|||
'person' => $this->person,
|
||||
];
|
||||
|
||||
$this->setHtmlHead(lang('Person.edit'));
|
||||
replace_breadcrumb_params([
|
||||
0 => $this->person->full_name,
|
||||
]);
|
||||
|
|
|
|||
|
|
@ -68,6 +68,7 @@ class PodcastController extends BaseController
|
|||
];
|
||||
}
|
||||
|
||||
$this->setHtmlHead(lang('Podcast.all_podcasts'));
|
||||
return view('podcast/list', $data);
|
||||
}
|
||||
|
||||
|
|
@ -77,6 +78,7 @@ class PodcastController extends BaseController
|
|||
'podcast' => $this->podcast,
|
||||
];
|
||||
|
||||
$this->setHtmlHead($this->podcast->title);
|
||||
replace_breadcrumb_params([
|
||||
0 => $this->podcast->at_handle,
|
||||
]);
|
||||
|
|
@ -89,6 +91,7 @@ class PodcastController extends BaseController
|
|||
'podcast' => $this->podcast,
|
||||
];
|
||||
|
||||
$this->setHtmlHead($this->podcast->title);
|
||||
replace_breadcrumb_params([
|
||||
0 => $this->podcast->at_handle,
|
||||
]);
|
||||
|
|
@ -101,6 +104,7 @@ class PodcastController extends BaseController
|
|||
'podcast' => $this->podcast,
|
||||
];
|
||||
|
||||
$this->setHtmlHead($this->podcast->title);
|
||||
replace_breadcrumb_params([
|
||||
0 => $this->podcast->at_handle,
|
||||
]);
|
||||
|
|
@ -113,6 +117,7 @@ class PodcastController extends BaseController
|
|||
'podcast' => $this->podcast,
|
||||
];
|
||||
|
||||
$this->setHtmlHead($this->podcast->title);
|
||||
replace_breadcrumb_params([
|
||||
0 => $this->podcast->at_handle,
|
||||
]);
|
||||
|
|
@ -125,6 +130,7 @@ class PodcastController extends BaseController
|
|||
'podcast' => $this->podcast,
|
||||
];
|
||||
|
||||
$this->setHtmlHead($this->podcast->title);
|
||||
replace_breadcrumb_params([
|
||||
0 => $this->podcast->at_handle,
|
||||
]);
|
||||
|
|
@ -137,6 +143,7 @@ class PodcastController extends BaseController
|
|||
'podcast' => $this->podcast,
|
||||
];
|
||||
|
||||
$this->setHtmlHead($this->podcast->title);
|
||||
replace_breadcrumb_params([
|
||||
0 => $this->podcast->at_handle,
|
||||
]);
|
||||
|
|
@ -149,6 +156,7 @@ class PodcastController extends BaseController
|
|||
'podcast' => $this->podcast,
|
||||
];
|
||||
|
||||
$this->setHtmlHead($this->podcast->title);
|
||||
replace_breadcrumb_params([
|
||||
0 => $this->podcast->at_handle,
|
||||
]);
|
||||
|
|
@ -161,6 +169,7 @@ class PodcastController extends BaseController
|
|||
'podcast' => $this->podcast,
|
||||
];
|
||||
|
||||
$this->setHtmlHead($this->podcast->title);
|
||||
replace_breadcrumb_params([
|
||||
0 => $this->podcast->at_handle,
|
||||
]);
|
||||
|
|
@ -180,6 +189,7 @@ class PodcastController extends BaseController
|
|||
'browserLang' => get_browser_language($this->request->getServer('HTTP_ACCEPT_LANGUAGE')),
|
||||
];
|
||||
|
||||
$this->setHtmlHead(lang('Podcast.create'));
|
||||
return view('podcast/create', $data);
|
||||
}
|
||||
|
||||
|
|
@ -270,6 +280,7 @@ class PodcastController extends BaseController
|
|||
'categoryOptions' => $categoryOptions,
|
||||
];
|
||||
|
||||
$this->setHtmlHead(lang('Podcast.edit'));
|
||||
replace_breadcrumb_params([
|
||||
0 => $this->podcast->at_handle,
|
||||
]);
|
||||
|
|
@ -410,6 +421,7 @@ class PodcastController extends BaseController
|
|||
'podcast' => $this->podcast,
|
||||
];
|
||||
|
||||
$this->setHtmlHead(lang('Podcast.delete'));
|
||||
replace_breadcrumb_params([
|
||||
0 => $this->podcast->at_handle,
|
||||
]);
|
||||
|
|
@ -578,10 +590,10 @@ class PodcastController extends BaseController
|
|||
'podcast' => $this->podcast,
|
||||
];
|
||||
|
||||
$this->setHtmlHead(lang('Podcast.publish'));
|
||||
replace_breadcrumb_params([
|
||||
0 => $this->podcast->at_handle,
|
||||
]);
|
||||
|
||||
return view('podcast/publish', $data);
|
||||
}
|
||||
|
||||
|
|
@ -713,10 +725,10 @@ class PodcastController extends BaseController
|
|||
->first(),
|
||||
];
|
||||
|
||||
$this->setHtmlHead(lang('Podcast.publish_edit'));
|
||||
replace_breadcrumb_params([
|
||||
0 => $this->podcast->at_handle,
|
||||
]);
|
||||
|
||||
return view('podcast/publish_edit', $data);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -46,6 +46,8 @@ class PodcastPersonController extends BaseController
|
|||
'personOptions' => (new PersonModel())->getPersonOptions(),
|
||||
'taxonomyOptions' => (new PersonModel())->getTaxonomyOptions(),
|
||||
];
|
||||
|
||||
$this->setHtmlHead(lang('Person.podcast_form.title'));
|
||||
replace_breadcrumb_params([
|
||||
0 => $this->podcast->at_handle,
|
||||
]);
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@ class SettingsController extends BaseController
|
|||
public function index(): string
|
||||
{
|
||||
helper('form');
|
||||
$this->setHtmlHead(lang('Settings.title'));
|
||||
return view('settings/general');
|
||||
}
|
||||
|
||||
|
|
@ -202,6 +203,7 @@ class SettingsController extends BaseController
|
|||
public function theme(): string
|
||||
{
|
||||
helper('form');
|
||||
$this->setHtmlHead(lang('Settings.theme.title'));
|
||||
return view('settings/theme');
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -76,6 +76,7 @@ class SoundbiteController extends BaseController
|
|||
'pager' => $soundbitesBuilder->pager,
|
||||
];
|
||||
|
||||
$this->setHtmlHead(lang('Soundbite.list.title'));
|
||||
replace_breadcrumb_params([
|
||||
0 => $this->podcast->at_handle,
|
||||
1 => $this->episode->title,
|
||||
|
|
@ -92,6 +93,7 @@ class SoundbiteController extends BaseController
|
|||
'episode' => $this->episode,
|
||||
];
|
||||
|
||||
$this->setHtmlHead(lang('Soundbite.form.title'));
|
||||
replace_breadcrumb_params([
|
||||
0 => $this->podcast->at_handle,
|
||||
1 => $this->episode->title,
|
||||
|
|
|
|||
|
|
@ -82,6 +82,7 @@ class VideoClipsController extends BaseController
|
|||
'pager' => $videoClipsBuilder->pager,
|
||||
];
|
||||
|
||||
$this->setHtmlHead(lang('VideoClip.list.title'));
|
||||
replace_breadcrumb_params([
|
||||
0 => $this->podcast->at_handle,
|
||||
1 => $this->episode->title,
|
||||
|
|
@ -99,6 +100,9 @@ class VideoClipsController extends BaseController
|
|||
'videoClip' => $videoClip,
|
||||
];
|
||||
|
||||
$this->setHtmlHead(lang('VideoClip.title', [
|
||||
'videoClipLabel' => esc($videoClip->title),
|
||||
]));
|
||||
replace_breadcrumb_params([
|
||||
0 => $this->podcast->at_handle,
|
||||
1 => $this->episode->title,
|
||||
|
|
@ -128,9 +132,10 @@ class VideoClipsController extends BaseController
|
|||
'transcript' => $this->episode->transcript instanceof Transcript,
|
||||
];
|
||||
|
||||
$this->setHtmlHead(lang('VideoClip.form.title'));
|
||||
|
||||
if (in_array(false, $checks, true)) {
|
||||
$data['checks'] = $checks;
|
||||
|
||||
return view('episode/video_clips_requirements', $data);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue