timetracker/attendance/templates/attendance/attendance_overview_instructor.html
2021-01-30 17:40:40 -07:00

80 lines
2.9 KiB
HTML

<section>
<header>
<h1>{{ user.instructor.department.name }}</h1>
<p>
<a href="">Generate Reports</a>
</p>
</header>
<h3>Active sessions</h3>
<p>
<a href="{% url 'period-create' %}">+ Add new session</a>
</p>
<table>
<thead>
<tr>
<th>Student</th>
<th>Station</th>
<th>Clocked in</th>
<th colspan="2">Duration</th>
</tr>
</thead>
<tbody>
{% for period in period_list %}
{% if not period.clocked_out %}
<tr>
<td>{{ period.student }}</td>
<td>{{ period.station_number }}</td>
<td>{{ period.clocked_in }}</td>
{% if period.clocked_out %}
<td>{{ period.clocked_out }}</td>
<td>{{ period.clocked_in|timesince:period.clocked_out }}</td>
{% else %}
<td>Current sesson: {{ period.clocked_in|timesince }}</td>
{% endif %}
<td><a href="{% url 'period-detail' period.id %}">View</a></td>
</tr>
{% endif %}
{% empty %}
<tr><td colspan="2">No periods yet.</td></tr>
{% endfor %}
</tbody>
</table>
</section>
<article>
<div>
<h3>Attendance log</h3>
<table>
<thead>
<tr>
<th>Student</th>
<th>Station</th>
<th>Clocked in</th>
<th>Clocked out</th>
<th colspan="2">Duration</th>
</tr>
</thead>
<tbody>
{% for period in period_list %}
{% if period.clocked_out %}
<tr>
<td>{{ period.student }}</td>
<td>{{ period.station_number }}</td>
<td>{{ period.clocked_in }}</td>
{% if period.clocked_out %}
<td>{{ period.clocked_out }}</td>
<td>{{ period.clocked_in|timesince:period.clocked_out }}</td>
{% else %}
<td colspan="2">Current sesson: {{ period.clocked_in|timesince }}</td>
{% endif %}
<td><a href="{% url 'period-detail' period.id %}">View</a></td>
</tr>
{% endif %}
{% empty %}
<tr><td colspan="2">No periods yet.</td></tr>
{% endfor %}
</tbody>
</table>
</div>
</article>