@extends('backend.layouts.app') @section('title', \App\Http\Helpers\MenuHelper::getPageTitle()) @section('content') @include('backend.module._index-reset-button')

All Videos

@can('content-video.create') Create @endcan
@if(!$cat)
Use the Category filter above to view videos under a specific category, then drag & drop to reorder.
@elseif($cat && count($videos) <= 1)
Add at least 2 videos in this category to enable drag & drop reordering.
@endif
@forelse($videos as $video) @php $mainTranslation = $video->translations->firstWhere('video_translation_main', 1) ?? $video->translations->first(); @endphp @empty @endforelse
# Title Category Status Sort Actions
@if($cat) @if(count($videos) > 1) @else @endif @else @endif {{ ($videos->currentPage() - 1) * $videos->perPage() + $loop->iteration }} {{ $mainTranslation->video_translation_title ?? '-' }} @if($video->translations->count() > 1) {{ $video->translations->count() }} languages @endif {{ $categories[$video->video_category] ?? $video->video_category ?? '-' }} @php $rawStatus = $video->video_status; $statusBadge = [ 'ACTIVE' => 'bg-success-50 text-success-600 dark:bg-success-500/10 dark:text-success-400', 'INACTIVE' => 'bg-error-50 text-error-600 dark:bg-error-500/10 dark:text-error-400', 'ARCHIVE' => 'bg-gray-100 text-gray-600 dark:bg-gray-800 dark:text-gray-400', ][$rawStatus] ?? 'bg-gray-100 text-gray-600 dark:bg-gray-800 dark:text-gray-400'; $statusLabel = $rawStatus ? ($statuses[$rawStatus] ?? ucfirst(strtolower($rawStatus))) : '-'; $publishStart = $video->publish_start; $publishEnd = $video->publish_end; $hasWindow = $publishStart || $publishEnd; $isEnded = $publishEnd && now()->gt($publishEnd); $isUpcoming = ! $isEnded && $publishStart && now()->lt($publishStart); $windowTextClass = $isEnded ? 'text-error-600 dark:text-error-500' : ($isUpcoming ? 'text-warning-600 dark:text-warning-400' : 'text-gray-500 dark:text-gray-400'); @endphp {{ $statusLabel }} @if($hasWindow)
START @if($publishStart) {{ $publishStart->format('d/m/Y h:i A') }} @else No start date @endif END @if($publishEnd) {{ $publishEnd->format('d/m/Y h:i A') }} @else No end date @endif
@endif
{{ $video->video_sorting ?? '-' }}
@can('content-video.update') @endcan @can('content-video.delete')
@csrf @method('DELETE')
@endcan

No videos found

Click "Create" to add your first entry.

{{ $videos->appends(request()->query())->links('vendor.pagination.custom') }}
@endsection @push('scripts') @endpush