|
|
@@ -2,9 +2,16 @@
|
|
|
|
|
|
namespace App;
|
|
|
|
|
|
+use App\Helpers\HtmlHelper;
|
|
|
+
|
|
|
/**
|
|
|
* @var Product[] $products
|
|
|
* @var Pagination $pagination
|
|
|
+ * @var int $product_id
|
|
|
+ * @var int $supplier_id
|
|
|
+ * @var string $name
|
|
|
+ * @var string $sku
|
|
|
+ * @var int $type
|
|
|
*/
|
|
|
|
|
|
?>
|
|
|
@@ -20,6 +27,61 @@ namespace App;
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
+<div class="card mb-3">
|
|
|
+ <div class="card-header">
|
|
|
+ <?=htmlspecialchars(__("Filters"))?>
|
|
|
+ </div>
|
|
|
+ <div class="card-body">
|
|
|
+ <form action="/products" method="get">
|
|
|
+ <div class="row">
|
|
|
+ <div class="col-sm-4">
|
|
|
+ <div class="mb-3">
|
|
|
+ <label class="form-label" for="product-id"><?=htmlspecialchars(__("ID"))?></label>
|
|
|
+ <input class="form-control" type="number" name="product_id" id="product-id" placeholder="<?=htmlspecialchars(__("Type ID"))?>" value="<?=htmlspecialchars($product_id)?>" />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="col-sm-4">
|
|
|
+ <div class="mb-3">
|
|
|
+ <label class="form-label" for="supplier-id"><?= htmlspecialchars(__("Supplier")) ?></label>
|
|
|
+ <select class="form-control" name="supplier_id" id="supplier-id">
|
|
|
+ <option value=""><?= htmlspecialchars(__("Any Supplier")) ?></option>
|
|
|
+ <?php
|
|
|
+ HtmlHelper::renderOptions(Supplier::getOptions(), $supplier_id);
|
|
|
+ ?>
|
|
|
+ </select>
|
|
|
+ </div>
|
|
|
+ </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 class="col-sm-4">
|
|
|
+ <div class="mb-3">
|
|
|
+ <label class="form-label" for="sku"><?= htmlspecialchars(__("SKU")) ?></label>
|
|
|
+ <input class="form-control" type="text" name="sku" id="sku" placeholder="<?= htmlspecialchars(__("Type SKU")) ?>" value="<?=htmlspecialchars($sku)?>" />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="col-sm-4">
|
|
|
+ <div class="mb-3">
|
|
|
+ <label class="form-label" for="type"><?=htmlspecialchars(__("Type"))?></label>
|
|
|
+ <select class="form-control" name="type" id="type">
|
|
|
+ <option value=""><?=htmlspecialchars(__("Any Type"))?></option>
|
|
|
+ <?php
|
|
|
+ HtmlHelper::renderOptions(Product::getTypeOptions(), $type);
|
|
|
+ ?>
|
|
|
+ </select>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <button class="btn btn-primary" type="submit">
|
|
|
+ <?=htmlspecialchars(__("Submit"))?>
|
|
|
+ </button>
|
|
|
+ </form>
|
|
|
+ </div>
|
|
|
+</div>
|
|
|
+
|
|
|
<?php
|
|
|
if(empty($products)) {
|
|
|
?>
|