41 lines
1.6 KiB
HTML
41 lines
1.6 KiB
HTML
<div class="column is-one-quarter">
|
|
<div class="box {%if not shift.teambackup_set.all%} has-background-warning{%endif%}">
|
|
<div class="content">
|
|
<strong>Ort:</strong> {{ shift.room.name }}<br>
|
|
<strong>Beginn:</strong> {{ shift.start_at }}<br>
|
|
<strong>Dauer:</strong> {{ shift.duration }}<br>
|
|
<strong>Belegung:</strong> {{ shift.shiftregistration_set.count }}/{{ shift.required_helpers|default:shift.room.required_helpers }}
|
|
<hr>
|
|
<ul>
|
|
{% for item in shift.teambackup_set.all%}
|
|
<li>{{item.name}}</li>
|
|
{%endfor%}
|
|
</ul>
|
|
<form action="{%url 'signage:work_add' shift.pk%}" method="post">
|
|
{% csrf_token %}
|
|
{% for field in form %}
|
|
<div class="field">
|
|
{% if field.widget_type == 'checkbox' %}
|
|
<div class="control">
|
|
<label class="checkbox" for="{{ field.id_for_label }}">{{ field }} {{ field.label }}</label>
|
|
</div>
|
|
{% else %}
|
|
<label class="label" for="{{ field.id_for_label }}">{{ field.label }}</label>
|
|
<div class="control">
|
|
{{ field }}
|
|
</div>
|
|
{% endif %}
|
|
{% for error in field.errors %}
|
|
<p class="help is-danger">{{ error }}</p>
|
|
{% endfor %}
|
|
{% if field.help_text %}
|
|
<p class="help">{{ field.help_text }}</p>
|
|
{% endif %}
|
|
</div>
|
|
{% endfor %}
|
|
<button class="button is-link" type="submit">Team hinzufuegen</button>
|
|
</form>
|
|
</div>
|
|
|
|
</div>
|
|
</div> |