summaryrefslogtreecommitdiff
path: root/src/jwebmail/templates/_top_nav.html
blob: 4c8bdb7153514810b0f90b6a3ae9aa8e0d07e1b3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
<div class="columns">

  <form class=column method=GET
      action="{{ url_for(
                   'displayheaders',
                   folder=request.view_args.folder,
                   per_page=request.args.get('per_page')
                 ) }}">

    <div class=field>
      <div class=control>
        <input type=search name=search size=8 class=input placeholder="{{ gettext('Search') }}" />
      </div>
    </div>
  </form>

  <form class=column>
    <div class="field">
      <div class=control>
        <label for=sort class="label">
          {% trans %}Sort{% endtrans %}
          <div class="select ml-2" id=sort-select>
            <select name=sort id=sort>
              <option value="!date">{{ gettext('Date') }} - {{ gettext('Descending') }}</option>
              <option value="date">{{ gettext('Date') }} - {{ gettext('Ascending') }}</option>
              <option value="!size">{{ gettext('Size') }} - {{ gettext('Descending') }}</option>
              <option value="!sender">{{ gettext('Sender') }} - {{ gettext('Descending') }}</option>
              <option value="sender">{{ gettext('Sender') }} - {{ gettext('Ascending') }}</option>
            </select>
          </div>
        </label>
      </div>
    </div>
  </form>

  <div class=column>
    <nav class="pagination" role="navigation">
      {% if first %}
        <a class="pagination-previous" disabled>&laquo;</a>
      {% else %}
        <a class="pagination-previous"
           href="{{ url_for(
                      'displayheaders',
                      folder=request.view_args.folder,
                      page_bound=page_bound_before,
                      page_after=0,
                      per_page=request.args.get('per_page'),
                      sort=request.args.get('sort'),
                      search=request.args.get('search'),
                    ) }}"
           aria-label="Next">
          &laquo;
        </a>
      {% endif %}

      {% if last %}
        <a class="pagination-next" disabled>&raquo;</a>
      {% else %}
        <a class="pagination-next"
           href="{{ url_for(
                      'displayheaders',
                      folder=request.view_args.folder,
                      page_bound=page_bound_after,
                      page_after=1,
                      per_page=request.args.get('per_page'),
                      sort=request.args.get('sort'),
                      search=request.args.get('search'),
                    ) }}"
           aria-label="Next">
          &raquo;
        </a>
      {% endif %}
    </nav>
  </div>

</div>