| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- <?php /** @noinspection PhpUnhandledExceptionInspection */
- namespace App;
- /**
- * @var Sale[] $sales
- */
- $core = Core::getInstance();
- $user = $core->getUser();
- ?>
- <table class="table table-bordered table-hover mb-3">
- <colgroup>
- <col style="width: 1%"/>
- <col style="width: 15%"/>
- <col style="width: 40%"/>
- <col style="width: 15%"/>
- <col style="width: 15%"/>
- <col style="width: 15%"/>
- <col style="width: 1%"/>
- </colgroup>
- <thead>
- <tr>
- <th><?=htmlspecialchars(__("Ref."))?></th>
- <th><?=htmlspecialchars(__("Date"))?></th>
- <th><?=htmlspecialchars(__("Location"))?></th>
- <th><?=htmlspecialchars(__("Status"))?></th>
- <th><?=htmlspecialchars(__("Predicted Sold Date"))?></th>
- <th><?=htmlspecialchars(__("Last Updated"))?></th>
- <th><?=htmlspecialchars(__("Actions"))?></th>
- </tr>
- </thead>
- <tbody>
- <?php
- foreach($sales as $sale) {
- $location = $sale->getLocation();
- ?>
- <tr>
- <td class="text-end">
- <a href="<?=htmlspecialchars($sale->getUrl())?>"><?=htmlspecialchars($sale->getReference())?></a>
- </td>
- <td>
- <?=htmlspecialchars($user->formatDate($sale->getDateTimeCreated()))?>
- </td>
- <td>
- <a href="<?=htmlspecialchars($location->getUrl())?>">
- <?=htmlspecialchars($location->getDisplayName())?>
- </a>
- </td>
- <td>
- <?=htmlspecialchars($sale->getDisplayStatus())?>
- </td>
- <td>
- <?=htmlspecialchars($sale->getDisplayPredictedSoldDate())?>
- </td>
- <td>
- <?php
- $dt_updated = $sale->getDateTimeUpdated();
- if($dt_updated) {
- echo $dt_updated->diffForHumans();
- }
- ?>
- </td>
- <td class="p-1">
- <a class="btn btn-sm btn-primary" href="<?=htmlspecialchars($sale->getUrl())?>">
- <?=htmlspecialchars(__("View"))?>
- </a>
- </td>
- </tr>
- <?php
- }
- ?>
- </tbody>
- </table>
|