| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980 |
- <div class="container mt-3 py-4">
- <input type="hidden" id="csrf-token" value="<?=htmlspecialchars($_SESSION["csrf_token"])?>" />
- <div class="row">
- <div class="col">
- <h2><?=htmlspecialchars(__("Find Tests"))?></h2>
- </div>
- <div class="col-auto">
- <a id="claim-tests-button" class="btn btn-primary disabled" href="#" data-toggle="modal" data-target="#modal-test-claim">
- <?=sprintf(htmlspecialchars(__("Claim %s0%s ...")), '<span id="claim-number">', '</span>')?>
- </a>
- </div>
- </div>
- <div class="card mb-3">
- <div class="card-body">
- <?=htmlspecialchars(__("On this page you can search for tests that are currently available. Please use the \"Select\" buttons or click on the map markers to select and deselect a test. After you have made your selections, please click the \"Claim\" button on the top-right of this page to assign yourself the tests."))?>
- </div>
- </div>
- <div class="row">
- <div class="col-lg-6 order-2 order-lg-1 mb-3 mb-lg-0">
- <div class="list-group limit-height-2">
- <?php
- foreach($tests as $test) {
- $location = $test->getLocation();
- $distance = Geolocation::getDistance($location->getGeolocation(), $address->getGeolocation());
- $distance_formatted = number_format($distance, 1);
- $project = $test->getProject();
- $template = $project->getTemplate();
- ?>
- <div class="list-group-item">
- <div class="d-flex justify-content-between">
- <div>
- <div><?=htmlspecialchars($location->name)?></div>
- <div><small><?=htmlspecialchars($location->getDisplayAddress())?></small></div>
- <div>
- <small><strong><?=htmlspecialchars(__("Type:"))?></strong> <?=htmlspecialchars($template->name)?></small>
- <?php
- if($project->isNighttime()) {
- ?>
- <span class="badge badge-dark">
- <i class="fas fa-fw fa-moon"></i>
- <?=htmlspecialchars(__("Nighttime"))?>
- </span>
- <?php
- }
- ?>
- </div>
- <div>
- <small>
- <?=sprintf(htmlspecialchars(__("%s%s mi%s from your %s address")), '<strong>', '</strong>', htmlspecialchars($address->name))?>
- </small>
- </div>
- </div>
- <button class="btn btn-primary align-self-start" data-test-id="<?=$test->id?>"><?=htmlspecialchars(__("Select"))?></button>
- </div>
- </div>
- <?php
- }
- ?>
- </div>
- </div>
- <div class="col-lg-6 order-1 order-lg-2 mb-3 mb-lg-0">
- <div class="input-group mb-3">
- <div class="input-group-prepend">
- <span class="input-group-text">
- <?=htmlspecialchars(__("Location"))?>
- </span>
- </div>
- <input class="form-control" type="text" data-autocomplete="map" />
- </div>
- <div id="map" data-maps data-lat="<?=$latitude?>" data-lng="<?=$longitude?>" data-zoom="9" data-callback="getTests" style="width: 100%; height: 458px;">
- </div>
- </div>
- </div>
- </div>
|