CakeAddresses/templates/States/index.php

64 lines
3.1 KiB
PHP
Raw Normal View History

2025-11-18 08:43:34 +00:00
<?php
/**
* @var \App\View\AppView $this
* @var iterable<\Cake\Datasource\EntityInterface> $states
*/
?>
<div class="states index content">
<h3><?= __('States') ?></h3>
<div class="table-responsive">
<table>
<thead>
<tr>
<th><?= $this->Paginator->sort('id') ?></th>
<th><?= $this->Paginator->sort('name') ?></th>
<th><?= $this->Paginator->sort('country_id') ?></th>
<th><?= $this->Paginator->sort('country_code') ?></th>
<th><?= $this->Paginator->sort('fips_code') ?></th>
<th><?= $this->Paginator->sort('iso2') ?></th>
<th><?= $this->Paginator->sort('type') ?></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 ($states as $state): ?>
<tr>
<td><?= $this->Number->format($state->id) ?></td>
<td><?= h($state->name) ?></td>
<td><?= $state->hasValue('country') ? $this->Html->link($state->country->name, ['controller' => 'Countries', 'action' => 'view', $state->country->id]) : '' ?></td>
<td><?= h($state->country_code) ?></td>
<td><?= h($state->fips_code) ?></td>
<td><?= h($state->iso2) ?></td>
<td><?= h($state->type) ?></td>
<td><?= $state->latitude === null ? '' : $this->Number->format($state->latitude) ?></td>
<td><?= $state->longitude === null ? '' : $this->Number->format($state->longitude) ?></td>
<td><?= h($state->created_at) ?></td>
<td><?= h($state->updated_at) ?></td>
<td><?= h($state->flag) ?></td>
<td><?= h($state->wikiDataId) ?></td>
<td class="actions">
<?= $this->Html->link(__('View'), ['action' => 'view', $state->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>