@extends('layouts.dashboard') @section('content') @php /** * Admin → Media library (all tenants). Browse every restaurant's uploaded assets * with a restaurant / kind / search filter and a per-tile owner label; remove any. * * @var array $items media rows for this page * @var array $restaurants [id,name] for the filter dropdown * @var array $names id => restaurant name (tile owner labels) * @var int $ridFilter active restaurant filter (0 = all) * @var string $kind active kind filter ('' | image | video) * @var string $search active search term * @var array $pager paginate() metadata */ @endphp @php /* .qm-d2: the dashboard density standard (app.css §35) */ @endphp
@php // Page primary action -> top-bar subheader slot, exactly like the vendor library. @endphp @php ob_start(); @endphp {{ t_raw('nav.media_add') }} @php \App\Support\View::slot('subhead', ob_get_clean()); @endphp
@php /* Stated once, here, rather than inside the crop modal: what a crop produces is a property of the library (every asset is re-encoded on the way in), not of the rectangle someone happens to be dragging. Standard .qm-tip. */ @endphp
@if (!count($items))

{{ t_raw('admin.media.empty') }}

@else
@foreach ($items as $it) @php $ownerId = $it['restaurant_id'] !== null ? (int) $it['restaurant_id'] : 0; @endphp
@if (($it['kind'] ?? 'image') === 'video') @php /* A clip is a lightbox trigger exactly like the images beside it — the overlay swaps its for a playing
@endforeach
@partial('table-toolbar', ['pager' => $pager, 'base' => '/admin/media']) @endif
@php /* /.qm-d2 */ @endphp @endsection