add code for creating new customers

* update string catalog and german translation (addresses #11)
 * create new actions for adding customers in customers controller
   (addresses #12)

git-svn-id: file:///var/www/wwwusers/usr01/svn/pyalchemybiz/trunk@10 389c73d4-bf09-4d3d-a15e-f94a37d0667a
This commit is contained in:
Jan Dittberner 2009-01-18 22:42:51 +00:00
parent 1bbcc8e559
commit 08b4d46c84
7 changed files with 92 additions and 19 deletions

View file

@ -1,6 +1,6 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.1//EN"
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>${_('PyAlchemyBiz')}</title>
${h.stylesheet_link_tag('/pyalchemybiz.css')}

View file

@ -0,0 +1,15 @@
<%inherit file="/base.mako" />
<h1>${_('Customer management')}</h1>
<h2>${_('Create new customer')}</h2>
${h.start_form(h.url_for(action='create_process'), method='post')}
<div id="createcustomerform">
<label for="firstname">${_('First name:')}</label><br />
${h.text_field('firstname')}<br />
<label for="lastname">${_('Last name:')}</label><br />
${h.text_field('lastname')}<br />
${h.submit(_('Add new customer'))}
</div>
${h.end_form()}

View file

@ -1,9 +1,11 @@
<%inherit file="/base.mako" />
<h1>${_('Hello')}</h1>
<h1>${_('Customer management')}</h1>
<ul id="customers">
% for customer in c.customers:
<li>${customer | h} [${h.link_to(_('edit'), h.url_for(id=customer.id, action="edit"))}]</li>
<li>${customer | h} [${h.link_to(_('edit customer'), h.url_for(id=customer.id, action="edit"))}]</li>
% endfor
</ul>
${h.link_to(_('create new customer'), h.url_for(action="create"))}