Add base mobile template, for custom menu
This commit is contained in:
parent
7947f89b5f
commit
ed1cc301a3
25
rattail_demo/web/templates/mobile/base.mako
Normal file
25
rattail_demo/web/templates/mobile/base.mako
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
## -*- 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()}
|
Loading…
Reference in a new issue