@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)
{{ $event->participation_button_label }}
@endif @if ($showParticipateToLandingPageButton)
{{ $event->participation_button_label }}
@endif
@if ($alreadyRegistered)

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

@endif
Annonce
Frais de participation
{{--
Travaux Scientifique
--}} {{-- @if ($showAbstractButton) --}}
Travaux Scientifique
{{-- @endif --}} @if ($showAbstractToLandingPageButton)
Travaux Scientifique
@endif @if ($showAbstractToParticipatePageButton)
Travaux Scientifique
@endif
Aperçu du programme
@if ($showInternalProgramButton)
{{ $event->label_program }}
@endif @if ($showExternalProgramButton)
{{ $event->label_program }}
@endif
Spectacle
@if ($showHebergementButton)
Hébergement
@endif