62 lines
3.0 KiB
PHP
62 lines
3.0 KiB
PHP
|
|
<?php
|
||
|
|
/**
|
||
|
|
* @var \App\View\AppView $this
|
||
|
|
* @var iterable<\Cake\Datasource\EntityInterface> $cities
|
||
|
|
*/
|
||
|
|
?>
|
||
|
|
<div class="cities index content">
|
||
|
|
<h3><?= __('Cities') ?></h3>
|
||
|
|
<div class="table-responsive">
|
||
|
|
<table>
|
||
|
|
<thead>
|
||
|
|
<tr>
|
||
|
|
<th><?= $this->Paginator->sort('id') ?></th>
|
||
|
|
<th><?= $this->Paginator->sort('name') ?></th>
|
||
|
|
<th><?= $this->Paginator->sort('state_id') ?></th>
|
||
|
|
<th><?= $this->Paginator->sort('state_code') ?></th>
|
||
|
|
<th><?= $this->Paginator->sort('country_id') ?></th>
|
||
|
|
<th><?= $this->Paginator->sort('country_code') ?></th>
|
||
|
|
<th><?= $this->Paginator->sort('latitude') ?></th>
|
||
|
|
<th><?= $this->Paginator->sort('longitude') ?></th>
|
||
|
|
<th><?= $this->Paginator->sort('created_at') ?></th>
|
||
|
|
<th><?= $this->Paginator->sort('updated_at') ?></th>
|
||
|
|
<th><?= $this->Paginator->sort('flag') ?></th>
|
||
|
|
<th><?= $this->Paginator->sort('wikiDataId') ?></th>
|
||
|
|
<th class="actions"><?= __('Actions') ?></th>
|
||
|
|
</tr>
|
||
|
|
</thead>
|
||
|
|
<tbody>
|
||
|
|
<?php foreach ($cities as $city): ?>
|
||
|
|
<tr>
|
||
|
|
<td><?= $this->Number->format($city->id) ?></td>
|
||
|
|
<td><?= h($city->name) ?></td>
|
||
|
|
<td><?= $city->hasValue('state') ? $this->Html->link($city->state->name, ['controller' => 'States', 'action' => 'view', $city->state->id]) : '' ?></td>
|
||
|
|
<td><?= h($city->state_code) ?></td>
|
||
|
|
<td><?= $city->hasValue('country') ? $this->Html->link($city->country->name, ['controller' => 'Countries', 'action' => 'view', $city->country->id]) : '' ?></td>
|
||
|
|
<td><?= h($city->country_code) ?></td>
|
||
|
|
<td><?= $this->Number->format($city->latitude) ?></td>
|
||
|
|
<td><?= $this->Number->format($city->longitude) ?></td>
|
||
|
|
<td><?= h($city->created_at) ?></td>
|
||
|
|
<td><?= h($city->updated_at) ?></td>
|
||
|
|
<td><?= h($city->flag) ?></td>
|
||
|
|
<td><?= h($city->wikiDataId) ?></td>
|
||
|
|
<td class="actions">
|
||
|
|
<?= $this->Html->link(__('View'), ['action' => 'view', $city->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>
|