@(contacts:Seq[models.Contact])

@main(title = "All contacts", current = "list") {
    <table id="list">
        <thead>
            <tr>
                <th class="name">Name</th>
                <th class="firstname">First name</th>
                <th class="birthdate">Birth date</th>
                <th class="email">Email</th>
                <th class="action"></th>
                <th class="action"></th>
            </tr>
        </thead>
        <tbody>
            @contacts.map { contact =>
                <tr class="contact" contactId="@contact.id" draggable="true">
                    <td id="name">@contact.name</td>
                    <td id="firstname">@contact.firstname</td>
                    <td id="birthdate">@contact.birthdate.format("yyyy-MM-dd")</td>
                    <td id="email">@contact.email</td>
                    <td><a href="@action(controllers.Application.edit(Some(contact.id())))">edit</a></td>
                    <td>@a(controllers.Application.delete(contact.id())) { delete }</td>
                </tr>
            }
        </tbody>
    </table>
}
