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
82cae758
Commit
82cae758
authored
Oct 22, 2020
by
keita.onoguchi
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '追加調整' into 'master'
追加 See merge request
!76
parents
02c354c2
428883dd
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
1 deletion
+15
-1
EcsiteController.java
src/main/java/com/example/web/EcsiteController.java
+2
-0
style.css
src/main/resources/static/css/style.css
+6
-1
cart.html
src/main/resources/templates/cart.html
+7
-0
No files found.
src/main/java/com/example/web/EcsiteController.java
View file @
82cae758
...
...
@@ -164,6 +164,8 @@ public class EcsiteController {
public
String
Cart
(
Model
model
,
@AuthenticationPrincipal
LoginUser
userDetails
,
LinkedHashMap
<
String
,
Items
>
items
,
ArrayList
<
Items
>
cart
){
User
user
=
userDetails
.
getUser
();
model
.
addAttribute
(
"user"
,
user
);
Wallets
wallets
=
walletsService
.
findOne
(
user
.
getId
());
model
.
addAttribute
(
"wallets"
,
wallets
);
session
.
setAttribute
(
"userId"
,
user
.
getId
());
items
=
(
LinkedHashMap
<
String
,
Items
>)
session
.
getAttribute
(
"cart"
);
if
(
items
==
null
)
{
...
...
src/main/resources/static/css/style.css
View file @
82cae758
...
...
@@ -1688,7 +1688,7 @@ label {
/* カート画面 */
.th
,
.td
{
font-size
:
20
px
;
font-size
:
16
px
;
}
.td
{
...
...
@@ -1738,6 +1738,11 @@ label {
padding-right
:
115px
;
padding-top
:
20px
;
}
#walletAmount
{
text-align
:
right
;
padding-right
:
80px
;
}
/* カート画面モーダル */
#buy
{
...
...
src/main/resources/templates/cart.html
View file @
82cae758
...
...
@@ -34,6 +34,7 @@
<div
class=
"col-md-6"
>
<div
class=
"header-top-menu"
>
<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>
<!-- カートページへ遷移 -->
...
...
@@ -103,6 +104,7 @@
<tr
class=
"row"
id=
"theadTr"
>
<th
class=
"thCart"
id=
"imageTh"
>
Image
</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=
"priceTh"
>
Price
</th>
</tr>
...
...
@@ -113,6 +115,7 @@
<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"
><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"
><p
th:text=
"${cart.price}"
class=
"textP"
>
¥
10000
</p></td>
<td
class=
"tdCart"
><button
type=
"button"
class=
"itemCountChange"
>
Change
</button></td>
...
...
@@ -124,6 +127,10 @@
<p
th:case=
"null"
id=
"total-price"
>
Total Price
<span
id=
"total-price-span"
>
¥
0
</span></p>
<p
th:case=
"*"
id=
"total-price"
>
Total Price
<span
id=
"total-price-span"
th:text=
"'¥' + ${totalPrice}"
>
10000
</span></p>
</div>
<br/>
<div
id=
"walletAmount"
>
<p
id=
"total-price"
>
Wallet Amount
<span
id=
"total-price-span"
th:text=
"'¥' + ${wallets.amount}"
>
10000
</span></p>
</div>
<div
id=
"buy"
>
<button
class=
"js-modal-open"
id=
"buy-btn"
>
Buy
</button>
</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