View file modules/community/templates/top.phtml

File size: 1.14Kb
<?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 $data
 */

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

<div class="mb-3 mt-n1" role="group">
    <?php foreach ($data['tabs'] as $tab): ?>
        <a href="<?= $tab['url'] ?>" class="btn btn-outline-secondary mt-1 <?= ($tab['active'] ? 'active' : '') ?>"><?= $tab['name'] ?></a>
    <?php endforeach; ?>
</div>

<!-- List of Users -->
<?php if ($data['total']): ?>
    <?php foreach ($data['list'] as $usr): ?>
        <?= $this->fetch('users::user_row', ['item' => $usr, 'active_tab' => $data['active_tab']]) ?>
    <?php endforeach ?>
<?php else: ?>
    <div class="row">
        <div class="col-md-6">
            <div class="alert alert-info"><?= __('List is empty') ?></div>
        </div>
    </div>
<?php endif ?>

<div class="mt-3">
    <div>
        <a href="../"><?= __('Back') ?></a>
    </div>
</div>