File tree 3 files changed +44
-0
lines changed
3 files changed +44
-0
lines changed Original file line number Diff line number Diff line change @@ -416,6 +416,19 @@ final public function playlists(): \Illuminate\Database\Eloquent\Collection
416
416
->get ();
417
417
}
418
418
419
+ /**
420
+ * @return ?\Illuminate\Database\Eloquent\Collection<int, TmdbMovie>
421
+ */
422
+ #[Computed]
423
+ final public function collectionMovies (): ?\Illuminate \Database \Eloquent \Collection
424
+ {
425
+ if (!$ this ->work instanceof TmdbMovie) {
426
+ return null ;
427
+ }
428
+
429
+ return $ this ->work ->collections ->first ()?->movies;
430
+ }
431
+
419
432
final public function alertConfirm (): void
420
433
{
421
434
if (!auth ()->user ()->group ->is_modo ) {
@@ -563,6 +576,7 @@ final public function render(): \Illuminate\Contracts\View\Factory|\Illuminate\C
563
576
'regions ' => $ this ->regions ,
564
577
'distributors ' => $ this ->distributors ,
565
578
'playlists ' => $ this ->playlists ,
579
+ 'collectionMovies ' => $ this ->collectionMovies ,
566
580
]);
567
581
}
568
582
}
Original file line number Diff line number Diff line change 15
15
16
16
return [
17
17
'born ' => 'Born: ' ,
18
+ 'collection ' => 'Collection ' ,
18
19
'collections ' => 'Collections ' ,
19
20
'companies ' => 'Companies ' ,
20
21
'disclaimer ' => 'This product uses the TMDb API but is not endorsed or certified by TMDb. ' ,
Original file line number Diff line number Diff line change @@ -1023,6 +1023,35 @@ class="form__button form__button--text"
1023
1023
</table >
1024
1024
</div >
1025
1025
</section >
1026
+ @if ($collectionMovies ?-> isNotEmpty () )
1027
+ <section class =" panelV2" >
1028
+ <header class =" panel__header" >
1029
+ <h2 class =" panel__heading" >{{ __ (' mediahub.collection' ) } } </h2 >
1030
+ <div class =" panel__actions" x-data =" posterRow" >
1031
+ <div class =" panel__action" >
1032
+ <button class =" form__standard-icon-button" x-bind =" scrollLeft" >
1033
+ <i class =" {{ \config (' other.font-awesome' ) } } fa-angle-left" ></i >
1034
+ </button >
1035
+ </div >
1036
+ <div class =" panel__action" >
1037
+ <button class =" form__standard-icon-button" x-bind =" scrollRight" >
1038
+ <i class =" {{ \config (' other.font-awesome' ) } } fa-angle-right" ></i >
1039
+ </button >
1040
+ </div >
1041
+ </div >
1042
+ </header >
1043
+ <div
1044
+ class =" panel__body collection-posters"
1045
+ x-ref =" posters"
1046
+ style =" max-height : 330px !important "
1047
+ >
1048
+ @foreach ($collectionMovies as $collectionMovie )
1049
+ <x-movie .poster :movie =" $collectionMovie" :categoryId =" $category->id" />
1050
+ @endforeach
1051
+ </div >
1052
+ </section >
1053
+ @endif
1054
+
1026
1055
@if ($playlists -> isNotEmpty () )
1027
1056
<section class =" panelV2" >
1028
1057
<header class =" panel__header" >
You can’t perform that action at this time.
0 commit comments