Morph project => rattail-demo
This commit is contained in:
parent
a38c832dee
commit
220c6184aa
14 changed files with 219 additions and 162 deletions
14
rattail_demo/web/templates/base.mako
Normal file
14
rattail_demo/web/templates/base.mako
Normal file
|
@ -0,0 +1,14 @@
|
|||
## -*- coding: utf-8 -*-
|
||||
<%inherit file="tailbone:templates/themes/better/base.mako" />
|
||||
|
||||
<%def name="global_title()">${"[STAGE] " if not request.rattail_config.production() else ''}Rattail Demo</%def>
|
||||
|
||||
<%def name="favicon()">
|
||||
<link rel="icon" type="image/x-icon" href="${request.static_url('tailbone:static/img/rattail.ico')}" />
|
||||
</%def>
|
||||
|
||||
<%def name="header_logo()">
|
||||
${h.image(request.static_url('tailbone:static/img/rattail.ico'), "Header Logo", height='49')}
|
||||
</%def>
|
||||
|
||||
${parent.body()}
|
7
rattail_demo/web/templates/home.mako
Normal file
7
rattail_demo/web/templates/home.mako
Normal file
|
@ -0,0 +1,7 @@
|
|||
## -*- coding: utf-8 -*-
|
||||
<%inherit file="tailbone:templates/home.mako" />
|
||||
|
||||
<div class="logo">
|
||||
${h.image(request.static_url('tailbone:static/img/home_logo.png'), "Rattail Logo")}
|
||||
<h1>Welcome to the Rattail Demo</h1>
|
||||
</div>
|
110
rattail_demo/web/templates/menu.mako
Normal file
110
rattail_demo/web/templates/menu.mako
Normal file
|
@ -0,0 +1,110 @@
|
|||
## -*- coding: utf-8 -*-
|
||||
|
||||
<%def name="main_menu_items()">
|
||||
|
||||
% if request.has_any_perm('products.list', 'vendors.list', 'brands.list', 'families.list', 'reportcodes.list'):
|
||||
<li>
|
||||
<a>Products</a>
|
||||
<ul>
|
||||
% if request.has_perm('products.list'):
|
||||
<li>${h.link_to("Products", url('products'))}</li>
|
||||
% endif
|
||||
% if request.has_perm('vendors.list'):
|
||||
<li>${h.link_to("Vendors", url('vendors'))}</li>
|
||||
% endif
|
||||
% if request.has_perm('brands.list'):
|
||||
<li>${h.link_to("Brands", url('brands'))}</li>
|
||||
% endif
|
||||
% if request.has_perm('families.list'):
|
||||
<li>${h.link_to("Families", url('families'))}</li>
|
||||
% endif
|
||||
% if request.has_perm('reportcodes.list'):
|
||||
<li>${h.link_to("Report Codes", url('reportcodes'))}</li>
|
||||
% endif
|
||||
</ul>
|
||||
</li>
|
||||
% endif
|
||||
|
||||
% if request.has_any_perm('people.list', 'customers.list', 'employees.list'):
|
||||
<li>
|
||||
<a>People</a>
|
||||
<ul>
|
||||
% if request.has_perm('people.list'):
|
||||
<li>${h.link_to("All People", url('people'))}</li>
|
||||
% endif
|
||||
% if request.has_perm('customers.list'):
|
||||
<li>${h.link_to("Customers", url('customers'))}</li>
|
||||
% endif
|
||||
% if request.has_perm('employees.list'):
|
||||
<li>${h.link_to("Employees", url('employees'))}</li>
|
||||
% endif
|
||||
</ul>
|
||||
</li>
|
||||
% endif
|
||||
|
||||
% if request.has_any_perm('stores.list', 'departments.list', 'subdepartments.list'):
|
||||
<li>
|
||||
<a>Company</a>
|
||||
<ul>
|
||||
% if request.has_perm('stores.list'):
|
||||
<li>${h.link_to("Stores", url('stores'))}</li>
|
||||
% endif
|
||||
% if request.has_perm('departments.list'):
|
||||
<li>${h.link_to("Departments", url('departments'))}</li>
|
||||
% endif
|
||||
% if request.has_perm('subdepartments.list'):
|
||||
<li>${h.link_to("Subdepartments", url('subdepartments'))}</li>
|
||||
% endif
|
||||
</ul>
|
||||
</li>
|
||||
% endif
|
||||
|
||||
% if request.has_any_perm('batch.handheld.list', 'batch.inventory.list'):
|
||||
<li>
|
||||
<a>Batches</a>
|
||||
<ul>
|
||||
% if request.has_perm('batch.handheld.list'):
|
||||
<li>${h.link_to("Handheld", url('batch.handheld'))}</li>
|
||||
% endif
|
||||
% if request.has_perm('batch.inventory.list'):
|
||||
<li>${h.link_to("Inventory", url('batch.inventory'))}</li>
|
||||
% endif
|
||||
</ul>
|
||||
</li>
|
||||
% endif
|
||||
|
||||
% if request.has_any_perm('users.list', 'roles.list', 'settings.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("Settings", url('settings'))}</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("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
|
||||
|
||||
</%def>
|
Loading…
Add table
Add a link
Reference in a new issue