Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
E
Ecsite
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
shoei.kanno
Ecsite
Commits
89f5e5f6
Commit
89f5e5f6
authored
Oct 19, 2020
by
shoei.kanno
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
商品一覧画面画像表示
parent
c423ab94
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
11 additions
and
13 deletions
+11
-13
EcsiteController.java
src/main/java/com/example/web/EcsiteController.java
+5
-5
a.jpg
src/main/resources/static/upload/a.jpg
+0
-0
b.jpg
src/main/resources/static/upload/b.jpg
+0
-0
c.jpg
src/main/resources/static/upload/c.jpg
+0
-0
list.html
src/main/resources/templates/list.html
+6
-8
No files found.
src/main/java/com/example/web/EcsiteController.java
View file @
89f5e5f6
...
...
@@ -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
();
...
...
src/main/resources/static/upload/a.jpg
0 → 100644
View file @
89f5e5f6
69.9 KB
src/main/resources/static/upload/b.jpg
0 → 100644
View file @
89f5e5f6
4.77 KB
src/main/resources/static/upload/c.jpg
0 → 100644
View file @
89f5e5f6
7.34 KB
src/main/resources/templates/list.html
View file @
89f5e5f6
...
...
@@ -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 =
"'¥' +${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 =
"'¥' +${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"
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment