#{extends 'main.html' /}
#{set title:'Contacts' /}

<div id="header">
<h1>Contacts</h1>
</div>

<div id="content">
<table>
<thead>
<tr><th>Contact</th><th>Address</th><th>Email</th><th>Mobile</th><th>Action</th></tr>
</thead>
<tbody>
#{list contacts, as: 'person'}
<tr><td>${person}</td><td>${person.address}</td><td>${person.email}</td><td>${person.mobile}</td>
<td><a href="@{Application.generateNameCard(person.id)}" class="action">generate namecard</a></td></tr>
#{/list}
</tbody>
</table>

<ul class="actions">
<li><a href="/addressBook">Address Book</a></li>
</ul>
</div>