Added external_id filter to Product/Index
This commit is contained in:
@@ -95,7 +95,7 @@
|
||||
<th></th>
|
||||
</tr>
|
||||
<?php foreach($campaigns as $camp): ?>
|
||||
<tr style="<?=(date('U') >= $camp->from && date('U') <= $camp->to) ? "background-color: #f0fff0" : ""?>">
|
||||
<tr <?=(date('U') >= $camp->from && date('U') <= $camp->to) ? "class='active'" : ""?>>
|
||||
<td class="text-right">
|
||||
<?php if(date('U') >= $camp->from && date('U') <= $camp->to): ?>
|
||||
<span class="fa-stack" title="Vorbestellkampagne aktiv">
|
||||
|
||||
@@ -62,6 +62,25 @@
|
||||
</div>
|
||||
|
||||
<div class="col-2">
|
||||
<label class="form-label" for="filter_external_id">Produktbesitzer</label>
|
||||
<select class="select2 form-control" name="external_id" id="filter_external_id">
|
||||
<option></option>
|
||||
<?php foreach(AddressModel::search(['addresstype' => ['productowner']]) as $owner): ?>
|
||||
<option value="<?=$owner->id?>" <?=(is_array($filter) && array_key_exists('external_id', $filter) && $filter['external_id'] == $owner->id) ? "selected='selected'" : ""?>><?=$owner->getCompanyOrName()?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="col-1">
|
||||
<label class="form-label" for="filter_external">Externe Produkte</label>
|
||||
<select name="filter[external]" id="filter_external" class="form-control">
|
||||
<option></option>
|
||||
<option value="1" <?=(is_array($filter) && array_key_exists('external', $filter) && $filter['external']) ? "selected='selected'" : ""?>>Anzeigen</option>
|
||||
<option value="0" <?=(is_array($filter) && array_key_exists('external', $filter) && !$filter['external']) ? "selected='selected'" : ""?>>Ausblenden</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="col-1">
|
||||
<label class="form-label" for="filter_name">Name</label>
|
||||
<input type="text" class="form-control" name="filter[name]" id="filter_name" value="<?=$filter['name']?>" />
|
||||
</div>
|
||||
@@ -84,14 +103,6 @@
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="col-1">
|
||||
<label class="form-label" for="filter_external">Externe Produkte</label>
|
||||
<select name="filter[external]" id="filter_external" class="form-control">
|
||||
<option></option>
|
||||
<option value="1" <?=(is_array($filter) && array_key_exists('external', $filter) && $filter['external']) ? "selected='selected'" : ""?>>Anzeigen</option>
|
||||
<option value="0" <?=(is_array($filter) && array_key_exists('external', $filter) && !$filter['external']) ? "selected='selected'" : ""?>>Ausblenden</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="row mt-2">
|
||||
@@ -164,6 +175,13 @@
|
||||
<script type="text/javascript">
|
||||
$("#filter_productgroup_id").select2({closeOnSelect: false});
|
||||
$("#filter_producttech_id").select2({closeOnSelect: false});
|
||||
|
||||
$("#filter_external_id").change(function() {
|
||||
console.log($("#filter_external_id").val());
|
||||
if($("#filter_external_id").val()) {
|
||||
$("#filter_external").val(1);
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<?php include(realpath(dirname(__FILE__)."/../../$mfLayoutPackage")."/footer.php"); ?>
|
||||
|
||||
@@ -24,6 +24,19 @@
|
||||
text-align:left;
|
||||
}
|
||||
|
||||
.table-striped tbody tr.active:nth-of-type(odd) {
|
||||
background-color: #e0f5e0;
|
||||
}
|
||||
|
||||
.table-striped tbody tr.active:nth-of-type(even) {
|
||||
background-color: #f0fff0;
|
||||
}
|
||||
|
||||
.table-hover tbody tr.active:hover {
|
||||
color: #212529;
|
||||
background-color: #dbf0db;
|
||||
}
|
||||
|
||||
.btn-primary {
|
||||
color: #fff;
|
||||
background-color: #0d6efd;
|
||||
|
||||
Reference in New Issue
Block a user