From 3f238a41ffd0a1ec4b0764c35bfdfcd7f52e6d02 Mon Sep 17 00:00:00 2001
From: Leah Velleman <leah.velleman@gmail.com>
Date: Mon, 20 Jun 2016 17:06:41 -0400
Subject: [PATCH] fixed 'older' and 'newer' arrows for rtl locales
---
mediagoblin/templates/mediagoblin/utils/prev_next.html | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/mediagoblin/templates/mediagoblin/utils/prev_next.html b/mediagoblin/templates/mediagoblin/utils/prev_next.html
index 9e262ed..1570cf5 100644
a
|
b
|
|
19 | 19 | {# Provide navigation links to neighboring media entries, if possible #} |
20 | 20 | {% set prev_entry_url = media.url_to_prev(request.urlgen) %} |
21 | 21 | {% set next_entry_url = media.url_to_next(request.urlgen) %} |
| 22 | {% if request.locale.startswith("fa") or request.locale.startswith("ar") %} |
| 23 | {% set next_arrow = "â" %} |
| 24 | {% set prev_arrow = "â" %} |
| 25 | {% else %} |
| 26 | {% set next_arrow = "â" %} |
| 27 | {% set prev_arrow = "â" %} |
| 28 | {% endif %} |
22 | 29 | |
23 | 30 | {% if prev_entry_url or next_entry_url %} |
24 | 31 | <div class="navigation"> |
25 | 32 | {# There are no previous entries for the very first media entry #} |
26 | 33 | {% if prev_entry_url %} |
27 | 34 | <a class="navigation_button navigation_left" href="{{ prev_entry_url }}"> |
28 | | ← {% trans %}newer{% endtrans %} |
| 35 | {{next_arrow}} {% trans %}newer{% endtrans %} |
29 | 36 | </a> |
30 | 37 | {% else %} |
31 | 38 | {# This is the first entry. display greyed-out 'previous' image #} |
32 | 39 | <p class="navigation_button navigation_left"> |
33 | | ← {% trans %}newer{% endtrans %} |
| 40 | {{next_arrow}} {% trans %}newer{% endtrans %} |
34 | 41 | </p> |
35 | 42 | {% endif %} |
36 | 43 | {# Likewise, this could be the very last media entry #} |
37 | 44 | {% if next_entry_url %} |
38 | 45 | <a class="navigation_button navigation_right" href="{{ next_entry_url }}"> |
39 | | {% trans %}older{% endtrans %} → |
| 46 | {% trans %}older{% endtrans %} {{prev_arrow}} |
40 | 47 | </a> |
41 | 48 | {% else %} |
42 | 49 | {# This is the last entry. display greyed-out 'next' image #} |
43 | 50 | <p class="navigation_button navigation_right"> |
44 | | {% trans %}older{% endtrans %} → |
| 51 | {% trans %}older{% endtrans %} {{prev_arrow}} |
45 | 52 | </p> |
46 | 53 | {% endif %} |
47 | 54 | </div> |