Commit 89f5e5f6 authored by shoei.kanno's avatar shoei.kanno

商品一覧画面画像表示

parent c423ab94
......@@ -81,12 +81,12 @@ public class EcsiteController {
//靴の情報を一括で取得するmodel(Idでの降順表示設定済み)
model.addAttribute("shoes", shoes);
//靴を表示するための処理を全画像にかける
List <String> shoesPhoto = new ArrayList<String> ();
for(int i = 0; i < shoes.size(); i++) {
shoesPhoto.add((shoes.get(i)).getPhoto());
}
// List <String> shoesPhoto = new ArrayList<String> ();
// for(int i = 0; i < shoes.size(); i++) {
// shoesPhoto.add((shoes.get(i)).getPhoto());
// }
//靴の処理した画像を一括で取得する
model.addAttribute("shoesPhoto", shoesPhoto);
// model.addAttribute("shoesPhoto", shoesPhoto);
//user情報取得、格納
User user = userDetails.getUser();
......
......@@ -94,14 +94,12 @@
<div id="listBox">
<!--each分でくりかえす(宮嶋)-->
<div class="productBox" th:each="shoe : ${shoes}">
<div th:each="shoesPhoto : ${shoesPhoto}">
<img class="shoeImage" th:src="@{upload/スニーカー1.jpg}" alt="productImage"/>
<p th:text= "${shoe.name}" class="shoeName">AirMAX</p>
<p th:text = "'&yen;' +${shoe.price}" class="shoePrice">¥10,000</p>
<input type="hidden" th:value="${shoe.id}"/>
<button type="button" id="modal-open" class="details">Datails</button>
<!-- <button class="js-modal-open" id="sign-up">Details</button>-->
</div>
<img class="shoeImage" th:src="@{/upload/{photo}(photo=${shoe.photo})}" alt="productImage" width="300" height="300"/>
<p th:text= "${shoe.name}" class="shoeName">AirMAX</p>
<p th:text = "'&yen;' +${shoe.price}" class="shoePrice">¥10,000</p>
<input type="hidden" th:value="${shoe.id}"/>
<button type="button" id="modal-open" class="details">Datails</button>
<!-- <button class="js-modal-open" id="sign-up">Details</button>-->
</div>
</div>
<footer class="footer">
......
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