-
Notifications
You must be signed in to change notification settings - Fork 4
/
mentoring.html
349 lines (333 loc) · 13.2 KB
/
mentoring.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
<!DOCTYPE html>
<html lang="utf-8">
<head>
<link th:href="@{/plugins/colorbox/colorbox.css}" rel="stylesheet"
type="text/css">
<link rel="stylesheet" type="text/css" th:href="@{/styles/courses.css}">
<link rel="stylesheet" type="text/css"
th:href="@{/styles/courses_responsive.css}">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link
href="https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+KR:wght@300&display=swap"
rel="stylesheet">
<script th:src="@{/plugins/colorbox/jquery.colorbox-min.js}"></script>
<script th:src="@{/js/courses.js}"></script>
<script src="@{/js/jquery.twbsPagination.js}"></script>
<script src="https://t1.kakaocdn.net/kakao_js_sdk/2.0.1/kakao.min.js"
integrity="sha384-eKjgHJ9+vwU/FCSUG3nV1RKFolUXLsc6nLQ2R1tD0t4YFPCvRmkcF8saIfOZNWf/"
crossorigin="anonymous"></script>
</head>
<style>
.contact_info_title {
font-family: 'Roboto Slab', serif;
font-size: 36px;
font-weight: 700;
color: #384158;
}
</style>
<script>
$(document).ready(function(){
var userid = $('#userid').val();
$('#search_button1').click(function(){
$('#search_form_mentoring').attr({
method:'get',
action:'[[@{/mentoring/defaultmainsearch}]]'
});
$('#search_form_mentoring').submit();
});
});
</script>
<script>
function checkOnlyOne(element) {
//중복선택 방지
const checkboxes
= document.getElementsByName("mentoringtype");
checkboxes.forEach((cb) => {
cb.checked = false;
})
element.checked = true;
//선택 값 가져오기
var mtype;
$('input:checkbox[name=mentoringtype]').each(function (index) {
if($(this).is(":checked")==true){
mtype=$(this).val();
}
});
//선택된 것으로 mentoring 출력
var selcatename = $('#selcatename').val();
var userid = $('#userid').val();
location.href = '[[@{/mentoring/defaultmultimainsearch1?mname=}]]'+selcatename + '&[[@{mtype=}]]' + mtype +'&[[@{userid=}]]' + userid;
}
</script>
<script type="text/javascript">
$(function(){
// #ul의 자식 엘리먼트(li)가 몇번째인지 확인한 후 a요소를 찾은 후 on이라는 클래스 추가
$('#mainul').children().eq(3).find('a').addClass('on');
});
</script>
<!-- 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>멘토링</li>
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Courses -->
<div class="courses">
<div class="container">
<div class="row">
<!-- Courses Sidebar -->
<div class="col-lg-4">
<div class="sidebar">
<div class="contact_info_title" style="font-family: 'IBM Plex Sans KR', sans-serif;">멘토링</div>
<!-- Latest Course -->
<div class="sidebar_section">
<div style="margin-top: 50px;" th:if="${ms != null}"
class="sidebar_section_title"></div>
<div class="sidebar_latest">
<!-- Latest Course -->
<div
class="latest d-flex flex-row align-items-start justify-content-start">
<div>
    
