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 %} {% endif %}
<strong>Ort:</strong> {{ shift.room.name }}<br> <strong>Ort:</strong> {{ shift.room.name }}<br>
<strong>Beginn:</strong> {{ shift.start_at }}<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 }} <strong>Belegung:</strong> {{ shift.reg_count }}/{{ shift.required_helpers|default:shift.room.required_helpers }}
</div> </div>
<div class="buttons is-right"> <div class="buttons is-right">

View File

@ -21,7 +21,7 @@
<strong>Beginn:</strong> {{ shift.start_at }}<br> <strong>Beginn:</strong> {{ shift.start_at }}<br>
<strong>Dauer:</strong> {{ shift.duration|duration }}<br> <strong>Dauer:</strong> {{ shift.duration|duration }}<br>
<strong>Treffpunkt:</strong> {{ shift.room.meeting_location|linebreaksbr }}<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> </p>
{% if shift.room.description %} {% if shift.room.description %}
<div class="description"> <div class="description">

View File

@ -7,10 +7,6 @@
<strong>Beginn:</strong> {{ shift.start_at }}<br> <strong>Beginn:</strong> {{ shift.start_at }}<br>
<strong>Dauer:</strong> {{ shift.duration }}<br> <strong>Dauer:</strong> {{ shift.duration }}<br>
<strong>Belegung:</strong> {{ shift.reg_count }}/{{ shift.required_helpers|default:shift.room.required_helpers }} <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 %}
</div> </div>
<div class="is-flex is-justify-content-end"> <div class="is-flex is-justify-content-end">
<a class="button is-info is-small" href="{% url 'team:shift' shift.id %}">Details</a> <a class="button is-info is-small" href="{% url 'team:shift' shift.id %}">Details</a>

View File

@ -3,17 +3,19 @@
{% block title %}Schichtdetails{% endblock %} {% block title %}Schichtdetails{% endblock %}
{% block content %} {% 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> <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 %} {% if shift.room.description %}
<div class="description"> <div class="content">
<strong>Beschreibung:</strong> <strong>Beschreibung:</strong>
<p>{{ shift.room.description|safe|linebreaksbr }}</p> <p>{{ shift.room.description|safe|linebreaksbr }}</p>
</div> </div>
{% endif %} {% endif %}
{% if shift.description %} {% if shift.description %}
<div class="description"> <div class="content">
<strong>Zusatzinfo:</strong> <strong>Zusatzinfo:</strong>
<p>{{ shift.description|linebreaksbr }}</p> <p>{{ shift.description|linebreaksbr }}</p>
</div> </div>

View File

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