forked from Ponysearch/Ponysearch
[mod] Retain page numbers even when there are no results
This commit is contained in:
parent
c3cc24be12
commit
99fb565b39
2 changed files with 19 additions and 17 deletions
|
@ -232,7 +232,7 @@ class ResultContainer:
|
|||
if engine_name in engines:
|
||||
histogram_observe(standard_result_count, 'engine', engine_name, 'result', 'count')
|
||||
|
||||
if not self.paging and standard_result_count > 0 and engine_name in engines and engines[engine_name].paging:
|
||||
if not self.paging and engine_name in engines and engines[engine_name].paging:
|
||||
self.paging = True
|
||||
|
||||
def _merge_infobox(self, infobox):
|
||||
|
|
|
@ -124,6 +124,7 @@
|
|||
</div>
|
||||
</form>
|
||||
{% endif %}
|
||||
{%- if results | count > 0 -%}
|
||||
<form method="{{ method or 'POST' }}" action="{{ url_for('search') }}" class="next_page">
|
||||
<div class="{% if rtl %}left{% else %}right{% endif %}">
|
||||
<input type="hidden" name="q" value="{{ q|e }}" >
|
||||
|
@ -140,6 +141,7 @@
|
|||
<button role="link" type="submit">{{ _('Next page') }} {{ icon_small('chevron-right') }}</button>
|
||||
</div>
|
||||
</form>
|
||||
{%- endif -%}
|
||||
{% set pstart = 1 %}
|
||||
{% set pend = 11 %}
|
||||
{% if pageno > 5 %}
|
||||
|
|
Loading…
Reference in a new issue