timetracker/attendance/templates/attendance/attendance_overview_student.html
2021-02-05 23:05:16 -07:00

28 lines
1.3 KiB
HTML

{% load timedelta_filter %}
<article class="student">
<section class="student__header panel">
<h1 class="student__department">{{ user.student.department.name }}</h1>
{% if user.student.is_clocked_in %}
<div class="student__statusbar status">
<p><span class="status__clocked--clocked-in">You are currently clocked in.</span></p>
<p class="status__clocked-info">
Clocked in at: <strong>{{ current_period.clocked_in|date:"P" }}</strong><br>
Current sesson: <strong>{{ current_period.clocked_in|timesince }}</strong>
</p>
</div>
{% include 'attendance/_student_code.html' with clocked_in=True %}
{% else %}
<div class="status__clocked">
<p>You are not clocked in.</p>
{% include 'attendance/_student_code.html' with clocked_in=False %}
</div>
{% endif %}
</section>
<section class="student__attendance attendance">
<h2 class="attendance__title">Attendance log</h2>
<p class="attendance__total">Total hours for the month: <strong>{{ period_total.total|timedelta_format:2 }}</strong><br>
<small>(Does not include current session.)</small></p>
{% include 'attendance/_student_periods.html' %}
</section>
</article>