add category views
This commit is contained in:
parent
6bf3fd5886
commit
69247133f7
5 changed files with 207 additions and 0 deletions
2
rattail/pyramid/templates/categories/base.mako
Normal file
2
rattail/pyramid/templates/categories/base.mako
Normal file
|
@ -0,0 +1,2 @@
|
|||
<%inherit file="/base.mako" />
|
||||
${parent.body()}
|
10
rattail/pyramid/templates/categories/category.mako
Normal file
10
rattail/pyramid/templates/categories/category.mako
Normal file
|
@ -0,0 +1,10 @@
|
|||
<%inherit file="/categories/base.mako" />
|
||||
<%inherit file="/crud.mako" />
|
||||
|
||||
<%def name="crud_name()">Category</%def>
|
||||
|
||||
<%def name="menu()">
|
||||
<p>${h.link_to("Back to Categories", url('categories.list'))}</p>
|
||||
</%def>
|
||||
|
||||
${parent.body()}
|
12
rattail/pyramid/templates/categories/index.mako
Normal file
12
rattail/pyramid/templates/categories/index.mako
Normal file
|
@ -0,0 +1,12 @@
|
|||
<%inherit file="/categories/base.mako" />
|
||||
<%inherit file="/index.mako" />
|
||||
|
||||
<%def name="title()">Categories</%def>
|
||||
|
||||
<%def name="menu()">
|
||||
% if request.has_perm('categories.create'):
|
||||
<p>${h.link_to("Create a new Category", url('category.new'))}</p>
|
||||
% endif
|
||||
</%def>
|
||||
|
||||
${parent.body()}
|
Loading…
Add table
Add a link
Reference in a new issue