{{-- One dictionary table's rows + its per-row edit modals + its add modal, split out of index.blade.php so DictionaryController::save() can re-render just this table after an add/edit/delete/move and return it as data.html — see data-replace-target on the js-ajax-form handler in layouts/app.blade.php. Params: $table, $title, $items, $tablesWithAbbr, $commentCategories. The #dictCard_{{ $table }} id is the replace-target the AJAX handler swaps via outerHTML. --}}
@if (in_array($table, $tablesWithAbbr, true))@endif @if ($table === 'classrooms')@endif @if ($table === 'student_statuses')@endif @if ($table === 'comments')@endif @if ($table === 'ent_sections')@endif @forelse ($items as $index => $item) @if (in_array($table, $tablesWithAbbr, true))@endif @if ($table === 'classrooms') @endif @if ($table === 'student_statuses') @endif @if ($table === 'comments') @endif @if ($table === 'ent_sections') @endif @empty @endforelse
# Порядок НазваниеАббревиатураАренда/урокСсылкаКомментарийЦветКатегорияТекстМакс. баллОбязательныйДействия
{{ $item['id'] }}
@csrf
@csrf
{{ $item['name'] ?? '' }}{{ $item['abbreviation'] ?? '' }}{{ $item['rent_per_lesson'] !== null ? number_format((float) $item['rent_per_lesson'], 2) : '—' }} @if ($item['link']) {{ $item['link'] }} @else @endif @if ($item['comment']) {{ $item['comment'] }} @else @endif {{ $item['color'] }}{{ $item['category_id'] }} {{ $item['text'] }}{{ $item['max_score'] }} @if ($item['is_mandatory']) Да @else @endif
@csrf
Записей пока нет
{{-- Edit modals (one per row) --}} @foreach ($items as $item) @endforeach {{-- Add modal --}}