57 lines
2.5 KiB
PHP
57 lines
2.5 KiB
PHP
<?php
|
|
/**
|
|
* @var \App\View\AppView $this
|
|
* @var iterable<\App\Model\Entity\User> $users
|
|
*/
|
|
?>
|
|
<div class="users index content">
|
|
<?= $this->Html->link('Dodaj użytkownika', ['action' => 'add'], ['class' => 'button float-right']) ?>
|
|
<h3>Użytkownicy</h3>
|
|
<div class="table-responsive">
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th><?= $this->Paginator->sort('id', 'Id') ?></th>
|
|
<th><?= $this->Paginator->sort('name', 'Nazwa') ?></th>
|
|
<th><?= $this->Paginator->sort('email', 'Email') ?></th>
|
|
<th><?= $this->Paginator->sort('created', 'Utworzono') ?></th>
|
|
<th><?= $this->Paginator->sort('modified', 'Zmodyfikowano') ?></th>
|
|
<th class="actions">Operacje</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php foreach ($users as $user): ?>
|
|
<tr>
|
|
<td><?= $this->Number->format($user->id) ?></td>
|
|
<td><?= h($user->name) ?></td>
|
|
<td><?= h($user->email) ?></td>
|
|
<td><?= $user->created ? $user->created->i18nFormat('dd.MM.yyyy HH:mm') : '' ?></td>
|
|
<td><?= $user->modified ? $user->modified->i18nFormat('dd.MM.yyyy HH:mm') : '' ?></td>
|
|
<td class="actions">
|
|
<?= $this->Html->link('Podgląd', ['action' => 'view', $user->id]) ?>
|
|
<?= $this->Html->link('Edytuj', ['action' => 'edit', $user->id]) ?>
|
|
<?= $this->Form->postLink(
|
|
'Usuń',
|
|
['action' => 'delete', $user->id],
|
|
[
|
|
'method' => 'delete',
|
|
'confirm' => 'Czy na pewno chcesz usunąć użytkownika nr {0}?',
|
|
]
|
|
) ?>
|
|
</td>
|
|
</tr>
|
|
<?php endforeach; ?>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<div class="paginator">
|
|
<ul class="pagination">
|
|
<?= $this->Paginator->first('<< pierwszy') ?>
|
|
<?= $this->Paginator->prev('< poprzedni') ?>
|
|
<?= $this->Paginator->numbers() ?>
|
|
<?= $this->Paginator->next('następny >') ?>
|
|
<?= $this->Paginator->last('ostatni >>') ?>
|
|
</ul>
|
|
<p><?= $this->Paginator->counter('Strona {{page}} z {{pages}}, wyświetlono {{current}} rekordów z {{count}} wszystkich') ?></p>
|
|
</div>
|
|
</div>
|