| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- <?php
- /**
- * @var Location[] $locations
- */
- ?>
- <div class="table-responsive limit-height-2">
- <table class="table table-sm table-sm-text table-hover">
- <thead>
- <tr>
- <th class="text-right pr-3">ID</th>
- <th>Name / Address</th>
- <th>Legal Entity</th>
- <th>Internal ID</th>
- <th></th>
- </tr>
- </thead>
- <tbody>
- <?php
- foreach($locations as $location) {
- $class = "";
- if($location->isArchived()) $class = "text-muted";
- ?>
- <tr class="<?=$class?>">
- <td class="text-right pr-3">
- <?=$location->id?>
- </td>
- <td>
- <a href="/account/locations/<?=$location->id?>"><?=htmlspecialchars($location->name)?></a>
- <?php
- if($location->closed) {
- ?>
- <span class="badge badge-danger">Closed</span>
- <?php
- }
- if($location->isArchived()) {
- ?>
- <span class="badge badge-secondary"><?=htmlspecialchars(__("Archived"))?></span>
- <?php
- }
- ?>
- <br />
- <small><?=htmlspecialchars($location->getDisplayAddress(["address_1", "address_2", "city", "postal_code"]))?></small>
- </td>
- <td>
- <?=htmlspecialchars($location->legal_entity_name)?>
- </td>
- <td>
- <?=htmlspecialchars($location->internal_id)?>
- </td>
- <td class="text-right align-middle">
- <a class="btn btn-sm btn-outline-primary" href="/account/locations/<?=$location->id?>/edit">Edit</a>
- </td>
- </tr>
- <?php
- }
- ?>
- </tbody>
- </table>
- </div>
- <?php
- if(empty($locations)) {
- ?>
- <div class="alert alert-info">
- No locations to display.
- </div>
- <?php
- }
- ?>
|