Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @(users: List[User])
- @main("Listing users") {
- <div class="container">
- <h1>users: @users.length </h1>
- <a href="@routes.UsersController.add" class="btn btn-primary">Add User</a>
- <table class="table table-striped">
- <thead>
- <tr>
- <th>ID</th>
- <th>Name</th>
- <th>Edit</th>
- <th>Delete</th>
- </tr>
- </thead>
- <tbody>
- @for(user <- users) {
- <tr>
- <td>@user.id</td>
- <td>@user.name</td>
- @user.id.map { id =>
- <td><a href="@routes.UsersController.edit(id)" class="btn btn-warning" type="submit">Edit</button></td>
- <td>@helper.form(routes.UsersController.delete(id)){<button class="btn btn-danger" type="submit">Delete</button>}</li></td>
- }
- </tr>
- }
- @(users: List[User])
- @main("Listing users") {
- <div class="container">
- <h1>users: @users.length </h1>
- <a href="@routes.UsersController.add" class="btn btn-primary">Add User</a>
- <table class="table table-striped">
- <thead>
- <tr>
- <th>ID</th>
- <th>Name</th>
- <th>Edit</th>
- <th>Delete</th>
- </tr>
- </thead>
- <tbody>
- @for(user <- users) {
- <tr>
- <td>@user.id</td>
- <td>@user.name</td>
- @user.id.map { id =>
- <td><a href="@routes.UsersController.edit(id)" class="btn btn-warning" type="submit">Edit</button></td>
- <td>@helper.form(routes.UsersController.delete(id)){<button class="btn btn-danger" type="submit">Delete</button>}</li></td>
- }
- </tr>
- }
- </tbody>
- </table>
- </div>
- }
- </tbody>
- </table>
- </div>
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement