Add grid, CRUD views for Setting
model.
This required some tweaks to the base CRUD view etc.
This commit is contained in:
parent
86507cf660
commit
cc2c2573e5
5 changed files with 205 additions and 32 deletions
13
tailbone/templates/settings/crud.mako
Normal file
13
tailbone/templates/settings/crud.mako
Normal file
|
@ -0,0 +1,13 @@
|
|||
## -*- coding: utf-8 -*-
|
||||
<%inherit file="/crud.mako" />
|
||||
|
||||
<%def name="context_menu_items()">
|
||||
<li>${h.link_to("Back to Settings", url('settings'))}</li>
|
||||
% if form.readonly:
|
||||
<li>${h.link_to("Edit this Setting", url('settings.edit', name=form.fieldset.model.name))}</li>
|
||||
% elif form.updating:
|
||||
<li>${h.link_to("View this Setting", url('settings.view', name=form.fieldset.model.name))}</li>
|
||||
% endif
|
||||
</%def>
|
||||
|
||||
${parent.body()}
|
12
tailbone/templates/settings/index.mako
Normal file
12
tailbone/templates/settings/index.mako
Normal file
|
@ -0,0 +1,12 @@
|
|||
## -*- coding: utf-8 -*-
|
||||
<%inherit file="/grid.mako" />
|
||||
|
||||
<%def name="title()">Settings</%def>
|
||||
|
||||
<%def name="context_menu_items()">
|
||||
% if request.has_perm('settings.create'):
|
||||
<li>${h.link_to("Create a new Setting", url('settings.create'))}</li>
|
||||
% endif
|
||||
</%def>
|
||||
|
||||
${parent.body()}
|
Loading…
Add table
Add a link
Reference in a new issue