rattail-demo/rattail_demo/web/templates/mobile/base.mako
2017-03-30 21:46:06 -05:00

26 lines
1.1 KiB
Mako

## -*- coding: utf-8 -*-
<%inherit file="tailbone:templates/mobile/base.mako" />
<%def name="mobile_usermenu()">
<div id="usermenu" data-role="panel" data-display="overlay">
<ul data-role="listview">
<li data-icon="home">${h.link_to("Home", url('mobile.home'))}</li>
% if request.is_root:
<li class="root-user" data-icon="forbidden">${h.link_to("Stop being root", url('stop_root'), **{'data-ajax': 'false'})}</li>
% elif request.is_admin:
<li class="root-user" data-icon="forbidden">${h.link_to("Become root", url('become_root'), **{'data-ajax': 'false'})}</li>
% endif
% if request.has_perm('customers.list'):
<li>${h.link_to("Customers", url('mobile.customers'))}</li>
% endif
% if request.has_perm('products.list'):
<li>${h.link_to("Products", url('mobile.products'))}</li>
% endif
<li data-icon="lock">${h.link_to("Logout", url('logout'), **{'data-ajax': 'false'})}</li>
<li data-icon="info">${h.link_to("About {}".format(capture(self.app_title)), url('mobile.about'))}</li>
</ul>
</div>
</%def>
${parent.body()}