<?php
/** @var \Magetop\Advancepreview\Block\Adminhtml\Product\Edit\PreviewAdditionalTab $block */
// echo get_class($block);
$productId = $block->getRequest()->getParam('product_id',0);
$additional = $block->getAdditionalProductId($productId);
// print_r($additional->getData());
?>
<table style="width:100%" id="table-product-additional-review-list">
    <tr>
        <th><?php echo __('Title') ?></th>
        <th><?php echo __('Price') ?></th>
        <th><?php echo __('Tooltip Information') ?></th>
        <th><?php echo __('Edit') ?></th>
        <th><?php echo __('Delete') ?></th>
    </tr>
    <?php if($additional && $additional->getSize() > 0) : ?>
        <?php foreach ($additional as $item) : ?>
            <tr>
                <td><?php echo $item->getData('title') ?></td>
                <td><?php echo $item->getData('price') ?></td>
                <td><?php echo $item->getData('description') ?></td>
                <td><span class="preview-additional-item-edit" additional-id="<?php echo $item->getId(); ?>"><?php echo __('Edit') ?></span></td>
                <td><span class="preview-additional-item-delete" additional-id="<?php echo $item->getId(); ?>"><?php echo __('Delete') ?></span></td>
            </tr>
        <?php endforeach; ?>
    <?php endif; ?>
</table>
