location_list.php 788 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. <table class="table table-hover">
  2. <thead>
  3. <tr>
  4. <th>ID</th>
  5. <th>Name / Address</th>
  6. <th></th>
  7. </tr>
  8. </thead>
  9. <tbody>
  10. <?php
  11. foreach($locations as $location) {
  12. ?>
  13. <tr>
  14. <td class="text-right">
  15. <?=$location->id?>
  16. </td>
  17. <td>
  18. <a href="/account/locations/<?=$location->id?>"><?=htmlspecialchars($location->name)?></a><br />
  19. <small><?=htmlspecialchars($location->getDisplayAddress(["address_1", "address_2", "city", "postal_code"]))?></small>
  20. </td>
  21. <td class="text-right align-middle">
  22. <a class="btn btn-outline-primary" href="/account/locations/<?=$location->id?>/edit">Edit</a>
  23. </td>
  24. </tr>
  25. <?php
  26. }
  27. ?>
  28. </tbody>
  29. </table>
  30. <?php
  31. if(empty($locations)) {
  32. ?>
  33. <div class="alert alert-info">
  34. No locations to display.
  35. </div>
  36. <?php
  37. }
  38. ?>