Force use of "simple" menus for bobcat theme

seems safe i think...
This commit is contained in:
Lance Edgar 2018-11-29 01:55:29 -06:00
parent b5083d32db
commit c88e1cca68

View file

@ -1,5 +1,4 @@
## -*- coding: utf-8; -*- ## -*- coding: utf-8; -*-
<%namespace file="/menu.mako" import="main_menu_items" />
<%namespace file="/grids/nav.mako" import="grid_index_nav" /> <%namespace file="/grids/nav.mako" import="grid_index_nav" />
<%namespace file="/feedback_dialog.mako" import="feedback_dialog" /> <%namespace file="/feedback_dialog.mako" import="feedback_dialog" />
<%namespace name="base_meta" file="/base_meta.mako" /> <%namespace name="base_meta" file="/base_meta.mako" />
@ -25,7 +24,42 @@
<nav class="navbar" role="navigation" aria-label="main navigation"> <nav class="navbar" role="navigation" aria-label="main navigation">
<div class="navbar-menu"> <div class="navbar-menu">
${main_menu_items()} <div class="navbar-start">
% for topitem in menus:
<div class="navbar-item has-dropdown is-hoverable">
<a class="navbar-link">${topitem.title}</a>
<div class="navbar-dropdown">
% for subitem in topitem.items:
${h.link_to(subitem.title, subitem.url, class_='navbar-item')}
% endfor
</div>
</div>
% endfor
</div><!-- navbar-start -->
<div class="navbar-end">
## User Menu
% if request.user:
<div class="navbar-item has-dropdown is-hoverable">
<a class="navbar-link ${'root-user' if request.is_root else ''}">${request.user}${" ({})".format(inbox_count) if inbox_count else ''}</a>
<div class="navbar-dropdown">
% if request.is_root:
${h.link_to("Stop being root", url('stop_root'), class_='navbar-item root-user')}
% elif request.is_admin:
${h.link_to("Become root", url('become_root'), class_='navbar-item root-user')}
% endif
${h.link_to("Messages{}".format(" ({})".format(inbox_count) if inbox_count else ''), url('messages.inbox'), class_='navbar-item')}
${h.link_to("Change Password", url('change_password'), class_='navbar-item')}
${h.link_to("Logout", url('logout'), class_='navbar-item')}
</div>
</div>
% else:
${h.link_to("Login", url('login'), class_='navbar-item')}
% endif
</div><!-- navbar-end -->
</div> </div>
</nav> </nav>