@extends('layouts.app') @section('mobile-title', 'Edit Metadata') @section('mobile-subtitle', $document->title) @section('mobile-back', route('documents.show', $document)) @section('content') @php $mime = $document->mime_type ?? ''; $name = strtolower($document->original_name ?? ''); $fileIcon = match (true) { str_contains($mime, 'pdf') || str_ends_with($name, '.pdf') => ['picture_as_pdf', 'text-red-700'], str_starts_with($mime, 'image/') => ['image', 'text-[var(--construct-secondary)]'], str_contains($mime, 'spreadsheet') || str_ends_with($name, '.csv') || str_ends_with($name, '.xlsx') => ['table_chart', 'text-emerald-800'], str_contains($mime, 'word') || str_ends_with($name, '.doc') || str_ends_with($name, '.docx') => ['description', 'text-[var(--construct-secondary)]'], default => ['draft', 'text-[var(--construct-muted)]'], }; $humanSize = $document->size >= 1048576 ? number_format($document->size / 1048576, 1).' MB' : number_format(max($document->size, 1) / 1024, 1).' KB'; $tagsValue = old('tags', collect($document->tags ?? [])->implode(', ')); @endphp
@csrf @method('PATCH')
Document Centre chevron_right {{ $folder->name }} chevron_right Edit Document
{{ $fileIcon[0] }}

{{ $document->original_name }}

Edit Metadata

Cancel
@endsection