{{-- List of table revisions --}} @extends('layouts.app') @php /** @var \App\Models\Table $table */ /** @var \App\Models\Revision[]|\Illuminate\Support\Collection $revisions */ @endphp @section('content')
@include('table._header-handle')

{{ $table->title }}

@icon(fa-reply, sr:Back to Table)

Table Revisions

@php $revIds = $revisions->pluck('id')->reverse()->values(); @endphp @foreach($revisions as $i => $revision) @php $num = count($revisions) - $i; $isCurrent = $revision->id == $table->revision_id; @endphp
#{{$num}} – {{ $revision->created_at->format('Y-m-d, G:i:s') }} @if($isCurrent) (current) @else (see table in this revision) @endif
@if($revision->ancestor_id) @if ($revIds->contains($revision->ancestor_id)) Based on #{{ 1+$revIds->search($revision->ancestor_id) }} @else Forked from elsewhere @endif @endif
{{ $revision->note }}
@if(!$isCurrent && authed() && user()->ownsTable($table)) Set as current @endif
@endforeach
@endsection