<?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 $file
 */
?>

<div class="forum-section post-item mb-2">
    <div class="section-header d-flex justify-content-between <?= (empty($file['preview_text']) ? 'border-0 pb-0' : '') ?>">
        <div class="d-flex align-items-center">
            <span class="mr-2"><img src="<?= $file['icon'] ?>" alt="icon"></span>
            <a href="<?= $file['detail_url'] ?>" class="text-dark-brown"><?= $file['rus_name'] ?></a>
            <span class="badge badge-pill badge-light border ml-3"><?= $file['field'] ?></span>
        </div>
    </div>
    <?php if (! empty($file['preview_text'])): ?>
        <div class="small pt-2 text-muted">
            <div><?= $file['preview_text'] ?></div>
        </div>
    <?php endif; ?>
    <?php if (! empty($file['accept_url'])): ?>
        <div class="mt-2">
            <a href="<?= $file['accept_url'] ?>" class="btn btn-success btn-sm"><?= __('Accept') ?></a>
            <a href="<?= $file['delete_url'] ?>" class="btn btn-danger btn-sm"><?= __('Delete') ?></a>
        </div>
    <?php endif; ?>
</div>
