@extends('agency.layouts.app') @section('title', $folder->name) @section('page_title', 'Disk') @php $fmtBytes = function ($bytes) { $bytes = (float) $bytes; $units = ['B', 'KB', 'MB', 'GB', 'TB']; $i = 0; while ($bytes >= 1024 && $i < count($units) - 1) { $bytes /= 1024; $i++; } return ($i === 0 ? number_format($bytes, 0) : number_format($bytes, 1, ',', '.')) . ' ' . $units[$i]; }; $color = $folder->color_code ?: '#64748b'; $crumbs = [['Disk', route('agency.disk.index')]]; foreach ($breadcrumbs as $crumb) { $crumbs[] = [$crumb['name'], $crumb['id'] === $folder->id ? null : route('agency.disk.folders.show', $crumb['id'])]; } $items = $folder->items; $images = $items->filter->isImage()->values(); $lightboxImages = $images->map(fn ($i) => ['id' => $i->id, 'name' => $i->title ?: $i->original_name, 'url' => Storage::url($i->file_path)])->values(); $title = e($folder->name) . ($folder->is_system ? ' Sistem klasörü' : '') . (!$folder->is_public ? '' : ' Açık'); @endphp @section('content')
@include('agency.disk.partials.head', [ 'title' => $title, 'icon' => $folder->icon_class, 'iconColor' => $color, 'crumbs' => $crumbs, 'actions' => ' Alt klasör' . '' . '', ]) @if($isBrandFolder && $brandAgency) @include('agency.disk.partials.brand-slots', ['agency' => $brandAgency]) @endif {{-- Sürükle-bırak yükleme --}} @if($folder->children->count())
Alt klasörler {{ $folder->children->count() }}
@foreach($folder->children as $child) @php $cc = $child->color_code ?: '#64748b'; @endphp {{ $child->name }} {{ $child->item_count }} dosya · {{ $fmtBytes($child->total_size_bytes) }} @endforeach
@endif
Dosyalar {{ $items->count() }} @if($folder->description) {{ Str::limit($folder->description, 80) }} @endif
@if($items->count())
@endif
@if($items->count()) {{-- Izgara --}}
@foreach($items as $item) @php $imgIndex = $images->search(fn ($i) => $i->id === $item->id); @endphp
@if($item->is_featured)@endif @if($item->is_public)@endif
@include('agency.disk.partials.file-visual', ['item' => $item])
{{ $item->title ?: $item->original_name }}
{{ $item->formatted_file_size }}@if($item->width) · {{ $item->width }}×{{ $item->height }}@endif
@endforeach
{{-- Liste --}} @else
Bu klasör boş Dosyaları yukarıdaki alana sürükleyin ya da “Dosya yükle”ye tıklayın.
@endif
0 seçili
{{-- Görsel önizleme --}}
@endsection @push('scripts') @endpush