summaryrefslogtreecommitdiff
path: root/src/jwebmail/templates/_nav.html
blob: 79b7b6e117f2387c44fac219f9995040e57a49e9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<nav class="pagination" role="navigation">
  {% set args = dict(request.args) %}
  {% do args.update(request.view_args) %}

  {% if first %}
    <a class="pagination-previous" disabled>&laquo;</a>
  {% else %}
    {% do args.update([('page_bound', page_bound_before), ('page_after', 0)]) %}
    <a class="pagination-previous" href="{{ url_for(request.endpoint, **args) }}" aria-label="Previous">
      &laquo;
    </a>
  {% endif %}

  {% if last %}
    <a class="pagination-next" disabled>&raquo;</a>
  {% else %}
    {% do args.update([('page_bound', page_bound_after), ('page_after', 1)]) %}
    <a class="pagination-next" href="{{ url_for(request.endpoint, **args) }}" aria-label="Next">
      &raquo;
    </a>
  {% endif %}
</nav>