Autoselect hits per page from query
This commit is contained in:
parent
f88d30718c
commit
9a890d08ee
1 changed files with 17 additions and 8 deletions
|
@ -12,13 +12,7 @@
|
|||
<!-- <button id="btn-get" class="btn btn-primary parse-json" data-target="basic">Get rules</button> -->
|
||||
<div id="SelectResults">
|
||||
<label style="display:inline;" for="hitsPerPage">Результатов на страницу</label>
|
||||
<select name="hitsPerPage" id="hitsPerPageSelect">
|
||||
<option value="20" selected="selected">20</option>
|
||||
<option value="40">40</option>
|
||||
<option value="60">60</option>
|
||||
<option value="80">80</option>
|
||||
<option value="100">100</option>
|
||||
</select>
|
||||
<@selectHitsPerPage/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -30,7 +24,6 @@
|
|||
<button id="btn-get-standard-searchform" class="btn btn-warning reset" data-target="basic">Стандартная форма поиска</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="themes/iph/js/query-builder.standalone.min.js"></script>
|
||||
<script src="themes/iph/js/query-builder.ru.js"></script>
|
||||
<script>
|
||||
|
@ -218,3 +211,19 @@
|
|||
operators: ['contains', 'not_contains']
|
||||
},
|
||||
</#macro>
|
||||
|
||||
<#macro selectHitsPerPage>
|
||||
<#if !hitsPerPage?? >
|
||||
<#assign hitsPerPage = 20 >
|
||||
</#if>
|
||||
<#assign hitsValues= [20,40,60,80,100]>
|
||||
<select name="hitsPerPage" id="hitsPerPageSelect">
|
||||
<option value="${hitsPerPage}" selected="selected">${hitsPerPage}</option>
|
||||
<#list hitsValues as hppValue>
|
||||
<#if hppValue != hitsPerPage>
|
||||
<option value="${hppValue}">${hppValue}</option>
|
||||
</#if>
|
||||
</#list>
|
||||
|
||||
</select>
|
||||
</#macro>
|
||||
|
|
Loading…
Add table
Reference in a new issue