| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091 |
- <?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: 20%"/>
- <col style="width: 30%"/>
- <col style="width: 10%"/>
- <col style="width: 1%"/>
- </colgroup>
- <thead>
- <tr>
- <th><?=htmlspecialchars(__("ID"))?></th>
- <th><?=htmlspecialchars(__("Customer"))?></th>
- <th><?=htmlspecialchars(__("Billing Entity"))?></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();
- $billing_entity = $location->getBillingEntity();
- $address = $location->getAddress();
- ?>
- <tr>
- <td class="text-end"><?=$location->id?></td>
- <td>
- <a href="<?=htmlspecialchars($customer->getUrl())?>">
- <?=htmlspecialchars($customer->name)?>
- </a>
- </td>
- <td>
- <?php
- if($billing_entity) {
- ?>
- <a href="<?=htmlspecialchars($billing_entity->getUrl())?>">
- <?=htmlspecialchars($billing_entity->name)?>
- </a>
- <?php
- }
- else {
- ?>
- <?=htmlspecialchars(__("Default"))?>
- <?php
- }
- ?>
- </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>
|