| ... | ... |
@@ -3,7 +3,7 @@ |
| 3 | 3 |
{% block filter %}
|
| 4 | 4 |
<form hx-get="{{ insert_tag('env::request') }}" hx-headers='{"VR-Ajax": "WaSlotsModule"}' hx-trigger="change, submit" hx-target="closest .content-wrapper" class="filter">
|
| 5 | 5 |
<div class="row"> |
| 6 |
- <div class="col-md-5 kapazitaet"> |
|
| 6 |
+ <div class="col-md-3 kapazitaet"> |
|
| 7 | 7 |
<select name="filter_kapazitaet"> |
| 8 | 8 |
<option value="">-</option> |
| 9 | 9 |
{% for option in filter.kapazitaet.options %}
|
| ... | ... |
@@ -11,7 +11,7 @@ |
| 11 | 11 |
{% endfor %}
|
| 12 | 12 |
</select> |
| 13 | 13 |
</div> |
| 14 |
- <div class="col-md-5 sorte"> |
|
| 14 |
+ <div class="col-md-3 sorte"> |
|
| 15 | 15 |
<select name="filter_sorte"> |
| 16 | 16 |
<option value="">-</option> |
| 17 | 17 |
{% for key, option in filter.sorte.options %}
|
| ... | ... |
@@ -19,6 +19,14 @@ |
| 19 | 19 |
{% endfor %}
|
| 20 | 20 |
</select> |
| 21 | 21 |
</div> |
| 22 |
+ <div class="col-md-3 leseart"> |
|
| 23 |
+ <select name="filter_leseart"> |
|
| 24 |
+ <option value="">-</option> |
|
| 25 |
+ {% for key, option in filter.leseart.options %}
|
|
| 26 |
+ <option value="{{ key }}"{% if filter.leseart.selected is defined and filter.leseart.selected == key %} selected{% endif %}>{{ option }}</option>
|
|
| 27 |
+ {% endfor %}
|
|
| 28 |
+ </select> |
|
| 29 |
+ </div> |
|
| 22 | 30 |
<div class="col submit"><button>Filter übernehmen</button></div> |
| 23 | 31 |
</div> |
| 24 | 32 |
</form> |
| ... | ... |
@@ -65,6 +65,11 @@ class WeinanlieferungSlotsListModuleController extends AbstractFrontendModuleCon |
| 65 | 65 |
$arrOptions['column'][] = "REGEXP_LIKE(sorten,'\"sorte\";s:[0-9]+:\"" . intval($_GET['filter_sorte']) . "\"')"; |
| 66 | 66 |
// $arrOptions['value'][] = $_GET['filter_sorte']; |
| 67 | 67 |
} |
| 68 |
+ if (!empty($_GET['filter_leseart'])) |
|
| 69 |
+ {
|
|
| 70 |
+ $arrData['filter']['leseart']['selected'] = $_GET['filter_leseart']; |
|
| 71 |
+ $arrOptions['column'][] = "REGEXP_LIKE(sorten,'\"leseart\";s:[0-9]+:\"" . intval($_GET['filter_leseart']) . "\"')"; |
|
| 72 |
+ } |
|
| 68 | 73 |
$arrData['filter']['kapazitaet']['options'] = range(1,30); |
| 69 | 74 |
|
| 70 | 75 |
if (($Sorten = WeinanlieferungRebsorteModel::findAll(['order'=>'title ASC'])) !== null) |
| ... | ... |
@@ -72,6 +77,11 @@ class WeinanlieferungSlotsListModuleController extends AbstractFrontendModuleCon |
| 72 | 77 |
$arrData['filter']['sorte']['options'] = array_combine($Sorten->fetchEach('id'),$Sorten->fetchEach('title'));
|
| 73 | 78 |
} |
| 74 | 79 |
|
| 80 |
+ if (($Leseart = WeinanlieferungLeseartModel::findAll(['order'=>'title ASC'])) !== null) |
|
| 81 |
+ {
|
|
| 82 |
+ $arrData['filter']['leseart']['options'] = array_combine($Leseart->fetchEach('id'),$Leseart->fetchEach('title'));
|
|
| 83 |
+ } |
|
| 84 |
+ |
|
| 75 | 85 |
// Get available slots |
| 76 | 86 |
if (($slots = WeinanlieferungSlotsModel::findMultiplePublishedByPids($standortIds,$arrOptions)) !== null) |
| 77 | 87 |
{
|