| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 |
- <?php
- namespace App;
- use App\Helpers\HtmlHelper;
- /**
- * @var Location[] $locations
- * @var Pagination $pagination
- * @var int $customer_id
- * @var int $location_id
- * @var string $name
- */
- ?>
- <div class="mb-3">
- <h3><?=htmlspecialchars(__("Locations"))?></h3>
- </div>
- <div class="card mb-3">
- <div class="card-header">
- <?=htmlspecialchars(__("Filters"))?>
- </div>
- <div class="card-body">
- <form action="/locations" method="get">
- <div class="row">
- <div class="col-sm-4">
- <div class="mb-3">
- <label class="form-label" for="customer-id"><?= htmlspecialchars(__("Customer")) ?></label>
- <select class="form-select" name="customer_id" id="customer-id">
- <option value=""><?= htmlspecialchars(__("Any Customer")) ?></option>
- <?php
- HtmlHelper::renderOptions(Customer::getOptions(), $customer_id);
- ?>
- </select>
- </div>
- </div>
- <div class="col-sm-4">
- <?php
- View::include("components/location_id_field", compact("location_id"));
- ?>
- </div>
- <div class="col-sm-4">
- <div class="mb-3">
- <label class="form-label" for="name"><?= htmlspecialchars(__("Name")) ?></label>
- <input class="form-control" type="text" name="name" id="name"
- placeholder="<?= htmlspecialchars(__("Type name")) ?>" value="<?=htmlspecialchars($name)?>" />
- </div>
- </div>
- </div>
- <button class="btn btn-primary" type="submit">
- <?=htmlspecialchars(__("Submit"))?>
- </button>
- </form>
- </div>
- </div>
- <?php
- if(empty($locations)) {
- ?>
- <div class="alert alert-info">
- <i class="fa fa-fw fa-info-circle"></i>
- <?=htmlspecialchars(__("No locations to display."))?>
- </div>
- <?php
- }
- else {
- ?>
- <div class="mb-3" id="map" style="height: 480px;" data-locations-page="true">
- </div>
- <?php
- View::include("locations_table", compact("locations", "pagination"));
- $pagination->render();
- }
|