summaryrefslogtreecommitdiff
path: root/app/Template/user_list/listing.php
blob: 3bd38495c62e79a2fbf6e8b46f07be7c6179bc02 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<div class="page-header">
    <?php if ($this->user->hasAccess('UserCreationController', 'show')): ?>
    <ul>
        <li>
            <?= $this->modal->medium('plus', t('New user'), 'UserCreationController', 'show') ?>
        </li>
        <li>
            <?= $this->modal->medium('paper-plane', t('Invite people'), 'UserInviteController', 'show') ?>
        </li>
        <li>
            <?= $this->modal->medium('upload', t('Import'), 'UserImportController', 'show') ?>
        </li>
        <li>
            <?= $this->url->icon('users', t('View all groups'), 'GroupListController', 'index') ?>
        </li>
    </ul>
    <?php endif ?>
</div>


<div class="filter-box margin-bottom">
    <form method="get" action="<?= $this->url->dir() ?>" class="search">
        <?= $this->form->hidden('controller', array('controller' => 'UserListController')) ?>
        <?= $this->form->hidden('action', array('action' => 'search')) ?>

        <div class="input-addon">
            <?= $this->form->text('search', $values, array(), array('placeholder="'.t('Search').'"'), 'input-addon-field') ?>
        </div>
    </form>
</div>

<?php if ($paginator->isEmpty()): ?>
    <p class="alert"><?= t('No users found.') ?></p>
<?php elseif (! $paginator->isEmpty()): ?>
    <div class="table-list">
        <?= $this->render('user_list/header', array('paginator' => $paginator)) ?>
        <?php foreach ($paginator->getCollection() as $user): ?>
            <div class="table-list-row table-border-left">
                <?= $this->render('user_list/user_title', array(
                    'user' => $user,
                )) ?>

                <?= $this->render('user_list/user_details', array(
                    'user' => $user,
                )) ?>

                <?= $this->render('user_list/user_icons', array(
                    'user' => $user,
                )) ?>
            </div>
        <?php endforeach ?>
    </div>

    <?= $paginator ?>
<?php endif ?>