<?php
/**
 * Copyright © Magefan (support@magefan.com). All rights reserved.
 * Please visit Magefan.com for license details (https://magefan.com/end-user-license-agreement).
 */

/**
 * @var $block \Magefan\SeoCrosslink\Block\Adminhtml\Stats
 * @var $escaper \Magento\Framework\Escaper
 */

// A new rule has no history yet, and the unfiltered grid would list every rule's
if (!(int)$block->getRequest()->getParam('id')) {
    return;
}
?>
<style>
    .mfseo-rule-history { margin-top: 40px; }
    .mfseo-rule-history .mfseo-note { color: #6a6a6a; margin: -10px 0 0; }
</style>
<div class="mfseo-rule-history">
    <div class="admin__page-section-title">
        <strong class="title"><?= $escaper->escapeHtml(__('Cross Links History')) ?></strong>
    </div>
    <p class="mfseo-note">
        <?= $escaper->escapeHtml(__('Pages this cross link has been placed on, recorded as they are visited.')) ?>
        <?php if (!$block->isHistoryEnabled()): ?>
            <br/><?= $escaper->escapeHtml(__('Cross Links History is off')) ?> &mdash;
            <a href="<?= $escaper->escapeUrl($block->getConfigUrl()) ?>">
                <?= $escaper->escapeHtml(__('Open settings')) ?></a>
        <?php endif; ?>
    </p>
    <?= $block->getChildHtml() ?>
</div>
