Rebranded to Tailbone.
This commit is contained in:
parent
47944767dc
commit
40efd8a3bc
111 changed files with 188 additions and 209 deletions
12
tailbone/templates/customers/crud.mako
Normal file
12
tailbone/templates/customers/crud.mako
Normal file
|
@ -0,0 +1,12 @@
|
|||
<%inherit file="/crud.mako" />
|
||||
|
||||
<%def name="context_menu_items()">
|
||||
<li>${h.link_to("Back to Customers", url('customers'))}</li>
|
||||
% if form.readonly and request.has_perm('customers.update'):
|
||||
<li>${h.link_to("Edit this Customer", url('customer.update', uuid=form.fieldset.model.uuid))}</li>
|
||||
% elif form.updating:
|
||||
<li>${h.link_to("View this Customer", url('customer.read', uuid=form.fieldset.model.uuid))}</li>
|
||||
% endif
|
||||
</%def>
|
||||
|
||||
${parent.body()}
|
5
tailbone/templates/customers/index.mako
Normal file
5
tailbone/templates/customers/index.mako
Normal file
|
@ -0,0 +1,5 @@
|
|||
<%inherit file="/grid.mako" />
|
||||
|
||||
<%def name="title()">Customers</%def>
|
||||
|
||||
${parent.body()}
|
51
tailbone/templates/customers/read.mako
Normal file
51
tailbone/templates/customers/read.mako
Normal file
|
@ -0,0 +1,51 @@
|
|||
<%inherit file="/customers/crud.mako" />
|
||||
|
||||
${parent.body()}
|
||||
|
||||
<% customer = form.fieldset.model %>
|
||||
|
||||
<h2>People</h2>
|
||||
% if customer.people:
|
||||
<p>Customer account is associated with the following people:</p>
|
||||
<div class="grid clickable">
|
||||
<table>
|
||||
<thead>
|
||||
<th>First Name</th>
|
||||
<th>Last Name</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
% for i, person in enumerate(customer.people, 1):
|
||||
<tr class="${'odd' if i % 2 else 'even'}" url="${url('person.read', uuid=person.uuid)}">
|
||||
<td>${person.first_name or ''}</td>
|
||||
<td>${person.last_name or ''}</td>
|
||||
</tr>
|
||||
% endfor
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
% else:
|
||||
<p>Customer account is not associated with any people.</p>
|
||||
% endif
|
||||
|
||||
<h2>Groups</h2>
|
||||
% if customer.groups:
|
||||
<p>Customer account belongs to the following groups:</p>
|
||||
<div class="grid clickable">
|
||||
<table>
|
||||
<thead>
|
||||
<th>ID</th>
|
||||
<th>Name</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
% for i, group in enumerate(customer.groups, 1):
|
||||
<tr class="${'odd' if i % 2 else 'even'}" url="${url('customer_group.read', uuid=group.uuid)}">
|
||||
<td>${group.id}</td>
|
||||
<td>${group.name or ''}</td>
|
||||
</tr>
|
||||
% endfor
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
% else:
|
||||
<p>Customer account doesn't belong to any groups.</p>
|
||||
% endif
|
Loading…
Add table
Add a link
Reference in a new issue