| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- <?php /** @noinspection PhpUnhandledExceptionInspection */
- namespace App;
- /**
- * @var Location[] $locations
- */
- ?>
- <table class="table table-bordered table-hover mb-3">
- <colgroup>
- <col style="width: 1%"/>
- <col style="width: 20%"/>
- <col style="width: 20%"/>
- <col style="width: 50%"/>
- <col style="width: 10%"/>
- <col style="width: 1%"/>
- </colgroup>
- <thead>
- <tr>
- <th><?=htmlspecialchars(__("ID"))?></th>
- <th><?=htmlspecialchars(__("Customer"))?></th>
- <th><?=htmlspecialchars(__("Name"))?></th>
- <th><?=htmlspecialchars(__("Address"))?></th>
- <th><?=htmlspecialchars(__("Map"))?></th>
- <th><?=htmlspecialchars(__("Actions"))?></th>
- </tr>
- </thead>
- <tbody>
- <?php
- foreach($locations as $location) {
- $customer = $location->getCustomer();
- $address = $location->getAddress();
- ?>
- <tr>
- <td class="text-end"><?=$location->id?></td>
- <td>
- <a href="<?=htmlspecialchars($customer->getUrl())?>">
- <?=htmlspecialchars($customer->name)?>
- </a>
- </td>
- <td>
- <?=htmlspecialchars($location->name)?>
- </td>
- <td>
- <?=htmlspecialchars(implode(", ", $address->getLines()))?>
- </td>
- <td>
- <?php
- if($address->hasGeolocation()) {
- ?>
- <i class="fa fa-fw fa-check text-success lat-lng-icon" data-latitude="<?=$address->latitude?>" data-longitude="<?=$address->longitude?>" style="cursor: pointer"></i>
- <?php
- }
- else {
- ?>
- <i class="fa fa-fw fa-times text-danger"></i>
- <?php
- }
- ?>
- </td>
- <td class="p-1">
- <a class="btn btn-sm btn-primary" href="<?=htmlspecialchars($location->getUrl())?>">
- <?=htmlspecialchars(__("View"))?>
- </a>
- </td>
- </tr>
- <?php
- }
- ?>
- </tbody>
- </table>
|