location_list.php 503 B

12345678910111213141516171819202122232425
  1. <?php
  2. if(empty($locations)) {
  3. ?>
  4. <div class="alert alert-info">
  5. No locations to display.
  6. </div>
  7. <?php
  8. }
  9. else {
  10. ?>
  11. <div class="list-group">
  12. <?php
  13. foreach($locations as $location) {
  14. ?>
  15. <a class="list-group-item list-group-item-action" href="/account/locations/<?=$location->id?>">
  16. <?=htmlspecialchars($location->name)?><br />
  17. <small><?=htmlspecialchars($location->getDisplayAddress(["address_1", "address_2", "city", "postal_code"]))?></small>
  18. </a>
  19. <?php
  20. }
  21. ?>
  22. </div>
  23. <?php
  24. }
  25. ?>