Skip to content

Instantly share code, notes, and snippets.

@iolo
Created September 11, 2012 08:43
Show Gist options
  • Save iolo/3696974 to your computer and use it in GitHub Desktop.
Save iolo/3696974 to your computer and use it in GitHub Desktop.
@(tasks: List[Task], taskForm: Form[String])
@import helper._
@main("Todo list") {
<h1>@tasks.size task(s)</h1>
<ul>
@tasks.map { task =>
<li>
@task.label
@form(routes.Application.deleteTask(task.id)) {
<input type="submit" value="Delete">
}
</li>
}
</ul>
<h2>Add a new task</h2>
@form(routes.Application.newTask) {
@inputText(taskForm("label"))
<input type="submit" value="Create">
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment