fixed 'older' and 'newer' arrows for rtl locales
This commit is contained in:
parent
41302ad2b6
commit
1b009a815a
@ -19,29 +19,36 @@
|
||||
{# Provide navigation links to neighboring media entries, if possible #}
|
||||
{% set prev_entry_url = media.url_to_prev(request.urlgen) %}
|
||||
{% set next_entry_url = media.url_to_next(request.urlgen) %}
|
||||
{% if request.locale.startswith("fa") or request.locale.startswith("ar") %}
|
||||
{% set next_arrow = "→" %}
|
||||
{% set prev_arrow = "←" %}
|
||||
{% else %}
|
||||
{% set next_arrow = "←" %}
|
||||
{% set prev_arrow = "→" %}
|
||||
{% endif %}
|
||||
|
||||
{% if prev_entry_url or next_entry_url %}
|
||||
<div class="navigation">
|
||||
{# There are no previous entries for the very first media entry #}
|
||||
{% if prev_entry_url %}
|
||||
<a class="navigation_button navigation_left" href="{{ prev_entry_url }}">
|
||||
← {% trans %}newer{% endtrans %}
|
||||
{{next_arrow}} {% trans %}newer{% endtrans %}
|
||||
</a>
|
||||
{% else %}
|
||||
{# This is the first entry. display greyed-out 'previous' image #}
|
||||
<p class="navigation_button navigation_left">
|
||||
← {% trans %}newer{% endtrans %}
|
||||
{{next_arrow}} {% trans %}newer{% endtrans %}
|
||||
</p>
|
||||
{% endif %}
|
||||
{# Likewise, this could be the very last media entry #}
|
||||
{% if next_entry_url %}
|
||||
<a class="navigation_button navigation_right" href="{{ next_entry_url }}">
|
||||
{% trans %}older{% endtrans %} →
|
||||
{% trans %}older{% endtrans %} {{prev_arrow}}
|
||||
</a>
|
||||
{% else %}
|
||||
{# This is the last entry. display greyed-out 'next' image #}
|
||||
<p class="navigation_button navigation_right">
|
||||
{% trans %}older{% endtrans %} →
|
||||
{% trans %}older{% endtrans %} {{prev_arrow}}
|
||||
</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user