@php($is_label = in_array($item->type, ["heading", "text_field", "ending_text"]) ? true : false) @php($color = $is_label ? 'info' : 'success') @php($editing = !$is_label && $item->id == request('question_id')) @if(!$editing) @component('components.cards.status', ['color'=> $color, 'class' => 'mb-4 quiz-element '.($editing ? 'in_progress_question' : ''), 'attributes' => 'data-type='.$item->type.' data-id='.$item->id])
{{-- content --}}
{!! config('dgc-icons.'.$item->type) !!} @if(!$is_label) {{ $item->getQuestionLabel() }} @else {{ $item->title }} @endif @if(!$is_label) @if($item->is_required) {{ __('bdd.questions.is_required.s') }} @else {{ __('bdd.questions.is_required.n') }} @endif @if($item->hasCondition()) {{ __('bdd.questions.is_condition.s') }} @else {{ __('bdd.questions.is_condition.n') }} @endif @if($item->isRandom()) {{ __('bdd.questions.is_random.s') }} @endif @endif
@if($editing) {{ __('labels.in_progress') }} @endif
{{-- answers --}} @include('forms.quizs.answers', ['item' => $item, 'is_label' => $is_label])
{{-- params --}}
{!! config('dgc-icons.gear') !!} @if (!$is_label) @if($questions_count > 1) {!! config('dgc-icons.shuffle') !!} @endif {!! config('dgc-icons.prescription') !!} @if($questions_count > 1) {!! config('dgc-icons.arrow-down') !!} @endif @endif
@endcomponent @else {{-- ENCOURS D'EDITION --}}
{!! config('dgc-icons.'.$item->type) !!} {{ $item->getQuestionLabel() }} {{ __('labels.in_progress') }}
@endif