sales_table.php 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <?php /** @noinspection PhpUnhandledExceptionInspection */
  2. namespace App;
  3. /**
  4. * @var Sale[] $sales
  5. */
  6. ?>
  7. <table class="table table-bordered table-hover mb-3">
  8. <colgroup>
  9. <col style="width: 1%"/>
  10. <col style="width: 33%"/>
  11. <col style="width: 33%"/>
  12. <col style="width: 33%"/>
  13. <col style="width: 1%"/>
  14. </colgroup>
  15. <thead>
  16. <tr>
  17. <th><?=htmlspecialchars(__("No."))?></th>
  18. <th><?=htmlspecialchars(__("Location"))?></th>
  19. <th><?=htmlspecialchars(__("Status"))?></th>
  20. <th><?=htmlspecialchars(__("Predicted Sold Date"))?></th>
  21. <th><?=htmlspecialchars(__("Actions"))?></th>
  22. </tr>
  23. </thead>
  24. <tbody>
  25. <?php
  26. foreach($sales as $sale) {
  27. $location = $sale->getLocation();
  28. ?>
  29. <tr>
  30. <td class="text-end">
  31. <a href="<?=htmlspecialchars($sale->getUrl())?>"><?=htmlspecialchars($sale->getNumber())?></a>
  32. </td>
  33. <td>
  34. <a href="<?=htmlspecialchars($location->getUrl())?>">
  35. <?=htmlspecialchars($location->getDisplayName())?>
  36. </a>
  37. </td>
  38. <td>
  39. <?=htmlspecialchars($sale->getDisplayStatus())?>
  40. </td>
  41. <td>
  42. <?=htmlspecialchars($sale->getDisplayPredictedSoldDate())?>
  43. </td>
  44. <td class="p-1">
  45. <a class="btn btn-sm btn-primary" href="<?=htmlspecialchars($sale->getUrl())?>">
  46. <?=htmlspecialchars(__("View"))?>
  47. </a>
  48. </td>
  49. </tr>
  50. <?php
  51. }
  52. ?>
  53. </tbody>
  54. </table>