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
c5a4e8fc
Commit
c5a4e8fc
authored
Oct 19, 2020
by
issei.miyajima
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '一覧画面、ルーティング修正' into 'master'
一覧画面、vie、controllerw修正 See merge request
!27
parents
d6af580c
7643a8c4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
10 deletions
+19
-10
EcsiteController.java
src/main/java/com/example/web/EcsiteController.java
+5
-1
list.html
src/main/resources/templates/list.html
+14
-9
No files found.
src/main/java/com/example/web/EcsiteController.java
View file @
c5a4e8fc
...
@@ -75,7 +75,7 @@ public class EcsiteController {
...
@@ -75,7 +75,7 @@ public class EcsiteController {
//一覧画面遷移(靴の情報と画像を一緒にmodelにあげることが出来ない為、分けてある)
//一覧画面遷移(靴の情報と画像を一緒にmodelにあげることが出来ない為、分けてある)
@GetMapping
(
"list"
)
@GetMapping
(
"list"
)
public
String
list
(
Model
model
)
{
public
String
list
(
Model
model
,
@AuthenticationPrincipal
LoginUser
userDetails
)
{
//靴の情報をすべて取得
//靴の情報をすべて取得
List
<
Shoes
>
shoes
=
shoesService
.
findAll
();
List
<
Shoes
>
shoes
=
shoesService
.
findAll
();
//靴の情報を一括で取得するmodel(Idでの降順表示設定済み)
//靴の情報を一括で取得するmodel(Idでの降順表示設定済み)
...
@@ -87,6 +87,10 @@ public class EcsiteController {
...
@@ -87,6 +87,10 @@ public class EcsiteController {
}
}
//靴の処理した画像を一括で取得する
//靴の処理した画像を一括で取得する
model
.
addAttribute
(
"shoesPhoto"
,
shoesPhoto
);
model
.
addAttribute
(
"shoesPhoto"
,
shoesPhoto
);
//user情報取得、格納
User
user
=
userDetails
.
getUser
();
model
.
addAttribute
(
"user"
,
user
);
//遷移先 未設定
//遷移先 未設定
return
"list"
;
return
"list"
;
}
}
...
...
src/main/resources/templates/list.html
View file @
c5a4e8fc
<!DOCTYPE html>
<!DOCTYPE html>
<html
class=
"no-js"
lang=
"ja"
>
<html
class=
"no-js"
lang=
"ja"
xmlns:th=
"http://www.thymeleaf.org"
>
<head>
<head>
<meta
charset=
"utf-8"
/>
<meta
charset=
"utf-8"
/>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge,chrome=1"
/>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge,chrome=1"
/>
...
@@ -7,9 +7,8 @@
...
@@ -7,9 +7,8 @@
<meta
name=
"description"
content=
""
/>
<meta
name=
"description"
content=
""
/>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1"
/>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1"
/>
<link
rel=
"icon"
href=
"images/favicon.png"
/>
<link
rel=
"icon"
href=
"images/favicon.png"
/>
<link
rel=
"stylesheet"
href=
"css/style.css"
/>
<link
rel=
"stylesheet"
href=
"css/style.css"
th:href=
"@{/css/style.css}"
/>
<link
rel=
"stylesheet"
href=
"https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/css/bootstrap.min.css"
integrity=
"sha384-/Y6pD6FV/Vv2HJnA6t+vslU6fwYXjCFtcEpHbNJ0lyAFsXTsjBbfaDjzALeQsN6M"
crossorigin=
"anonymous"
>
<!--[if lt IE 9]>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
...
@@ -21,7 +20,7 @@
...
@@ -21,7 +20,7 @@
<div
id=
"modal-content"
>
<div
id=
"modal-content"
>
<div
id=
"modal-content-innar"
>
<div
id=
"modal-content-innar"
>
<!-- モーダルウィンドウのコンテンツ開始 -->
<!-- モーダルウィンドウのコンテンツ開始 -->
<img
class=
"shoeImage"
alt=
"productImage"
>
<img
class=
"shoeImage"
alt=
"productImage"
/
>
<div
id=
"showName"
></div>
<div
id=
"showName"
></div>
<div
id=
"showPrice"
></div>
<div
id=
"showPrice"
></div>
...
@@ -81,7 +80,7 @@
...
@@ -81,7 +80,7 @@
<div
class=
"col-md-12"
>
<div
class=
"col-md-12"
>
<form
class=
"form-inline col-md-12 wow fadeInDown animated"
>
<form
class=
"form-inline col-md-12 wow fadeInDown animated"
>
<div
class=
"form-group"
>
<div
class=
"form-group"
>
<input
type=
"email"
class=
"form-control subscribe"
id=
"email"
placeholder=
"Search..."
>
<input
type=
"email"
class=
"form-control subscribe"
id=
"email"
placeholder=
"Search..."
/
>
<button
class=
"suscribe-btn"
><i
class=
"pe-7s-search"
></i></button>
<button
class=
"suscribe-btn"
><i
class=
"pe-7s-search"
></i></button>
</div>
</div>
</form>
<!-- end /. form -->
</form>
<!-- end /. form -->
...
@@ -93,12 +92,18 @@
...
@@ -93,12 +92,18 @@
<div
id=
"listBox"
>
<div
id=
"listBox"
>
<!--each分でくりかえす(宮嶋)-->
<!--each分でくりかえす(宮嶋)-->
<div
class=
"productBox"
th:each=
"shoe : ${shoes}"
>
<div
class=
"productBox"
th:each=
"shoe : ${shoes}"
>
<img
class=
"shoeImage"
src=
"images/スニーカー3.jpg"
alt=
"productImage"
>
<img
class=
"shoeImage"
src=
"images/スニーカー3.jpg"
alt=
"productImage"
/
>
<a
t
ext =
${shoe.name}
class=
"shoeName"
>
AirMAX
</a>
<a
t
h:text=
"${shoe.name}"
class=
"shoeName"
>
AirMAX
</a>
<a
t
ext =
${shoe.price}
class=
"shoePrice"
>
¥10,000
</a>
<a
t
h:text =
"${shoe.price}"
class=
"shoePrice"
>
¥10,000
</a>
<button
type=
"button"
id=
"modal-open"
class=
"button-link"
>
詳細
</button>
<button
type=
"button"
id=
"modal-open"
class=
"button-link"
>
詳細
</button>
</div>
</div>
<!--デモ用のダミー-->
<!--デモ用のダミー-->
<div
class=
"productBox"
>
<img
class=
"shoeImage"
src=
"images/スニーカー3.jpg"
alt=
"productImage"
/>
<a
class=
"shoeName"
>
AirMAX
</a>
<a
class=
"shoePrice"
>
¥10,000
</a>
<button
type=
"button"
id=
"modal-open"
class=
"button-link"
>
詳細
</button>
</div>
<div
class=
"productBox"
>
box
</div>
<div
class=
"productBox"
>
box
</div>
<div
class=
"productBox"
>
box
</div>
<div
class=
"productBox"
>
box
</div>
<div
class=
"productBox"
>
box
</div>
<div
class=
"productBox"
>
box
</div>
...
...
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