<div class="modal" id="modal-changelog" data-width="512"></div>

<section class="content-header">
    <h1><?= __('Morpheus MuWeb update') ?></h1>
</section>

<section class="content">
    <?php if ($status === 1): ?>
        <div class="callout callout-success">
            <p class="d-flex justify-content-between align-items-center">
                <?= __('CONGRATULATIONS! You are using the latest version of Morpheus MuWeb %s', [MORPHEUS_VERSION]) ?>

                <a data-load-with-modal data-modal="modal-changelog" href="<?= admin_url_to('/update/changelog') ?>"><?= __('Changelog') ?></a>
            </p>
        </div>
    <?php elseif ($status === 2): ?>
        <div class="callout callout-danger">
            <p><?= __('Could not connect to Morpheus MuWeb servers') ?></p>
        </div>
    <?php else: ?>
        <div class="box box-default">
            <div class="box-body">
                <p><?= __('Your version') ?>: <strong><?= MORPHEUS_VERSION ?></strong></p>
                <p><?= __('New version available') ?>: <strong><a data-load-with-modal data-modal="modal-changelog" href="<?= admin_url_to('/update/changelog?versions=' . join(',', $versions)) ?>"><?= $version ?></a></strong></p>

                <a class="btn btn-default" data-ajax-action data-confirm="<?= __('Are you sure you want to update the version of Morpheus MuWeb') ?>" href="<?= admin_url_to('/update/apply') ?>"><?= __('Update') ?></a>
            </div>
        </div>
    <?php endif ?>
</section>