@extends('layouts.app') @section('title', $file->name) @section('page', 'files') @section('content') @php $latest = $file->versions->first(); @endphp All files

{{ $file->name }} {{ badge('Latest version', 'b-blue', true) }}

@if ($file->project){{ $file->project->name }}, @endif uploaded by {{ $latest?->uploaded_by === auth()->id() ? 'you' : $latest?->uploader?->name }} {{ strtolower(d_smart($latest?->created_at)) }} at {{ $latest?->created_at?->format('H:i') }}

Download
@if ($file->isPreviewable()) @include('partials.canvas', ['file' => $file, 'pins' => collect(), 'radius' => 'var(--radius)']) @else
{{ $file->extShort() }}No preview for this file typeDownload it to open it on your computer.
@endif

Details

Type
{{ $file->typeName() }}
Size
{{ file_size($file->size()) }}
Project
{{ $file->project?->name }}
Folder
{{ $file->folderName() }}
@if ($file->approval)
Approval
{{ ['waiting' => 'Waiting for approval', 'changes_requested' => 'Changes requested', 'approved' => 'Approved'][$file->approval->status] }}
@endif

Version history

{{ plural($file->versions->count(), 'version') }}
@foreach ($file->versions as $i => $v)
v{{ $v->version_no }}{{ $i ? '' : ', latest' }}
{{ $v->uploaded_by === auth()->id() ? 'You' : $v->uploader?->name }}, {{ strtolower(d_smart($v->created_at)) === 'today' ? 'today' : d_smart($v->created_at) }}.{{ $v->change_note ? ' '.rtrim($v->change_note, '.').'.' : '' }}
@endforeach

Activity

    @forelse ($activity as $a)
  • {{ av($a->causer, 'sm') }}
    {{ $a->causer_id === auth()->id() ? 'You' : $a->causer?->name }} {{ $a->description }}
  • @empty
  • No activity yet.
  • @endforelse
@include('partials.share-modal', ['file' => $file, 'action' => route('portal.files.share', $file)]) @endsection