<?php

/**
 * This file is part of JohnCMS Content Management System.
 *
 * @copyright JohnCMS Community
 * @license   https://opensource.org/licenses/GPL-3.0 GPL-3.0
 * @link      https://johncms.com JohnCMS Project
 */

/**
 * @var $title
 * @var $page_title
 * @var $urls
 * @var $action_url
 * @var $extensions
 * @var $screen_attached
 * @var $moderation
 * @var $screen_attached_error
 */

$this->layout(
    'system::layout/default',
    [
        'title'      => $title,
        'page_title' => $page_title,
    ]
);
?>

<div class="alert alert-success">
    <div><?= __('File attached') ?></div>
    <?php if ($screen_attached === true): ?>
        <div><?= __('Screenshot is attached') ?></div>
    <?php elseif ($screen_attached === false): ?>
        <div><?= __('Screenshot not attached') ?> <?= $screen_attached_error ?></div>
    <?php endif; ?>
</div>

<?php if ($moderation): ?>
    <div class="alert alert-info">
        <?= __('If you pass moderation, it will be added to the Downloads') ?>
    </div>
<?php else: ?>
    <div class="mb-3">
        <a href="<?= $urls['view_file_url'] ?>" class="btn btn-outline-primary btn-sm"><?= __('Continue') ?></a>
    </div>
<?php endif; ?>

<div>
    <a href="?act=files_upload&amp;id=<?= $id ?>" class="btn btn-primary"><?= __('Upload more') ?></a>
    <a href="?id=<?= $id ?>" class="btn btn-secondary"><?= __('Cancel') ?></a>
</div>
