Bug #503 - removes inert navigation buttons
authorCaleb Forbes Davis V <caldavis@gmail.com>
Sun, 21 Aug 2011 05:09:28 +0000 (00:09 -0500)
committerCaleb Forbes Davis V <caldavis@gmail.com>
Sun, 21 Aug 2011 05:09:28 +0000 (00:09 -0500)
- the grey X navigation buttons indicating the first and last media
entries should not appear since they do not do anything

mediagoblin/templates/mediagoblin/utils/prev_next.html

index 7cf8d2a46af7fa3a5594a714b4088e40a6e1367d..f8a746d9565c1ec9a5cff657626379096531605a 100644 (file)
 {% 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 %}