Add postcast styling

Add prettyPhoto
This commit is contained in:
Jorit Tijsen
2024-03-18 17:17:54 +01:00
parent 8ce3a1d7b3
commit 742c126a0a
31 changed files with 1284 additions and 361 deletions

View File

@@ -63,17 +63,15 @@ class RadioController extends Controller
$apiResult = $this->API('podcast/details/' . (int)$id);
$podcast = new \Model\Podcast($apiResult);
$related = [];
if($podcast->program != null)
$page = (int)$request->get('pagina', 1);
$apiResult = $this->API('podcast/overzicht?pagina=' . (int)max(1, $page) . '&aantal=6');
$podcasts = [];
foreach($apiResult->podcasts as $_podcast)
{
$apiRelated = $this->API("podcast/programma/{$podcast->program->id}?date={$podcast->created->format('Y-m-d')}");
foreach($apiRelated->podcasts as $relatedItem)
{
$related[] = new \Model\Podcast($relatedItem);
}
$podcasts[] = new \Model\Podcast($_podcast);
}
return view('podcastitem', array_merge($this->getSidebareData(), ['title' => $title, 'podcast' => $podcast, 'metadata' => $podcast->metadata, 'related' => $related, 'searchURL' => 'gemist/zoeken']));
return view($request->ajax() ? 'partial/podcastitems' : 'podcastitem', ['title' => $title, 'podcast' => $podcast, 'metadata' => $podcast->metadata, 'podcasts' => $podcasts, 'searchURL' => 'gemist/zoeken']);
}
public function podcasts(Request $request, $programma = null)