1
0

location_list.php 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <div class="table-responsive limit-height-2">
  2. <table class="table table-sm table-hover">
  3. <thead>
  4. <tr>
  5. <th class="text-right pr-3">ID</th>
  6. <th>Name / Address</th>
  7. <th></th>
  8. </tr>
  9. </thead>
  10. <tbody>
  11. <?php
  12. foreach($locations as $location) {
  13. ?>
  14. <tr>
  15. <td class="text-right pr-3">
  16. <?=$location->id?>
  17. </td>
  18. <td>
  19. <a href="/account/locations/<?=$location->id?>"><?=htmlspecialchars($location->name)?></a>
  20. <?php
  21. if($location->closed) {
  22. ?>
  23. <span class="badge badge-danger">Closed</span>
  24. <?php
  25. }
  26. ?>
  27. <br />
  28. <?php
  29. if($location->internal_id) {
  30. ?>
  31. <small class="text-info">Internal ID: <?=htmlspecialchars($location->internal_id)?></small><br />
  32. <?php
  33. }
  34. ?>
  35. <small><?=htmlspecialchars($location->getDisplayAddress(["address_1", "address_2", "city", "postal_code"]))?></small>
  36. </td>
  37. <td class="text-right align-middle">
  38. <a class="btn btn-outline-primary" href="/account/locations/<?=$location->id?>/edit">Edit</a>
  39. </td>
  40. </tr>
  41. <?php
  42. }
  43. ?>
  44. </tbody>
  45. </table>
  46. </div>
  47. <?php
  48. if(empty($locations)) {
  49. ?>
  50. <div class="alert alert-info">
  51. No locations to display.
  52. </div>
  53. <?php
  54. }
  55. ?>