@php
$layout = BaseHelper::stringify(request()->query('layout'));
if (! in_array($layout, ['list', 'grid', 'map'])) {
$layout = 'list';
}
$isMapActive = (theme_option('show_map_on_jobs_page', 'yes') === 'yes' && $layout === 'map') && $jobs->isNotEmpty();
$template = $isMapActive ? 'map' : $layout;
@endphp
@if ($jobs->total() > 0)
{{ __('Showing :from-:to of :total job(s)', [
'from' => $jobs->firstItem(),
'to' => $jobs->lastItem(),
'total' => $jobs->total(),
]) }}
@endif
{{ __('Show') }}:
@include(Theme::getThemeNamespace('views.job-board.partials.sort-by-dropdown'))
{!! Theme::partial('loading') !!}
@forelse($jobs as $job)
@include(Theme::getThemeNamespace('views.job-board.partials.job-item-' . $template), ['job' => $job])
@empty
@include(Theme::getThemeNamespace('views.job-board.partials.job-item-empty'))
@endforelse
@if($isMapActive)
@endif
@if(! $isMapActive)
{!! $jobs->withQueryString()->links(Theme::getThemeNamespace('partials.pagination')) !!}
@endif