Attendance/templates/admin.html

218 lines
11 KiB
HTML
Raw Permalink Normal View History

2021-09-12 02:39:09 -07:00
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
2021-09-24 22:31:36 -07:00
<title>Admin 管理員 - Attendance 點名</title>
2021-09-12 02:39:09 -07:00
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.1/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-F3w7mX95PdgyTmZZMECAngseQB83DfGTowi0iMjiWaeVhAn4FJkqJByhZMI3AhiU" crossorigin="anonymous">
2021-12-12 02:38:10 -08:00
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css" integrity="sha512-1ycn6IcaQQ40/MKBW2W4Rhis/DbILU74C1vSrLJxCq57o941Ym01SwNsOMqvEBFlcgUa6xLiPY/NS5R+E6ztJQ==" crossorigin="anonymous" referrerpolicy="no-referrer" />
2021-09-12 02:39:09 -07:00
<link rel="stylesheet" href="/static/allpages.css">
<link rel="stylesheet" href="/static/homeroom.css">
2021-09-18 04:26:06 -07:00
<link rel="shortcut icon" type="image/x-icon" href="/static/favicon.ico" />
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-H6D61RSBHR"></script>
2021-10-19 07:30:49 -07:00
<script src="/static/gtag.js"></script>
2021-09-12 02:39:09 -07:00
</head>
<body>
2021-09-26 06:37:34 -07:00
<div class="showTime"><span id="showTime"></span></div>
2021-12-12 02:38:10 -08:00
{% include 'sidebar.html' %}
2021-09-12 02:39:09 -07:00
<div class="container">
2021-09-18 04:26:06 -07:00
<h1 class="margin-top">Admin View | 管理頁面</h1>
2021-12-12 02:38:10 -08:00
<h2 class="margin-top">{{currRoom[0]}} {{currRoom[1]}}</h2>
2021-09-18 04:26:06 -07:00
<h2>[{{currDate}}]</h2>
2021-12-12 02:38:10 -08:00
{% if 'c' in submission %}
2021-09-26 06:37:34 -07:00
<h2 style="color: rgb(61, 194, 0); text-align: center;">Homeroom Confirmed 班導已確認</h2>
{% else %}
<h2 style="color: red; text-align: center;">Homeroom NOT Confirmed 班導尚未確認</h2>
{% endif %}
2021-12-12 02:38:10 -08:00
<div class="col margin-top">
<div class="sticky-top" style="background-color:white;">
2021-09-14 07:55:11 -07:00
<div class="row title">
2021-09-18 07:04:31 -07:00
<div class="col">班級</div>
<div class="col">座號</div>
<div class="col">姓名</div>
<div class="col">英文姓名</div>
{% for i in periods %}
<div class="col">{{i}}</div>
2021-09-18 07:04:31 -07:00
{% endfor %}
2021-09-14 07:55:11 -07:00
</div>
<div class="row title">
<div class="col"></div>
<div class="col"></div>
<div class="col"></div>
<div class="col"></div>
{% for i in periods %}
<div class="col">
2021-12-12 02:38:10 -08:00
{{schedule[i]['subject']}} {% if schedule[i]['special'] == True %} <span class="text-red">(換)</span> {% endif %}</div>
2021-09-14 07:55:11 -07:00
{% endfor %}
</div>
<div class="row title">
<div class="col"></div>
<div class="col"></div>
<div class="col"></div>
<div class="col"></div>
{% for i in periods %}
2021-12-12 02:38:10 -08:00
<div class="col">{{schedule[i]['teacher']}}</div>
2021-09-14 07:55:11 -07:00
{% endfor %}
</div>
2021-09-12 02:39:09 -07:00
</div>
2021-12-12 02:38:10 -08:00
{% for i in students %}
2021-09-12 02:39:09 -07:00
<div class="row">
2021-12-12 02:38:10 -08:00
<div class="col">{{currRoom[0]}}{{currRoom[1]}}</div>
<div class="col">{{ i[0] }}</div>
<div class="col">{{ i[1] }}</div>
<div class="col">{{ i[2] }}</div>
2021-09-12 02:39:09 -07:00
{% for j in periods %}
<div class="col view-{{j}}">
2021-12-12 02:38:10 -08:00
{% if schedule[j]['subject'] == 'GP' %}
2021-12-26 05:08:50 -08:00
{% for k in submission[j] %}
{% if k!='notes' and i[0] in absentData[j] %}
{% if absentData[j][i[0]]['status'] == 'L' %}
<p class="highlightAbs n-3 view-n-{{i[0]}}">𝜑</p>
{% elif absentData[j][i[0]]['status'] == 'K' %}
<p class="highlightAbs n-2 view-n-{{i[0]}}"></p>
{% elif absentData[j][i[0]]['status'] == 'G' %}
<p class="highlightAbs n-2 view-n-{{i[0]}}"></p>
{% elif absentData[j][i[0]]['status'] == 'S' %}
<p class="highlightAbs n-2 view-n-{{i[0]}}"></p>
{% elif absentData[j][i[0]]['status'] == 'F' %}
<p class="highlightAbs n-2 view-n-{{i[0]}}"></p>
{% elif absentData[j][i[0]]['status'] == 'P' %}
<p class="highlightAbs n-2 view-n-{{i[0]}}"></p>
{% elif absentData[j][i[0]]['status'] == 'O' %}
<p class="highlightAbs n-2 view-n-{{i[0]}}"></p>
{% else %}
<p class="highlightAbs n-2 view-n-{{i[0]}}">{{absentData[j][i[0]]['status']}}</p>
{% endif %}
<p class="highlightAbs">{{absentData[j][i[0]]['note']}}</p>
{% elif studGP[i[0]][schedule[j]['teacher']] == k %}
<p class="highlightAbs n-1 view-n-{{i[0]}}">V</p>
{% if j in idvDS and i[0] in idvDS[j] %}
<p class="highlightAbs n-2">{{idvDS[j][i[0]]}}</p>
{% endif %}
{% else %}
<p class="highlightAbs view-n-{{i[0]}}"></p>
{% endif %}
{% endfor %}
2021-12-12 02:38:10 -08:00
{% else %}
2021-12-26 05:08:50 -08:00
{% if i[0] in absentData[j] %}
{% if absentData[j][i[0]]['status'] == 'L' %}
<p class="highlightAbs n-3 view-n-{{i[0]}}">𝜑</p>
{% elif absentData[j][i[0]]['status'] == 'K' %}
<p class="highlightAbs n-2 view-n-{{i[0]}}"></p>
{% elif absentData[j][i[0]]['status'] == 'G' %}
<p class="highlightAbs n-2 view-n-{{i[0]}}"></p>
{% elif absentData[j][i[0]]['status'] == 'S' %}
<p class="highlightAbs n-2 view-n-{{i[0]}}"></p>
{% elif absentData[j][i[0]]['status'] == 'F' %}
<p class="highlightAbs n-2 view-n-{{i[0]}}"></p>
{% elif absentData[j][i[0]]['status'] == 'P' %}
<p class="highlightAbs n-2 view-n-{{i[0]}}"></p>
{% elif absentData[j][i[0]]['status'] == 'O' %}
<p class="highlightAbs n-2 view-n-{{i[0]}}"></p>
{% else %}
<p class="highlightAbs n-2 view-n-{{i[0]}}">{{absentData[j][i[0]]['status']}}</p>
{% endif %}
<p class="highlightAbs">{{absentData[j][i[0]]['note']}}</p>
{% elif j in submission %}
<p class="highlightAbs n-1 view-n-{{i[0]}}">V</p>
{% else %}
<p class="highlightAbs view-n-{{i[0]}}"></p>
{% endif %}
{% if j in idvDS and i[0] in idvDS[j] %}
<p class="highlightAbs n-2">{{idvDS[j][i[0]]}}</p>
{% endif %}
2021-09-18 07:04:31 -07:00
{% endif %}
2021-09-12 02:39:09 -07:00
</div>
{% endfor %}
</div>
{% endfor %}
2021-12-12 02:38:10 -08:00
{% for i in range(7) %}
<div class="row" {%if i==0%}style="border-top: 2px solid black;"{%endif%} {% if i == 6 %} style="border-bottom: 2px solid black;" {% endif %}>
<div class="col"></div>
<div class="col"></div>
2021-12-12 02:38:10 -08:00
<div class="col" style="font-weight: bold;">{{dstext[i]}}</div>
<div class="col">{{dsboard[i]}}</div>
{% for j in periods %}
{% if j in submission and schedule[j] != 'GP' %}
<div class="col">
{{submission[j]['ds' + (i+1)|string]}}</div>
{% else %}
<div class="col"></div>
2021-12-12 02:38:10 -08:00
{% endif %}
{% endfor %}
</div>
2021-12-12 02:38:10 -08:00
{% endfor %}
2021-09-12 02:39:09 -07:00
{% for c in range(periods|length + 1) %}
2021-09-14 07:55:11 -07:00
{% if c % 4 == 0 %}
2021-09-12 02:39:09 -07:00
<div class="row signatures">
{% endif %}
<div class="col half">
{% if c == 0 %}
2021-10-05 04:22:23 -07:00
<div class="row needborder">Homeroom Teacher 導師</div>
2021-12-12 02:38:10 -08:00
{% if 'c' in submission %}
<div class="row"><img src="{{submission['c']['signature']}}" alt=""></div>
<div class="row">備註: {{submission['c']['notes']}}</div>
2021-09-12 02:39:09 -07:00
{% else %}
<div class="row"><span style="color:red;">No Signature 導師尚未簽名</span></div>
{% endif %}
{% else %}
2021-12-12 02:38:10 -08:00
{% if schedule[periods[c-1]]['subject'] == 'GP' %}
{% if periods[c-1] in submission %}
{% for i in submission[periods[c-1]] %}
{% if i != 'notes' %}
<div class="row needborder">{{periods[c-1]}}:
2021-12-12 02:38:10 -08:00
{{schedule[periods[c-1]]['teacher']}}: {{i}}</div>
<div class="row"><img src="{{submission[periods[c-1]][i]['signature']}}" alt="">
{% if loop.index == loop.length-1 %}
<br>備註: {{submission[periods[c-1]]['notes']}}
2021-10-05 04:22:23 -07:00
{% endif %}
</div>
2021-12-12 02:38:10 -08:00
{% endif %}
2021-09-12 02:39:09 -07:00
{% endfor %}
{% else %}
<div class="row needborder">{{periods[c-1]}}:
2021-12-12 02:38:10 -08:00
{{schedule[periods[c-1]]['subject']}}: {{i}}: No
2021-10-05 04:22:23 -07:00
Signature
2021-09-12 02:39:09 -07:00
</div>
<div class="row"></div>
{% endif %}
{% else %}
2021-12-12 02:38:10 -08:00
<div class="row needborder">{{periods[c-1]}}: {{schedule[periods[c-1]]['subject']}}:
{{schedule[periods[c-1]]['teacher']}}
2021-09-12 02:39:09 -07:00
</div>
2021-12-12 02:38:10 -08:00
{% if periods[c-1] in submission %}
<div class="row"><img src="{{submission[periods[c-1]]['signature']}}" alt=""><br>備註:
{{submission[periods[c-1]]['notes']}}</div>
{% endif %}
2021-09-12 02:39:09 -07:00
{% endif %}
{% endif %}
</div>
2021-09-14 07:55:11 -07:00
{% if c % 4 == 3 %}
2021-09-12 02:39:09 -07:00
</div>
{% endif %}
{% endfor %}
</div>
2021-12-26 05:08:50 -08:00
{% include 'footer.html' %}
2021-09-12 02:39:09 -07:00
</div>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"
integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p"
crossorigin="anonymous"></script>
2021-10-28 03:51:44 -07:00
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
2021-09-12 02:39:09 -07:00
<script>
var homerooms = {};
{% for i in homerooms %}
homerooms['{{i}}'] = [];
{% for j in homerooms[i] %}
homerooms['{{i}}'].push({{ j }});
{% endfor %}
{% endfor %}
</script>
2021-10-19 07:30:49 -07:00
<script src="/static/pagejs/admin.js"></script>
2021-09-18 07:04:31 -07:00
<script src="/static/time.js"></script>
2021-09-12 02:39:09 -07:00
</body>
</html>