changeset 2475:0a5220f576f2

Fixed active states for links in top nav using the hyperlink macro
author sharky93 <rishabhr123@gmail.com>
date Sat, 14 Sep 2013 00:26:56 +0530
parents c1526ea8e0b5
children 663f46bd7f7e
files MoinMoin/themes/basic/templates/layout.html
diffstat 1 files changed, 6 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/themes/basic/templates/layout.html	Sat Sep 14 00:08:57 2013 +0530
+++ b/MoinMoin/themes/basic/templates/layout.html	Sat Sep 14 00:26:56 2013 +0530
@@ -68,32 +68,26 @@
                                 {% if user.name -%}
                                     {% set wiki_href, aliasname, title, exists = theme_supp.userhome() %}
                                     <li>
-                                    <a href="{{ wiki_href }}" {% if not exists %}class="moin-nonexistent"{% endif %} rel="nofollow" title="{{ title }}">
-                                        <i class="icon-user icon-white"> </i>
-                                        {{ aliasname }}
-                                    </a>
+                                        {{ hyperlink(wiki_href, title, exists, aliasname, "icon-user icon-white") }}
                                     </li>
                                     {% if 'frontend.usersettings' not in cfg.endpoints_excluded -%}
                                         <li>
-                                        <a href="{{ url_for('frontend.usersettings') }}" class="moin-usersettings" rel="nofollow">
-                                            <i class="icon-cog icon-white"> </i>
-                                                {{ _('Settings') }}</a>
+                                            {{ hyperlink(url_for('frontend.usersettings'), None, True,
+                                                _('Settings'), "icon-cog icon-white") }}
                                         </li>
                                     {%- endif %}
                                 {%- endif %}
                                 {% if user.auth_method in cfg.auth_can_logout %}
                                     <li>
-                                    <a href="{{ url_for('frontend.logout', logout_submit=1) }}" class="moin-logout" rel="nofollow">
-                                        <i class="icon-off icon-white"></i>
-                                        {{ _('Logout') }}
-                                    </a>
+                                        {{ hyperlink(url_for('frontend.logout', logout_submit=1), None, True,
+                                                _('Logout'), "icon-off icon-white") }}
                                     </li>
                                 {% endif %}
                             {% else %}
                                 {% set login_url = theme_supp.login_url() %}
                                 {% if login_url %}
                                     <li>
-                                    <a href="{{ login_url }}" class="moin-login" rel="nofollow">{{ _('Login') }}</a>
+                                        {{ hyperlink(login_url, None, True, _('Login'), None) }}
                                     </li>
                                 {% endif %}
                             {%- endif %}