phpmyadmin/resources/templates/list_navigator.twig
Maurício Meneghini Fauth b1cb1c8129
Replace trans tag with the t function in templates
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2024-04-25 14:17:52 -03:00

53 lines
2.2 KiB
Twig

{% if max_count < count %}
<div class="{{ classes|join(' ') }}">
{% if frame != 'frame_navigation' %}
{{ t('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="{{ t('Begin', context = 'First page') }}">
{% if show_icons('TableNavigationLinksMode') %}
&lt;&lt;
{% endif %}
{% if show_text('TableNavigationLinksMode') %}
{{ t('Begin', context = 'First page') }}
{% 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="{{ t('Previous', context = 'Previous page') }}">
{% if show_icons('TableNavigationLinksMode') %}
&lt;
{% endif %}
{% if show_text('TableNavigationLinksMode') %}
{{ t('Previous', context = 'Previous page') }}
{% 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="{{ t('Next', context = 'Next page') }}">
{% if show_text('TableNavigationLinksMode') %}
{{ t('Next', context = 'Next page') }}
{% 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="{{ t('End', context = 'Last page') }}">
{% if show_text('TableNavigationLinksMode') %}
{{ t('End', context = 'Last page') }}
{% endif %}
{% if show_icons('TableNavigationLinksMode') %}
&gt;&gt;
{% endif %}
</a>
{% endif %}
</div>
{% endif %}