@php $isEventRegistrationOpen = !$event->is_closed_registration; $alreadyRegistered = $event->participant(auth()->user()?->id, $event->id); $isAuthenticate = auth()->user(); $hasAbstracts = $event->has_abstracts; $isEventAbstractOpen = !$event->is_closed_abstract_submission; $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)
S'inscrire à la journée
@endif @if ($showParticipateToLandingPageButton)
S'inscrire à la journée
@endif
@if ($alreadyRegistered)

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

@endif
Annonce
Consulter le programme
{{--
Frais d'inscription
--}} {{--
Soumission abstracts
--}} @if ($showAbstractButton)
Soumission abstracts
@endif @if ($showAbstractToLandingPageButton)
Soumission abstracts
@endif @if ($showAbstractToParticipatePageButton)
Soumission abstracts
@endif {{-- @if ($showInternalProgramButton)
Consulter le programme
@endif --}} {{-- @if ($showExternalProgramButton)
Consulter le programme
@endif --}} {{-- @if ($showHebergementButton)
Hébergement
@endif --}}