-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathhome.html
executable file
·305 lines (292 loc) · 10.6 KB
/
home.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
{% extends 'login/layout.html' %}
{% load staticfiles %}
{% block header %}
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="{% url "login:main" %}">SUPPORT.</a>
</div>
<div class="navbar-collapse collapse navbar-right">
<ul class="nav navbar-nav">
<li class="active"><a href="{% url "login:main" %}">홈</a></li>
{% if user.is_authenticated %}
<li><a href="{% url "login:logout" %}">로그아웃</a></li>
{% else %}
<li><a href="{% url "login:login" %}">로그인</a></li>
{% endif %}
<li><a href="{% url "login:seltable" %}">실습실 예약</a></li>
<li><a href="{% url "login:mypage" %}">마이페이지</a></li>
</ul>
</div>
<!--/.nav-collapse -->
</div>
</div>
{% endblock %}
{% block content %}
<!-- *****************************************************************************************************************
HEADERWRAP
***************************************************************************************************************** -->
<div id="headerwrap">
<div class="container">
<div class="row">
<div class="col-lg-12" id="logo_content">
<span class="logo_content">
<h3 style="margin-bottom:2%;">언제나, 늘, 당신곁에</h3>
</span>
<h1 style="margin-top:-0.1%;" class="logo_sentence">제4대 소프트웨어학부 학생회 </h1>
<h1 style="margin-top:-0.25%;" class="support_font"><span class="logo">SUPPORT.</span> 입니다.</h1>
</div>
</div>
<div class="row">
<div class="col-lg-12">
<div class="carousel" style="width:100%;">
{% for post in posts %}
{% if post.photo %}
<a id="carousel-{{ forloop.counter0 }}" class="carousel-item" href="#"><img src={{ post.photo.url }} ></a>
{% endif %}
{% endfor %}
</div>
</div>
</div>
<script>
document.addEventListener('DOMContentLoaded', function () {
var elems = document.querySelectorAll('.carousel');
var instances = M.Carousel.init(elems);
});
</script>
<!-- /container -->
</div>
<!-- /headerwrap -->
</div>
<!-- *****************************************************************************************************************
SERVICE LOGOS
***************************************************************************************************************** -->
<div id="service">
<div class="container">
<div class="row centered">
<div class="col-lg-3">
<i class="fas fa-umbrella fa-5x"></i>
<h4>우산</h4>
<p>{{ unbrella_count }} | <b>{{ unbrella_total }}</b></p> <!-- 수정됨 -->
<!-- {% if user.user_data.un.is_reserved == False and user.user_data.un.is_borrowed == False %}
{% else %}
<p><a href = "" onclick="alert('이미 대여중인 우산이 존재합니다')" class="btn btn-theme" value="대여">대여</a></p>
{% endif %}
-->
<form action="" method="POST">{% csrf_token %}
<p><button type="submit" name="unbrella" value="True" class="btn btn-theme">예약</button></p> <!-- 수정됨 -->
</form>
</div>
<div class="col-lg-3">
<i class="fas fa-battery-full fa-5x"></i>
<h4>보조배터리</h4>
<p>{{ battery_count }} | <b>{{ battery_total }}</b></p> <!-- 수정됨 -->
<form action="" method="POST">{% csrf_token %}
<p><button type="submit" name="battery" value="True" class="btn btn-theme">예약</button></p> <!-- 수정됨 -->
</form>
</div>
<div class="col-lg-3">
<i class="fas fa-ethernet fa-5x"></i>
<div class="lan_lent">
<h4>랜선</h4>
<p>{{ lan_count }} | <b>{{ lan_total }}</b></p> <!-- 수정됨 -->
<form action="" method="POST">{% csrf_token %}
<p><button type="submit" name="lan" value="True" class="btn btn-theme">예약</button></p> <!-- 수정됨 -->
</form>
</div>
</div>
<div class="col-lg-3">
<i class="fas fa-plug fa-5x"></i>
<div class="lan_lent">
<h4>케이블</h4>
<p>{{ cable_count }} | <b>{{ cable_total }}</b></p>
<form action="" method="POST">{% csrf_token %}
<p><button type="submit" name="cable" value="True" class="btn btn-theme">예약</button></p> <!-- 수정됨 -->
</form>
</div>
</div>
<div class="col-lg-12">
<p><span class="fas fa-exclamation-circle" style="margin-top:5%;"></span> 예약 후 <b>10분</b>안에 학생회실에서 대여해주세요.</p>
</div>
</div>
</div>
</div><!-- 4/9 대여버튼 예약버튼으로 수정, 대여 가능한 물품 개수 색깔 진하기 수정! div class = "service" 부분부터 보세요! -->
<!-- *****************************************************************************************************************
PORTFOLIO SECTION
***************************************************************************************************************** -->
<div id="portfoliowrap">
<div class="time_now">
<p> </p>
<h3>실습실 현재 예약 현황</h3>
<div class="ikc-tablelist-listup ikc-smuf-form">
<p>
<span class="ikc-reserved-status">
<span class="ik-reserved-off" style="background:#dddddd; border:1px solid grey;"></span>
예약 가능
<span class="ikc-reserved-inactive"></span>
예약 불가능
</span>
</p>
</div>
<div class="row">
<div class="col-12">
<table class="table" border="0" cellpadding="1" cellspacing="0">
<thead>
<th>번호/시간</td>
<th> 10 </th>
<th> 11 </th>
<th> 12 </th>
<th> 1 </th>
<th> 2 </th>
<th> 3 </th>
<th> 4 </th>
<th> 5 </th>
</thead>
<tbody>
{% for table in tables %}
{% if table.start_time == "10" %}
<tr>
<td>{{ table.number }}</td>
{% endif %}
{% if table.is_borrowed %}
<td class="occupied"></td>
{% else %}
<td></td>
{% endif %}
{% if table.start_time == "17" %}
</tr>
{% endif %}
{% endfor %}
<!-- 장고 DB를 받어서 확인하도록 함-->
</tbody>
</table>
</div>
</div>
</div>
<!-- *****************************************************************************************************************
건의사항
***************************************************************************************************************** -->
<div class="container mtb">
<div class="row">
<div class="portfoliowrap" id="wrap">
<form role="form" action="/complain/" method="POST">{% csrf_token %}
<div class="col-12" id="complain_wrap">
<h4>건의사항
<div class="btn-group btn-group-toggle" data-toggle="buttons" id="radio">
<label class="btn btn-secondary active">
<input type="radio" name="is_anonymous" autocomplete="off" value="True" checked="checked"> 익명
</label>
<label class="btn btn-secondary">
<input type="radio" name="is_anonymous" id="is_anonymous" autocomplete="off" value="False"> 실명
</label>
</h4>
<div class="hline"></div>
<div class="col-12">
<div class="col-12">
<textarea class="form-control btn-block" name="updated_text" id="contact-message" placeholder="건의사항 남기기"
row="10" data-rule="required" style="margin-top:2.5%;"></textarea>
<input type="submit" class="btn btn-theme btn-block" id="complain_button" value="건의사항 보내기"></input>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
<!-- *****************************************************************************************************************
MESSAGE ALERTS
*******************************************************************************************************************-->
{% if login_status == 1 %}
<script>
alert('로그인 후 이용 가능합니다')
</script>
{% endif %}
{% if login_status == 2 %}
<script>
alert('죄송합니다. 대여사업은 학생회비를 낸 학생을 대상으로만 운영됩니다.')
</script>
{% endif %}
{% if unbrella_status != 0 %}
{% if unbrella_status == 1 %}
<script>
alert('{{ message_unbrella }}')
</script>
{% else %}
{% if unbrella_status == 2 %}
<script>
alert('이미 대여중인 우산이 있습니다')
</script>
{% else %}
{% if unbrella_status == 3 %}
<script>
alert('대여가능한 우산이 없습니다')
</script>
{% endif %}
{% endif %}
{% endif %}
{% else %}
{% if battery_status != 0 %}
{% if battery_status == 1 %}
<script>
alert('{{ message_battery }}')
</script>
{% else %}
{% if battery_status == 2 %}
<script>
alert('이미 대여중인 배터리가 있습니다')
</script>
{% else %}
{% if battery_status == 3 %}
<script>
alert('대여가능한 배터리가 없습니다')
</script>
{% endif %}
{% endif %}
{% endif %}
{% else %}
{% if lan_status != 0 %}
{% if lan_status == 1 %}
<script>
alert('{{ message_lan }}')
</script>
{% else %}
{% if lan_status == 2 %}
<script>
alert('이미 대여중인 랜선이 있습니다')
</script>
{% else %}
{% if lan_status == 3 %}
<script>
alert('대여가능한 랜선이 없습니다')
</script>
{% endif %}
{% endif %}
{% endif %}
{% else %}
{% if cable_status == 1 %}
<script>
alert('{{ message_cable }}')
</script>
{% else %}
{% if cable_status == 2 %}
<script>
alert('이미 대여중인 케이블이 있습니다')
</script>
{% else %}
{% if cable_status == 3 %}
<script>
alert('대여가능한 케이블이 없습니다')
</script>
{% endif %}
{% endif %}
{% endif %}
{% endif %}
{% endif %}
{% endif %}
{% endblock %}