<?php /** * @author Amasty Team * @copyright Copyright (c) Amasty (https://www.amasty.com) * @package Advanced Product Reviews Base for Magento 2 */ /** * @var \Amasty\AdvancedReview\Block\Images $block * @var \Magento\Framework\Escaper $escaper */ $collection = $block->getCollection(); ?> <?php if ($collection->getSize()) : ?> <div id="amreview-id-<?= $block->escapeHtmlAttr($block->getReviewId()); ?>" class="amreview-images"><?php foreach ($collection as $item) : ?> <div class="amreview-slider-item" data-amreview-js="slider-item"><a href="<?= $escaper->escapeUrl($block->getFullImagePath($item)) ?>" class="amreview-image-link" data-amreview-js="review-image"><img class="amreview-image" src="<?= /* @noEscape */ $block->getResizedImagePath($item);?>" title="<?= $block->escapeHtml(__('Review image')); ?>" alt="<?= $block->escapeHtml(__('Review image')); ?>" style="max-height: <?= /* @noEscape */ (int)$block->getMaxHeight();?>px" /></a> <label class="amreview-remove-image" title="<?= $block->escapeHtml(__('Remove image')); ?>"><input class="amreview-checkbox" value="1" type="checkbox" name="review_remove_image[<?= /* @noEscape */ (int)$item->getId();?>]" ><?= $block->escapeHtml(__('Remove'));?></label></div><?php endforeach; ?></div><script>
        require([
            "jquery",
            "Amasty_AdvancedReview/vendor/fancybox/jquery.fancybox.min"
        ], function ($) {
            $('[data-amreview-js="review-image"]').fancybox();
        });</script><?php endif;?>