Skip to content

Instantly share code, notes, and snippets.

@arbarlow
Created September 10, 2011 16:36
Show Gist options
  • Select an option

  • Save arbarlow/1208500 to your computer and use it in GitHub Desktop.

Select an option

Save arbarlow/1208500 to your computer and use it in GitHub Desktop.
@(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>
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment