[d659b83] | 1 | <!DOCTYPE html>
|
---|
| 2 | <html lang="en">
|
---|
| 3 | <head>
|
---|
| 4 | <meta charset="UTF-8">
|
---|
| 5 | <meta name="viewport" content="width=device-width, initial-scale=1.0">
|
---|
| 6 | <title>Meal info</title>
|
---|
| 7 | <!-- Bootstrap CSS -->
|
---|
| 8 | <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"
|
---|
| 9 | integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T"
|
---|
| 10 | crossorigin="anonymous">
|
---|
| 11 | </head>
|
---|
| 12 |
|
---|
| 13 | <body>
|
---|
| 14 | <div th:replace="appBar"></div>
|
---|
| 15 |
|
---|
| 16 | <div class="container mt-4">
|
---|
| 17 | <table class="table table-bordered">
|
---|
| 18 | <thead class="thead-dark">
|
---|
| 19 | <tr>
|
---|
| 20 | <th>Name</th>
|
---|
| 21 | <th>Quantity (g)</th>
|
---|
| 22 | <th>Calories (kcal)</th>
|
---|
| 23 | <th>Proteins (g)</th>
|
---|
| 24 | <th>Fats (g)</th>
|
---|
| 25 | <th>Carbs (g)</th>
|
---|
| 26 | <th>Action</th>
|
---|
| 27 | </tr>
|
---|
| 28 | </thead>
|
---|
| 29 | <tbody>
|
---|
| 30 | <tr th:each="ingredient : ${meal.getIngredients()}">
|
---|
| 31 | <td><span th:text="${ingredient.getIngredient().getName()}"></span></td>
|
---|
| 32 | <td><span th:text="${ingredient.getQuantity()}"></span></td>
|
---|
| 33 | <td><span th:text="${ingredient.getCalories()}"></span></td>
|
---|
| 34 | <td><span th:text="${ingredient.getProteins()}"></span></td>
|
---|
| 35 | <td><span th:text="${ingredient.getFats()}"></span></td>
|
---|
| 36 | <td><span th:text="${ingredient.getCarbs()}"></span></td>
|
---|
| 37 | <td>
|
---|
| 38 | <form th:action="@{/meals/removeIngredient/{mealID}(mealID=${meal.mID})}" method="post">
|
---|
| 39 | <input type="hidden" name="ingredientID" th:value="${ingredient.id}" />
|
---|
| 40 | <button type="submit" class="btn btn-danger btn-sm float-right">
|
---|
| 41 | Remove
|
---|
| 42 | </button>
|
---|
| 43 | </form>
|
---|
| 44 | </td>
|
---|
| 45 |
|
---|
| 46 | </tr>
|
---|
| 47 | </tbody>
|
---|
| 48 | </table>
|
---|
| 49 | </div>
|
---|
| 50 |
|
---|
| 51 | <!-- Bootstrap JS and Popper.js (required for Bootstrap) -->
|
---|
| 52 | <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"
|
---|
| 53 | integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo"
|
---|
| 54 | crossorigin="anonymous"></script>
|
---|
| 55 | <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"
|
---|
| 56 | integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1"
|
---|
| 57 | crossorigin="anonymous"></script>
|
---|
| 58 | <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"
|
---|
| 59 | integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM"
|
---|
| 60 | crossorigin="anonymous"></script>
|
---|
| 61 |
|
---|
| 62 | </body>
|
---|
| 63 | </html>
|
---|