{{-- 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Действия |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| {{ $item['id'] }} | {{ $item['name'] ?? '' }} | @if (in_array($table, $tablesWithAbbr, true)){{ $item['abbreviation'] ?? '' }} | @endif @if ($table === 'classrooms'){{ $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 | @endif @if ($table === 'student_statuses'){{ $item['color'] }} | @endif @if ($table === 'comments'){{ $item['category_id'] }} | {{ $item['text'] }} | @endif @if ($table === 'ent_sections'){{ $item['max_score'] }} | @if ($item['is_mandatory']) Да @else — @endif | @endif||
| Записей пока нет | ||||||||||||