From e730cd4856712b99339a2c299632ec44f7974803 Mon Sep 17 00:00:00 2001 From: mirivlad Date: Thu, 26 Mar 2026 17:26:30 +0800 Subject: [PATCH] =?UTF-8?q?Feat:=20=D0=A3=D0=BB=D1=83=D1=87=D1=88=D0=B5?= =?UTF-8?q?=D0=BD=20UI=20=D1=81=D0=BF=D0=B8=D1=81=D0=BA=D0=B0=20=D0=B2?= =?UTF-8?q?=D0=BE=D0=BF=D1=80=D0=BE=D1=81=D0=BE=D0=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ✅ Таблица вместо списка (удобно для 40-50+ вопросов) ✅ Иконки для типов вопросов: - single_choice: 📻 (radio button) - multiple_choice: ✅ (checkbox) - input: 📝 (textarea) - matching: ↔️ (arrows) ✅ Purple badge для matching ✅ Номер вопроса, баллы, кол-во ответов в таблице Co-authored-by: Qwen-Coder --- .../views/admin/questions/index.blade.php | 17 +++-- resources/views/admin/tests/show.blade.php | 67 ++++++++++++++----- resources/views/layouts/app.blade.php | 5 ++ 3 files changed, 70 insertions(+), 19 deletions(-) diff --git a/resources/views/admin/questions/index.blade.php b/resources/views/admin/questions/index.blade.php index e56200f..f5fff8b 100644 --- a/resources/views/admin/questions/index.blade.php +++ b/resources/views/admin/questions/index.blade.php @@ -19,11 +19,20 @@
- {{ $question->type }} - #{{ $loop->iteration }}. {{ Str::limit($question->question_text, 100) }} + #{{ $loop->iteration }} + @if($question->type === 'single_choice') + + @elseif($question->type === 'multiple_choice') + + @elseif($question->type === 'input') + + @elseif($question->type === 'matching') + + @endif + {{ Str::limit($question->question_text, 100) }}
- {{ $question->answers->count() }} ответов - @if($question->is_required)Обязательный@endif + {{ $question->answers->count() }} ответов@if($question->matchingPairs->count() > 0), {{ $question->matchingPairs->count() }} пар@endif + @if($question->is_required) Обязательный@endif {{ $question->score }} балл(а)
diff --git a/resources/views/admin/tests/show.blade.php b/resources/views/admin/tests/show.blade.php index e2eeb2b..a6f0b2c 100644 --- a/resources/views/admin/tests/show.blade.php +++ b/resources/views/admin/tests/show.blade.php @@ -32,27 +32,64 @@
-
+
-
Вопросы
+
Вопросы ({{ $test->questions->count() }})
@if($test->questions->count() > 0) - +
+ + + + + + + + + + + + + @foreach($test->questions as $question) + + + + + + + + + @endforeach + +
#ВопросТипБаллыОтветовДействия
{{ $loop->iteration }} + + {{ Str::limit($question->question_text, 80) }} + + @if($question->is_required)@endif + + @if($question->type === 'single_choice') + + @elseif($question->type === 'multiple_choice') + + @elseif($question->type === 'input') + + @elseif($question->type === 'matching') + + @endif + {{ $question->type }} + {{ $question->score }}{{ $question->answers->count() }}@if($question->matchingPairs->count() > 0) + {{ $question->matchingPairs->count() }} пар@endif +
+ +
+ @csrf @method('DELETE') + +
+
+
+
@else

Нет вопросов

@endif diff --git a/resources/views/layouts/app.blade.php b/resources/views/layouts/app.blade.php index aba843c..436dc10 100644 --- a/resources/views/layouts/app.blade.php +++ b/resources/views/layouts/app.blade.php @@ -48,6 +48,11 @@ .card-stat { border-left: 4px solid var(--primary-color); } + + .badge-purple { + background-color: #6f42c1; + color: white; + } @stack('styles')