Update changelog
This commit is contained in:
commit
a38c832dee
9 changed files with 289 additions and 0 deletions
8
poser/__init__.py
Normal file
8
poser/__init__.py
Normal file
|
@ -0,0 +1,8 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
Rattail 'Poser' (demo project)
|
||||
"""
|
||||
|
||||
from __future__ import unicode_literals, absolute_import
|
||||
|
||||
from ._version import __version__
|
3
poser/_version.py
Normal file
3
poser/_version.py
Normal file
|
@ -0,0 +1,3 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
__version__ = u'0.1.0'
|
0
poser/web/__init__.py
Normal file
0
poser/web/__init__.py
Normal file
40
poser/web/app.py
Normal file
40
poser/web/app.py
Normal file
|
@ -0,0 +1,40 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
Pyramid web application
|
||||
"""
|
||||
|
||||
from __future__ import unicode_literals, absolute_import
|
||||
|
||||
from tailbone import app
|
||||
|
||||
|
||||
def main(global_config, **settings):
|
||||
"""
|
||||
This function returns a Pyramid WSGI application.
|
||||
"""
|
||||
# set some defaults for PostgreSQL
|
||||
app.provide_postgresql_settings(settings)
|
||||
|
||||
# prefer Poser templates over Tailbone; use 'better' theme
|
||||
settings.setdefault('mako.directories', ['poser.web:templates',
|
||||
'tailbone:templates/themes/better',
|
||||
'tailbone:templates',])
|
||||
|
||||
# make config objects
|
||||
rattail_config = app.make_rattail_config(settings)
|
||||
pyramid_config = app.make_pyramid_config(settings)
|
||||
|
||||
# bring in the rest of Tailbone
|
||||
pyramid_config.include('tailbone.static')
|
||||
pyramid_config.include('tailbone.subscribers')
|
||||
pyramid_config.include('tailbone.views')
|
||||
|
||||
# # bring in the rest of Poser
|
||||
# pyramid_config.include('poser.web.subscribers')
|
||||
# pyramid_config.include('poser.web.static')
|
||||
# pyramid_config.include('poser.web.views')
|
||||
|
||||
# configure PostgreSQL some more
|
||||
app.configure_postgresql(pyramid_config)
|
||||
|
||||
return pyramid_config.make_wsgi_app()
|
139
poser/web/templates/menu.mako
Normal file
139
poser/web/templates/menu.mako
Normal file
|
@ -0,0 +1,139 @@
|
|||
## -*- coding: utf-8 -*-
|
||||
|
||||
<%def name="main_menu_items()">
|
||||
|
||||
% if request.has_any_perm('schedule.view', 'timesheet.view'):
|
||||
<li>
|
||||
<a>Time Clock</a>
|
||||
<ul>
|
||||
% if request.has_perm('schedule.view'):
|
||||
<li>${h.link_to("Employee Schedule", url('schedule.employee'))}</li>
|
||||
% endif
|
||||
% if request.has_perm('timesheet.view'):
|
||||
<li>${h.link_to("Employee Time Sheet", url('timesheet.employee'))}</li>
|
||||
% endif
|
||||
% if request.has_any_perm('schedule.viewall', 'timesheet.viewall'):
|
||||
<li>-</li>
|
||||
% if request.has_perm('schedule.viewall'):
|
||||
<li>${h.link_to("Full Schedule", url('schedule'))}</li>
|
||||
% endif
|
||||
% if request.has_perm('timesheet.viewall'):
|
||||
<li>${h.link_to("Full Time Sheet", url('timesheet'))}</li>
|
||||
% endif
|
||||
% endif
|
||||
</ul>
|
||||
</li>
|
||||
% endif
|
||||
|
||||
<li>
|
||||
<a>Products</a>
|
||||
<ul>
|
||||
% if request.has_perm('products.list'):
|
||||
<li>${h.link_to("Products", url('products'))}</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>
|
||||
|
||||
<li>
|
||||
<a>Vendors</a>
|
||||
<ul>
|
||||
<li>${h.link_to("Vendors", url('vendors'))}</li>
|
||||
% if request.has_any_perm('vendorcatalogs.list', 'vendorcatalogs.create'):
|
||||
<li>-</li>
|
||||
% if request.has_perm('vendorcatalogs.list'):
|
||||
<li>${h.link_to("Catalogs", url('vendorcatalogs'))}</li>
|
||||
% endif
|
||||
% if request.has_perm('vendorcatalogs.create'):
|
||||
<li>${h.link_to("Upload New Catalog", url('vendorcatalogs.create'))}</li>
|
||||
% endif
|
||||
% endif
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a>Company</a>
|
||||
<ul>
|
||||
<li>${h.link_to("Stores", url('stores'))}</li>
|
||||
<li>${h.link_to("Departments", url('departments'))}</li>
|
||||
<li>${h.link_to("Subdepartments", url('subdepartments'))}</li>
|
||||
<li>-</li>
|
||||
<li>${h.link_to("Employees", url('employees'))}</li>
|
||||
<li>-</li>
|
||||
<li>${h.link_to("Customers", url('customers'))}</li>
|
||||
% if request.has_perm('customergroups.list'):
|
||||
<li>${h.link_to("Customer Groups", url('customergroups'))}</li>
|
||||
% endif
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a>Reports</a>
|
||||
<ul>
|
||||
<li>${h.link_to("Ordering Worksheet", url('reports.ordering'))}</li>
|
||||
<li>${h.link_to("Inventory Worksheet", url('reports.inventory'))}</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
% 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', 'labelprofiles.list', 'settings.list', 'emailprofiles.list', 'datasyncchanges.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('labelprofiles.list'):
|
||||
<li>${h.link_to("Label Profiles", url('labelprofiles'))}</li>
|
||||
% endif
|
||||
% if request.has_perm('settings.list'):
|
||||
<li>${h.link_to("Settings", url('settings'))}</li>
|
||||
% endif
|
||||
% if request.has_perm('emailprofiles.list'):
|
||||
<li>${h.link_to("Email Profiles", url('emailprofiles'))}</li>
|
||||
% endif
|
||||
% if request.has_perm('datasyncchanges.list'):
|
||||
<li>${h.link_to("DataSync Changes", url('datasyncchanges'))}</li>
|
||||
% endif
|
||||
</ul>
|
||||
</li>
|
||||
% endif
|
||||
|
||||
% if request.user:
|
||||
<li>
|
||||
<a>${request.user}${" ({})".format(inbox_count) if inbox_count else ''}</a>
|
||||
<ul>
|
||||
<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
|
||||
|
||||
</%def>
|
Loading…
Add table
Add a link
Reference in a new issue