Delete 'bobcat' theme override

core bobcat theme now supports simple menus natively
This commit is contained in:
Lance Edgar 2018-11-29 01:56:03 -06:00
parent 599bf7cc32
commit 520940bc81
2 changed files with 0 additions and 104 deletions

View file

@ -1,7 +0,0 @@
## -*- coding: utf-8; -*-
<%inherit file="tailbone:templates/themes/bobcat/base.mako" />
## NOTE: we must define this base template even though we just
## inherit from upstream bobcat!
${parent.body()}

View file

@ -1,97 +0,0 @@
## -*- coding: utf-8; -*-
<%def name="make_simple_menu()">
<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 root-user')}
% 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 -->
</%def>
<%def name="main_menu_items()">
% if request.rattail_config.getbool('tailbone', 'menus.simple', default=False):
${self.make_simple_menu()}
% else:
<div class="navbar-start">
## Admin
% if request.has_any_perm('users.list', 'roles.list', 'settings.list', 'upgrades.list'):
<div class="navbar-item has-dropdown is-hoverable">
<a class="navbar-link">Admin</a>
<div class="navbar-dropdown">
% if request.has_perm('users.list'):
${h.link_to("Users", url('users'), class_='navbar-item')}
% endif
% if request.has_perm('roles.list'):
${h.link_to("Roles", url('roles'), class_='navbar-item')}
% endif
% if request.has_perm('settings.list'):
${h.link_to("Raw Settings", url('settings'), class_='navbar-item')}
% endif
% if request.has_perm('upgrades.list'):
${h.link_to("Rattail Demo Upgrades", url('upgrades'), class_='navbar-item')}
% endif
</div>
</div>
% endif
</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 -->
% endif
</%def>