Просмотр файла modules/album/templates/users.phtml

Размер файла: 1.28Kb
<?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="btn-group mb-3" role="group">
    <?php foreach ($data['filters'] as $filter): ?>
        <a href="<?= $filter['url'] ?>" class="btn btn-outline-secondary <?= ($filter['active'] ? 'active' : '') ?>"><?= $filter['name'] ?></a>
    <?php endforeach; ?>
</div>

<?php if (empty($data['users'])): ?>
    <?= $this->fetch(
        'system::app/alert',
        [
            'alert_type' => 'alert-info',
            'alert'      => __('The list is empty'),
        ]
    ) ?>
<?php endif; ?>

<?php foreach ($data['users'] as $user_row): ?>
    <?= $this->fetch('album::user_row', ['item' => $user_row]) ?>
<?php endforeach; ?>

<div class="mt-3">
    <?php if ($data['total'] > $user->config->kmess): ?>
        <?= $data['pagination'] ?>
    <?php endif; ?>
    <?php if ($data['total'] > 0): ?>
        <div><?= __('Total:') ?> <?= $data['total'] ?></div>
    <?php endif; ?>
</div>