Remove deprecated menu template
using "simple" menus exclusively now
This commit is contained in:
parent
5ebe3a001a
commit
e401549e29
|
@ -1,49 +0,0 @@
|
||||||
## -*- coding: utf-8; -*-
|
|
||||||
<%inherit file="tailbone:templates/menu.mako" />
|
|
||||||
|
|
||||||
<%def name="main_menu_items()">
|
|
||||||
|
|
||||||
% if request.rattail_config.getbool('tailbone', 'menus.simple', default=False):
|
|
||||||
${parent.main_menu_items()}
|
|
||||||
% else:
|
|
||||||
|
|
||||||
% if request.has_any_perm('users.list', 'roles.list', 'settings.list', 'upgrades.list'):
|
|
||||||
<li>
|
|
||||||
<a>Admin</a>
|
|
||||||
<ul>
|
|
||||||
% if request.has_perm('users.list'):
|
|
||||||
<li>${h.link_to("Users", url('users'))}</li>
|
|
||||||
% endif
|
|
||||||
% if request.has_perm('roles.list'):
|
|
||||||
<li>${h.link_to("Roles", url('roles'))}</li>
|
|
||||||
% endif
|
|
||||||
% if request.has_perm('settings.list'):
|
|
||||||
<li>${h.link_to("Raw Settings", url('settings'))}</li>
|
|
||||||
% endif
|
|
||||||
% if request.has_perm('upgrades.list'):
|
|
||||||
<li>${h.link_to("Rattail Demo Upgrades", url('upgrades'))}</li>
|
|
||||||
% endif
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
% endif
|
|
||||||
|
|
||||||
% if request.user:
|
|
||||||
<li>
|
|
||||||
<a${' class="root-user"' if request.is_root else ''|n}>${request.user}${" ({})".format(inbox_count) if inbox_count else ''}</a>
|
|
||||||
<ul>
|
|
||||||
% if request.is_root:
|
|
||||||
<li class="root-user">${h.link_to("Stop being root", url('stop_root'))}</li>
|
|
||||||
% elif request.is_admin:
|
|
||||||
<li class="root-user">${h.link_to("Become root", url('become_root'))}</li>
|
|
||||||
% endif
|
|
||||||
<li>${h.link_to("Messages{}".format(" ({})".format(inbox_count) if inbox_count else ''), url('messages.inbox'))}</li>
|
|
||||||
<li>${h.link_to("Change Password", url('change_password'))}</li>
|
|
||||||
<li>${h.link_to("Logout", url('logout'))}</li>
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
% else:
|
|
||||||
<li>${h.link_to("Login", url('login'))}</li>
|
|
||||||
% endif
|
|
||||||
|
|
||||||
% endif
|
|
||||||
</%def>
|
|
Loading…
Reference in a new issue