@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) && strlen(trim($changeset->note)) > 0; @endphp @extends('table.propose.layout') @section('tab-content')
{!! Widget::header(3, 'Change Summary') !!}
Rows
@if($anyRowChanges) @if($numChangedRows)
{{ $numChangedRows }} changed Reset
@endif @if($numNewRows)
{{ $numNewRows }} new Reset
@endif @if($numRemovedRows)
{{ $numRemovedRows }} removed Reset
@endif @else No changes @endif
Columns
@if($anyColChanges) @if($numChangedColumns)
{{ $numChangedColumns }} changed Reset
@endif @if($numNewColumns)
{{ $numNewColumns }} new Reset
@endif @if($numRemovedColumns)
{{ $numRemovedColumns }} removed Reset
@endif @if($colsReordered)
Order changed Reset
@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') !!}
@if(user()->ownsTable($table)) @icon(fa-save fa-pr)Save & Apply @else @icon(fa-paper-plane-o fa-pr)Submit for review @endif @if($anyRowChanges || $anyColChanges) Write a summary to submit your changes. @else No changes to submit. @endif
@stop @push('scripts') @endpush