Commit 82cae758 authored by keita.onoguchi's avatar keita.onoguchi

Merge branch '追加調整' into 'master'

追加

See merge request !76
parents 02c354c2 428883dd
...@@ -164,6 +164,8 @@ public class EcsiteController { ...@@ -164,6 +164,8 @@ public class EcsiteController {
public String Cart(Model model, @AuthenticationPrincipal LoginUser userDetails, LinkedHashMap<String, Items> items, ArrayList <Items> cart){ public String Cart(Model model, @AuthenticationPrincipal LoginUser userDetails, LinkedHashMap<String, Items> items, ArrayList <Items> cart){
User user = userDetails.getUser(); User user = userDetails.getUser();
model.addAttribute("user", user); model.addAttribute("user", user);
Wallets wallets = walletsService.findOne(user.getId());
model.addAttribute("wallets", wallets);
session.setAttribute("userId", user.getId()); session.setAttribute("userId", user.getId());
items = (LinkedHashMap<String, Items>) session.getAttribute("cart"); items = (LinkedHashMap<String, Items>) session.getAttribute("cart");
if(items == null) { if(items == null) {
......
...@@ -1688,7 +1688,7 @@ label { ...@@ -1688,7 +1688,7 @@ label {
/* カート画面 */ /* カート画面 */
.th, .td { .th, .td {
font-size: 20px; font-size: 16px;
} }
.td { .td {
...@@ -1738,6 +1738,11 @@ label { ...@@ -1738,6 +1738,11 @@ label {
padding-right: 115px; padding-right: 115px;
padding-top: 20px; padding-top: 20px;
} }
#walletAmount {
text-align: right;
padding-right: 80px;
}
/* カート画面モーダル */ /* カート画面モーダル */
#buy { #buy {
......
...@@ -34,6 +34,7 @@ ...@@ -34,6 +34,7 @@
<div class="col-md-6"> <div class="col-md-6">
<div class="header-top-menu"> <div class="header-top-menu">
<ul class="nav nav-pills navbar-right"> <ul class="nav nav-pills navbar-right">
<li><a sec:authorize="hasRole('ROLE_ADMIN')" th:href="@{/limited/admin/management}">Management</a></li>
<!-- 履歴ページへ遷移 --> <!-- 履歴ページへ遷移 -->
<li><a th:href="@{/limited/log/{id}(id=${user.id})}">My Purchase Log</a></li> <li><a th:href="@{/limited/log/{id}(id=${user.id})}">My Purchase Log</a></li>
<!-- カートページへ遷移 --> <!-- カートページへ遷移 -->
...@@ -103,6 +104,7 @@ ...@@ -103,6 +104,7 @@
<tr class="row" id="theadTr"> <tr class="row" id="theadTr">
<th class="thCart" id="imageTh">Image</th> <th class="thCart" id="imageTh">Image</th>
<th class="thCart" id="productNameTh">Product Name</th> <th class="thCart" id="productNameTh">Product Name</th>
<th class="thCart" id="sizeTh">Size</th>
<th class="thCart" id="quantityTh">Quantity</th> <th class="thCart" id="quantityTh">Quantity</th>
<th class="thCart" id="priceTh">Price</th> <th class="thCart" id="priceTh">Price</th>
</tr> </tr>
...@@ -113,6 +115,7 @@ ...@@ -113,6 +115,7 @@
<td class="hidden"><input th:text="${cart.shoesId}"/></td> <td class="hidden"><input th:text="${cart.shoesId}"/></td>
<td class="tdCart"><img th:src="@{/upload/{photo}(photo=${cart.photo})}" width="300" height="200"/></td> <td class="tdCart"><img th:src="@{/upload/{photo}(photo=${cart.photo})}" width="300" height="200"/></td>
<td class="tdCart"><p th:text= "${cart.shoesName}" class="textP">Convers All Star</p></td> <td class="tdCart"><p th:text= "${cart.shoesName}" class="textP">Convers All Star</p></td>
<td class="tdCart"><p th:text= "${cart.shoesSize}" class="textP">21</p></td>
<td class="tdCart"><input type="number" min="0" th:value="${cart.quantity}" class="textP itemCount"></input></td> <td class="tdCart"><input type="number" min="0" th:value="${cart.quantity}" class="textP itemCount"></input></td>
<td class="tdCart"><p th:text= "${cart.price}" class="textP">&yen;10000</p></td> <td class="tdCart"><p th:text= "${cart.price}" class="textP">&yen;10000</p></td>
<td class="tdCart"><button type="button" class="itemCountChange">Change</button></td> <td class="tdCart"><button type="button" class="itemCountChange">Change</button></td>
...@@ -124,6 +127,10 @@ ...@@ -124,6 +127,10 @@
<p th:case="null" id="total-price">Total Price<span id="total-price-span">&yen;0</span></p> <p th:case="null" id="total-price">Total Price<span id="total-price-span">&yen;0</span></p>
<p th:case="*" id="total-price">Total Price<span id="total-price-span" th:text="'&yen;' + ${totalPrice}">10000</span></p> <p th:case="*" id="total-price">Total Price<span id="total-price-span" th:text="'&yen;' + ${totalPrice}">10000</span></p>
</div> </div>
<br/>
<div id="walletAmount">
<p id="total-price">Wallet Amount<span id="total-price-span" th:text="'&yen;' + ${wallets.amount}">10000</span></p>
</div>
<div id="buy"> <div id="buy">
<button class="js-modal-open" id="buy-btn">Buy</button> <button class="js-modal-open" id="buy-btn">Buy</button>
</div> </div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment