관리-도구
편집 파일: 10156f67cf654e9e599ccf17799e9f98.php
<form action="<?php echo e(route('admin.products.update-product-images',['id' => $product['id']])); ?>" method="post" enctype="multipart/form-data" class="form-advance-validation form-advance-file-validation non-ajax-form-validate" novalidate="novalidate"> <?php echo csrf_field(); ?> <div class="offcanvas offcanvas-end" tabindex="-1" id="offcanvasEditImages" aria-labelledby="offcanvasEditImagesLabel" style="--bs-offcanvas-width: 500px"> <div class="offcanvas-header bg-body"> <h3 class="mb-0"><?php echo e(translate('Edit_Images')); ?></h3> <button type="button" class="btn btn-circle bg-white text-dark fs-10" style="--size: 1.5rem;" data-bs-dismiss="offcanvas" aria-label="Close"> <i class="fi fi-rr-cross"></i> </button> </div> <div class="offcanvas-body"> <div class="p-12 p-sm-20 bg-section rounded-10 mb-20"> <div class="px-2"> <label class="form-label fw-semibold mb-1 d-flex gap-1"> <?php echo e(translate('Product_thumbnail')); ?> <span class="text-danger">*</span> </label> <p class="mb-20"> <?php echo e(translate('Edit_product_thumbnail_images_for_this_product.')); ?> <span class="text-info d-block"> <?php echo e(getFileUploadFormats(skip: '.svg, .gif', asBladeMessage: true).' '. translate('Image_size'). ' : '. translate('Max').' '. getFileUploadMaxSize() . 'MB'); ?> <?php echo e(translate('Ratio'). ' (1:1)'); ?> </span> </p> <div class="upload-file"> <input type="file" name="image" class="upload-file__input single_file_input action-upload-color-image" accept="<?php echo e(getFileUploadFormats(skip: '.svg')); ?>" data-imgpreview="static_thumb_preview"> <label class="upload-file__wrapper"> <div class="upload-file-textbox text-center"> <img width="34" height="34" class="svg" src="<?php echo e(dynamicAsset(path: 'public/assets/new/back-end/img/svg/image-upload.svg')); ?>" alt=""> <p class="mt-1 fs-12 text-body text-center mb-0"> <?php echo e(translate('Add')); ?> </p> </div> <img class="upload-file-img" id="static_thumb_preview" loading="lazy" src="<?php echo e(getStorageImages(path:$product->thumbnail_full_url, type:'backend-product')); ?>" data-default-src="<?php echo e(getStorageImages(path:$product->thumbnail_full_url, type:'backend-product')); ?>" alt=""> </label> <div class="overlay"> <div class="d-flex gap-10 justify-content-center align-items-center h-100"> <button type="button" class="btn btn-outline-info icon-btn edit_btn"> <i class="fi fi-rr-camera"></i> </button> </div> </div> </div> </div> </div> <div class="p-12 p-sm-20 bg-section rounded-10 mb-20"> <div class="px-2"> <label class="form-label fw-semibold mb-1"> <?php echo e(translate('additional_image')); ?> </label> <p class="mb-0"> <?php echo e(translate('Edit_additional_images_for_this_product_from_here.')); ?> <span class="text-info d-block"> <?php echo e(getFileUploadFormats(skip: '.svg, .gif', asBladeMessage: true).' '. translate('Image_size'). ' : '. translate('Max').' '. getFileUploadMaxSize() . 'MB'); ?> <?php echo e(translate('Ratio'). ' (1:1)'); ?> </span> </p> <div class="position-relative"> <div class="multi_image_picker space-need d-flex gap-4 pt-4 flex-wrap design_two" data-ratio="1/1" data-field-name="images[]" data-max-count="" data-allowed-formats="<?php echo e(getFileUploadFormats(skip: '.svg,.gif')); ?>" data-validation-error-msg="<?php echo e(translate('File_size_is_too_large_Maximum_').' '.getFileUploadMaxSize().' '.'MB'); ?>" > <?php $finalImages = \App\Utils\ProductManager::getProductDetailsEditImages(product: $product); ?> <?php $__currentLoopData = $finalImages; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $photo): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <?php $uid = rand(1111, 9999); $imagePath = isset($photo['key']) ? getStorageImages(path: $photo, type: 'backend-product') : getStorageImages(path: '', type: 'backend-product'); $fileKey = $photo['key'] ?? $photo; ?> <div class="upload-file m-0 position-relative" id="additional-section-<?php echo e($key); ?>"> <?php if(request('product-gallery')): ?> <button type="button" class="remove_btn btn btn-danger btn-circle w-20 h-20 fs-8 remove-existing-gallery" data-section-remove-id="additional-section-<?php echo e($key); ?>"> <i class="fi fi-sr-cross"></i> </button> <?php else: ?> <a class="remove_btn btn btn-danger btn-circle w-20 h-20 fs-8" href="<?php echo e(route('admin.products.delete-image', [ 'id' => $product->id, 'name' => $fileKey, 'color' => $photo['color'] ?? null ])); ?>"> <i class="fi fi-sr-cross"></i> </a> <?php endif; ?> <label class="upload-file__wrapper"> <img class="upload-file-img" loading="lazy" id="additional_Image_<?php echo e($uid); ?>" src="<?php echo e($imagePath); ?>" data-default-src="<?php echo e($imagePath); ?>" alt=""> </label> <?php if(request('product-gallery')): ?> <input type="hidden" name="existing_images[]" value="<?php echo e($fileKey); ?>"> <?php endif; ?> </div> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </div> </div> </div> </div> </div> <div class="offcanvas-footer shadow-popup"> <div class="d-flex justify-content-center flex-wrap gap-3 bg-white px-4 py-3"> <button type="button" data-bs-dismiss="offcanvas" aria-label="Close" class="btn btn-secondary flex-grow-1"> <?php echo e(translate('Cancel')); ?> </button> <button type="submit" class="btn btn-primary flex-grow-1"> <?php echo e(translate('Update')); ?> </button> </div> </div> </div> </form> <?php /**PATH /home2/slnssare/public_html/resources/views/admin-views/product/partials/offcanvas/_edit-images-offcanvas.blade.php ENDPATH**/ ?>