source: src/main/resources/templates/ingredients.html@ d659b83

main
Last change on this file since d659b83 was d659b83, checked in by Marko_Gjorgjievski_201136 <marko.gjorgjievski@…>, 2 months ago

Commiting the whole project

  • Property mode set to 100644
File size: 2.6 KB
Line 
1<!DOCTYPE html>
2<html lang="en">
3<head>
4 <meta charset="UTF-8">
5 <title>Ingredient List</title>
6 <!-- Add your CSS styles or link to an external stylesheet here -->
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<body>
13<div th:replace="appBar"></div>
14<div class="container mt-4">
15 <h1 class="center">Ingredients</h1>
16 <table class="table">
17 <thead>
18 <tr>
19 <th>Name</th>
20 <th>Calories</th>
21 <th>Protein</th>
22 <th>Fats</th>
23 <th>Carbs</th>
24 <th th:if="${mealID != null}">Add to Meal</th>
25 </tr>
26 </thead>
27 <tbody>
28 <tr th:each="ingredient : ${ingredientList}">
29 <td th:text="${ingredient.name}"></td>
30 <td th:text="${ingredient.calories}"></td>
31 <td th:text="${ingredient.protein}"></td>
32 <td th:text="${ingredient.fats}"></td>
33 <td th:text="${ingredient.carbs}"></td>
34 <td th:if="${mealID != null}">
35 <form action="/ingredients/addIngredientToMeal" method="post">
36 <input type="hidden" name="mealID" th:value="${mealID}">
37 <input type="hidden" name="ingredientID" th:value="${ingredient.iID}">
38 <div class="form-group">
39 <input type="number" class="form-control" name="quantity" placeholder="Quantity" required>
40 </div>
41 <button type="submit" class="btn btn-primary">Add to Meal</button>
42 </form>
43 </td>
44 </tr>
45 </tbody>
46 </table>
47 <a href="/ingredients/addIngredient" class="btn btn-primary">Add Ingredient</a>
48</div>
49
50<!-- Bootstrap JS and Popper.js (required for Bootstrap) -->
51<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"
52 integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo"
53 crossorigin="anonymous"></script>
54<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"
55 integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1"
56 crossorigin="anonymous"></script>
57<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"
58 integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM"
59 crossorigin="anonymous"></script>
60
61</body>
62</html>
Note: See TracBrowser for help on using the repository browser.