@(tasks: List[Task], taskForm: Form[String])

@import helper._

@main("Todo list") {

    <h1>@tasks.size task(s)</h1>

    <p>My secret is @play.Play.application().configuration().getString("application.secret")

    <ul>
    @tasks.map { task =>
        <li>
            @task.label

            @form(routes.Application.deleteTask(task.id.get.stringify)) {
                <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">

    }

}
@(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.get.stringify)) {
                <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">

    }

}
Hide publishing of configuration parameter.
Hide publishing of configuration parameter.
