Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ public String spaMenu(@RequestParam String name, @RequestParam String skintype,
appropriateFacials.add(facials.get(i));
}
}
model.addAttribute("name", name);
model.addAttribute("skintype", skintype);
model.addAttribute("manipedi",manipedi);
model.addAttribute("appropriateFacials",appropriateFacials);

return "menu";
}
Expand Down
4 changes: 4 additions & 0 deletions src/main/resources/templates/fragments.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@
<title>Fragments</title>
</head>
<body>


<p th:fragment = "manicureDescription">Our manicure is a great way to spend 30 minutes of your day! We use shea butter hand cream and the finest gel polish.</p>

<p th:fragment = "pedicureDescription">Relax for 45 minutes in pure luxury! Our massage chairs and experienced nail techs are here to get your feet in shape for sandal season!</p>

</body>
</html>
42 changes: 42 additions & 0 deletions src/main/resources/templates/menu.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,50 @@
<body>
<h1>My Super Fancy Spa</h1>
<div id = "clientProfile">
<h2>My profile</h2>

<p th:text="${name}"></p>

<p th:text="${skintype}"></p>

<p th:text="${manipedi}"></p>
</div>

<div id = "servicesMenu">

<h2>Menu of Available Services</h2>

<div>
<h3>Facial Treatments</h3>
<p>The facial treatments below are recommended by our estheticians for your given skin type.</p>

<table>
<th:block th:each="facial : ${appropriateFacials}">
<tr>

<td th:text="${facial}"></td>
</tr>


</th:block>
</table>
</div>




<div th:if='${manipedi.equals("pedicure")}'>
<h3 >Pedicure</h3>
<p th:replace = "fragments :: pedicureDescription"></p>
</div>


<div th:unless='${manipedi.equals("pedicure")}'>
<h3 >Manicure</h3>
<p th:replace="fragments :: manicureDescription"></p>
</div>


</div>
</body>
</html>