Clean up code
parent
9ea7f05766
commit
8c37c8b34d
@ -1,38 +1,38 @@
|
||||
{% extends "base.html" %}
|
||||
{% block title %}Teamschichten{%endblock%}
|
||||
{% block title %}Teamschichten{% endblock %}
|
||||
|
||||
{% load shift_extras %}
|
||||
|
||||
{% block body %}
|
||||
<section class="section">
|
||||
<div class="container">
|
||||
<h2 class="title">Fallback-Schichten für {{ team_member.name }}</h2>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<section class="section">
|
||||
<div class="container">
|
||||
<h3 class="title">Fallback-Schichten für {{ team_member.name }}</h3>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Wann</th>
|
||||
<th>Wie lange</th>
|
||||
<th>Wo</th>
|
||||
<th>Helfer:innen</th>
|
||||
<th>Helfer*innen</th>
|
||||
<th>Team-Mitglieder</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for shift in shifts %}
|
||||
<tr {% if shift.registration_count == shift.required_helpers|default:shift.room.required_helpers %}style="opacity: 0.2"{% endif %}>
|
||||
<td>{{ shift.start_at }}</td>
|
||||
<td>{{ shift.duration|duration }}</td>
|
||||
<td>{{ shift.room.name }} </td>
|
||||
<td>{{ shift.registration_count }}/{{ shift.required_helpers|default:shift.room.required_helpers }}</td>
|
||||
<td>
|
||||
{% for assignment in shift.fallbackassignment_set.all %}
|
||||
{{ assignment.team_member.name }}{% if not forloop.last %}, {% endif %}
|
||||
{% endfor %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for shift in shifts %}
|
||||
<tr{% if shift.registration_count == shift.required_helpers|default:shift.room.required_helpers %} style="opacity: 0.2"{% endif %}>
|
||||
<td>{{ shift.start_at }}</td>
|
||||
<td>{{ shift.duration|duration }}</td>
|
||||
<td>{{ shift.room.name }} </td>
|
||||
<td>{{ shift.registration_count }}/{{ shift.required_helpers|default:shift.room.required_helpers }}</td>
|
||||
<td>
|
||||
{% for assignment in shift.fallbackassignment_set.all %}
|
||||
{{ assignment.team_member.name }}{% if not forloop.last %}, {% endif %}
|
||||
{% endfor %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
{% endblock %}
|
||||
|
Loading…
Reference in New Issue