@php $isEventRegistrationOpen = !$event->is_closed_registration; $alreadyRegistered = $event->participant(auth()->user()?->id, $event->id); $isAuthenticate = auth()->user(); $hasAbstracts = $event->has_abstracts; $isEventAbstractOpen = true; $hasProgram = $event->has_program; $isInternalProgram = $event->is_internal_link_program; $hasHebergement = $event->has_hebergement; $canAddAnotherAbstract = auth()->user() && auth()->user()->abstractsByEvents($event->id)->count() < $event->abstract_submission_limit; $showParticipateButton = $isAuthenticate && $isEventRegistrationOpen && !$alreadyRegistered; $showParticipateToLandingPageButton = !$isAuthenticate && $isEventRegistrationOpen; $showAbstractButton = $isAuthenticate && $isEventRegistrationOpen && $alreadyRegistered && $hasAbstracts && $isEventAbstractOpen && $canAddAnotherAbstract; $showAbstractToParticipatePageButton = $isAuthenticate && $isEventRegistrationOpen && !$alreadyRegistered && $hasAbstracts && $isEventAbstractOpen; $showAbstractToLandingPageButton = !$isAuthenticate && $isEventRegistrationOpen && $hasAbstracts && $isEventAbstractOpen; $showInternalProgramButton = $hasProgram && $isInternalProgram; $showExternalProgramButton = $hasProgram && !$isInternalProgram; // $showHebergementButton = $isEventRegistrationOpen && $hasHebergement; $showHebergementButton = $hasHebergement; @endphp
@if ($showParticipateButton)
{{ $event->participation_button_label ?? "S'inscrire au congrès" }}
@endif @if ($showParticipateToLandingPageButton)
{{ $event->participation_button_label ?? "S'inscrire au congrès" }}
@endif
@if ($alreadyRegistered)

Vous êtes déjà inscrit {{ $event->is_masculin ? 'au' : 'à la' }} « {!! \App\Helpers\TextHelper::addSup($event->title) !!} »

@endif
Annonce
@if ($showInternalProgramButton)
{{ $event->label_program ?? 'Programme' }}
@endif @if ($showExternalProgramButton)
{{ $event->label_program ?? 'Programme' }}
@endif @if ($showHebergementButton)
Hébergement
@endif {{-- Bouton Soumission abstracts (redirige vers participate/step1 si non inscrit) --}} @if ($showAbstractButton || $showAbstractToLandingPageButton || $showAbstractToParticipatePageButton)
Soumission abstracts
@endif {{-- Boutons des formulaires : on affiche aussi les formulaires clôturés (la page affiche le message de clôture sans les champs) --}} @foreach ($event->forms as $eventForm) @php $specialSlugs = ['video-forum', '5min-to-convince']; if (in_array($eventForm->slug, $specialSlugs)) { $formPath = $alreadyRegistered ? '/event/' . $event->slug . '/form/' . $eventForm->slug : '/event/' . $event->slug . '/participate/step1'; } else { $formPath = '/event/' . $event->slug . '/form/' . $eventForm->slug; } @endphp
@php // Choix des couleurs spécifiques pour certains formulaires if ($eventForm->slug === 'video-forum') { $btnClass = 'btn-purple'; } elseif ($eventForm->slug === '5min-to-convince') { $btnClass = 'btn-orange'; } else { $btnClass = 'btn-pink'; } @endphp {{ $eventForm->name }}
@endforeach