66 lines
1.7 KiB
HTML
66 lines
1.7 KiB
HTML
{% 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
|
|
<th>
|
|
Actions
|
|
{% 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 }}
|
|
<td>
|
|
{% if request.user in team.responsible_members.all %}
|
|
<a class="btn btn-info"
|
|
href="{% url 'teams:shift_update' camp_slug=camp.slug team_slug=team.slug pk=shift.pk %}">
|
|
<i class="fas fa-edit"></i> Edit
|
|
</a>
|
|
<a class="btn btn-danger" href="">
|
|
<i class="fas fa-trash"></i> Delete
|
|
</a>
|
|
{% endif %}
|
|
{% endfor %}
|
|
</table>
|
|
{% endblock %}
|