@php $tab = 'review'; /** @var \App\Tables\Changeset $changeset */ /** @var \App\Models\Table $table */ $numChangedRows = count($changeset->rowUpdates); $numNewRows = count($changeset->newRows); $numRemovedRows = count($changeset->removedRows); $anyRowChanges = $numChangedRows || $numNewRows || $numRemovedRows; $numChangedColumns = count($changeset->columnUpdates); $numNewColumns = count($changeset->newColumns); $numRemovedColumns = count($changeset->removedColumns); $colsReordered = !empty($changeset->columnOrder); $anyColChanges = $numChangedColumns || $numNewColumns || $numRemovedColumns || $colsReordered; $anyChanges = $anyRowChanges || $anyColChanges; @endphp @extends('table.propose.layout') @section('tab-content')
{!! Widget::header(3, 'Change Summary') !!}
Rows
@if($anyRowChanges) @if($numChangedRows)
{{ $numChangedRows }} changed
@endif @if($numNewRows)
{{ $numNewRows }} new
@endif @if($numRemovedRows)
{{ $numRemovedRows }} removed
@endif @else No changes @endif
Columns
@if($anyColChanges) @if($numChangedColumns)
{{ $numChangedColumns }} changed
@endif @if($numNewColumns)
{{ $numNewColumns }} new
@endif @if($numRemovedColumns)
{{ $numRemovedColumns }} removed
@endif @if($colsReordered)
Order changed
@endif @else No changes @endif
{!! Widget::textarea('note', 'Summary')->value($changeset->note) ->help(user()->ownsTable($table) ? "Describe changes you made to the table; this message will annotate the new table revision." : "Describe you suggested changes. The table owner will read this message and review your changes before deciding whether to accept the proposal." )->minHeight('8em') !!}
@stop