Loading app/Controllers/Admin/Podcast.php +2 −1 Original line number Diff line number Diff line Loading @@ -424,9 +424,10 @@ class Podcast extends BaseController return redirect()->route('podcast-view', [$this->podcast->id]); } public function latestEpisodes(int $limit) public function latestEpisodes(int $limit, int $podcast_id) { $episodes = (new EpisodeModel()) ->where('podcast_id', $podcast_id) ->orderBy('created_at', 'desc') ->findAll($limit); Loading app/Views/admin/podcast/create.php +2 −13 Original line number Diff line number Diff line Loading @@ -27,7 +27,6 @@ 'id' => 'image', 'name' => 'image', 'class' => 'form-input', 'required' => 'required', 'type' => 'file', 'accept' => '.jpg,.jpeg,.png', Loading Loading @@ -65,21 +64,13 @@ hint_tooltip(lang('Podcast.form.type.hint'), 'ml-1') ?> </legend> <?= form_radio( [ 'id' => 'episodic', 'name' => 'type', 'class' => 'form-radio-btn', ], ['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', ], ['id' => 'serial', 'name' => 'type', 'class' => 'form-radio-btn'], 'serial', old('type') ? old('type') == 'serial' : false ) ?> Loading Loading @@ -124,7 +115,6 @@ <?= form_label( lang('Podcast.form.other_categories'), 'other_categories', [], '', Loading @@ -137,7 +127,6 @@ [ 'id' => 'other_categories', 'class' => 'mb-4', 'required' => 'required', 'data-max-item-count' => '2', ] ) ?> Loading app/Views/admin/podcast/view.php +1 −0 Original line number Diff line number Diff line Loading @@ -25,6 +25,7 @@ <?= view_cell('\App\Controllers\Admin\Podcast::latestEpisodes', [ 'limit' => 5, 'podcast_id' => $podcast->id, ]) ?> <?= $this->endSection() ?> Loading
app/Controllers/Admin/Podcast.php +2 −1 Original line number Diff line number Diff line Loading @@ -424,9 +424,10 @@ class Podcast extends BaseController return redirect()->route('podcast-view', [$this->podcast->id]); } public function latestEpisodes(int $limit) public function latestEpisodes(int $limit, int $podcast_id) { $episodes = (new EpisodeModel()) ->where('podcast_id', $podcast_id) ->orderBy('created_at', 'desc') ->findAll($limit); Loading
app/Views/admin/podcast/create.php +2 −13 Original line number Diff line number Diff line Loading @@ -27,7 +27,6 @@ 'id' => 'image', 'name' => 'image', 'class' => 'form-input', 'required' => 'required', 'type' => 'file', 'accept' => '.jpg,.jpeg,.png', Loading Loading @@ -65,21 +64,13 @@ hint_tooltip(lang('Podcast.form.type.hint'), 'ml-1') ?> </legend> <?= form_radio( [ 'id' => 'episodic', 'name' => 'type', 'class' => 'form-radio-btn', ], ['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', ], ['id' => 'serial', 'name' => 'type', 'class' => 'form-radio-btn'], 'serial', old('type') ? old('type') == 'serial' : false ) ?> Loading Loading @@ -124,7 +115,6 @@ <?= form_label( lang('Podcast.form.other_categories'), 'other_categories', [], '', Loading @@ -137,7 +127,6 @@ [ 'id' => 'other_categories', 'class' => 'mb-4', 'required' => 'required', 'data-max-item-count' => '2', ] ) ?> Loading
app/Views/admin/podcast/view.php +1 −0 Original line number Diff line number Diff line Loading @@ -25,6 +25,7 @@ <?= view_cell('\App\Controllers\Admin\Podcast::latestEpisodes', [ 'limit' => 5, 'podcast_id' => $podcast->id, ]) ?> <?= $this->endSection() ?>