mirror of
https://github.com/danieleteti/delphimvcframework.git
synced 2024-11-18 01:05:54 +01:00
21 lines
669 B
Plaintext
21 lines
669 B
Plaintext
<?lua require 'userlib.commons'?>
|
|
<html>
|
|
<body>
|
|
<h2>Customers List</h2>
|
|
<hr>
|
|
<h6>This is an html table automatically generated by the JSON prepared in the DMVC controller</h6>
|
|
<?lua= html_table(customers, {
|
|
{fieldname="firstName", coltitle = "First name"},
|
|
{fieldname="lastName", coltitle = "Last name"},
|
|
}) ?>
|
|
<hr>
|
|
<h6>This is a classic loop to generate html by hand</h6>
|
|
<ul>
|
|
<?lua for _, customer in ipairs(customers) do ?>
|
|
<li><?lua=customer.firstName .. " " .. customer.lastName ?></li>
|
|
<?lua end ?>
|
|
</ul>
|
|
<hr>
|
|
<a href="/newcustomer.elua">Add New Customer</a>
|
|
</body>
|
|
</html> |