Skip to content

Commit f598541

Browse files
committed
Fix templates
1 parent ebb4bfb commit f598541

File tree

2 files changed

+7
-13
lines changed

2 files changed

+7
-13
lines changed

templates/Admin/GeocodedAddresses/index.php

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@
2121
<th><?= $this->Paginator->sort('address') ?></th>
2222
<th><?= $this->Paginator->sort('formatted_address') ?></th>
2323
<th><?= $this->Paginator->sort('country') ?></th>
24-
<th><?= $this->Paginator->sort('lat') ?></th>
25-
<th><?= $this->Paginator->sort('lng') ?></th>
24+
<th><?= __('Coordinates') ?></th>
2625
<th class="actions"><?= __('Actions') ?></th>
2726
</tr>
2827
</thead>
@@ -32,12 +31,11 @@
3231
<td><?= h($geocodedAddress->address) ?></td>
3332
<td><?= h($geocodedAddress->formatted_address) ?></td>
3433
<td><?= h($geocodedAddress->country) ?></td>
35-
<td><?= $this->Number->format($geocodedAddress->lat) ?></td>
36-
<td><?= $this->Number->format($geocodedAddress->lng) ?></td>
34+
<td><?= $geocodedAddress->lat && $geocodedAddress->lng ? $this->Number->format($geocodedAddress->lat) . ' / ' . $this->Number->format($geocodedAddress->lng) : '-' ?></td>
3735
<td class="actions">
38-
<?= $this->Html->link(Plugin::isLoaded('Tools') ? $this->Format->icon('view') : __('View'), ['action' => 'view', $geocodedAddress->id], ['escapeTitle' => false]); ?>
39-
<?= $this->Html->link(Plugin::isLoaded('Tools') ? $this->Format->icon('edit') : __('Edit'), ['action' => 'edit', $geocodedAddress->id], ['escapeTitle' => false]); ?>
40-
<?= $this->Form->postLink(Plugin::isLoaded('Tools') ? $this->Format->icon('delete') : __('Delete'), ['action' => 'delete', $geocodedAddress->id], ['escapeTitle' => false, 'confirm' => __('Are you sure you want to delete # {0}?', $geocodedAddress->id)]); ?>
36+
<?= $this->Html->link(Plugin::isLoaded('Tools') ? $this->Icon->render('view') : __('View'), ['action' => 'view', $geocodedAddress->id], ['escapeTitle' => false]); ?>
37+
<?= $this->Html->link(Plugin::isLoaded('Tools') ? $this->Icon->render('edit') : __('Edit'), ['action' => 'edit', $geocodedAddress->id], ['escapeTitle' => false]); ?>
38+
<?= $this->Form->postLink(Plugin::isLoaded('Tools') ? $this->Icon->render('delete') : __('Delete'), ['action' => 'delete', $geocodedAddress->id], ['escapeTitle' => false, 'confirm' => __('Are you sure you want to delete # {0}?', $geocodedAddress->id)]); ?>
4139
</td>
4240
</tr>
4341
<?php endforeach; ?>

templates/Admin/GeocodedAddresses/view.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,8 @@
2424
<td><?= h($geocodedAddress->country) ?></td>
2525
</tr>
2626
<tr>
27-
<th><?= __('Lat') ?></th>
28-
<td><?= $this->Number->format($geocodedAddress->lat) ?></td>
29-
</tr>
30-
<tr>
31-
<th><?= __('Lng') ?></th>
32-
<td><?= $this->Number->format($geocodedAddress->lng) ?></td>
27+
<th><?= __('Coordinates') ?></th>
28+
<td><?= $geocodedAddress->lat && $geocodedAddress->lng ? $this->Number->format($geocodedAddress->lat) . ' / ' . $this->Number->format($geocodedAddress->lng) : '-' ?></td>
3329
</tr>
3430
<tr>
3531
<th><?= __('Data') ?></th>

0 commit comments

Comments
 (0)