Skip to content

Commit

Permalink
Fixes #526: Search view pagination was incorrect.
Browse files Browse the repository at this point in the history
  • Loading branch information
edmondas committed Oct 25, 2023
1 parent ef957aa commit 4144e2a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/Version.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@

class Version
{
const VERSION = '3.6.0';
const VERSION = '3.6.1';
}
8 changes: 4 additions & 4 deletions templates/search.html
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ <h5 class="mb-3 pt-3 border-top">{% trans %}Records found{% endtrans %}</h5>
</tbody>
</table>

{% if total_zones > iface_rowamount %}
{% if total_records > iface_rowamount %}
{% set max_visible_pages = 9 %}
{% set total_records_pages = (total_records / iface_rowamount) | round(0, 'ceil') %}
{% set half_visible_pages = max_visible_pages // 2 %}
Expand All @@ -187,12 +187,12 @@ <h5 class="mb-3 pt-3 border-top">{% trans %}Records found{% endtrans %}</h5>
{% endif %}
{% endfor %}

{% if total_zone_pages > records_end_page %}
{% if total_records_pages > records_end_page %}
<li class="page-item disabled"><a class="page-link" href="#" tabindex="-1">..</a></li>
<li class="page-item"><a class="page-link" href="javascript:do_search_with_records_page({{ total_zone_pages }})">{{ total_zone_pages }}</a></li>
{% endif %}

{% if records_page < total_zone_pages %}
{% if records_page < total_records_pages %}
<li class="page-item"><a class="page-link" href="javascript:do_search_with_records_page({{ records_page + 1 }})">{% trans %}Next{% endtrans %}</a></li>
{% endif %}
</ul>
Expand All @@ -201,7 +201,7 @@ <h5 class="mb-3 pt-3 border-top">{% trans %}Records found{% endtrans %}</h5>
</div>
{% endif %}

{% if query is not empty and (not has_records or not has_zones) %}
{% if query is not empty and (not has_records and not has_zones) %}
<hr>
{% trans %}No results found{% endtrans %}
{% endif %}
Expand Down

0 comments on commit 4144e2a

Please sign in to comment.