@extends('layouts.app') @section('title', 'إدارة الدروس') @section('content')
{{-- Breadcrumb + Header --}}
{{-- Export CSV (يحافظ على البارامترات الحالية) --}} تصدير CSV {{-- زر إضافة يفتح Modal الإنشاء --}}
{{-- Hero Stats --}}
{{-- Toolbar: Search + Filters --}}
{{-- Tabs بالأنواع والحالة (تبدّل Query Params) --}}
@php $activeType = $filters['type'] ?? null; @endphp @php $countsByType = $stats['by_type'] ?? []; @endphp الكل درس {{ $countsByType['video'] ?? 0 }} صوت {{ $countsByType['audio'] ?? 0 }}
@php $pub = $filters['is_published']; @endphp جميع الحالات منشور مسودة
{{-- زر فلاتر متقدمة (Offcanvas) --}}
{{-- Table --}}
@php $makeSort = function ($col) use ($sort, $direction) { $dir = $sort === $col && $direction === 'asc' ? 'desc' : 'asc'; return request()->fullUrlWithQuery(['sort' => $col, 'direction' => $dir]); }; $dirIcon = fn($col) => $col !== $sort ? 'fa-sort' : ($direction === 'asc' ? 'fa-arrow-up-a-z' : 'fa-arrow-down-z-a'); @endphp @forelse($videos as $v) @empty @endforelse
# العنوان المادة النوع المشاهدات المدة الترتيب الحالة مجاني؟ الملف الصورة إجراءات
{{ $v->id }}
{{ $v->title }}
@if ($v->description)
{{ $v->description }}
@endif
{{ optional($v->course)->title ?? '-' }} {{ $v->type }} {{ number_format($v->views) }} {{ $v->duration ?? '00:00:00' }} {{ $v->order }} @if ($v->is_published) منشور @else مسودة @endif @if ($v->is_free) نعم @else لا @endif @if ($v->path_url) فتح @else لا يوجد @endif @if ($v->thumbnail_url) thumb @else لا يوجد @endif
{{-- Show --}} {{-- Edit --}} {{-- Delete --}}
لا توجد بيانات بعد.
{{-- Pagination --}}
{{-- Offcanvas Filters --}}
فلاتر متقدمة
{{-- حافظ على search والفرز والصفحة الحالية --}}
تفريغ
{{-- Modals --}} @include('dashboard.videos.modals.create', ['courses' => $courses]) @include('dashboard.videos.modals.edit', ['courses' => $courses]) @include('dashboard.videos.modals.show') @include('dashboard.videos.modals.delete') {{-- Toasts (نجاح/فشل) --}}
@if (session('success')) @endif @if ($errors->any()) @endif
@endsection @push('styles') @endpush @push('scripts') @endpush