@if(session()->has('success'))
{{ session('success') }}
@endif @if(session()->has('error'))
{{ session('error') }}
@endif

Aset Digital

Galeri Aset

Cari, lihat, dan kelola media dokumentasi Ponpes.

@if(in_array(auth()->user()->role, ['admin', 'user'], true)) @endif
@if(count($selectedAssetIds) > 0)
@if(auth()->user()->role === 'admin') @endif
@endif
@forelse($assets as $asset) @php $type = strtolower($asset->file_type); $cardColors = match($type) { 'pdf' => [ 'bg' => 'bg-red-50/70', 'border' => 'border-red-100', 'text' => 'text-red-700', 'icon' => '' ], 'psd' => [ 'bg' => 'bg-indigo-50/70', 'border' => 'border-indigo-100', 'text' => 'text-indigo-700', 'icon' => '' ], 'cdr' => [ 'bg' => 'bg-emerald-50/70', 'border' => 'border-emerald-100', 'text' => 'text-emerald-700', 'icon' => '' ], 'zip', 'rar' => [ 'bg' => 'bg-amber-50/70', 'border' => 'border-amber-100', 'text' => 'text-amber-700', 'icon' => '' ], 'doc', 'docx' => [ 'bg' => 'bg-blue-50/70', 'border' => 'border-blue-100', 'text' => 'text-blue-700', 'icon' => '' ], 'xls', 'xlsx' => [ 'bg' => 'bg-emerald-50/70', 'border' => 'border-emerald-100', 'text' => 'text-emerald-700', 'icon' => '' ], 'mp4', 'mkv', 'avi' => [ 'bg' => 'bg-teal-50/70', 'border' => 'border-teal-100', 'text' => 'text-teal-700', 'icon' => '' ], default => [ 'bg' => 'bg-slate-50/70', 'border' => 'border-slate-100', 'text' => 'text-slate-700', 'icon' => '' ] }; @endphp
@if($asset->thumbnail_path) {{ $asset->title }} {{ $asset->file_type }} @else
{!! $cardColors['icon'] !!} {{ $asset->file_type }}
@endif @if($asset->is_public) Publik @endif
{{ $asset->category->name ?? 'Uncategorized' }} {{ $asset->title }}

{{ number_format($asset->file_size) }} KB

{{ $asset->created_at->format('d M Y') }}

@if($asset->tags->isNotEmpty())
@foreach($asset->tags->take(2) as $tag) #{{ $tag->name }} @endforeach @if($asset->tags->count() > 2) +{{ $asset->tags->count() - 2 }} @endif
@endif
@if(auth()->user()->role === 'admin') @endif
@empty

Tidak ada aset digital yang ditemukan.

@endforelse
{{ $assets->links() }}
@if(in_array(auth()->user()->role, ['admin', 'super_admin'], true))
@endif @if($bulkEditModal)
@endif @if(in_array(auth()->user()->role, ['admin', 'super_admin'], true)) @if($categoryModal)
@endif @if($tagModal)
@endif @endif