Current File : //home/tradevaly/www/storage/framework/views/e2edaf3c6984cd9770e0f4df895346aef5953a25.php |
<?php $__env->startPush('title'); ?> Add Banner <?php $__env->stopPush(); ?>
<?php $__env->startSection('css'); ?>
<!-- select2 css -->
<link href="<?php echo e(asset('/assets/libs/select2/select2.min.css')); ?>" rel="stylesheet" type="text/css" />
<!-- dropzone css -->
<link href="<?php echo e(asset('/assets/libs/dropzone/dropzone.min.css')); ?>" rel="stylesheet" type="text/css" />
<style>
.image_preview_container {
display: grid;
gap: 15px;
grid-template-columns: repeat(auto-fit, minmax(150px, 280px));
justify-content: center;
padding: 25px;
}
.image_preview_container img {
width: 100%;
border: 1px solid #0001;
box-shadow: 0 2px 15px #0001, 0 2px 8px #0001;
border-radius: 4px;
aspect-ratio: 1/1;
object-fit: cover;
}
</style>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('content'); ?>
<?php $__env->startComponent('components.breadcrumb'); ?>
<?php $__env->slot('li_1'); ?> Dashboards <?php $__env->endSlot(); ?>
<?php $__env->slot('title'); ?> Add Banner <?php $__env->endSlot(); ?>
<?php echo $__env->renderComponent(); ?>
<div class="row">
<div class="col-lg-3">
<div class="card all_banner">
<div class="card-body">
<ul class="nav flex-column">
<li class="nav-item">
<a class="nav-link <?php echo e(session()->get('page') == 'home_page' ? 'active':''); ?>" href="<?php echo e(route('admin.component.banner.index')); ?>">Home Page</a>
</li>
<li class="nav-item">
<a class="nav-link <?php echo e(session()->get('page') == 'category_page' ? 'active':''); ?>" href="<?php echo e(route('admin.component.banner.category')); ?>">Category Page</a>
</li>
<li class="nav-item">
<a class="nav-link <?php echo e(session()->get('page') == 'buyers_page' ? 'active':''); ?>" href="<?php echo e(route('admin.component.banner.buyers')); ?>">Buyers Page</a>
</li>
<li class="nav-item">
<a class="nav-link <?php echo e(session()->get('page') == 'product_page' ? 'active':''); ?>" href="<?php echo e(route('admin.component.banner.product')); ?>">Product Page</a>
</li>
<li class="nav-item">
<a class="nav-link <?php echo e(session()->get('page') == 'company_page' ? 'active':''); ?>" href="<?php echo e(route('admin.component.banner.company')); ?>">Company Page</a>
</li>
<li class="nav-item">
<a class="nav-link <?php echo e(session()->get('page') == 'manufacture_page' ? 'active':''); ?>" href="<?php echo e(route('admin.component.banner.manufacture')); ?>">Manufacture Page</a>
</li>
<li class="nav-item">
<a class="nav-link <?php echo e(session()->get('page') == 'contact-banner' ? 'active':''); ?>" href="<?php echo e(route('admin.component.banner.contact')); ?>">Contact Page</a>
</li>
</ul>
</div>
</div>
</div>
<div class="col-md-9">
<div class="card">
<div class="card-body">
<h4 class="card-title">Add Bannner</h4>
<p class="card-title-desc">Fill all information below</p>
<form action="<?php echo e(url('b2b/component/banner/add')); ?>" method="POST" enctype="multipart/form-data"><?php echo csrf_field(); ?>
<div class="row">
<div class="col-sm-6">
<div class="mb-3">
<label for="example-datetime-local-input" class="col-form-label">Start</label>
<input class="form-control" type="datetime-local" name="start" id="example-datetime-local-input" value="2019-08-19T13:45:00">
</div>
</div>
<div class="col-sm-6">
<div class="mb-3">
<label for="example-datetime-local-input" class="col-form-label">End</label>
<input class="form-control" type="datetime-local" name="end" id="example-datetime-local-input" value="2019-08-19T13:45:00">
</div>
</div>
<div class="col-sm-12">
<div class="mb-3">
<div class="templating-select">
<label class="form-label">User</label>
<select class="form-control select2" name="user_id">
<option value="">Select A User</option>
<?php $__currentLoopData = $users; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $user): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<option value="<?php echo e($user->id); ?>"><?php echo e($user->company ? $user->company->name:$user->name); ?> </option>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</select>
</div>
</div>
</div>
<div class="col-sm-12">
<div class="mb-3">
<label for="metadescription"><?php echo e(translate('Enter Link')); ?></label>
<input id="metatitle" name="link" type="text" class="form-control" required>
</div>
</div>
<div class="col-sm-12">
<div class="mb-3">
<label for="metadescription"><?php echo e(translate('Position')); ?></label>
<select name="position" class="form-control">
<?php if(session()->get('page') == 'home_page'): ?>
<option value="top_banner">Top Slider</option>
<option value="after-banner-left">After Banner Left</option>
<option value="after-banner-left-center">After Banner Left Center</option>
<option value="after-banner-right-center">After Banner Right Center</option>
<option value="after-banner-right">After Banner Right</option>
<option value="after-category-left">After Category Left</option>
<option value="after-category-right">After Category Right</option>
<?php elseif(session()->get('page') == 'category_page'): ?>
<option value="top_category_banner">Top Category</option>
<option value="bottom_category_banner">Bottom Category</option>
<?php elseif(session()->get('page') == 'buyers_page'): ?>
<option value="top_buyer_banner">Top Buyers</option>
<option value="bottom_buyer_banner">Bottom Buyers</option>
<?php elseif(session()->get('page') == 'product_page'): ?>
<option value="top_product_banner">Top Product</option>
<option value="bottom_product_banner">Bottom Product</option>
<?php elseif(session()->get('page') == 'company_page'): ?>
<option value="top_company_banner">Top Company</option>
<option value="bottom_company_banner">Bottom Company</option>
<?php elseif(session()->get('page') == 'manufacture_page'): ?>
<option value="top_manufacture_banner">Top Manufacture</option>
<option value="bottom_manufacture_banner">Bottom Manufacture</option>
<?php elseif(session()->get('page') == 'contact-banner'): ?>
<option value="contact-banner">Contact Banner</option>
<?php endif; ?>
</select>
</div>
</div>
<?php if(session()->get('page') == 'category_page'): ?>
<div class="col-sm-12">
<div class="mb-3">
<label for="metadescription"><?php echo e(translate('Category')); ?></label>
<select name="category_id" class="form-control">
<option value="">Select a Category</option>
<?php $__currentLoopData = $categories; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $category): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<option value="<?php echo e($category->id); ?>"><?php echo e($category->name); ?></option>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</select>
</div>
</div>
<?php endif; ?>
<div class="col-md-12">
<div class="mb-3">
<div class="fallback">
<input name="image" type="file" oninput="preview_image(this, '.image_preview_container')" />
</div>
<div class="dz-message needsclick">
<div class="image_preview_container"></div>
</div>
</div>
</div>
</div>
<div class="d-flex flex-wrap gap-2">
<button type="submit" class="btn btn-primary waves-effect waves-light">Save Changes</button>
<button type="submit" class="btn btn-secondary waves-effect waves-light">Cancel</button>
</div>
</form>
</div>
</div>
</div>
</div>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('script'); ?>
<script src="<?php echo e(asset('/assets/libs/select2/select2.min.js')); ?>"></script>
<!-- dropzone plugin -->
<script src="<?php echo e(asset('/assets/libs/dropzone/dropzone.min.js')); ?>"></script>
<!-- init js -->
<script src="<?php echo e(asset('/assets/js/pages/ecommerce-select2.init.js')); ?>"></script>
<script>
function preview_image(F, image_container)
{
let my_container = document.querySelector(image_container);
let new_container = document.createElement('div');
new_container.className = 'image_preview_container';
F = F.files;
F = Array.from(F);
F.forEach(file => {
let my_url = URL.createObjectURL(file);
let my_image = getImage(my_url);
new_container.append(my_image);
});
my_container.replaceWith(new_container);
}
function getImage(url)
{
let img = document.createElement('img');
img.src = url;
img.alt = "Image Not Found";
return img;
}
$(document).on('change', '[name=parent_id]', function() {
var child_id = $(this).val();
get_child(child_id);
});
function get_child(child_id) {
$('[name="sub_id"]').html("");
$.ajax({
headers: {
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
},
url: "<?php echo e(route('ajax.cat')); ?>",
type: 'POST',
data: {
sub_id : child_id
},
success: function (response) {
var obj = JSON.parse(response);
if(obj != '') {
$('[name="sub_id"]').html(obj);
}
}
});
}
</script>
<script>
$(document).ready(function() {
$(".select2").select2();
});
</script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('backend.ayaan.master', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/tradevaly/public_html/resources/views/backend/pages/Banner/add.blade.php ENDPATH**/ ?>