Skip to content
Snippets Groups Projects
Commit 5e0f4aee authored by Hervé  MENAGER's avatar Hervé MENAGER
Browse files

add "jump to page" control in pagination

closes #69


Former-commit-id: 5ffdd28c0a3252f69c12f60dcb5a7c9f2a0969fe
parent fdb2f9e3
No related branches found
No related tags found
No related merge requests found
......@@ -122,10 +122,13 @@
</div>
<nav>
<ul class="pagination justify-content-end">
<ul class="pagination pagination-sm justify-content-end col-12">
{% if compounds.has_previous %}
<li class="page-item">
<a class="page-link" href="?{% url_replace request 'page' compounds.previous_page_number %}" tabindex="-1">Previous</a>
<a class="page-link" href="?{% url_replace request 'page' compounds.previous_page_number %}" aria-label="Previous">
<span aria-hidden="true">&laquo;</span>
<span class="sr-only">Previous</span>
</a>
</li>
{% endif %}
......@@ -135,9 +138,22 @@
{% if compounds.has_next %}
<li class="page-item">
<a class="page-link" href="?{% url_replace request 'page' compounds.next_page_number %}" tabindex="-1">Next</a>
<a class="page-link" href="?{% url_replace request 'page' compounds.next_page_number %}" aria-label="Next">
<span aria-hidden="true">&raquo;</span>
<span class="sr-only">Next</span>
</a>
</li>
{% endif %}
<li class="page-item ml-3">
<div class="input-group input-group-sm">
<input id="pageNumber" type="number" min="1" max="{{compounds.paginator.num_pages}}" step="1" placeholder="page #" style="width: 4em;" aria-label="Page number">
<div class="input-group-append">
<button class="btn btn-outline-primary" type="button" onclick="modifyUrl('page',$('#pageNumber').val())">Go</button>
</div>
</div>
</li>
</ul>
</nav>
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment