|
|
@@ -1,3 +1,7 @@
|
|
|
+<?php
|
|
|
+$filters_collapse = $filter_count ? "collapse show" : "collapse";
|
|
|
+?>
|
|
|
+
|
|
|
<div class="container mt-3 py-4">
|
|
|
|
|
|
<div class="row">
|
|
|
@@ -11,49 +15,64 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
- <div class="collapse" id="filters">
|
|
|
- <div class="card card-body mb-3">
|
|
|
- <h3>Filters</h3>
|
|
|
- <form method="get">
|
|
|
-
|
|
|
- <div class="row">
|
|
|
- <div class="col-3">
|
|
|
- <div class="form-group">
|
|
|
- <label for="status">Status</label>
|
|
|
- <select class="form-control" name="status" id="status">
|
|
|
- <option value="">Any</option>
|
|
|
- <?php
|
|
|
- foreach(Test::STATUSES as $value => $display) {
|
|
|
- $selected = ($value === $status) ? "selected" : "";
|
|
|
- ?>
|
|
|
- <option value="<?=$value?>" <?=$selected?>><?=htmlspecialchars($display)?></option>
|
|
|
+ <div class="<?=$filters_collapse?>" id="filters">
|
|
|
+ <form method="get">
|
|
|
+ <div class="card mb-3">
|
|
|
+ <div class="card-header">
|
|
|
+ Filters
|
|
|
+ </div>
|
|
|
+ <div class="card-body">
|
|
|
+ <div class="row">
|
|
|
+ <div class="col-3">
|
|
|
+ <div class="form-group">
|
|
|
+ <label for="status">Status</label>
|
|
|
+ <select class="form-control" name="status" id="status">
|
|
|
+ <option value="">Any</option>
|
|
|
<?php
|
|
|
- }
|
|
|
- ?>
|
|
|
- </select>
|
|
|
+ foreach(Test::STATUSES as $value => $display) {
|
|
|
+ $selected = ($value === $status) ? "selected" : "";
|
|
|
+ ?>
|
|
|
+ <option value="<?=$value?>" <?=$selected?>><?=htmlspecialchars($display)?></option>
|
|
|
+ <?php
|
|
|
+ }
|
|
|
+ ?>
|
|
|
+ </select>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- <div class="col-3">
|
|
|
- <div class="form-group">
|
|
|
- <label for="project-id">Project</label>
|
|
|
+ <div class="col-3">
|
|
|
+ <div class="form-group">
|
|
|
+ <label for="project-id">Project</label>
|
|
|
+ <select class="form-control" name="project_id" id="project-id">
|
|
|
+ <option value="">Select project</option>
|
|
|
+ <?php
|
|
|
+ foreach($projects as $project) {
|
|
|
+ $selected = ($project->id == $project_id) ? "selected" : "";
|
|
|
+ ?>
|
|
|
+ <option value="<?=$project->id?>" <?=$selected?>><?=htmlspecialchars($project->name)?></option>
|
|
|
+ <?php
|
|
|
+ }
|
|
|
+ ?>
|
|
|
+ </select>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- <div class="col-3">
|
|
|
- <div class="form-group">
|
|
|
- <label for="location-id">Location ID</label>
|
|
|
+ <div class="col-3">
|
|
|
+ <div class="form-group">
|
|
|
+ <label for="location-id">Location ID</label>
|
|
|
+ <input class="form-control" type="text" name="location_id" id="location-id" placeholder="Enter location ID" value="<?=$location_id?>" />
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- <div class="col-3">
|
|
|
- <div class="form-group">
|
|
|
- <label for="test-id">Test ID</label>
|
|
|
+ <div class="col-3">
|
|
|
+ <div class="form-group">
|
|
|
+ <label for="test-id">Test ID</label>
|
|
|
+ <input class="form-control" type="text" name="test_id" id="test-id" placeholder="Enter test ID" value="<?=$test_id?>" />
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <button class="btn btn-primary" type="submit">Filter</button>
|
|
|
+ <a class="btn btn-secondary" href="/account/tests">Clear Filters</a>
|
|
|
</div>
|
|
|
-
|
|
|
- <button class="btn btn-primary" type="submit">Filter</button>
|
|
|
- <a class="btn btn-secondary" href="/account/tests">Clear Filters</a>
|
|
|
- </form>
|
|
|
- </div>
|
|
|
+ </div>
|
|
|
+ </form>
|
|
|
</div>
|
|
|
|
|
|
<?php
|