{{-- 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' || $table === 'disciplines'){{ __('Цвет') }} | @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 === 'disciplines')@if (!empty($item['color'])) {{ $item['color'] }} @else — @endif | @endif @if ($table === 'classrooms'){{ $item['rent_per_lesson'] !== null ? number_format((float) $item['rent_per_lesson'], 2) : '—' }} | {{ $item['capacity'] ?? '—' }} | @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||
| {{ __('Записей пока нет') }} | ||||||||||||||