feat; add apply with discord btns to home page

Signed-off-by: miguel456 <me@nogueira.codes>
This commit is contained in:
2022-10-23 20:42:06 +01:00
parent d2de57c55d
commit ad4571db2a
3 changed files with 29 additions and 4 deletions

View File

@@ -94,18 +94,33 @@
<div class="card-footer text-center">
@auth
<button {{($isEligibleForApplication) ? '' : 'disabled'}} type="button" class="btn btn-success" onclick="window.location.href='{{route('renderApplicationForm', ['vacancySlug' => $position->vacancySlug])}}'">{{__('Apply')}}</button>
@if ($position->requiresDiscord)
@if(Auth::user()->hasDiscordConnection())
<button {{($isEligibleForApplication) ? '' : 'disabled'}} type="button" class="btn btn-success" onclick="window.location.href='{{route('renderApplicationForm', ['vacancySlug' => $position->vacancySlug])}}'">{{__('Apply')}}</button>
@else
<button {{($isEligibleForApplication) ? '' : 'disabled'}} style="background-color: #5865F2; color: white" type="button" class="btn" onclick="window.location.href='{{route('renderApplicationForm', ['vacancySlug' => $position->vacancySlug])}}'"><i class="fab fa-discord"></i> {{__('Apply with Discord')}}</button>
@endif
@else
<button {{($isEligibleForApplication) ? '' : 'disabled'}} type="button" class="btn btn-success" onclick="window.location.href='{{route('renderApplicationForm', ['vacancySlug' => $position->vacancySlug])}}'">{{__('Apply')}}</button>
@endif
@if(!$isEligibleForApplication)
<span class="badge-warning badge"><i class="fa fa-info"></i> {{__('Ineligible (:days) day(s) remaining', ['days' => $eligibilityDaysRemaining])}}</span>
@endif
@endauth
<button type="button" class="btn btn-info" onclick="$('#{{ $position->vacancySlug }}-details').modal('show')">{{__('Learn more')}}</button>
@guest
<button type="button" class="btn btn-success" onclick="window.location.href='{{route('renderApplicationForm', ['vacancySlug' => $position->vacancySlug])}}'">{{__('Apply')}}</button>
@if ($position->requiresDiscord)
<button style="background-color: #5865F2; color: white" type="button" class="btn" onclick="window.location.href='{{route('discord-apply', ['vacancySlug' => $position->vacancySlug])}}'"><i class="fab fa-discord"></i> {{__('Apply with Discord')}}</button>
@else
<button type="button" class="btn btn-success" onclick="window.location.href='{{route('renderApplicationForm', ['vacancySlug' => $position->vacancySlug])}}'">{{__('Apply')}}</button>
@endif
@endguest
<button type="button" class="btn btn-info" onclick="$('#{{ $position->vacancySlug }}-details').modal('show')">{{__('Learn more')}}</button>
</div>
</div>