map_overview.php 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. <?php /** @noinspection PhpUnhandledExceptionInspection */
  2. /**
  3. * @var Customer[] $customers
  4. * @var Project[] $projects
  5. */
  6. ?>
  7. <div class="container mt-3 py-4">
  8. <input type="hidden" id="submit" value="<?=$_SESSION["csrf_token"]?>" />
  9. <h2>Map Overview</h2>
  10. <div class="row">
  11. <div class="col-lg-6">
  12. <div class="form-group">
  13. <label for="location">Location</label>
  14. <input type="text" class="form-control" id="location" placeholder="Type location" data-autocomplete="map" />
  15. <div class="help-text text-muted">
  16. <small>Type location and select to jump to location.</small>
  17. </div>
  18. </div>
  19. </div>
  20. <div class="col-6 col-lg-3">
  21. <div class="form-group">
  22. <label for="min-date">Min Test Date</label>
  23. <input type="date" class="form-control" id="min-date" placeholder="Type date" />
  24. </div>
  25. </div>
  26. <div class="col-6 col-lg-3">
  27. <div class="form-group">
  28. <label for="max-date">Max Test Date</label>
  29. <input type="date" class="form-control" id="max-date" placeholder="Type date" />
  30. </div>
  31. </div>
  32. </div>
  33. <div class="mb-4" id="map" data-maps data-lat="51.3555177" data-lng="-1.1743197" data-zoom="7" style="height: 512px;"></div>
  34. <div class="row">
  35. <div class="col-md mb-3">
  36. <h3>Testers</h3>
  37. <div class="list-group mb-3">
  38. <a class="list-group-item list-group-item-action d-flex justify-content-between" data-all-addresses data-selected="false">
  39. <div>
  40. All Tester Addresses
  41. </div>
  42. <span class="badge badge-pill badge-lg align-self-center"></span>
  43. </a>
  44. </div>
  45. <h3>Customers</h3>
  46. <div class="list-group d-block">
  47. <?php
  48. foreach($customers as $customer) {
  49. ?>
  50. <a class="list-group-item list-group-item-action d-flex justify-content-between" data-customer-id="<?=$customer->id?>" data-selected="false">
  51. <div>
  52. <?=htmlspecialchars($customer->name)?><br />
  53. <small></small>
  54. </div>
  55. <span class="badge badge-pill badge-lg align-self-center"></span>
  56. </a>
  57. <?php
  58. }
  59. ?>
  60. </div>
  61. </div>
  62. <div class="col-md mb-3">
  63. <h3>Current/Future Projects</h3>
  64. <div class="form-group">
  65. <input class="form-control" type="search" value="" placeholder="<?=htmlspecialchars(__("Type filter"))?>" data-filter-target="#project-list" />
  66. </div>
  67. <div id="project-list" class="list-group d-block limit-height-2">
  68. <?php
  69. foreach($projects as $project) {
  70. $customer = $project->getCustomer();
  71. $unix_deadline = strtotime($project->dts_deadline . " UTC");
  72. $deadline = date("d/m/Y", $unix_deadline);
  73. $icon = null;
  74. if(!$project->isAnytime()) {
  75. $icon = $project->getTimeOfDayIcon();
  76. }
  77. $filter_value = mb_strtolower($customer->name . $project->name);
  78. ?>
  79. <a class="list-group-item list-group-item-action" data-project-id="<?=$project->id?>" data-selected="false" data-filter-value="<?=htmlspecialchars($filter_value)?>">
  80. <div class="w-100">
  81. <div class="d-flex justify-content-between">
  82. <small><strong><?=strtoupper(htmlspecialchars($customer->name))?></strong></small>
  83. <small><strong>DEADLINE: <?=$deadline?></strong></small>
  84. </div>
  85. <?=htmlspecialchars($project->name)?>
  86. <?php
  87. if($icon) {
  88. ?>
  89. <i class="fal fa-<?=$icon?>"></i>
  90. <?php
  91. }
  92. ?>
  93. </div>
  94. <span class="badge badge-pill badge-lg align-self-center"></span>
  95. </a>
  96. <?php
  97. }
  98. ?>
  99. </div>
  100. </div>
  101. </div>
  102. </div>