Skip to content

Commit

Permalink
Merge pull request rrze-mmz#42 from rrze-mmz/39-correct-dark-mode-tex…
Browse files Browse the repository at this point in the history
…t-visibility-on-the-lecturers-image-page

Dark mode bugfixes
  • Loading branch information
stefanosgeo authored Feb 1, 2024
2 parents d8ddf81 + c169696 commit 6bb097d
Show file tree
Hide file tree
Showing 6 changed files with 153 additions and 144 deletions.
25 changes: 13 additions & 12 deletions app/Http/Controllers/Frontend/HomeController.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,21 @@ class HomeController extends Controller
*/
public function __invoke(): View
{
$series = Series::whereHas('clips.assets')->isPublic()
->with(['owner', 'presenters', 'clips' => function (ContractsBuilder $query) {
$query->whereHas('assets');
}, 'clips.assets'])
->withLastPublicClip()
->orderByDesc(Clip::select('recording_date')
->whereColumn('series_id', 'series.id')
->has('assets')
->limit(1)
->orderByDesc('recording_date'))
->limit(16)
->get();

return view('frontend.homepage.index', [
'series' => Series::whereHas('clips.assets')->isPublic()
->with(['owner', 'presenters', 'clips' => function (ContractsBuilder $query) {
$query->whereHas('assets');
}, 'clips.assets'])
->withLastPublicClip()
->orderByDesc(Clip::select('recording_date')
->whereColumn('series_id', 'series.id')
->has('assets')
->limit(1)
->orderByDesc('recording_date'))
->limit(16)
->get(),
'series' => $series,
'clips' => Clip::with(['assets', 'presenters'])
->public()
->whereHas('assets')
Expand Down
8 changes: 6 additions & 2 deletions app/Services/OpencastService.php
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ public function getSeries(Series $series)
*/
public function getEventsByStatus(
OpencastWorkflowState $state,
Series $series = null,
?Series $series = null,
int $limit = 20,
): Collection {
$runningWorkflows = collect();
Expand Down Expand Up @@ -213,7 +213,7 @@ public function getEventsByStatusAndByDate(
return $events;
}

public function getEventsWaitingForTrimming(Series $series = null)
public function getEventsWaitingForTrimming(?Series $series = null): Collection
{
$series = (is_null($series)) ? '' : $series->opencast_series_id;
// /admin-ng/event/events.json?filter=comments:OPEN,status:EVENTS.EVENTS.STATUS.PROCESSED&limit=10&offset=0&sort=start_date:ASC
Expand All @@ -232,6 +232,10 @@ public function getEventsWaitingForTrimming(Series $series = null)
Log::error($exception);
}

if ($trimmingEvents->isEmpty()) {
$trimmingEvents['results'] = [];
}

return collect($trimmingEvents['results']);
}

Expand Down
Loading

0 comments on commit 6bb097d

Please sign in to comment.