Files
180081_PHP/templates/Users/view.php
2025-12-01 21:02:58 +01:00

44 lines
1.7 KiB
PHP

<?php
/**
* @var \App\View\AppView $this
* @var \App\Model\Entity\User $user
*/
?>
<div class="row">
<aside class="column">
<div class="side-nav">
<h4 class="heading">Operacje</h4>
<?= $this->Html->link('Edytuj użytkownika', ['action' => 'edit', $user->id], ['class' => 'side-nav-item']) ?>
<?= $this->Form->postLink('Usuń użytkownika', ['action' => 'delete', $user->id], ['confirm' => 'Czy na pewno chcesz usunąć użytkownika nr {0}?', 'class' => 'side-nav-item']) ?>
<?= $this->Html->link('Lista użytkowników', ['action' => 'index'], ['class' => 'side-nav-item']) ?>
<?= $this->Html->link('Dodaj użytkownika', ['action' => 'add'], ['class' => 'side-nav-item']) ?>
</div>
</aside>
<div class="column column-80">
<div class="users view content">
<h3><?= h($user->name) ?></h3>
<table>
<tr>
<th>Nazwa</th>
<td><?= h($user->name) ?></td>
</tr>
<tr>
<th>Email</th>
<td><?= h($user->email) ?></td>
</tr>
<tr>
<th>Id</th>
<td><?= $this->Number->format($user->id) ?></td>
</tr>
<tr>
<th>Utworzono</th>
<td><?= $user->created ? $user->created->i18nFormat('dd.MM.yyyy HH:mm') : '' ?></td>
</tr>
<tr>
<th>Zmodyfikowano</th>
<td><?= $user->modified ? $user->modified->i18nFormat('dd.MM.yyyy HH:mm') : '' ?></td>
</tr>
</table>
</div>
</div>
</div>