63 lines
1.9 KiB
PHP
63 lines
1.9 KiB
PHP
<?php
|
|
/**
|
|
* @var \App\View\AppView $this
|
|
* @var iterable<\App\Model\Entity\Tool> $tools
|
|
*/
|
|
?>
|
|
<div class="tools index content">
|
|
<?= $this->Html->link(__('Dodaj nowe'),
|
|
['action' => 'add'],
|
|
['class' => 'button float-right'])
|
|
?>
|
|
<h3><?= __('Lista narzedzi') ?></h3>
|
|
<div class="table-responsive">
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th><?= $this->Paginator->sort('id') ?></th>
|
|
<th><?= $this->Paginator->sort('name','Nazwa') ?></th>
|
|
<th><?= $this->Paginator->sort('quantity','Ilość') ?></th>
|
|
<th><?= $this->Paginator->sort('active','Aktywne') ?></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 ($tools as $tool): ?>
|
|
<tr>
|
|
<td><?= $this->Number->format($tool->id) ?></td>
|
|
<td><?= h($tool->name) ?></td>
|
|
<td><?= $this->Number->format($tool->quantity) ?></td>
|
|
<td><?= h($tool->active) ?></td>
|
|
<td><?= $tool->created ? $tool->created->i18nFormat('dd.MM.yyyy HH:mm') : '' ?></td>
|
|
<td><?= $tool->modified ? $tool->modified->i18nFormat('dd.MM.yyyy HH:mm') : '' ?></td>
|
|
<td class="actions">
|
|
<?= $this->Html->link(__('Podgląd'),
|
|
['action' => 'view', $tool->id]) ?>
|
|
<?= $this->Html->link(__('Edytuj'),
|
|
['action' => 'edit', $tool->id]) ?>
|
|
<?= $this->Form->postLink( __('Usuń'),
|
|
['action' => 'delete', $tool->id],
|
|
['method' => 'delete',
|
|
'confirm' => __('Na pewno usunąć {0}?', $tool->name),])
|
|
?>
|
|
</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}},
|
|
widok {{current}} rekordów z {{count}}')) ?></p>
|
|
</div>
|
|
</div>
|