@php $sectionOptions = $locationsOptions ?? []; $sectionData ??= []; $cities = (array)data_get($sectionData, 'cities'); // Get Admin Map's values $locCanBeShown = (data_get($sectionOptions, 'show_cities') == '1'); $locColumns = (int)(data_get($sectionOptions, 'items_cols') ?? 3); $locCountListingsPerCity = (config('settings.listings_list.count_cities_listings')); $mapCanBeShown = ( file_exists(config('larapen.core.maps.path') . config('country.icode') . '.svg') && data_get($sectionOptions, 'enable_map') == '1' ); $showListingBtn = (data_get($sectionOptions, 'show_listing_btn') == '1'); $hideOnMobile = (data_get($sectionOptions, 'hide_on_mobile') == '1') ? ' hidden-sm' : ''; @endphp @if ($locCanBeShown || $mapCanBeShown) @includeFirst([ config('larapen.core.customizedViewPath') . 'sections.spacer', 'sections.spacer' ], ['hideOnMobile' => $hideOnMobile])
@if (!$mapCanBeShown)

 {{ t('Choose a city') }}

@endif @php $leftClassCol = ''; $rightClassCol = ''; $ulCol = 'col-md-3 col-sm-12'; // Cities Columns if ($locCanBeShown && $mapCanBeShown) { // Display the Cities & the Map $leftClassCol = 'col-lg-8 col-md-12'; $rightClassCol = 'col-lg-3 col-md-12 mt-3 mt-xl-0 mt-lg-0'; $ulCol = 'col-md-4 col-sm-6 col-12'; if ($locColumns == 2) { $leftClassCol = 'col-md-6 col-sm-12'; $rightClassCol = 'col-md-5 col-sm-12'; $ulCol = 'col-md-6 col-sm-12'; } if ($locColumns == 1) { $leftClassCol = 'col-md-3 col-sm-12'; $rightClassCol = 'col-md-8 col-sm-12'; $ulCol = 'col-xl-12'; } } else { if ($locCanBeShown && !$mapCanBeShown) { // Display the Cities & Hide the Map $leftClassCol = 'col-xl-12'; } if (!$locCanBeShown && $mapCanBeShown) { // Display the Map & Hide the Cities $rightClassCol = 'col-xl-12'; } } @endphp @if ($locCanBeShown)
@if (!empty($cities))
@if ($mapCanBeShown)

 {{ t('Choose a city or region') }}

@endif
@foreach ($cities as $key => $items) @php $listBorder = (count($cities) == $key+1) ? 'cat-list-border' : ''; @endphp @endforeach
@if ($showListingBtn) @php [$createListingLinkUrl, $createListingLinkAttr] = getCreateListingLinkInfo(); @endphp {{ t('Create Listing') }} @endif
@endif
@endif @includeFirst([ config('larapen.core.customizedViewPath') . 'sections.home.locations.svgmap', 'sections.home.locations.svgmap' ])
@endif @section('modal_location') @parent @if ($locCanBeShown || $mapCanBeShown) @includeFirst([config('larapen.core.customizedViewPath') . 'layouts.inc.modal.location', 'layouts.inc.modal.location']) @endif @endsection