-
Notifications
You must be signed in to change notification settings - Fork 4
/
purchasedetail.html
512 lines (461 loc) · 14.2 KB
/
purchasedetail.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
<!DOCTYPE html>
<html lang="utf-8">
<head>
<meta charset="utf-8">
<link rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css">
<!-- Customized Bootstrap Stylesheet -->
<link rel="stylesheet" type="text/css" th:href="@{/styles/contact.css}">
<link rel="stylesheet" type="text/css"
th:href="@{/styles/contact_responsive.css}">
<style type="text/css">
.responsive-table {
width: 100%;
margin-bottom: 1.5em;
}
.responsive-table thead {
position: absolute;
clip: rect(1px, 1px, 1px, 1px);
/* IE6, IE7 */
clip: rect(1px, 1px, 1px, 1px);
padding: 0;
border: 0;
height: 1px;
width: 1px;
overflow: hidden;
}
.responsive-table thead th {
background-color: #005b00;
border: 1px solid #005b00;
font-weight: normal;
text-align: center;
color: white;
}
.responsive-table thead th:first-of-type {
text-align: left;
}
.responsive-table tbody, .responsive-table tr, .responsive-table th,
.responsive-table td {
display: block;
padding: 0;
text-align: left;
white-space: normal;
}
.responsive-table th, .responsive-table td {
padding: .5em;
vertical-align: middle;
}
.responsive-table caption {
margin-bottom: 1em;
font-size: 1em;
font-weight: bold;
text-align: center;
}
.responsive-table tfoot {
font-size: .8em;
font-style: italic;
}
.responsive-table tbody tr {
margin-bottom: 1em;
border: 2px solid #005b00;
}
.responsive-table tbody tr:last-of-type {
margin-bottom: 0;
}
.responsive-table tbody th[scope="row"] {
background-color: #005b00;
color: white;
}
.responsive-table tbody td[data-type=currency] {
text-align: right;
}
.responsive-table tbody td[data-title]:before {
content: attr(data-title);
float: left;
font-size: .8em;
color: rgb(0, 0, 0);
}
.responsive-table tbody td {
text-align: right;
border-bottom: 1px solid #005b00;
}
@media ( min-width : 200em) {
.responsive-table {
font-size: .9em;
}
.responsive-table thead {
position: relative;
clip: auto;
height: auto;
width: auto;
overflow: auto;
}
.responsive-table tr {
display: table-row;
}
.responsive-table th, .responsive-table td {
display: table-cell;
padding: .5em;
}
.responsive-table caption {
font-size: 1.5em;
}
.responsive-table tbody {
display: table-row-group;
}
.responsive-table tbody tr {
display: table-row;
border-width: 1px;
}
.responsive-table tbody tr:nth-of-type(even) {
background-color: rgba(94, 93, 82, 0.1);
}
.responsive-table tbody th[scope="row"] {
background-color: transparent;
color: rgb(0, 0, 0);
text-align: left;
}
.responsive-table tbody td {
text-align: center;
}
.responsive-table tbody td[data-title]:before {
content: none;
color: rgb(0, 0, 0);
}
}
@media ( min-width : 62em) {
.responsive-table {
font-size: 1em;
}
.responsive-table th, .responsive-table td {
padding: .75em .5em;
}
.responsive-table tfoot {
font-size: .9em;
}
}
@media ( min-width : 75em) {
.responsive-table th, .responsive-table td {
padding: .75em;
}
}
/* button */
.comment_button1 {
width: 70px;
height: 46px;
background: #005b00;
text-transform: uppercase;
font-size: 14px;
font-weight: 500;
color: #FFFFFF;
cursor: pointer;
border: none;
outline: none;
border-radius: 3px;
margin-top: 15px;
}
.comment_button1:hover {
box-shadow: 0px 5px 40px rgba(0, 0, 0, 0.25);
}
.modal-title
{
font-family: 'FontAwesome';
}
</style>
<style>
#ul {
list-style-type: none;
background-color: #D9D9D9;
width: 50%;
padding: 0;
margin: 0;
border-radius: 2%;
}
#li a {
text-decoration: none;
display: block;
color: #000;
padding: 5% 12% 5% 12%;
font-weight: bold;
border-bottom: 1px solid #fff;
cursor:pointer;
}
#li a:hover {
background-color: #005B00;
color: #fff;
border-radius: 2%;
}
@media (max-width: 768px) {
/* 모바일에 최적화된 예외 CSS 코드*/
#ul {
list-style-type: none;
background-color: #ccc;
width: 100%;
padding: 0;
margin: 0;
border-radius: 2%;
}
#li a {
text-decoration: none;
display: block;
color: #000;
padding: 2% 8% 2% 8%;
font-weight: bold;
border-bottom: 1px solid #fff;
cursor:pointer;
}
#li a:hover {
background-color: #005B00;
color: #fff;
border-radius: 2%;
}
}
#ul li a.on {
background-color: #005B00;
color: #fff;
border-radius: 2%;
}
</style>
<script type="text/javascript">
$(function(){
// #ul의 자식 엘리먼트(li)가 몇번째인지 확인한 후 a요소를 찾은 후 on이라는 클래스 추가
$('#ul').children().eq(3).find('a').addClass('on');
});
</script>
<script
src="https://cdn.jsdelivr.net/npm/[email protected]/dist/jquery.slim.min.js"></script>
<script
src="https://cdn.jsdelivr.net/npm/[email protected]/dist/umd/popper.min.js"></script>
<script
src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script>
<!-- jQuery -->
<script type="text/javascript"
src="https://code.jquery.com/jquery-1.12.4.min.js"></script>
<script th:src="@{/plugins/colorbox/jquery.colorbox-min.js}"></script>
<script>
function review(purchaseid, mentor_userid) {
var c = confirm('리뷰를 작성하시겠습니까?');
if (c == true) {
location.href = '[[@{/review/review?id=}]]' + purchaseid
+ '[[@{mentor_userid=}]]' + mentor_userid;
}
};
$(document)
.ready(
function() {
$('#reviewregi_btn')
.click(
function(mentorid) {
var mentorid = $('#mentorid').val();
var mentoringid = $('#mentoringid')
.val();
var userid = '[[${session.loginuser.userid}]]';
var starrating = $(
"input[name='rating']:checked")
.val();
var reviewcon = $('#reviewcon')
.val();
$
.ajax({
url : '[[@{/addreview}]]',
data : {
'mentoringid' : mentoringid,
'userid' : userid,
'starrating' : starrating,
'reviewcon' : reviewcon
},
success : location.href = '[[@{/mentor/mentordetail?mentorid=}]]'
+ mentorid
});
});
});
</script>
</head>
<body>
<!-- Home -->
<div class="home">
<div class="breadcrumbs_container">
<div class="container">
<div class="row">
<div class="col">
<div class="breadcrumbs">
<ul>
<li><a th:href="@{/}">홈</a></li>
<li><a th:href="@{/user/mypage(userid=${userid})}">마이페이지</a></li>
<li>구매 이력</li>
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Checkout Start -->
<div class="contact">
<div class="contact_info_container">
<div class="container">
<div class="row">
<div class="col-lg-4">
<div class="sidebar">
<a th:href="@{/user/mypage(userid = ${session.loginuser.userid})}"><div class="contact_info_title"><!-- 마이페이지 --></div></a>
<!-- Latest Course -->
<!-- <div class="sidebar_section">
<div style="margin-top: 50px;" th:if="${ms != null}"
class="sidebar_section_title">Mentoring Register</div>
<div class="sidebar_latest">
Latest Course
<div
class="latest d-flex flex-row align-items-start justify-content-start">
</div>
</div>
</div> -->
<div> </div>
<div> </div>
<div class="sidebar_section">
<div class="sidebar_section_title"></div>
<div class="sidebar_categories">
<ul id="ul" style="text-align: center">
<li id="li">
<a th:if="${ms == null}" th:onclick="|location.href='@{/mentor/mentorregister(id=${us.userid})}'|">멘토 등록</a>
</li>
<li id="li">
<a th:if="${ms != null}" th:onclick="|location.href='@{/mentor/idcheck(mentorid=${ms.mentorid})}'|">멘토 정보</a>
</li>
<li id="li">
<a th:if="${ms != null}" th:onclick="|location.href='@{/mentor/mentormodify(id=${us.userid},mentorid=${ms.mentorid})}'|">멘토 정보 수정</a>
</li>
<li id="li">
<a th:onclick="|location.href='@{/purchase/purchasedetail(id=${us.userid})}'|">구매 이력</a>
</li>
<li id="li">
<a th:onclick="|location.href='@{/mentoring/mymentoringdetail(id=${us.userid})}'|">멘토링 이력</a>
</li>
<li id="li">
<a th:if="${ms != null and ms.mentorok == 1}" th:onclick="|location.href='@{/mentor/mentoringadmin(id=${us.userid},mentorid=${ms.mentorid})}'|">멘토링 관리</a>
</li>
<li id="li">
<a th:onclick="|location.href='@{/coupon/mycoupon(id=${us.userid})}'|">내 쿠폰함</a>
</li>
</ul>
</div>
</div>
</div>
</div>
<div class="col-lg-8">
<div class="contact_info_title"><!-- PurchaseDetail --></div>
<div class="contact_form" th:each="c:${list}">
<table class="responsive-table">
<thead>
<tr>
<th scope="col">멘토링 이름</th>
<th scope="col">구매 번호</th>
<th scope="col">구매 날짜</th>
<th scope="col">구매 가격</th>
<th scope="col">구매 방법</th>
<th scope="col">구매 카드</th>
<th scope="col">멘토링 날짜</th>
<th scope="col">멘토링 멤버수</th>
<th scope="col">멘토링 방식</th>
<th scope="col">멘토링 장소</th>
<th scope="col">진행 상황</th>
<th scope="col"></th>
</tr>
</thead>
<tbody>
<tr>
<th scope="row" th:text="${c.mentoring_mtitle}"></th>
<td data-title="구매 번호" th:text="${c.purchaseid}"></td>
<td data-title="구매 날짜"
th:text="${#dates.format(c.purchase_purdate, 'yyyy-MM-dd')}"></td>
<td data-title="구매 가격" th:text="${c.purchase_purprice}"></td>
<td data-title="구매 방법" th:text="${c.purchase_purpay}"></td>
<td data-title="구매 카드" th:text="${c.purchase_purcard}"></td>
<td data-title="멘토링 날짜"
th:text="${#dates.format(c.mentoring_mentoringdate, 'yyyy-MM-dd')}"></td>
<td data-title="멘토링 멤버수" th:text="${c.mentoringmembercnt}"></td>
<td data-title="멘토링 방식"
th:text="${c.mentoring_mentorurl}"></td>
<td data-title="멘토링 장소"
th:text="${c.mentoring_mplace}"></td>
<td data-title="진행 상황" th:text="${c.progresspur}"
id="progresspuresult"></td>
<td>
<button type="button" id="review_btn" data-toggle="modal"
data-target="#reviewmodal" class="comment_button1">리뷰작성
</button>
</td>
</tr>
</tbody>
</table>
<!-- Review Modal -->
<div class="modal fade" id="reviewmodal" tabindex="-1"
role="dialog" aria-labelledby="exampleModalCenterTitle"
aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<h6 class="modal-title" id="exampleModalLabel" >멘토에게
리뷰남기기</h6>
</div>
<div class="modal-body">
<div class="add_comment_container">
<div class="add_comment_title" style="font-family: 'fontawesome';">
좋은 수강평을 남겨주시면 MOGOTCO와 멘토님께 큰 힘이 됩니다!
<div class="teacher_image review_mentoring_title">
<img th:src="@{/img/}+${c.mentor_mentorimg}"
style="width: 100px; height: 100px;" alt="">
</div>
<div class="review_mentoring_title"
th:text="${c.mentoring_mtitle}">멘토링 제목</div>
</div>
<form name="review_form" id="review_form"
class="review_form">
<!-- rating -->
<fieldset>
<!-- secret -->
<input type="hidden" class="mentoringid" id="mentoringid"
name="mentoringid" th:value="${c.mentoring_mentoringid}">
<input type="hidden" class="mentorid" id="mentorid"
name="mentorid" th:value="${c.mentor_mentorid}">
<!-- rating -->
<span class="text-bold">별점을 선택해주세요</span> <input
type="radio" class="rating" name="rating" value="5"
id="rate1"> <label for="rate1"
class="fa-solid fa-star fa-xl"></label> <input
type="radio" class="rating" name="rating" value="4"
id="rate2"> <label for="rate2"
class="fa-solid fa-star fa-xl"></label> <input
type="radio" class="rating" name="rating" value="3"
id="rate3"> <label for="rate3"
class="fa-solid fa-star fa-xl"></label> <input
type="radio" class="rating" name="rating" value="2"
id="rate4"> <label for="rate4"
class="fa-solid fa-star fa-xl"></label> <input
type="radio" class="rating" name="rating" value="1"
id="rate5"> <label for="rate5"
class="fa-solid fa-star fa-xl"></label>
</fieldset>
<textarea type="text" class="comment_input_review" name="reviewcon" id="reviewcon" placeholder = "후기를 남겨주시면 50포인트를 드립니다!"></textarea>
</form>
</div>
</div>
<div class="modal-body-btn">
<button type="button" class="btn btn-secondary"
data-dismiss="modal">Close</button>
<button type="button" id="reviewregi_btn"
class="btn btn-secondary"
style="background-color: #005b00; border-color: #005b00"
data-dismiss="modal">등록하기</button>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Contact Info -->
</div>
</div>
</div>
</div>
</body>
</html>