diff options
author | Alexander_Kabui | 2024-09-10 17:58:59 +0300 |
---|---|---|
committer | Alexander_Kabui | 2024-09-10 17:58:59 +0300 |
commit | 16207edb77eef75903a007df6b2bd84cb4d5b943 (patch) | |
tree | 7a1230ce84a52bb40bbb660b25cf032bc125c0c5 /gn2/wqflask/templates | |
parent | 49174678569965bf64ea237d0bacd62c2a3ecfcf (diff) | |
download | genenetwork2-16207edb77eef75903a007df6b2bd84cb4d5b943.tar.gz |
Implement client side pagination for history page.
Diffstat (limited to 'gn2/wqflask/templates')
-rw-r--r-- | gn2/wqflask/templates/gnqa_search_history.html | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/gn2/wqflask/templates/gnqa_search_history.html b/gn2/wqflask/templates/gnqa_search_history.html index 8d54ad80..c12e7c93 100644 --- a/gn2/wqflask/templates/gnqa_search_history.html +++ b/gn2/wqflask/templates/gnqa_search_history.html @@ -47,6 +47,30 @@ {% endfor %} </ul> </div> + <div class="row"> + <nav aria-label="Page navigation example" + class="col-sm-8 col-sm-offset-2 col-md-6 col-md-offset-3"> + <ul class="pagination"> + {% for idx in range(1, num_pages) %} + {% if current == idx %} + <li class="page-item active"> + <a class="page-link" + hx-swap="innerHTML" + hx-target="#swap" + hx-get="/gnqna/records?page={{ idx }}">{{ idx }}</a> + </li> + {% else %} + <li class="page-item"> + <a class="page-link" + hx-swap="innerHTML" + hx-target="#swap" + hx-get="/gnqna/records?page={{ idx }}">{{ idx }}</a> + </li> + {% endif %} + {% endfor %} + </ul> + </nav> + </div> </div> </div> </div> |