source: src/main/resources/templates/exercise.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.9 KB
Line 
1<!DOCTYPE html>
2<html xmlns:th="http://www.thymeleaf.org">
3<head>
4 <meta charset="UTF-8">
5 <title>Exercise 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
14<div th:replace="appBar"></div>
15<div class="container mt-4">
16 <h1 class="center">Exercises</h1>
17 <table class="table">
18 <thead>
19 <tr>
20 <th>Name</th>
21 <th>Type</th>
22 <th th:if="${workoutID != null}">Add to Workout</th>
23 </tr>
24 </thead>
25 <tbody>
26 <tr th:each="exercise : ${exerciseList}">
27 <td th:text="${exercise.name}"></td>
28 <td th:text="${exercise.type}"></td>
29 <!-- Show the form only if workoutID is not null -->
30 <td th:if="${workoutID != null}">
31 <form action="/exercises/addExerciseToWorkout" method="post">
32 <input type="hidden" name="workoutID" th:value="${workoutID}">
33 <input type="hidden" name="exerciseID" th:value="${exercise.eID}">
34 <div th:if="${exercise.getType().equalsIgnoreCase('bodybuilding')}" class="form-group">
35 Reps: <input type="number" name="reps" class="form-control" required>
36 Sets: <input type="number" name="sets" class="form-control" required>
37 Weight(kg): <input type="number" name="weight" class="form-control" required>
38 </div>
39 <div th:if="${exercise.getType().equalsIgnoreCase('cardio')}" class="form-group">
40 Time(min): <input type="number" name="time" class="form-control" required>
41 </div>
42 <button type="submit" class="btn btn-primary">Add to Workout</button>
43 </form>
44 </td>
45 </tr>
46 </tbody>
47 </table>
48 <a href="/exercises/addExercise" class="btn btn-primary" role="button">Add Exercise</a><br>
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>
Note: See TracBrowser for help on using the repository browser.