90 lines
4.6 KiB
PHP
90 lines
4.6 KiB
PHP
|
|
<?php
|
||
|
|
/**
|
||
|
|
* @var \App\View\AppView $this
|
||
|
|
* @var iterable<\Cake\Datasource\EntityInterface|\CakeAddresses\Model\Entity\Address> $addresses
|
||
|
|
*/
|
||
|
|
?>
|
||
|
|
<div class="addresses index content">
|
||
|
|
<?= $this->Html->link(__('New Address'), [
|
||
|
|
'plugin' => 'CakeAddresses',
|
||
|
|
'controller' => 'Addresses',
|
||
|
|
'action' => 'add'
|
||
|
|
], [
|
||
|
|
'class' => 'button float-right'
|
||
|
|
]) ?>
|
||
|
|
<h3><?= __('Addresses') ?></h3>
|
||
|
|
<div class="table-responsive">
|
||
|
|
<table>
|
||
|
|
<thead>
|
||
|
|
<tr>
|
||
|
|
<th><?= $this->Paginator->sort('id') ?></th>
|
||
|
|
<th><?= $this->Paginator->sort('address_name') ?></th>
|
||
|
|
<th><?= $this->Paginator->sort('contact_name') ?></th>
|
||
|
|
<th><?= $this->Paginator->sort('address_line1') ?></th>
|
||
|
|
<th><?= $this->Paginator->sort('address_line2') ?></th>
|
||
|
|
<th><?= $this->Paginator->sort('city') ?></th>
|
||
|
|
<th><?= $this->Paginator->sort('city_id') ?></th>
|
||
|
|
<th><?= $this->Paginator->sort('state') ?></th>
|
||
|
|
<th><?= $this->Paginator->sort('state_id') ?></th>
|
||
|
|
<th><?= $this->Paginator->sort('postal_code') ?></th>
|
||
|
|
<th><?= $this->Paginator->sort('country') ?></th>
|
||
|
|
<th><?= $this->Paginator->sort('country_id') ?></th>
|
||
|
|
<th><?= $this->Paginator->sort('phone_number') ?></th>
|
||
|
|
<th><?= $this->Paginator->sort('email') ?></th>
|
||
|
|
<th class="actions"><?= __('Actions') ?></th>
|
||
|
|
</tr>
|
||
|
|
</thead>
|
||
|
|
<tbody>
|
||
|
|
<?php foreach ($addresses as $address): ?>
|
||
|
|
<tr>
|
||
|
|
<td><?= $this->Number->format($address->id) ?></td>
|
||
|
|
<td><?= h($address->address_name) ?></td>
|
||
|
|
<td><?= h($address->contact_name) ?></td>
|
||
|
|
<td><?= h($address->address_line1) ?></td>
|
||
|
|
<td><?= h($address->address_line2) ?></td>
|
||
|
|
<td><?= h($address->city) ?></td>
|
||
|
|
<td><?= $address->hasValue('city_entity') ? $this->Html->link($address->city_entity->name, ['controller' => 'Cities', 'action' => 'view', $address->city_entity->id]) : '' ?></td>
|
||
|
|
<td><?= h($address->state) ?></td>
|
||
|
|
<td><?= $address->hasValue('state_entity') ? $this->Html->link($address->state_entity->name, ['controller' => 'States', 'action' => 'view', $address->state_entity->id]) : '' ?></td>
|
||
|
|
<td><?= h($address->postal_code) ?></td>
|
||
|
|
<td><?= h($address->country) ?></td>
|
||
|
|
<td><?= $address->hasValue('country_entity') ? $this->Html->link($address->country_entity->name, ['controller' => 'Countries', 'action' => 'view', $address->country_entity->id]) : '' ?></td>
|
||
|
|
<td><?= h($address->phone_number) ?></td>
|
||
|
|
<td><?= h($address->email) ?></td>
|
||
|
|
<td class="actions">
|
||
|
|
<?= $this->Html->link(__('View'), [
|
||
|
|
'plugin' => 'CakeAddresses',
|
||
|
|
'controller' => 'Addresses',
|
||
|
|
'action' => 'view',
|
||
|
|
$address->id,
|
||
|
|
]); ?>
|
||
|
|
<?= $this->Html->link(__('Edit'), [
|
||
|
|
'plugin' => 'CakeAddresses',
|
||
|
|
'controller' => 'Addresses',
|
||
|
|
'action' => 'edit',
|
||
|
|
$address->id,
|
||
|
|
]) ?>
|
||
|
|
<?= $this->Form->postLink(__('Delete'), [
|
||
|
|
'plugin' => 'CakeAddresses',
|
||
|
|
'controller' => 'Addresses',
|
||
|
|
'action' => 'delete',
|
||
|
|
$address->id,
|
||
|
|
], ['confirm' => __('Are you sure you want to delete # {0}?', $address->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>
|