<button type="button" th:if="${ms != null and ms.mentorok == 1}"
th:onclick="|location.href='@{/mentoring/mentoringregister(userid=${session.loginuser.userid})}'|"
class="home_search_button"
style="width: 180px; font-weight: bold;">멘토링 등록하기</button>
</div>
</div>
</div>
</div>
<form id="typeselectmentoring">
<div class="sidebar_section">
<div class="sidebar_section_title" style="font-family: 'IBM Plex Sans KR', sans-serif;">카테고리</div>
<div class="sidebar_categories">
<ul>
<li><a th:href="@{/mentoring/defaultmentoring}"
th:text="${'all'}" th:value="${'all'}"><input
type="hidden" name='mname' id="mname" th:value="${'all'}"
th:style="${selcatename == 'all' ? 'color: #005b00;' : 'color: #000000;'}"
th:text="${'all'}"></a></li>
<li th:each="mtc:${mtcatelist}"><a
th:href="@{/mentoring/defaultmentoringCate(mname=${mtc.mname},userid=${userid})}"
th:value="${mtc.mname}" th:text="${mtc.mname}"
th:style="${mtc.mname == selcatename ? 'color: #005b00;' : 'color: #000000;'}"><input
type="hidden" th:text="${mtc.mname}" name='mname' id="mname"
th:value="${mtc.mname}"></a></li>
</ul>
</div>
</div>
<div class="sidebar_section">
<div class="sidebar_section_title" style="font-family: 'IBM Plex Sans KR', sans-serif;">필터</div>
<div class="sidebar_categories">
<p>
<input type="checkbox" name='mentoringtype' value='lowprice'
th:onclick="checkOnlyOne(this)" id="lowprice"> <label
for="lowprice">가격순</label>
</p>
<p>
<input type="checkbox" name='mentoringtype' value='recentmen'
th:onclick="checkOnlyOne(this)" id="recentmen"> <label
for="recentmen">가장 빠른순</label>
</p>
<p>
<input type="checkbox" name='mentoringtype' value='orderreview'
th:onclick="checkOnlyOne(this)" id="orderreview"> <label
for="orderreview">별점순</label>
</p>
<p>
<input type="checkbox" name='mentoringtype' value='mcaringok'
th:onclick="checkOnlyOne(this)" id="mcaringok"> <label
for="mcaringok">사후관리</label>
</p>
</div>
</div>
<input type="hidden" id='selcatename' th:value="${selcatename}">
<input type="hidden" id='txt' th:value="${txt}">
</form>
</div>
</div>
<!-- Courses Main Content -->
<div class="col-lg-8">
<div class="courses_search_container">
<form id="search_form_mentoring"
class="courses_search_form d-flex flex-row align-items-center justify-content-start">
<input name="txt" type="text" class="courses_search_input"
required="required"
style="width: 100%;"> <input type="hidden" id='userid'
th:value="${userid}">
<button id="search_button1" class="courses_search_button ml-auto"
type="submit">검색</button>
</form>
</div>
<div class="courses_container">
<div class="row courses_row">
<!-- Course -->
<div th:each="mtr:${mtr}" class="col-lg-6 course_col">
<div class="course">
<div class="course_image">
<a
th:href="@{/mentoring/mentoringdetail(mentoringid=${mtr.mentoringid})}"><img
th:src="@{/img/}+${mtr.mentoringimg}" alt=""></a>
</div>
<div class="course_body">
<h3 class="course_title">
<a
style="float: left; font-family: 'IBM Plex Sans KR', sans-serif;"
th:text="${mtr.mtitle}"
th:href="@{/mentoring/mentoringdetail(mentoringid=${mtr.mentoringid})}"></a>
</h3>
<ul style="list-style: none;">
<li><a id="kakaotalksharingbtn"><img
th:onclick="shareMessage([[${mtr.mentoringid}]],[[${mtr.mtitle}]])"
style="width: 25px; height: 25px; float: left;"
src="https://developers.kakao.com/assets/img/about/logos/kakaotalksharing/kakaotalk_sharing_btn_small.png"
alt="카카오톡 공유 보내기 버튼" /></a></li>
</ul>
<br> <br>
<div style="display: inline; color: black;">
<span style="font-family: 'IBM Plex Sans KR', sans-serif;">아이디:</span>
</div>
<div style="display: inline; color: black;"
class="course_teacher" th:text="${mtr.user_userid}"></div>
<br>
<div style="display: inline; color: black;">
<span style="font-family: 'IBM Plex Sans KR', sans-serif;">시간별
모집 정원:</span>
</div>
<div style="display: inline; color: black;" class="course_text"
th:text="${mtr.mmemberidcnt}"></div>
<br>
<div style="display: inline; color: black;">
<span style="font-family: 'IBM Plex Sans KR', sans-serif;">
날짜:</span>
</div>
<div style="display: inline; color: black;" class="course_text"
th:text="${#dates.format(mtr.mentoringdate,'yyyy-MM-dd')}"></div>
<br>
<div class="teacher_meta_text ml-auto"
th:if="${mtr.date_difference >= 0 }">
<span class="badge badge-pill badge-primary"
style="margin-top: 10px; margin-bottom: 18px; float: right; color: #FFFFFF">진행가능</span>
</div>
<div class="teacher_meta_text ml-auto"
th:if="${mtr.date_difference < 0}">
<span class="badge badge-pill badge-danger"
style="margin-top: 10px; margin-bottom: 18px; float: right; color: #FFFFFF">진행완료</span>
</div>
<div class="teacher_meta_text ml-auto"
th:if="${mtr.mentorurl == 'nonface'}">
<span class="badge badge-pill badge-primary"
style="margin-top: 10px; margin-bottom: 18px; float: right; background-color: #006400; color: #FFFFFF;">비대면</span>
</div>
<div class="teacher_meta_text ml-auto"
th:if="${mtr.mentorurl == 'face'}">
<span class="badge badge-pill badge-danger"
style="margin-top: 10px; margin-bottom: 18px; float: right; background-color: #FF8C00; color: #FFFFFF;">대면</span>
</div>
<div class="teacher_meta_text ml-auto"
th:if="${mtr.mcaring == 1}">
<span class="badge badge-pill badge-danger"
style="margin-top: 10px; margin-bottom: 18px; float: right; background-color: #4B0082; color: #FFFFFF;">care</span>
</div>
</div>
<div class="course_footer">
<div
class="course_footer_content d-flex flex-row align-items-center justify-content-start">
<div class="course_info">
<i class="fa fa-graduation-cap" aria-hidden="true"></i> <span
style="font-family: 'IBM Plex Sans KR', sans-serif;font-size:12px;">현직: </span>
<span style="font-size:12px;"th:text="${mtr.mentor_mentorcom}"></span>
</div>
</div>
<div
class="course_footer_content d-flex flex-row align-items-center justify-content-start">
<div class="course_info">
<i class="fa-solid fa-sack-dollar" aria-hidden="true"></i> <span
style="font-family: 'IBM Plex Sans KR', sans-serif;font-size:12px;">가격: </span>
<span style="font-size:12px;"th:text="${mtr.mentoringprice}"></span>
</div>
<div class="course_info">
<i class="fa-solid fa-calendar-days" aria-hidden="true"></i> <span
style="font-family: 'IBM Plex Sans KR', sans-serif;font-size:12px;"> </span>
<span style="font-size:12px;"th:text="${#dates.format(mtr.mentoringdate,'yyyy-MM-dd')}"></span>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row pagination_row">
<div class="col">
<div
class="pagination_container d-flex flex-row align-items-center justify-content-start">
<ul class="pagination_list" style="width: 630px; float: left;">
<li><a th:if="${meningnum > 0}"
th:href="@{/mentoring/pagingcheck(userid=${userid},mname=${selcatename},txt=${txt},mtype=${mtype},meningnum=${meningnum}-6)}"><i
class="fa fa-angle-left" aria-hidden="true" id="prev_page"></i></a></li>
</ul>
<ul class="pagination_list" style="width: 600px; float: left;">
<li><a th:text="${page}"><i class="fa fa-angle-right"
aria-hidden="true" id="next_page"></i></a></li>
</ul>
<ul class="pagination_list" style="float: right;">
<li><a
th:href="@{/mentoring/pagingcheck(userid=${userid},mname=${selcatename},txt=${txt},mtype=${mtype},meningnum=${meningnum}+6)}"><i
class="fa fa-angle-right" aria-hidden="true" id="next_page"></i></a></li>
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script>
Kakao.init('b67794657ed6e950ec05402c7a55d07f'); // 사용하려는 앱의 JavaScript 키 입력
</script>
<script>
function shareMessage(mentoringid,mtitle) {
Kakao.Share.sendDefault({
objectType: 'feed',
content: {
title: 'Mogotco mentor',
description: 'mentorid : '+mtitle,
imageUrl:
'',
link: {
// [내 애플리케이션] > [플랫폼] 에서 등록한 사이트 도메인과 일치해야 함
mobileWebUrl: 'http:https://127.0.0.1/mogotco/mentoring/mentoringdetail?mentoringid='+mentoringid,
webUrl: 'http:https://127.0.0.1/mogotco/mentoring/mentoringdetail?mentoringid='+mentoringid,
},
},
buttons: [
{
title: 'web',
link: {
mobileWebUrl: 'http:https://127.0.0.1/mogotco/mentoring/mentoringdetail?mentoringid='+mentoringid,
webUrl: 'http:https://127.0.0.1/mogotco/mentoring/mentoringdetail?mentoringid='+mentoringid,
},
},
{
title: 'app',
link: {
mobileWebUrl: 'http:https://127.0.0.1/mogotco/mentoring/mentoringdetail?mentoringid='+mentoringid,
webUrl: 'http:https://127.0.0.1/mogotco/mentoring/mentoringdetail?mentoringid='+mentoringid,
},
},
],
});
}
</script>