@if($currentFolder)
我的專案資料夾
@foreach($breadcrumb as $crumb)
@if(!$loop->last)
$crumb->id]) }}" style="color:var(--bs-secondary-color);font-size:.95rem;text-decoration:none;">{{ $crumb->title }}
@else
{{ $crumb->title }}
@endif
@endforeach
@else
我的專案資料夾
@endif
{{-- Filter chips + view toggle --}}
此資料夾是空的
@can('contributeDoc', $project)
點擊上方按鈕新增文件或資料夾 @endcan
@else
@php
$folders = $items->where('file_type', 'folder');
$files = $items->where('file_type', '!=', 'folder');
@endphp
{{-- ===== GRID VIEW ===== --}}
{{-- ===== LIST VIEW (Google Drive style) ===== --}}
點擊上方按鈕新增文件或資料夾 @endcan
{{-- Header --}}
@foreach($items as $item)
@php
$isFolder = $item->file_type === 'folder';
$isSheet = $item->file_type === 'spreadsheet';
$isFile2 = $item->file_type === 'file';
$isPres2 = $item->file_type === 'presentation';
$isMind2 = $item->file_type === 'mindmap';
$isDraw2 = $item->file_type === 'drawing';
$typeLabel = $isFolder ? '資料夾' : ($isFile2 ? '附件' : ($isSheet ? '試算表' : ($isPres2 ? '簡報' : ($isMind2 ? '心智圖' : ($isDraw2 ? '繪圖' : '文件')))));
$ownerLabel = $item->author?->name ?? '—';
$locationLabel = $currentFolder ? $currentFolder->title : '我的專案資料夾';
@endphp
名稱
位置
類型
擁有者
修改日期
{{-- Name --}}
{{-- Location --}}
@endforeach
@if($isFolder)
@elseif($isFile2)
@elseif($isSheet)
@elseif($isPres2)
@elseif($isMind2)
@elseif($isDraw2)
@else
@endif
{{ $item->title }}
{{ $locationLabel }}
{{-- Type --}}
{{ $typeLabel }}
{{-- Owner --}}
{{ $ownerLabel }}
{{-- Date --}}
{{ $item->updated_at->format('Y-m-d') }}
{{-- Actions --}}
@if(!$isFolder && $isFile2)
@php $isPlainText2 = in_array(strtolower(pathinfo($item->title, PATHINFO_EXTENSION)), ['txt','md'], true); @endphp
@if($isPlainText2)
編輯
@else
預覽
@endif
@endif
@if(!$isFolder)
{{ $isFile2 ? '下載' : '編輯' }}
@endif
@can('contributeDoc', $project)
@endcan