extended commit (see note)

- Cleaned up dependencies.

- Added ``rattail.pyramid.includeme()``.

- Added ``CustomerGroup`` CRUD view (read only).

- Added hot links to ``Customer`` CRUD view.

- Added ``Store`` index, CRUD views.

- Updated ``rattail.pyramid.views.includeme()``.

- Added ``email_preference`` to ``Customer`` CRUD.
This commit is contained in:
Lance Edgar 2012-09-17 11:59:24 -07:00
parent 123fa375ea
commit 1578dd3b55
10 changed files with 237 additions and 109 deletions

View file

@ -0,0 +1,7 @@
<%inherit file="/crud.mako" />
<%def name="context_menu_items()">
<li>${h.link_to("Back to Customer Groups", url('customer_groups'))}</li>
</%def>
${parent.body()}

View file

@ -7,7 +7,7 @@ ${parent.body()}
<h2>People</h2>
% if customer.people:
<p>Customer account is associated with the following people:</p>
<div class="grid hoverable">
<div class="grid clickable">
<table>
<thead>
<th>First Name</th>
@ -15,7 +15,7 @@ ${parent.body()}
</thead>
<tbody>
% for i, person in enumerate(customer.people, 1):
<tr class="${'odd' if i % 2 else 'even'}">
<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>
@ -30,7 +30,7 @@ ${parent.body()}
<h2>Groups</h2>
% if customer.groups:
<p>Customer account belongs to the following groups:</p>
<div class="grid hoverable">
<div class="grid clickable">
<table>
<thead>
<th>ID</th>
@ -38,7 +38,7 @@ ${parent.body()}
</thead>
<tbody>
% for i, group in enumerate(customer.groups, 1):
<tr class="${'odd' if i % 2 else 'even'}">
<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>

View file

@ -0,0 +1,7 @@
<%inherit file="/crud.mako" />
<%def name="context_menu_items()">
<li>${h.link_to("Back to Stores", url('stores'))}</li>
</%def>
${parent.body()}

View file

@ -0,0 +1,11 @@
<%inherit file="/grid.mako" />
<%def name="title()">Stores</%def>
<%def name="context_menu_items()">
% if request.has_perm('stores.create'):
<li>${h.link_to("Create a new Store", url('store.create'))}</li>
% endif
</%def>
${parent.body()}