@extends('adminlte::page') @section('title', 'Bank Materi') @section('plugins.Datatables', true) @push('css') @endpush @section('content')
{{-- HEADER SECTION --}}

Bank Materi

Kelola bahan ajar digital Anda di satu tempat.

{{-- STATS SECTION --}}
Total Materi

{{ $materis->count() }}

Video / Youtube

{{ $materis->where('type', 'youtube')->count() }}

Dokumen (PDF/Doc)

{{ $materis->whereIn('type', ['pdf', 'file'])->count() }}

{{-- TABLE CARD --}}
@foreach($materis as $index => $materi) {{-- KONTEN MATERI (Rich Cell) --}} {{-- TARGET KELAS --}} {{-- STATUS --}} {{-- AKSI --}} @endforeach
# Konten Materi Target Kelas Status Aksi
{{ $index + 1 }}
{{-- Thumbnail --}}
@if($materi->type == 'youtube') YT
@elseif($materi->type == 'pdf') @else @endif
{{-- Detail --}}
@php $badgeClass = match($materi->type) { 'youtube' => 'badge-video', 'pdf' => 'badge-pdf', default => 'badge-doc' }; $typeLabel = match($materi->type) { 'youtube' => 'Video Pembelajaran', 'pdf' => 'E-Book / PDF', default => 'Dokumen' }; @endphp {{ $typeLabel }} {{ $materi->title }}
{{ $materi->subject->nama_mapel ?? 'Umum' }} {{ $materi->created_at->diffForHumans() }}
@if($materi->classLevel)
{{ substr($materi->classLevel->nama_kelas, 0, 2) }}
{{ $materi->classLevel->nama_kelas }}
@else Semua Kelas @endif
@if($materi->is_active) Dipublikasikan @else Draft @endif
@if($materis->isEmpty())
Belum Ada Materi

Mulai bagikan ilmu dengan mengupload materi pertama Anda.

@endif
@stop @section('js') @stop