2
0
Fork 0

Fix templates

This commit is contained in:
Luca 2023-05-09 23:42:49 +02:00
parent d5137f78f1
commit 5f434adf05
5 changed files with 16 additions and 18 deletions

View File

@ -8,7 +8,7 @@
{% endif %}
<strong>Ort:</strong> {{ shift.room.name }}<br>
<strong>Beginn:</strong> {{ shift.start_at }}<br>
<strong>Dauer:</strong> {{ shift.duration|duration }}</br>
<strong>Dauer:</strong> {{ shift.duration|duration }}<br>
<strong>Belegung:</strong> {{ shift.reg_count }}/{{ shift.required_helpers|default:shift.room.required_helpers }}
</div>
<div class="buttons is-right">

View File

@ -21,7 +21,7 @@
<strong>Beginn:</strong> {{ shift.start_at }}<br>
<strong>Dauer:</strong> {{ shift.duration|duration }}<br>
<strong>Treffpunkt:</strong> {{ shift.room.meeting_location|linebreaksbr }}<br>
<strong>Belegung:</strong> {{ shift.shiftregistration_set.count }}/{{ shift.required_helpers|default:shift.room.required_helpers }}
<strong>Belegung:</strong> {{ shift.reg_count }}/{{ shift.required_helpers|default:shift.room.required_helpers }}
</p>
{% if shift.room.description %}
<div class="description">

View File

@ -6,11 +6,7 @@
<strong>Ort:</strong> {{ shift.room.name }}<br>
<strong>Beginn:</strong> {{ shift.start_at }}<br>
<strong>Dauer:</strong> {{ shift.duration }}<br>
<strong>Belegung:</strong> {{ shift.reg_count}}/{{ shift.required_helpers|default:shift.room.required_helpers }}
{% if shift.teambackup_set.all.count %}
<br>
<strong>Backup-Teammitglied(er):</strong> {% for member in shift.teambackup_set.all %}{{ member.name }}{% if not forloop.last %}, {% endif %}{% endfor %}
{% endif %}
<strong>Belegung:</strong> {{ shift.reg_count }}/{{ shift.required_helpers|default:shift.room.required_helpers }}
</div>
<div class="is-flex is-justify-content-end">
<a class="button is-info is-small" href="{% url 'team:shift' shift.id %}">Details</a>

View File

@ -3,20 +3,22 @@
{% block title %}Schichtdetails{% endblock %}
{% block content %}
<h3 class="title is-spaced">{% if shift.deleted %}(gelöscht) {% endif %}
<h3 class="title is-spaced">
{% if shift.deleted %}(gelöscht) {% endif %}
<a href="{% url 'team:shift_room' shift.room.name %}">{{ shift.room.name }}</a>
{{ shift.start_at }} ({{ shift.registration_count }}/{{ shift.required_helpers|default:shift.room.required_helpers }})</h3>
{{ shift.start_at }} ({{ shift.registration_count }}/{{ shift.required_helpers|default:shift.room.required_helpers }})
</h3>
{% if shift.room.description %}
<div class="description">
<strong>Beschreibung:</strong>
<p>{{ shift.room.description|safe|linebreaksbr }}</p>
</div>
<div class="content">
<strong>Beschreibung:</strong>
<p>{{ shift.room.description|safe|linebreaksbr }}</p>
</div>
{% endif %}
{% if shift.description %}
<div class="description">
<strong>Zusatzinfo:</strong>
<p>{{ shift.description|linebreaksbr }}</p>
</div>
<div class="content">
<strong>Zusatzinfo:</strong>
<p>{{ shift.description|linebreaksbr }}</p>
</div>
{% endif %}
{% if shift.shiftregistration_set.all %}
<h5 class="subtitle">Helfer*innen</h5>

View File

@ -223,7 +223,7 @@ class RoomShiftList(ShiftList):
def get_context_data(self, **kwargs):
room = get_object_or_404(Room, pk=self.kwargs["pk"])
context = super().get_context_data(**kwargs)
context["title"] = f"Schichten fuer {room.name}"
context["title"] = f"Schichten für {room.name}"
return context
def get_queryset(self):