Re: The worlds FIRST EuDrop... The Mighty Eagle Template Solution

new topic     » goto parent     » topic index » view thread      » older message » newer message

Added new demo and generated documentation using eudoc, creole, and make.

Translates 2 sequences to build a nice report.

sequence customers_tbl = { 
	{"xecronix", "nospam_xecronix@sogetthis.com", "407-555-1212", "123 Main Street"}, 
	{"jsmith", "greatday88@sogetthis.com", "407-555-1212", "999 Other Street"} 
} 
sequence orders_tbl = { 
	{"xecronix", "Laser Pointer", 3, 1.25}, 
	{"jsmith", "Spiral Notebook", 12, 6.87}, 
	{"jsmith", "Computer Mouse", 1, 9.86}, 
	{"jsmith", "Mouse Pad", 1, 3.49} 
} 

https://raw.githubusercontent.com/xecronix/MightyEagle/master/demo/demo_sales_report.png

And here is the template used to build the report.

sequence template = """ 

<html> 
<style> 
	td {border:1px solid} 
	table {border:1px solid} 
	.center {text-align:center} 
	.right_align {text-align:right} 
</style> 
<body> 
<table> 
{@customer_cb 
  <tr> 
    <th colspan='3'> 
      {=name :}<br /> 
      {=address :}<br /> 
      {=phone :}<br /> 
      {=email :}<br /> 
    </th> 
  </tr> 
  <tr> 
      <th>Product</th> 
      <th>Quantity</th> 
      <th>Cost</th> 
    </th> 
  </tr> 
{@order_cb 
  <tr> 
    <td class='center'>{=prod :}</td> 
    <td class='right_align'>{=qty :}</td> 
    <td class='right_align'>{=cost :}</td> 
  </tr> 
:}:} 
</table> 
</body> 
</html> 
""" 

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu