<%namespace name="util" module="bodhi.server.util"/>
<%def name="render(page, pages)">
<ul class="pagination pagination-sm text-center mb-0 fw-bold">
  % if page == 1:
  <li class="page-item disabled "><a class="page-link" href="#">Previous</a></li>
  % else:
  <li class="page-item"><a class="page-link" href="${util.page_url(page-1)}">Previous</a></li>
  % endif

  % for i in util.pages_list(page, pages):
  % if i == "...":
  <li class="page-item disabled">
  % elif page == i:
  <li class="page-item active flex-fill">
  % else:
  <li class="page-item flex-fill">
  % endif
  <a class="page-link" href="${util.page_url(i)}">${i}</a>
  </li>
  % endfor

  % if page == pages:
  <li class="page-item disabled"><a class="page-link" href="#">Next</a></li>
  % else:
  <li class="page-item"><a class="page-link" href="${util.page_url(page+1)}">Next</a></li>
  % endif
</ul>
</%def>
