Viewing file: 02c7feef61e9fae87754e45aeea7eba9afb21bf5.php (14.8 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php $__env->startSection('title'); ?> <?php echo e(json_decode(get_settings('site_setting'))->name); ?> - <?php echo e(trans('multirestaurant::layout.multi_restaurants_home')); ?> <?php $__env->stopSection(); ?>
<?php $__env->startSection('css'); ?>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('content'); ?>
<?php $template = json_decode(get_settings('multirestaurant_template')); ?>
<?php if(isset($template->bg_image_file_name)): ?>
<div class="content-section" style="background-image: url('<?php echo e(asset('uploads/'.$template->bg_image_file_name)); ?>')">
<?php else: ?>
<div class="content-section">
<?php endif; ?>
<div class="text-section">
<h1><?php echo e(isset($template->title)?$template->title:''); ?></h1>
</div>
<div class="form-section">
<form class="form-location">
<div class="search-address">
<div class="search-input-box">
<input type="text" class="search-form-input" name="" id="pac-input"
placeholder=" Enter your full address" autocomplete="off" value="">
<small class="error-text" id="error"></small>
</div>
<div class="city-par d-none">
<ul class="city-name pt-2 pb-2" id="showCity"></ul>
</div>
</div>
<div class="btn-set">
<div class="dropdown">
<button class="btn-delivery"><?php echo e(trans('multirestaurant::layout.select_order_type')); ?></button>
<div class="dropdown-content">
<a type="btn" class="locationBtn" id="cash_on_delivery_btn" order-type="cash_on_delivery"><?php echo e(trans('multirestaurant::layout.delivery')); ?></a>
<a type="btn" class="locationBtn" id="takeaway_btn" order-type="takeaway"><?php echo e(trans('multirestaurant::layout.pick_up')); ?></a>
</div>
</div>
<span class="btn-separator">or</span>
<button type="button" class="btn-delivery locationBtn" id="table_booking_btn" order-type="table_booking"><?php echo e(trans('multirestaurant::layout.book_a_table')); ?></button>
</div>
</form>
</div>
</div>
<section class="home-section">
<h2 class="section-title">
<?php echo e(isset($template->section_two_blur_title)?$template->section_two_blur_title:''); ?>
<span class="section-subtitle"><?php echo e(isset($template->section_two_title)?$template->section_two_title:''); ?></span>
</h2>
<div class="home-subsection">
<div class="back-img">
<?php if(isset($template->section_two_bg_image_file_name)): ?>
<img src="<?php echo e(asset('uploads/'.$template->section_two_bg_image_file_name)); ?>" alt="">
<?php endif; ?>
</div>
<div class="full-contain">
<div class="home-section-content">
<p class="title"><?php echo e(isset($template->section_two_description_title)?$template->section_two_description_title:''); ?></p>
<p class="content">
<?php echo e(isset($template->section_two_description)?$template->section_two_description:''); ?>
</p>
<a class="btn-section" href="<?php echo e(isset($template->section_two_link)?$template->section_two_link:''); ?>" target="_blank"><?php echo e(trans('multirestaurant::layout.get_started')); ?></a>
</div>
</div>
</div>
</section>
<section class="home-section">
<h2 class="section-title">
<?php echo e(isset($template->section_three_blur_title)?$template->section_three_blur_title:''); ?>
<span class="section-subtitle"><?php echo e(isset($template->section_three_title)?$template->section_three_title:''); ?></span>
</h2>
<div class="home-subsection">
<div class="back-img">
<?php if(isset($template->section_three_bg_image_file_name)): ?>
<img src="<?php echo e(asset('uploads/'.$template->section_three_bg_image_file_name)); ?>" alt="">
<?php endif; ?>
</div>
<div class="full-contain">
<div class="home-section-content">
<p class="title"><?php echo e(isset($template->section_three_description_title)?$template->section_three_description_title:''); ?></p>
<p class="content">
<?php echo e(isset($template->section_three_description)?$template->section_three_description:''); ?>
</p>
<a class="btn-section" href="<?php echo e(isset($template->section_three_link)?$template->section_three_link:''); ?>" target="_blank"><?php echo e(trans('multirestaurant::layout.get_started')); ?></a>
</div>
</div>
</div>
</section>
<section class="home-section">
<h2 class="section-title">
<?php echo e(trans('multirestaurant::layout.cities')); ?>
<span class="section-subtitle"><?php echo e(trans('multirestaurant::layout.find_us_in_these_cities_and_many_more')); ?></span>
</h2>
<div class="city-section">
<div class="row">
<?php if(isset($cities)): ?>
<?php $__currentLoopData = $cities; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $city): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<div class="col-lg-3 col-md-6">
<a href="<?php echo e(route('multirestaurant::find.restaurant',['city'=>$city->name])); ?>">
<figure class="snip0016 cityBtn">
<img alt="sample41" src="<?php echo e(asset('uploads/'.$city->image)); ?>">
<figcaption>
<h2><?php echo e(trans('multirestaurant::layout.lets')); ?>
<span><?php echo e(trans('multirestaurant::layout.checkout')); ?> </span><?php echo e($city->name); ?>
</h2>
</figcaption>
</figure>
</a>
</div>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
<?php endif; ?>
</div>
</div>
</section>
<section class="home-dp">
<div class="how-wrapper">
<div class="home-offset">
<div class="row">
<div class="col-lg-12 col-md-12 col-sm-12">
<h4>
<strong><?php echo e(isset($template->section_four_description_title)?$template->section_four_description_title:''); ?></strong>
</h4>
<p class="content"><?php echo e(isset($template->section_four_description)?$template->section_four_description:''); ?></p>
</div>
</div>
</div>
</div>
</section>
<div class="location-modal locationModal">
<div class="location-modal-content">
<span class="locationClose close">×</span>
<div id="locationMap"></div>
</div>
<form action="<?php echo e(route('multirestaurant::find.restaurant')); ?>" method="GET">
<input type="hidden" id="modal-input" name="restaurant_location">
<input type="hidden" id="input_lat" name="location_lat">
<input type="hidden" id="input_long" name="location_long">
<input type="hidden" id="modal-input-order-type" name="order_type">
<div class="text-center ml-3">
<button type="submit" class="btn process-btn find"><?php echo e(trans('multirestaurant::layout.find_restaurant')); ?></button>
</div>
</form>
</div>
<div id="map"></div>
<div id="infowindow-content">
<span id="place-name" class="title"></span><br />
<span id="place-address"></span>
</div>
<input type="hidden" id="lat">
<input type="hidden" id="long">
<input type="hidden" id="address">
<input id="api_key" type="hidden" value="<?php echo e(isset(json_decode(get_settings('site_setting'))->api_key)?json_decode(get_settings('site_setting'))->api_key:''); ?>">
<?php $__env->stopSection(); ?>
<?php $__env->startSection('js'); ?>
<script src="https://polyfill.io/v3/polyfill.min.js?features=default"></script>
<script>
$(document).on('click','#cash_on_delivery_btn', (e)=> {
e.preventDefault();
const order_type_cash_on_delivery = $('#cash_on_delivery_btn').attr('order-type');
const lat = $('#lat').val();
const long = $('#long').val();
if (lat || long){
$('#error').addClass('d-none');
const address = $('#address').val();
$('#modal-input-order-type').val(order_type_cash_on_delivery)
$('#modal-input').val(address)
$('#input_lat').val(lat)
$('#input_long').val(long)
let html_location_map =`<iframe width="100%" height="380px" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps?q=${address}&layer=tc&t=m&z=18&source=embed&output=svembed"></iframe>`
$('#locationMap').html(html_location_map)
$(".location-modal").toggle();
}else {
<?php if(env('APP_DEMO')): ?>
$("#error").html('This option is not available in the demo version');
<?php else: ?>
$("#error").html('select a location address form the list');
<?php endif; ?>
}
});
$(document).on('click','#takeaway_btn', (e)=> {
e.preventDefault();
const order_type_takeaway = $('#takeaway_btn').attr('order-type');
const lat = $('#lat').val();
const long = $('#long').val();
if (lat || long){
$('#error').addClass('d-none');
const address = $('#address').val();
$('#modal-input-order-type').val(order_type_takeaway)
$('#modal-input').val(address)
$('#input_lat').val(lat)
$('#input_long').val(long)
let html_location_map =`<iframe width="100%" height="380px" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps?q=${address}&layer=tc&t=m&z=18&source=embed&output=svembed"></iframe>`
$('#locationMap').html(html_location_map)
$(".location-modal").toggle();
}else {
<?php if(env('APP_DEMO')): ?>
$("#error").html('This option is not available in the demo version');
<?php else: ?>
$("#error").html('select a location address form the list');
<?php endif; ?>
}
});
$(document).on('click','#table_booking_btn', (e)=> {
e.preventDefault();
$('.city-par').addClass('d-none');
const order_type_table_booking = $('#table_booking_btn').attr('order-type');
const lat = $('#lat').val();
const long = $('#long').val();
if (lat || long){
$('#error').addClass('d-none');
const address = $('#address').val();
$('#modal-input-order-type').val(order_type_table_booking)
$('#modal-input').val(address)
$('#input_lat').val(lat)
$('#input_long').val(long)
let html_location_map =`<iframe width="100%" height="380px" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps?q=${address}&layer=tc&t=m&z=18&source=embed&output=svembed"></iframe>`
$('#locationMap').html(html_location_map)
$(".location-modal").toggle();
}else {
<?php if(env('APP_DEMO')): ?>
$("#error").html('This option is not available in the demo version');
<?php else: ?>
$("#error").html('select a location address form the list');
<?php endif; ?>
}
});
$(document).on('click','.locationClose', (e)=> {
e.preventDefault();
$(".location-modal").toggle();
location.reload();
});
<?php if(!env('APP_DEMO')): ?>
$(document).on('keyup or past','#pac-input', function (e) {
e.preventDefault();
const cityname = $(this).val();
const key = $('#api_key').val();
if (key){
const search_string = "https://maps.googleapis.com/maps/api/place/textsearch/json?query=restaurants+in+"+cityname+"&sensor=false&key="+key+"";
$.ajax({
url: search_string
}).done( function ( data ) {
$('.city-par').removeClass('d-none');
let html_city = '';
$.each(data['results'], function(index,value){
html_city+=`<li class="p-1 locationCity" data-lat="${value.geometry.location.lat}" data-long="${value.geometry.location.lng}" data-address="${value.formatted_address}"> ${value.formatted_address}</li>`
});
$("#showCity").html(html_city);
});
}
});
<?php endif; ?>
$(document).on('click','.locationCity', function (e) {
e.preventDefault();
const lat = $(this).attr('data-lat');
const long = $(this).attr('data-long');
const address = $(this).attr('data-address');
$('#lat').val(lat)
$('#long').val(long)
$('#address').val(address)
$('#pac-input').val(address)
$('.city-par').addClass('d-none');
});
</script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('multirestaurant::layouts.master', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/picotech/domains/multirest.picotech.app/public_html/Modules/MultiRestaurant/Resources/views/index.blade.php ENDPATH**/ ?>
|