File: list_navigator.twig

package info (click to toggle)
phpmyadmin 4%3A5.2.2-really%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 140,312 kB
  • sloc: javascript: 228,447; php: 166,904; xml: 17,847; sql: 504; sh: 275; makefile: 209; python: 205
file content (52 lines) | stat: -rw-r--r-- 2,342 bytes parent folder | download | duplicates (3)
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
{% if max_count < count %}
<div class="{{ classes|join(' ') }}">
  {% if frame != 'frame_navigation' %}
    {% trans 'Page number:' %}
  {% endif %}

  {% if position > 0 %}
    <a href="{{ script|raw }}" data-post="{{ get_common(url_params|merge({(param_name): 0}), '', false) }}"{{ frame == 'frame_navigation' ? ' class="ajax"' }} title="{% trans %}Begin{% context %}First page{% endtrans %}">
      {% if show_icons('TableNavigationLinksMode') %}
        &lt;&lt;
      {% endif %}
      {% if show_text('TableNavigationLinksMode') %}
        {% trans %}Begin{% context %}First page{% endtrans %}
      {% endif %}
    </a>
    <a href="{{ script|raw }}" data-post="{{ get_common(url_params|merge({(param_name): position - max_count}), '', false) }}"{{ frame == 'frame_navigation' ? ' class="ajax"' }} title="{% trans %}Previous{% context %}Previous page{% endtrans %}">
      {% if show_icons('TableNavigationLinksMode') %}
        &lt;
      {% endif %}
      {% if show_text('TableNavigationLinksMode') %}
        {% trans %}Previous{% context %}Previous page{% endtrans %}
      {% endif %}
    </a>
  {% endif %}

  <form action="{{ script|raw }}" method="post">
    {{ get_hidden_inputs(url_params) }}

    {{ page_selector|raw }}
  </form>

  {% if position + max_count < count %}
    <a href="{{ script|raw }}" data-post="{{ get_common(url_params|merge({(param_name): position + max_count}), '', false) }}"{{ frame == 'frame_navigation' ? ' class="ajax"' }} title="{% trans %}Next{% context %}Next page{% endtrans %}">
      {% if show_text('TableNavigationLinksMode') %}
        {% trans %}Next{% context %}Next page{% endtrans %}
      {% endif %}
      {% if show_icons('TableNavigationLinksMode') %}
        &gt;
      {% endif %}
    </a>
    {% set last_pos = (count // max_count) * max_count %}
    <a href="{{ script|raw }}" data-post="{{ get_common(url_params|merge({(param_name): (last_pos == count ? count - max_count : last_pos)}), '', false) }}"{{ frame == 'frame_navigation' ? ' class="ajax"' }} title="{% trans %}End{% context %}Last page{% endtrans %}">
      {% if show_text('TableNavigationLinksMode') %}
        {% trans %}End{% context %}Last page{% endtrans %}
      {% endif %}
      {% if show_icons('TableNavigationLinksMode') %}
        &gt;&gt;
      {% endif %}
    </a>
  {% endif %}
</div>
{% endif %}