aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCaleb Forbes Davis V <caldavis@gmail.com>2011-08-21 00:09:28 -0500
committerCaleb Forbes Davis V <caldavis@gmail.com>2011-08-21 00:09:28 -0500
commite3df834a8a22a45ba77940efbd083c7d5a23764e (patch)
treeddffaaa08eba67fee75bd745ef7c82e4aa3a18fb
parent8955ed0c599900aed144f52a1f1a9f6b5cbc018a (diff)
downloadmediagoblin-e3df834a8a22a45ba77940efbd083c7d5a23764e.tar.lz
mediagoblin-e3df834a8a22a45ba77940efbd083c7d5a23764e.tar.xz
mediagoblin-e3df834a8a22a45ba77940efbd083c7d5a23764e.zip
Bug #503 - removes inert navigation buttons
- the grey X navigation buttons indicating the first and last media entries should not appear since they do not do anything
-rw-r--r--mediagoblin/templates/mediagoblin/utils/prev_next.html38
1 files changed, 14 insertions, 24 deletions
diff --git a/mediagoblin/templates/mediagoblin/utils/prev_next.html b/mediagoblin/templates/mediagoblin/utils/prev_next.html
index 7cf8d2a4..f8a746d9 100644
--- a/mediagoblin/templates/mediagoblin/utils/prev_next.html
+++ b/mediagoblin/templates/mediagoblin/utils/prev_next.html
@@ -20,27 +20,17 @@
{% set prev_entry_url = media.url_to_prev(request.urlgen) %}
{% set next_entry_url = media.url_to_next(request.urlgen) %}
-<div>
- {# 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 }}">
- <img src="/mgoblin_static/images/navigation_left.png" alt="Previous image" />
- </a>
- {% else %}
- {# This is the first entry. display greyed-out 'previous' image #}
- <p class="navigation_button navigation_left">
- <img src="/mgoblin_static/images/navigation_end.png" alt="No previous images" />
- </p>
- {% endif %}
- {# Likewise, this could be the very last media entry #}
- {% if next_entry_url %}
- <a class="navigation_button" href="{{ next_entry_url }}">
- <img src="/mgoblin_static/images/navigation_right.png" alt="Next image" />
- </a>
- {% else %}
- {# This is the last entry. display greyed-out 'next' image #}
- <p class="navigation_button">
- <img src="/mgoblin_static/images/navigation_end.png" alt="No following images" />
- </p>
- {% endif %}
-</div>
+{% if prev_entry_url or next_entry_url %}
+ <div class="grid_5 alpha omega">
+ {% if prev_entry_url %}
+ <a class="navigation_button navigation_left" href="{{ prev_entry_url }}">
+ <img src="/mgoblin_static/images/navigation_left.png" alt="Previous image" />
+ </a>
+ {% endif %}
+ {% if next_entry_url %}
+ <a class="navigation_button" href="{{ next_entry_url }}">
+ <img src="/mgoblin_static/images/navigation_right.png" alt="Next image" />
+ </a>
+ {% endif %}
+ </div>
+{% endif %}