1 | <!DOCTYPE html>
|
---|
2 | <html xmlns:th="http://www.thymeleaf.org">
|
---|
3 | <head>
|
---|
4 | <meta charset="UTF-8">
|
---|
5 | <meta name="viewport" content="width=device-width, initial-scale=1.0">
|
---|
6 | <title>Meal List</title>
|
---|
7 |
|
---|
8 | <!-- Bootstrap CSS -->
|
---|
9 | <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"
|
---|
10 | integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T"
|
---|
11 | crossorigin="anonymous">
|
---|
12 | </head>
|
---|
13 | <body>
|
---|
14 | <div th:replace="appBar"></div>
|
---|
15 |
|
---|
16 | <div class="container mt-4">
|
---|
17 | <h1 class="center">Meals</h1>
|
---|
18 |
|
---|
19 | <table class="table table-bordered">
|
---|
20 | <thead class="thead-dark">
|
---|
21 | <tr>
|
---|
22 | <th>Name</th>
|
---|
23 | <th>Type</th>
|
---|
24 | <th>Ingredients</th>
|
---|
25 | <th>Calories (kcal)</th>
|
---|
26 | <th>Proteins (g)</th>
|
---|
27 | <th>Fats (g)</th>
|
---|
28 | <th>Carbs (g)</th>
|
---|
29 | <th>Quantity (g)</th>
|
---|
30 | <th>Actions</th>
|
---|
31 | </tr>
|
---|
32 | </thead>
|
---|
33 | <tbody>
|
---|
34 | <tr th:each="meal : ${mealsList}">
|
---|
35 | <td><span th:text="${meal.name}"></span></td>
|
---|
36 | <td><span th:text="${meal.type}"></span></td>
|
---|
37 | <td>
|
---|
38 | <a th:href="@{/meals/info/{mealID}(mealID=${meal.mID})}" class="btn btn-primary" role="button">Ingredients</a>
|
---|
39 | </td>
|
---|
40 | <td><span th:text="${meal.getCalories()}"></span></td>
|
---|
41 | <td><span th:text="${meal.getProteins()}"></span></td>
|
---|
42 | <td><span th:text="${meal.getFats()}"></span></td>
|
---|
43 | <td><span th:text="${meal.getCarbs()}"></span></td>
|
---|
44 | <td><span th:text="${meal.getQuantity()}"></span></td>
|
---|
45 | <td>
|
---|
46 | <a th:href="@{/ingredients/{mealID}(mealID=${meal.mID})}" class="btn btn-success" role="button">Add Ingredient</a><br><br>
|
---|
47 | <a th:href="@{/day/meal/{mealID}(mealID=${meal.mID})}" class="btn btn-info" role="button">Add Meal To Day</a>
|
---|
48 | </td>
|
---|
49 | </tr>
|
---|
50 | </tbody>
|
---|
51 | </table>
|
---|
52 |
|
---|
53 | <a href="/meals/addMeal" class="btn btn-primary" role="button">Add Meal</a>
|
---|
54 | </div>
|
---|
55 |
|
---|
56 | <!-- Bootstrap JS and Popper.js (required for Bootstrap) -->
|
---|
57 | <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"
|
---|
58 | integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo"
|
---|
59 | crossorigin="anonymous"></script>
|
---|
60 | <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"
|
---|
61 | integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1"
|
---|
62 | crossorigin="anonymous"></script>
|
---|
63 | <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"
|
---|
64 | integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM"
|
---|
65 | crossorigin="anonymous"></script>
|
---|
66 |
|
---|
67 | </body>
|
---|
68 | </html>
|
---|