51 lines
2.2 KiB
PHP
51 lines
2.2 KiB
PHP
<?php
|
|
/**
|
|
* @var \App\View\AppView $this
|
|
* @var iterable<\App\Model\Entity\User> $users
|
|
*/
|
|
?>
|
|
<div class="users index content">
|
|
<?= $this->Html->link(__('New User'), ['action' => 'add'], ['class' => 'button float-right']) ?>
|
|
<h3><?= __('Users') ?></h3>
|
|
<div class="table-responsive">
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th><?= $this->Paginator->sort('id') ?></th>
|
|
<th><?= $this->Paginator->sort('nick') ?></th>
|
|
<th><?= $this->Paginator->sort('first') ?></th>
|
|
<th><?= $this->Paginator->sort('last') ?></th>
|
|
<th><?= $this->Paginator->sort('is_admin') ?></th>
|
|
<th class="actions"><?= __('Actions') ?></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php foreach ($users as $user): ?>
|
|
<tr>
|
|
<td><?= $this->Number->format($user->id) ?></td>
|
|
<td><?= h($user->nick) ?></td>
|
|
<td><?= h($user->first) ?></td>
|
|
<td><?= h($user->last) ?></td>
|
|
<td><?= h($user->is_admin) ?></td>
|
|
<td class="actions">
|
|
<?= $this->Html->link(__('View'), ['action' => 'view', $user->id]) ?>
|
|
<?= $this->Html->link(__('Edit'), ['action' => 'edit', $user->id]) ?>
|
|
<?= $this->Form->postLink(__('Delete'), ['action' => 'delete', $user->id], ['confirm' => __('Are you sure you want to delete # {0}?', $user->id)]) ?>
|
|
</td>
|
|
</tr>
|
|
<?php endforeach; ?>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<div class="paginator">
|
|
<ul class="pagination">
|
|
<?= $this->Paginator->first('<< ' . __('first')) ?>
|
|
<?= $this->Paginator->prev('< ' . __('previous')) ?>
|
|
<?= $this->Paginator->numbers() ?>
|
|
<?= $this->Paginator->next(__('next') . ' >') ?>
|
|
<?= $this->Paginator->last(__('last') . ' >>') ?>
|
|
</ul>
|
|
<p><?= $this->Paginator->counter(__('Page {{page}} of {{pages}}, showing {{current}} record(s) out of {{count}} total')) ?></p>
|
|
</div>
|
|
</div>
|