|
|
@@ -4,9 +4,51 @@
|
|
|
<h2><?=htmlspecialchars($customer->name)?> Locations</h2>
|
|
|
</div>
|
|
|
<div class="col-auto">
|
|
|
- <a class="btn btn-outline-primary" href="/account/locations/add?customer_id=<?=$customer->id?>">Add</a>
|
|
|
+ <button type="button" class="btn btn-outline-primary" data-toggle="collapse" data-target="#project-filters">
|
|
|
+ Toggle Filters
|
|
|
+ <?php
|
|
|
+ if($filter_count > 0) {
|
|
|
+ ?>
|
|
|
+ <span class="badge badge-pill badge-danger"><?=$filter_count?></span>
|
|
|
+ <?php
|
|
|
+ }
|
|
|
+ ?>
|
|
|
+ </button>
|
|
|
+ <a class="btn btn-outline-success" href="/account/locations/add?customer_id=<?=$customer->id?>">Add</a>
|
|
|
</div>
|
|
|
</div>
|
|
|
+
|
|
|
+ <?php
|
|
|
+ $filters_show = $filter_count > 0 ? "show" : "";
|
|
|
+ ?>
|
|
|
+
|
|
|
+ <div class="collapse <?=$filters_show?>" id="project-filters">
|
|
|
+ <div class="card mb-3">
|
|
|
+ <div class="card-header">
|
|
|
+ Filters
|
|
|
+ </div>
|
|
|
+ <div class="card-body">
|
|
|
+ <form method="get">
|
|
|
+ <input type="hidden" name="customer_id" value="<?=http::value("customer_id", "int")?>" />
|
|
|
+ <div class="row mb-1">
|
|
|
+ <label class="col-sm-4 col-form-label" for="id">ID</label>
|
|
|
+ <div class="col-sm">
|
|
|
+ <input class="form-control" type="number" name="id" id="id" placeholder="Enter ID" value="<?=htmlspecialchars(http::value("id", "int"))?>" />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="row mb-1">
|
|
|
+ <label class="col-sm-4 col-form-label" for="name">Name</label>
|
|
|
+ <div class="col-sm">
|
|
|
+ <input class="form-control" type="text" name="name" id="name" placeholder="Enter name" value="<?=htmlspecialchars(http::value("name"))?>" />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <button class="btn btn-primary mt-3" type="submit">Submit</button>
|
|
|
+ <a class="btn btn-secondary mt-3" href="/account/locations?customer_id=<?=$customer->id?>">Clear Filters</a>
|
|
|
+ </form>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
<?php
|
|
|
View::include("location_list", compact("locations"));
|
|
|
?>
|