changeset 2332:1e83a7aad10e

Fixes for displaying the Quick Links header, concise code, as per comments for commit @322841e
author sharky93 <rishabhr123@gmail.com>
date Thu, 18 Jul 2013 14:01:01 +0530
parents a641c863e177
children 00e30a24cd9f
files MoinMoin/themes/basic/templates/layout.html
diffstat 1 files changed, 4 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/themes/basic/templates/layout.html	Thu Jul 18 13:11:09 2013 +0530
+++ b/MoinMoin/themes/basic/templates/layout.html	Thu Jul 18 14:01:01 2013 +0530
@@ -79,23 +79,21 @@
                         {% if navibar_items %}
 
                         <li class="nav-header">Site Navigation</li>
-                        {% for cls, url, text, title in navibar_items %}
-                            {% if cls != 'userlink' %}
+                        {% for cls, url, text, title in navibar_items if cls != 'userlink' %}
                             <li class="{{ cls }}{% if url == current_url %} active{% endif %}">
                             <a href="{{ url }}" {% if title %}title="{{ title }}"{% endif %}>{{ text }}</a>
                             </li>
-                            {% endif %}
                         {% endfor %}
 
                         {% endif %}
                         
-                        <li class="nav-header">Quick Links</li>
                         {% for cls, url, text, title in navibar_items if cls == 'userlink' %}
+                            {% if loop.first %}
+                                <li class="nav-header">Quick Links</li>
+                            {% endif %}
                             <li class="{{ cls }}">
                                 <a href="{{ url }}" {% if title %}title="{{ title }}"{% endif %}>{{ text }}</a>
                             </li>
-                        {% else %}
-                            <li> Empty </li>
                         {% endfor %}
 
                     </ul>