@php $tab = 'add-rows'; /** @var \App\Tables\Column[] $columns */ /** @var \App\Tables\Changeset $changeset */ /** @var \App\Models\Row[]|Illuminate\Pagination\Paginator $rows */ /** @var \App\Models\Table $table */ @endphp @extends('table.propose.layout') @section('tab-content')
@csrf {!! Widget::header(3, "Import CSV") !!} @php $cols = []; foreach ($columns as $column) { $cols[] = ''.e($column->title) . ''; } @endphp {!! Widget::par('Append rows from pasted CSV lines or uploaded CSV file') !!} {{-- TODO interactive widget to select which cols are included, and in which order --}} {!! Widget::labeledPar('Columns', implode(', ', $cols), '', false) !!} {!! Widget::textarea('data', 'CSV as text')->help(' Comma-separated values, one row per line. Do not put spaces after commas, they would be included in the values. ')->minHeight('10em') !!} {!! Widget::file('csv-file', 'CSV file')->accept("text/csv") !!}
@stop @push('scripts') @endpush