@extends('layouts.master') @section('content')
@if ($step === 1) @lang('descriptions.monothema-detailed-voting.crud') @elseif ($step === 2) @lang('descriptions.monothema-detailed-voting.request-approval') @endif
@if (Helper::createMode()) @if (isset($voting))
@else @endif @elseif (Helper::editMode()) @endif @csrf @php for ($i = 1; $i <= 6; $i++) { ${"option_title_$i"} = ''; ${"option_description_$i"} = ''; ${"option_image_$i"} = ''; ${"option_image_URL_$i"} = ''; } if (isset($voting)) { if (isset($voting->option_list) && count($voting->option_list) > 0) { for ($i = 1; $i <= 6; $i++) { if (isset($voting->option_list[$i - 1])) { ${"option_title_$i"} = $voting->option_list[$i - 1]['title']; ${"option_description_$i"} = $voting->option_list[$i - 1]['description']; ${"option_image_$i"} = $voting->option_list[$i - 1]['image']; } } } } else { for ($i = 1; $i <= 6; $i++) { if (old("option-title-$i")) { ${"option_title_$i"} = old("option-title-$i"); } if (old("option-description-$i")) { ${"option_description_$i"} = old("option-description-$i"); } if (old("option-image-$i")) { ${"option_image_$i"} = old("option-image-$i"); } } } // Collection all media ids from all the options $option_image_ids = []; for ($i = 1; $i <= 6; $i++) { if (${"option_image_$i"} !== '') { $option_image_ids[] = ${"option_image_$i"}; } } // Get thumbnails for all the option images via IDs $thumbnails = Helper::getScalaMediaThumbnailList($option_image_ids); for ($i = 1; $i <= 6; $i++) { foreach ($thumbnails as $thumbnail) { if ((int) ${"option_image_$i"} === (int) $thumbnail['id']) { ${"option_image_URL_$i"} = $thumbnail['thumbnail']; break; } } } @endphp
@if ($step === 1)
Tragen Sie hier die Aufforderung zur Abstimmung ein:
z.B. "Stimmen Sie hier ab, welcher Verein 1.000 Euro bekommen soll.
Beschreiben Sie hier die Details zum Abstimmungsverfahren:
z.B. wie lange das Voting läuft, worüber genau abgestimmt wird, etc.
@for ($i = 1; $i <= 6; $i++)
Option {{ $i }}
Wählen Sie ein Bild aus:
Löschen
Eigenes Bild laden
Bilddatenbank
Tragen Sie hier den Namen der Abstimmungsoption ein:
Beschreiben Sie hier die Details dieser Option:
@endfor @elseif ($step === 2)
@for ($i = 0; $i < count($voting->option_list); $i++) @if ($voting->option_list[$i]['title'] !== '') @php $preview = str_replace('1.png', $i + 3 . '.png', $previews[0]); @endphp
@endif @endfor
<< Zurück
Weiter >>
@include ('partials.approvers')
@endif
@include ('partials.action_btns')
@endsection @section('back_button') @if ($step === 1) Zurück @elseif ($step === 2) @if (Helper::createMode()) Zurück @elseif (Helper::editMode()) Zurück @endif @endif @endsection