Podcasts en fragment gemist gescheiden
This commit is contained in:
@@ -29,7 +29,7 @@ class PodcastController extends Controller
|
|||||||
$podcasts[] = new \Model\Podcast($podcast);
|
$podcasts[] = new \Model\Podcast($podcast);
|
||||||
}
|
}
|
||||||
|
|
||||||
return view($request->ajax() ? 'partial.podcastitems' : 'podcastseries', array_merge($viewData, ['podcasts' => $podcasts, 'searchURL' => 'gemist/zoeken']));
|
return view($request->ajax() ? 'partial.podcastitems' : 'podcastseries', array_merge($viewData, ['podcasts' => $podcasts, 'searchURL' => 'gemist/zoeken', 'isPodcast' => true]));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function podcast(Request $request, $id)
|
public function podcast(Request $request, $id)
|
||||||
@@ -37,6 +37,15 @@ class PodcastController extends Controller
|
|||||||
parent::registerView($request, 'podcast', $id);
|
parent::registerView($request, 'podcast', $id);
|
||||||
$apiResult = $this->API('podcast/details/' . (int)$id);
|
$apiResult = $this->API('podcast/details/' . (int)$id);
|
||||||
$podcast = new \Model\Podcast($apiResult);
|
$podcast = new \Model\Podcast($apiResult);
|
||||||
return view('podcastitem', ['podcast' => $podcast, 'metadata' => $podcast->metadata]);
|
$podcasts = [];
|
||||||
|
if($podcast->program) {
|
||||||
|
$apiResult = $this->API('podcast/programma/' . (int)$podcast->program->id . '?pagina=1&aantal=5');
|
||||||
|
$podcasts = [];
|
||||||
|
foreach($apiResult->podcasts as $p)
|
||||||
|
{
|
||||||
|
$podcasts[] = new \Model\Podcast($p);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return view('podcastitem', ['podcast' => $podcast, 'metadata' => $podcast->metadata, 'podcasts' => $podcasts, 'isPodcast' => true]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ class RadioController extends Controller
|
|||||||
public function podcast(Request $request, $id, $title = '')
|
public function podcast(Request $request, $id, $title = '')
|
||||||
{
|
{
|
||||||
if($this->checkAPI('podcast/details/' . (int)$id) != "200"){
|
if($this->checkAPI('podcast/details/' . (int)$id) != "200"){
|
||||||
return view('podcastitem', array_merge($this->getSidebareData(), ['title' => $title, 'podcast' => null, 'metadata' => null, 'related' => [], 'searchURL' => 'gemist/zoeken']));
|
return view('podcastitem', array_merge($this->getSidebareData(), ['title' => $title, 'podcast' => null, 'metadata' => null, 'related' => [], 'searchURL' => 'gemist/zoeken', 'isPodcast' => false]));
|
||||||
}
|
}
|
||||||
|
|
||||||
parent::registerView($request, 'podcast', $id);
|
parent::registerView($request, 'podcast', $id);
|
||||||
@@ -71,7 +71,7 @@ class RadioController extends Controller
|
|||||||
$podcasts[] = new \Model\Podcast($_podcast);
|
$podcasts[] = new \Model\Podcast($_podcast);
|
||||||
}
|
}
|
||||||
|
|
||||||
return view($request->ajax() ? 'partial/podcastitems' : 'podcastitem', ['title' => $title, 'podcast' => $podcast, 'metadata' => $podcast->metadata, 'podcasts' => $podcasts, 'searchURL' => 'gemist/zoeken']);
|
return view($request->ajax() ? 'partial/podcastitems' : 'podcastitem', ['title' => $title, 'podcast' => $podcast, 'metadata' => $podcast->metadata, 'podcasts' => $podcasts, 'searchURL' => 'gemist/zoeken', 'isPodcast' => false]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function podcasts(Request $request, $programma = null)
|
public function podcasts(Request $request, $programma = null)
|
||||||
@@ -107,7 +107,7 @@ class RadioController extends Controller
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return view($request->ajax() ? 'partial/programitems' : 'programlist', ['programs' => array_reverse($programs)]);
|
return view($request->ajax() ? 'partial/programitems' : 'programlist', ['programs' => array_reverse($programs), 'isPodcast' => false]);
|
||||||
}
|
}
|
||||||
|
|
||||||
private function getPodcastList(Request $request, $action, $viewData = [])
|
private function getPodcastList(Request $request, $action, $viewData = [])
|
||||||
@@ -120,7 +120,7 @@ class RadioController extends Controller
|
|||||||
$podcasts[] = new \Model\Podcast($podcast);
|
$podcasts[] = new \Model\Podcast($podcast);
|
||||||
}
|
}
|
||||||
|
|
||||||
return view($request->ajax() ? 'partial/podcastitems' : 'podcastlist', array_merge($viewData, ['id' => 'items-podcasts', 'podcasts' => $podcasts, 'searchURL' => 'gemist/zoeken']));
|
return view($request->ajax() ? 'partial/podcastitems' : 'podcastlist', array_merge($viewData, ['id' => 'items-podcasts', 'podcasts' => $podcasts, 'searchURL' => 'gemist/zoeken', 'isPodcast' => false]));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<div>
|
<div>
|
||||||
@foreach($podcasts as $podcast)
|
@foreach($podcasts as $podcast)
|
||||||
<?php
|
<?php
|
||||||
$url = route('gemist.fragment') . $podcast->url;
|
$url = ($isPodcast ? '/podcast/aflevering' : '/gemist/fragment') . $podcast->url;
|
||||||
$popoutUrl = route('luister.podcast') . $podcast->url . '?auth=' . $podcast->auth;
|
$popoutUrl = route('luister.podcast') . $podcast->url . '?auth=' . $podcast->auth;
|
||||||
?>
|
?>
|
||||||
<div class="box full-width featured">
|
<div class="box full-width featured">
|
||||||
@@ -15,7 +15,7 @@
|
|||||||
<h2 class="post_title"><a href="{{$url}}" title="{{$podcast->title}}">{!!$podcast->titleWithoutProgram()!!}</a></h2>
|
<h2 class="post_title"><a href="{{$url}}" title="{{$podcast->title}}">{!!$podcast->titleWithoutProgram()!!}</a></h2>
|
||||||
<div class="sub_title">
|
<div class="sub_title">
|
||||||
@if ($podcast->program)
|
@if ($podcast->program)
|
||||||
<a class="program_name" href="{{ route('programma') . $podcast->program->url }}"
|
<a class="program_name" href="/{{ ($isPodcast ? 'podcast' : 'programma') . $podcast->program->url }}"
|
||||||
title="{{$podcast->program->name}}">{{$podcast->program->name}}</a>
|
title="{{$podcast->program->name}}">{{$podcast->program->name}}</a>
|
||||||
@endif
|
@endif
|
||||||
<span class="post_date" title="{{Formatter::relativeDate($podcast->created)}}">
|
<span class="post_date" title="{{Formatter::relativeDate($podcast->created)}}">
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ $actionButton = array_merge([
|
|||||||
?>
|
?>
|
||||||
<ul id="{{$id ?? ''}}" class="{{$ul['class']}}">
|
<ul id="{{$id ?? ''}}" class="{{$ul['class']}}">
|
||||||
@foreach($podcasts as $podcast)
|
@foreach($podcasts as $podcast)
|
||||||
<?php $url = route('gemist.fragment') . $podcast->url; ?>
|
<?php $url = ($isPodcast ? '/podcast/aflevering' : '/gemist/fragment') . $podcast->url; ?>
|
||||||
<li style="{{$li['style']}}" class="post {{$li['class']}}">
|
<li style="{{$li['style']}}" class="post {{$li['class']}}">
|
||||||
<div style="{{$content['style']}}" class="post_content {{$content['class']}}">
|
<div style="{{$content['style']}}" class="post_content {{$content['class']}}">
|
||||||
<h2 class="post_title">
|
<h2 class="post_title">
|
||||||
|
|||||||
@@ -4,9 +4,11 @@
|
|||||||
|
|
||||||
@section('title')
|
@section('title')
|
||||||
@if($podcast)
|
@if($podcast)
|
||||||
Fragment gemist
|
{{ $podcast->title }}
|
||||||
|
@elseif($isPodcast)
|
||||||
|
NH Gooi Podcast
|
||||||
@else
|
@else
|
||||||
Fragment {{$title}} niet gevonden
|
Fragment gemist
|
||||||
@endif
|
@endif
|
||||||
@endsection
|
@endsection
|
||||||
|
|
||||||
@@ -18,14 +20,18 @@
|
|||||||
<ul class="bread_crumb">
|
<ul class="bread_crumb">
|
||||||
<li><a title="Home" href="/">Home</a></li>
|
<li><a title="Home" href="/">Home</a></li>
|
||||||
<li class="separator"><i class="fa-solid fa-chevron-right"></i></li>
|
<li class="separator"><i class="fa-solid fa-chevron-right"></i></li>
|
||||||
<li><a title="Fragment gemist" href="{{route('gemist')}}">Fragment gemist</a></li>
|
@if($isPodcast)
|
||||||
|
<li>NH Gooi podcast</li>
|
||||||
|
@else
|
||||||
|
<li><a title="Home" href="/gemist/fragment">Fragment gemist</a></li>
|
||||||
|
@endif
|
||||||
<li class="separator"><i class="fa-solid fa-chevron-right"></i></li>
|
<li class="separator"><i class="fa-solid fa-chevron-right"></i></li>
|
||||||
@if($podcast && $podcast->program)
|
@if($podcast && $podcast->program)
|
||||||
<li><a title="{{$podcast->program->name}}"
|
<li><a title="{{$podcast->program->name}}"
|
||||||
href="{{route('gemist.programma') . $podcast->program->url}}">{{$podcast->program->name}}</a></li>
|
href="{{route('gemist.programma') . $podcast->program->url}}">{{$podcast->program->name}}</a></li>
|
||||||
<li class="separator"><i class="fa-solid fa-chevron-right"></i></li>
|
<li class="separator"><i class="fa-solid fa-chevron-right"></i></li>
|
||||||
@endif
|
@endif
|
||||||
<li>Fragment</li>
|
<li>{{ $podcast->title }}</li>
|
||||||
</ul>
|
</ul>
|
||||||
@endsection
|
@endsection
|
||||||
|
|
||||||
@@ -91,7 +97,6 @@
|
|||||||
<div class="row news_post">
|
<div class="row news_post">
|
||||||
<div class="col-12 col-md content_container">
|
<div class="col-12 col-md content_container">
|
||||||
<div class="box full-width post single small_image md_margin_top">
|
<div class="box full-width post single small_image md_margin_top">
|
||||||
<h1 class="page_title">{{$podcast->title}}</h1>
|
|
||||||
<div class="post_body">
|
<div class="post_body">
|
||||||
<ul class="post_details clearfix">
|
<ul class="post_details clearfix">
|
||||||
<li class="detail date">
|
<li class="detail date">
|
||||||
@@ -100,7 +105,7 @@
|
|||||||
</li>
|
</li>
|
||||||
@if($podcast->program)
|
@if($podcast->program)
|
||||||
<li class="detail author">
|
<li class="detail author">
|
||||||
<a href="{{ route('programma') . $podcast->program->url }}">{{ $podcast->program->name }}</a>
|
<a href="/{{ ($isPodcast ? 'podcast' : 'programma') . $podcast->program->url }}">{{ $podcast->program->name }}</a>
|
||||||
</li>
|
</li>
|
||||||
@endif
|
@endif
|
||||||
</ul>
|
</ul>
|
||||||
@@ -150,15 +155,15 @@
|
|||||||
<div data-tabs>
|
<div data-tabs>
|
||||||
<div class="tabs">
|
<div class="tabs">
|
||||||
<h4 data-tab-content-id="tab_more_fragmenten"
|
<h4 data-tab-content-id="tab_more_fragmenten"
|
||||||
class="box_header small flex-grow-1 active"><span>Meer fragmenten</span>
|
class="box_header small flex-grow-1 active"><span>Meer {{$isPodcast ? 'afleveringen' : 'fragmenten'}}</span>
|
||||||
</h4>
|
</h4>
|
||||||
</div>
|
</div>
|
||||||
<div id="tab_more_fragmenten" class="box tab_content podcast_items active">
|
<div id="tab_more_fragmenten" class="box tab_content podcast_items active">
|
||||||
@include('partial/podcastitems', ['id' => 'items-podcasts', 'showTime' => false, 'showImage' => false, 'podcasts' => $podcasts])
|
@include('partial/podcastitems', ['id' => 'items-podcasts', 'showTime' => false, 'showImage' => false, 'podcasts' => $podcasts, 'isPodcast' => $isPodcast])
|
||||||
<a class="btn auto_width" id="meer-nieuws-more-podcast" href="#"
|
<a class="btn auto_width" id="meer-nieuws-more-podcast" href="#"
|
||||||
data-loadmorenews='{"container":["#items-podcasts"]}'>
|
data-loadmorenews='{"container":["#items-podcasts"]}'>
|
||||||
<span class="fas fa-spinner fa-spin" id="loading"></span>
|
<span class="fas fa-spinner fa-spin" id="loading"></span>
|
||||||
Meer fragmenten
|
Meer {{$isPodcast ? 'afleveringen' : 'fragmenten'}}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -79,7 +79,8 @@
|
|||||||
'class' => 'd-flex flex-column justify-content-end flex-grow-1'
|
'class' => 'd-flex flex-column justify-content-end flex-grow-1'
|
||||||
],
|
],
|
||||||
'showAction' => true,
|
'showAction' => true,
|
||||||
'podcasts' => array_slice($podcasts, 0, 8)])
|
'podcasts' => array_slice($podcasts, 0, 8),
|
||||||
|
'isPodcast' => $isPodcast])
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@else
|
@else
|
||||||
@@ -98,7 +99,7 @@
|
|||||||
</h4>
|
</h4>
|
||||||
</div>
|
</div>
|
||||||
<div id="tab_more_fragmenten" class="box tab_content podcast_items active">
|
<div id="tab_more_fragmenten" class="box tab_content podcast_items active">
|
||||||
@include('partial/podcastitems', ['id' => 'items-podcasts', 'showTime' => false, 'showImage' => false, 'podcasts' => array_slice($podcasts, 8)])
|
@include('partial/podcastitems', ['id' => 'items-podcasts', 'showTime' => false, 'showImage' => false, 'podcasts' => array_slice($podcasts, 8), 'isPodcast' => $isPodcast])
|
||||||
<a class="btn auto_width" id="meer-nieuws-more-podcast" href="#"
|
<a class="btn auto_width" id="meer-nieuws-more-podcast" href="#"
|
||||||
data-loadmorenews='{"container":["#items-podcasts"]}'>
|
data-loadmorenews='{"container":["#items-podcasts"]}'>
|
||||||
<span class="fas fa-spinner fa-spin" id="loading"></span>
|
<span class="fas fa-spinner fa-spin" id="loading"></span>
|
||||||
|
|||||||
@@ -1,7 +1,11 @@
|
|||||||
@extends('layouts/full')
|
@extends('layouts/full')
|
||||||
|
|
||||||
@section('title')
|
@section('title')
|
||||||
Fragment gemist
|
@if(isset($program))
|
||||||
|
{{ $program->name }}
|
||||||
|
@else
|
||||||
|
NH Gooi Podcast
|
||||||
|
@endif
|
||||||
@endsection
|
@endsection
|
||||||
|
|
||||||
@section('page_class')
|
@section('page_class')
|
||||||
@@ -12,14 +16,12 @@
|
|||||||
<ul class="bread_crumb ">
|
<ul class="bread_crumb ">
|
||||||
<li><a title="Home" href="/">Home</a></li>
|
<li><a title="Home" href="/">Home</a></li>
|
||||||
<li class="separator"><i class="fa-solid fa-chevron-right"></i></li>
|
<li class="separator"><i class="fa-solid fa-chevron-right"></i></li>
|
||||||
<li><a title="Fragment gemist" href="{{route('gemist')}}">Fragment gemist</a></li>
|
<li>NH Gooi podcast</li>
|
||||||
<li class="separator"><i class="fa-solid fa-chevron-right"></i></li>
|
|
||||||
@if(isset($program))
|
@if(isset($program))
|
||||||
<li><a title="{{$program->name}}"
|
|
||||||
href="{{route('gemist.programma') . $program->url}}">{{$program->name}}</a></li>
|
|
||||||
<li class="separator"><i class="fa-solid fa-chevron-right"></i></li>
|
<li class="separator"><i class="fa-solid fa-chevron-right"></i></li>
|
||||||
|
<li><a title="{{$program->name}}"
|
||||||
|
href="/podcast{{$program->url}}">{{$program->name}}</a></li>
|
||||||
@endif
|
@endif
|
||||||
<li>Fragmenten</li>
|
|
||||||
</ul>
|
</ul>
|
||||||
@endsection
|
@endsection
|
||||||
|
|
||||||
@@ -28,8 +30,7 @@
|
|||||||
<div class="row news_post">
|
<div class="row news_post">
|
||||||
<div class="col-12 col-md content_container md_padding_top_80">
|
<div class="col-12 col-md content_container md_padding_top_80">
|
||||||
@if(isset($program))
|
@if(isset($program))
|
||||||
<div class="box full-width post single">
|
<div class="no-box full-width post single">
|
||||||
<h1 class="page_title">{{$program->name}}</h1>
|
|
||||||
<div class="post_body">
|
<div class="post_body">
|
||||||
<div class="content_box clearfix section_margin_top">
|
<div class="content_box clearfix section_margin_top">
|
||||||
<div class="post_content page_margin_top_section ">
|
<div class="post_content page_margin_top_section ">
|
||||||
@@ -43,12 +44,12 @@
|
|||||||
|
|
||||||
<div class="page_layout clearfix">
|
<div class="page_layout clearfix">
|
||||||
<div class="grid" id="items">
|
<div class="grid" id="items">
|
||||||
@include('partial/podcastdirectitems', ['podcasts' => array_slice($podcasts, 0, 2)])
|
@include('partial/podcastdirectitems', ['podcasts' => array_slice($podcasts, 0, 2), 'isPodcast' => $isPodcast])
|
||||||
</div><!--/.row-->
|
</div><!--/.row-->
|
||||||
</div>
|
</div>
|
||||||
@else
|
@else
|
||||||
<div class="box full-width">
|
<div class="box full-width">
|
||||||
<p class="page_body">Er zijn geen fragmenten beschikbaar.</p>
|
<p class="page_body">Er zijn geen items beschikbaar.</p>
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
@@ -62,7 +63,7 @@
|
|||||||
</h4>
|
</h4>
|
||||||
</div>
|
</div>
|
||||||
<div id="tab_more_fragmenten" class="box tab_content podcast_items active">
|
<div id="tab_more_fragmenten" class="box tab_content podcast_items active">
|
||||||
@include('partial/podcastitems', ['id' => 'items-podcasts', 'showTime' => false, 'showImage' => false, 'podcasts' => array_slice($podcasts, 2)])
|
@include('partial/podcastitems', ['id' => 'items-podcasts', 'showTime' => false, 'showImage' => false, 'podcasts' => array_slice($podcasts, 2), 'isPodcast' => $isPodcast])
|
||||||
<a class="btn auto_width" id="meer-nieuws-more-podcast" href="#"
|
<a class="btn auto_width" id="meer-nieuws-more-podcast" href="#"
|
||||||
data-loadmorenews='{"container":["#items-podcasts"]}'>
|
data-loadmorenews='{"container":["#items-podcasts"]}'>
|
||||||
<span class="fas fa-spinner fa-spin" id="loading"></span>
|
<span class="fas fa-spinner fa-spin" id="loading"></span>
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ Route::get('/gemist/fragment/{id}/{title}', 'RadioController@podcast')->where(['
|
|||||||
Route::get('/gemist/programma', 'RadioController@terugluisteren')->name('gemist.programma');
|
Route::get('/gemist/programma', 'RadioController@terugluisteren')->name('gemist.programma');
|
||||||
Route::get('/gemist/programma/{programma}/{title}', 'RadioController@podcasts')->where(['programma' => '\d+']);
|
Route::get('/gemist/programma/{programma}/{title}', 'RadioController@podcasts')->where(['programma' => '\d+']);
|
||||||
|
|
||||||
Route::get('/podcast/{programma}/{title}', 'PodcastController@podcasts')->where(['programma' => '\d+']);
|
Route::get('/podcast/{programma}/{title}', 'PodcastController@podcasts')->where(['programma' => '\d+'])->name('podcast.overzicht');
|
||||||
Route::get('/podcast/fragment/{id}/{title}', 'RadioController@podcast')->where(['id' => '\d+', 'title' => '.*']);
|
Route::get('/podcast/fragment/{id}/{title}', 'RadioController@podcast')->where(['id' => '\d+', 'title' => '.*']);
|
||||||
Route::get('/podcast/aflevering/{id}/{title}', 'PodcastController@podcast')->where(['id' => '\d+']);
|
Route::get('/podcast/aflevering/{id}/{title}', 'PodcastController@podcast')->where(['id' => '\d+']);
|
||||||
Route::get('/podcast/zoeken/{query}', 'RadioController@searchpodcast')->name('gemist.zoeken');
|
Route::get('/podcast/zoeken/{query}', 'RadioController@searchpodcast')->name('gemist.zoeken');
|
||||||
|
|||||||
Reference in New Issue
Block a user