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 #}
|
{# Provide navigation links to neighboring media entries, if possible #}
|
||||||
{% set prev_entry_url = media.url_to_prev(request.urlgen) %}
|
{% set prev_entry_url = media.url_to_prev(request.urlgen) %}
|
||||||
{% set next_entry_url = media.url_to_next(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 %}
|
{% if prev_entry_url or next_entry_url %}
|
||||||
<div class="navigation">
|
<div class="navigation">
|
||||||
{# There are no previous entries for the very first media entry #}
|
{# There are no previous entries for the very first media entry #}
|
||||||
{% if prev_entry_url %}
|
{% if prev_entry_url %}
|
||||||
<a class="navigation_button navigation_left" href="{{ prev_entry_url }}">
|
<a class="navigation_button navigation_left" href="{{ prev_entry_url }}">
|
||||||
← {% trans %}newer{% endtrans %}
|
{{next_arrow}} {% trans %}newer{% endtrans %}
|
||||||
</a>
|
</a>
|
||||||
{% else %}
|
{% else %}
|
||||||
{# This is the first entry. display greyed-out 'previous' image #}
|
{# This is the first entry. display greyed-out 'previous' image #}
|
||||||
<p class="navigation_button navigation_left">
|
<p class="navigation_button navigation_left">
|
||||||
← {% trans %}newer{% endtrans %}
|
{{next_arrow}} {% trans %}newer{% endtrans %}
|
||||||
</p>
|
</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{# Likewise, this could be the very last media entry #}
|
{# Likewise, this could be the very last media entry #}
|
||||||
{% if next_entry_url %}
|
{% if next_entry_url %}
|
||||||
<a class="navigation_button navigation_right" href="{{ next_entry_url }}">
|
<a class="navigation_button navigation_right" href="{{ next_entry_url }}">
|
||||||
{% trans %}older{% endtrans %} →
|
{% trans %}older{% endtrans %} {{prev_arrow}}
|
||||||
</a>
|
</a>
|
||||||
{% else %}
|
{% else %}
|
||||||
{# This is the last entry. display greyed-out 'next' image #}
|
{# This is the last entry. display greyed-out 'next' image #}
|
||||||
<p class="navigation_button navigation_right">
|
<p class="navigation_button navigation_right">
|
||||||
{% trans %}older{% endtrans %} →
|
{% trans %}older{% endtrans %} {{prev_arrow}}
|
||||||
</p>
|
</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user