bornhack-website/src/teams/templates/shifts/shift_list.html

54 lines
1.2 KiB
HTML
Raw Normal View History

2018-07-02 21:52:52 +00:00
{% extends 'base.html' %}
{% load commonmark %}
{% load bootstrap3 %}
{% block content %}
<a class="btn btn-info"
href="{% url 'teams:detail' camp_slug=camp.slug team_slug=team.slug %}">
<i class="fas fa-chevron-left"></i> Back to team detail
</a>
<hr />
{% if request.user in team.responsible_members.all %}
<a class="btn btn-success"
href="{% url 'teams:shift_create' camp_slug=camp.slug team_slug=team.slug %}">
Create shift
</a>
{% endif %}
<table class="table table-condensed">
<tbody>
{% for shift in shifts %}
{% ifchanged shift.shift_range.lower|date:'d' %}
<tr>
<td colspan=4>
<h4>
{{ shift.shift_range.lower|date:'Y-m-d l' }}
</h4>
<tr>
<th>
From
<th>
To
<th>
People required
<th>
People
{% endifchanged %}
<tr>
<td>
{{ shift.shift_range.lower|date:'H:i' }}
<td>
{{ shift.shift_range.upper|date:'H:i' }}
<td>
{{ shift.people_required }}
<td>
{{ shift.team_members}}
{% endfor %}
</table>
{% endblock %}