<?php
/** @var \Magetop\Advancepreview\Block\Adminhtml\Product\Edit\Form $block */
$productId = $block->getRequest()->getParam('product_id',0);
$previews = $block->getPreviewByProductId($productId);
//print_r($previews->getData());
?>
<table style="width:100%" id="table-product-review-list">
    <tr>
        <th><?php echo __('Title') ?></th>
         <th><?php echo __('Model File Name') ?></th>
         <th><?php echo __('Is Default') ?></th>
            <?php
            /* <th><?php echo __('Model Light') ?></th>
         <th><?php echo __('Model Zoom') ?></th>
         <th><?php echo __('Model Position') ?></th>
        <th><?php echo __('Created At') ?></th>*/
            ?>
        <th><?php echo __('Edit') ?></th>
        <th><?php echo __('Delete') ?></th>
    </tr>
    <?php foreach ($previews as $preview) : ?>
    <tr>
        <td><?php echo $preview->getData('title') ?></td>
        <td><?php echo $preview->getData('file_preview') ?></td>
        <td><?php echo $preview->getData('is_default') == 1 ? __('Yes') : __('No') ?></td>
        <?php /*
              <td><?php echo $preview->getData('preview_light') ?></td>
        <td><?php echo $preview->getData('preview_zoom') ?></td>
        <td><?php echo $preview->getData('position') ?></td>
        <td><?php echo $preview->getData('created_at') ?></td>
        */ ?>
        <td><span class="preview-item-edit" preview-id="<?php echo $preview->getId(); ?>"><?php echo __('Edit') ?></span></td>
        <td><span class="preview-item-delete" preview-id="<?php echo $preview->getId(); ?>"><?php echo __('Delete') ?></span></td>
    </tr>
    <?php endforeach; ?>
</table>
