Viewing file: 710b446505fcc9a8d4175bb57dd35e21.php (19.91 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<table class="table table-hover text-nowrap table-bordered"> <thead> <tr class="text-center"> <th width="5%"><?php echo e(__('thumbnail')); ?></th> <th width="30%"><?php echo e(__('name')); ?></th> <th><?php echo e(__('price')); ?></th> <?php if($showCategory): ?> <th><?php echo e(__('category')); ?></th> <?php endif; ?> <?php if($showCity): ?> <th><?php echo e(__('country')); ?></th> <?php endif; ?> <?php if($showCustomer): ?> <th><?php echo e(__('author')); ?></th> <?php endif; ?> <th><?php echo e(__('status')); ?></th> <th width="5%"><?php echo e(__('action')); ?></th> </tr> </thead> <tbody> <?php $__empty_1 = true; $__currentLoopData = $ads; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key =>$ad): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?> <tr> <td class="text-center"> <img src="<?php echo e($ad->image_url); ?>" class="rounded" height="50px" width="50px" alt="image"> </td> <td class="text-center"> <?php echo e($ad->title); ?>
<?php if($ad->featured): ?> <span class="badge badge-warning"> <?php echo e(__('featured')); ?>
</span> <?php endif; ?>
<?php if($ad->resubmission): ?> <span class="badge badge-danger"> <?php echo e(__('resubmission')); ?>
</span> <?php if(isset($ad->customer_edit_time)): ?> <span class="badge badge-warning"> <?php echo e(__('customer_resubmitted')); ?>
</span> <?php endif; ?> <?php endif; ?> </td> <td class="text-center"> <?php echo e(changeCurrency($ad->price)); ?>
</td> <?php if($showCategory): ?> <td class="text-center"> <a href="<?php echo e(route('module.category.show', $ad->category->slug)); ?>"><?php echo e($ad->category->name); ?></a> </td> <?php endif; ?> <?php if($showCity): ?> <td class="text-center"> <a href="<?php echo e(route('module.ad.index', ['country' => $ad->country])); ?>"> <?php echo e($ad->country); ?>
</a> </td> <?php endif; ?> <?php if($showCustomer): ?> <td class="text-center"> <a href="<?php echo e(route('module.customer.show', ['customer' => $ad->customer->username])); ?>"> <?php echo e($ad->customer->username); ?>
</a> </td> <?php endif; ?> <td class="text-center"> <button type="button" class="dropdown-toggle btn-sm btn btn-<?php echo e($ad->status == 'active' ? 'success' : ($ad->status == 'pending' ? 'warning' : 'secondary')); ?>" data-toggle="dropdown" aria-expanded="false"> <?php echo e(ucfirst($ad->status)); ?>
</button> <ul class="dropdown-menu" x-placement="bottom-start" style="position: absolute; will-change: transform; top: 0px; left: 0px; transform: translate3d(0px, 38px, 0px);">
<?php if($ad->status == 'active'): ?> <li><a onclick="return confirm('Are you sure to perform this action?')" class="dropdown-item" href="<?php echo e(route('module.ad.status', [$ad->slug, 'sold'])); ?>"> <i class="fas fa-hourglass-end text-danger"></i> <?php echo e(__('mark_as_sold')); ?>
</a> </li> <?php endif; ?> <?php if($ad->status == 'pending' && $setting->ads_admin_approval): ?> <li><a onclick="return confirm('Are you sure to perform this action?')" class="dropdown-item" href="<?php echo e(route('module.ad.status', [$ad->slug, 'declined'])); ?>"> <i class="fas fa-times text-danger"></i> <?php echo e(__('mark_as_declined')); ?>
</a> </li> <?php endif; ?> <?php if($ad->status == 'pending' && $setting->ads_admin_approval): ?> <li><a onclick="return confirm('Are you sure to perform this action?')" class="dropdown-item" href="<?php echo e(route('module.ad.status', [$ad->slug, 'active'])); ?>"> <i class="fas fa-check text-success"></i> <?php echo e(__('mark_as_active')); ?>
</a> </li> <?php endif; ?> <?php if($ad->status == 'pending' && $ad->resubmission == false && $setting->ads_admin_approval): ?> <li><a class="dropdown-item" data-toggle="modal" data-target="#resubmission<?php echo e($ad->slug); ?>" href="#resubmission<?php echo e($ad->slug); ?>"> <i class="fas fa-sync-alt text-danger"></i> <?php echo e(__('mark_as_resubmission')); ?>
</a> </li> <?php endif; ?> <?php if($ad->status == 'pending' && $ad->resubmission == true && $setting->ads_admin_approval): ?> <li><a class="dropdown-item" data-toggle="modal" data-target="#resubmission<?php echo e($ad->slug); ?>" href="#resubmission<?php echo e($ad->slug); ?>"> <i class="fas fa-sync-alt text-danger"></i> <?php echo e(__('mark_as_resubmission')); ?>
</a> </li> <?php endif; ?> <?php if($ad->status == 'sold' || ($ad->status == 'declined' && $setting->ads_admin_approval)): ?> <li><a onclick="return confirm('Are you sure to perform this action?')" class="dropdown-item" href="<?php echo e(route('module.ad.status', [$ad->slug, 'active'])); ?>"> <i class="fas fa-check text-success"></i> <?php echo e(__('mark_as_active')); ?>
</a> </li> <?php endif; ?> </ul> </td> <td class="text-center"> <button type="button" class="btn btn-info dropdown-toggle" data-toggle="dropdown" aria-expanded="false"> <?php echo e(__('options')); ?>
</button> <ul class="dropdown-menu" x-placement="bottom-start" style="position: absolute; will-change: transform; top: 0px; left: 0px; transform: translate3d(0px, 38px, 0px);"> <li><a class="dropdown-item" href="<?php echo e(route('module.ad.show', $ad->slug)); ?>"> <i class="fas fa-eye text-info"></i> <?php echo e(__('view_details')); ?>
</a></li> <li><a class="dropdown-item" href="<?php echo e(route('frontend.addetails', $ad->slug)); ?>"> <i class="fas fa-link text-secondary"></i> <?php echo e(__('website_link')); ?>
</a> </li> <li><a class="dropdown-item" href="<?php echo e(route('module.ad.edit', $ad->id)); ?>"> <i class="fas fa-edit text-success"></i> <?php echo e(__('edit_listing')); ?>
</a> </li> <li><a class="dropdown-item" href="<?php echo e(route('module.ad.show_gallery', $ad->id)); ?>"> <i class="fas fa-images text-warning"></i></i> <?php echo e(__('listing_gallery')); ?>
</a> </li> <li><a class="dropdown-item" href="<?php echo e(route('module.ad.custom.field.value.edit', $ad->id)); ?>"> <i class="fas fa-edit text-info"></i> <?php echo e(__('edit_custom_fields')); ?>
</a> </li> <li><a class="dropdown-item" href="<?php echo e(route('module.ad.custom.field.value.sorting', $ad->id)); ?>"> <i class="fas fa-arrows-alt text-warning"></i> <?php echo e(__('sorting_custom_fields')); ?>
</a> </li> <li> <form action="<?php echo e(route('module.ad.destroy', $ad->id)); ?>" method="POST" class="d-inline"> <?php echo method_field('DELETE'); ?> <?php echo csrf_field(); ?> <button type="submit" class="dropdown-item" onclick="return confirm('<?php echo e(__('are_you_sure_want_to_delete_this_item')); ?>?');"> <i class="fas fa-trash text-danger"></i> <?php echo e(__('delete_listing')); ?>
</button> </form> </li> </ul> </td> </tr>
<!-- Modal --> <div class="modal fade bd-example-modal-lg" id="resubmission<?php echo e($ad->slug); ?>" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true"> <div class="modal-dialog modal-lg" role="document"> <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title" id="exampleModalLabel"><?php echo e(__('describe_resubmission_feedback')); ?>
</h5> <button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">×</span> </button> </div> <div class="modal-body"> <form action="<?php echo e(route('module.ad.ResubmissionStatus', $ad->slug)); ?>" method="POST" enctype="multipart/form-data" class="d-inline"> <?php echo method_field('POST'); ?> <?php echo csrf_field(); ?> <textarea rows="10" id="ck_editor_<?php echo e($ad->slug); ?>" type="text" class="form-control" name="comment" placeholder="<?php echo e(__('description')); ?>... "><?php echo e(old('comment', $ad->comment ?? '')); ?></textarea>
<div class="mb-3"> <label for="formFileMultiple" class="form-label"><?php echo e(__('select_images')); ?></label> <input class="form-control-file" id="file1" type="file" name="photos[]" multiple> </div> <div class="modal-footer"> <button type="button" class="btn btn-secondary" data-dismiss="modal"><?php echo e(__('close')); ?></button> <button type="submit" onclick="return confirm('<?php echo e(__('are_you_sure_to_perform_this_action')); ?>')" class="btn btn-primary"><?php echo e(__('save')); ?></button> </div> </form> <?php if(count($ad->resubmissionGalleries) > 0): ?> <h5><?php echo e(__('image_list')); ?></h5> <ul class="resubmission-gallery"> <?php $__currentLoopData = $ad->resubmissionGalleries; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $imageData): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <li id="image-<?php echo e($imageData->id); ?>"> <a href="<?php echo e($imageData->image); ?>" data-gall="gallery" class="venobox"> <img src="<?php echo e($imageData->image); ?>" alt="Image"> </a> <button type="button" onclick="deleteImage(<?php echo e($imageData->id); ?>)"> <i class="fa fa-trash"></i> </button> </li> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </ul> <?php endif; ?>
</div> </div> </div> </div> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?> <tr> <td colspan="10" class="text-center"> <?php if (isset($component)) { $__componentOriginal29785112a59eec7800237cc87bc86e3e = $component; } ?> <?php if (isset($attributes)) { $__attributesOriginal29785112a59eec7800237cc87bc86e3e = $attributes; } ?> <?php $component = App\View\Components\NotFound::resolve(['word' => 'Ad','route' => 'module.ad.create'] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?> <?php $component->withName('not-found'); ?> <?php if ($component->shouldRender()): ?> <?php $__env->startComponent($component->resolveView(), $component->data()); ?> <?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(App\View\Components\NotFound::class))->getConstructor()): ?> <?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?> <?php endif; ?> <?php $component->withAttributes([]); ?> <?php echo $__env->renderComponent(); ?> <?php endif; ?> <?php if (isset($__attributesOriginal29785112a59eec7800237cc87bc86e3e)): ?> <?php $attributes = $__attributesOriginal29785112a59eec7800237cc87bc86e3e; ?> <?php unset($__attributesOriginal29785112a59eec7800237cc87bc86e3e); ?> <?php endif; ?> <?php if (isset($__componentOriginal29785112a59eec7800237cc87bc86e3e)): ?> <?php $component = $__componentOriginal29785112a59eec7800237cc87bc86e3e; ?> <?php unset($__componentOriginal29785112a59eec7800237cc87bc86e3e); ?> <?php endif; ?> </td> </tr> <?php endif; ?> </tbody> </table> <?php $__env->startSection('style'); ?> <style> .ck-editor__editable_inline { min-height: 170px; }
.c-btn { padding-left: 22px; padding-right: 22px; border-radius: 15px; }
.custom-control { position: relative; z-index: 1; display: block; min-height: 1.5rem; padding-left: 0; padding-right: 1.5rem; -webkit-print-color-adjust: exact; color-adjust: exact; }
.resubmission-gallery { list-style: none; padding: 0px; display: flex; flex-wrap: wrap; gap: 16px; margin-top: 20px; } .resubmission-gallery li { position: relative; margin: 0px; } .resubmission-gallery button { color: red; border: none; background: #dddddd64; position: absolute; top: 0px; right: 0px; border: 1px solid #ddd; border-radius: 0px 6px 0px 0px; } .resubmission-gallery img { width: 120px; height: 120px; object-fit: contain; border: 1px solid #ddd; border-radius: 6px; } table td { max-width: 300px; white-space: normal; } </style> <link rel="stylesheet" href="<?php echo e(asset('frontend/css/venobox.min.css')); ?>" type="text/css" /> <?php $__env->stopSection(); ?> <?php $__env->startPush('script'); ?> <script src="<?php echo e(asset('backend')); ?>/dist/js/ckeditor.js"></script> <script> document.addEventListener('DOMContentLoaded', function() { <?php $__empty_1 = true; $__currentLoopData = $ads; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $ad): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?> ClassicEditor .create(document.querySelector('#ck_editor_<?php echo e($ad->slug); ?>'), {
}) .catch(error => { console.error(error); }); <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?> // Handle the case where there are no ads <?php endif; ?> }); </script> <script> function deleteImage(id) { var message = "<?php echo e(__('are_you_sure_to_perform_this_action')); ?>"; if (confirm(message)) { fetch(`<?php echo e(route('module.ad.resubmissionImage', '')); ?>/${id}`, { method: 'DELETE', headers: { 'X-CSRF-TOKEN': '<?php echo e(csrf_token()); ?>' } }) .then(response => response.json()) .then(data => { if (data.success) { // Remove the image from the list const imageElement = document.querySelector(`#image-${id}`); imageElement.parentNode.removeChild(imageElement); } else { console.error('Error:', data.error); } }) .catch((error) => { console.error('Error:', error); }); } } </script> <script type="text/javascript" src="<?php echo e(asset('frontend/js/venobox.min.js')); ?>"></script> <script> new VenoBox({ selector: '.venobox', numeration: true, infinigall: true, share: true, spinner: 'rotating-plane' }); </script> <?php $__env->stopPush(); ?> <?php /**PATH /home/picotech/domains/classify.picotech.app/public_html/resources/views/components/backend/ad-manage.blade.php ENDPATH**/ ?>
|