Demo app using the Scala Play framework
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

24 lines
463 B

11 years ago
11 years ago
11 years ago
  1. @(tasks:List[Task], taskForm:Form[String])
  2. @import helper._
  3. @main("Todo List") {
  4. <h1>@tasks.size task(s)</h1>
  5. <ul>
  6. @tasks.map { task =>
  7. <li>
  8. @task.label
  9. @form(routes.Application.deleteTask(task.id)) {
  10. <input type="submit" value="Delete">
  11. }
  12. </li>
  13. }
  14. </ul>
  15. <h2>Add a new task</h2>
  16. @form(routes.Application.newTask) {
  17. @inputText(taskForm("label"))
  18. <input type="submit" value="Create">
  19. }
  20. }