From: Stephen Cameron Date: Mon, 8 Nov 2021 20:41:14 +0000 (+0100) Subject: WIP #4821 @5 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=536d70a44297b87cd72e66323704e2a19a079b91;p=odl.git WIP #4821 @5 --- diff --git a/resources/views/front/media-library.blade.php b/resources/views/front/media-library.blade.php index b76de3f..fdb4abe 100644 --- a/resources/views/front/media-library.blade.php +++ b/resources/views/front/media-library.blade.php @@ -88,42 +88,80 @@ '4' => "Système d'information", '8' => "Conditions techniques", ]; + + // Format arrays for use on frontend + $media_filters = collect($media_types)->mapWithKeys(function($item, $key) { + return ["media-$key" => $item]; + }); + $theme_filters = collect($themes)->mapWithKeys(function($item, $key) { + return ["theme-$key" => $item]; + }); + $filters = array_merge($media_filters->toArray(), $theme_filters->toArray()); + + // TODO: Implement Isotope JS for class-based filtering @endphp -

Médiathèque

+
- {{-- FILTERS --}} -
- Filtrer -
+

Médiathèque

- {{-- MEDIA LIBRARY GRID --}} -
- @foreach ($media as $item) -
-
- {{-- TODO: play button --}} - {{-- TODO: media length --}} -
-
- {{ $item['theme']['title'] }} + {{-- FILTERS --}} +
+ + Filtrer + + + {{-- ACTIVE FILTERS (JS) --}} + +
+ + {{-- MEDIA LIBRARY GRID --}} +
+ @foreach ($media as $item) +
+
+ {{-- TODO: play button --}} + {{-- TODO: media length --}} +
+
+ {{ $item['theme']['title'] }} +
+
+ {{ $item['title'] }} +
-
- @endforeach -
+ @endforeach +
-
{{-- FILTERING INTERFACE --}}
Média
@foreach($media_types as $media_type_id => $media_type) -
- -
+ @endforeach
@@ -170,13 +214,20 @@

Thème

@foreach($themes as $theme_id => $theme) -
- -
+ @endforeach
@@ -185,17 +236,18 @@
- -
+ + + @endsection