Add support for new Purchase/Batch views, 'create row' master pattern
More refactoring here but hopefully not that important..
This commit is contained in:
parent
8fe0e96273
commit
a6e43d1658
11 changed files with 555 additions and 26 deletions
10
tailbone/templates/master/create_row.mako
Normal file
10
tailbone/templates/master/create_row.mako
Normal file
|
@ -0,0 +1,10 @@
|
|||
## -*- coding: utf-8 -*-
|
||||
<%inherit file="/master/create.mako" />
|
||||
|
||||
<%def name="title()">New ${row_model_title}</%def>
|
||||
|
||||
<%def name="context_menu_items()">
|
||||
<li>${h.link_to("Back to {}".format(model_title), index_url)}</li>
|
||||
</%def>
|
||||
|
||||
${parent.body()}
|
|
@ -10,7 +10,7 @@
|
|||
<li>${h.link_to("Delete this {}".format(row_model_title), row_action_url('delete', instance))}</li>
|
||||
% endif
|
||||
% if master.rows_creatable and request.has_perm('{}.create'.format(row_permission_prefix)):
|
||||
<li>${h.link_to("Create a new {}".format(row_model_title), url('{}.create'.format(row_route_prefix)))}</li>
|
||||
<li>${h.link_to("Create a new {}".format(row_model_title), url('{}.create_row'.format(route_prefix), uuid=row_parent.uuid))}</li>
|
||||
% endif
|
||||
</%def>
|
||||
|
||||
|
|
11
tailbone/templates/purchases/batches/index.mako
Normal file
11
tailbone/templates/purchases/batches/index.mako
Normal file
|
@ -0,0 +1,11 @@
|
|||
## -*- coding: utf-8 -*-
|
||||
<%inherit file="/master/index.mako" />
|
||||
|
||||
<%def name="context_menu_items()">
|
||||
${parent.context_menu_items()}
|
||||
% if request.has_perm('purchases.batch'):
|
||||
<li>${h.link_to("Go to Purchases", url('purchases'))}</li>
|
||||
% endif
|
||||
</%def>
|
||||
|
||||
${parent.body()}
|
11
tailbone/templates/purchases/index.mako
Normal file
11
tailbone/templates/purchases/index.mako
Normal file
|
@ -0,0 +1,11 @@
|
|||
## -*- coding: utf-8 -*-
|
||||
<%inherit file="/master/index.mako" />
|
||||
|
||||
<%def name="context_menu_items()">
|
||||
${parent.context_menu_items()}
|
||||
% if request.has_perm('purchases.batch.list'):
|
||||
<li>${h.link_to("Go to Purchase Batches", url('purchases.batch'))}</li>
|
||||
% endif
|
||||
</%def>
|
||||
|
||||
${parent.body()}
|
Loading…
Add table
Add a link
Reference in a new issue