Clean up 'signage' app even more
This commit is contained in:
parent
1029e11b2e
commit
2a3ef33f62
|
@ -1,7 +0,0 @@
|
|||
from django import forms
|
||||
|
||||
|
||||
class TeamBackupForm(forms.Form):
|
||||
name = forms.CharField(
|
||||
max_length=100, widget=forms.TextInput(attrs={"class": "input"})
|
||||
)
|
|
@ -1,40 +0,0 @@
|
|||
<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 hinzufügen</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -47,16 +47,22 @@ window.addEventListener('load', () => {
|
|||
<section class="section">
|
||||
<div class="container">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Schicht</th>
|
||||
<th>Startzeit</th>
|
||||
<th>Belegung</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for shift in shifts %}
|
||||
<tr>
|
||||
<td>{{shift.start_at}}</td>
|
||||
<td>{{ shift.registration_count }}/{{ shift.required_helpers|default:shift.room.required_helpers }}</td>
|
||||
<td>{{shift.room.name}} </td>
|
||||
<td><b>{%for item in shift.teambackup_set.all%}{{item.name}}{% if not forloop.last %}, {% endif %}{%empty%}</b> <div class="has-text-danger">unbesetzt</div> <b>{%endfor%}</b></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
{% for shift in shifts %}
|
||||
<tr>
|
||||
<td>{{ shift.room.name }}</td>
|
||||
<td>{{ shift.start_at }}</td>
|
||||
<td>{{ shift.registration_count }}/{{ shift.required_helpers|default:shift.room.required_helpers }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}Team{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<section class="section">
|
||||
<div class="columns is-multiline">
|
||||
{% for shift in shifts %}
|
||||
{% include 'partials/worklist_shift.html' %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</section>
|
||||
{% endblock %}
|
Loading…
Reference in New Issue