From 5c60b5165e83f05efa3282004816e2becf78ae41 Mon Sep 17 00:00:00 2001 From: Florian Sorg Date: Sun, 7 May 2023 01:00:02 +0200 Subject: [PATCH] display shift and room description in team view --- shiftregister/app/templates/shift.html | 20 +++++++++++-------- shiftregister/core/templates/base.html | 4 ++++ .../team/templates/shift_detail.html | 13 +++++++++--- 3 files changed, 26 insertions(+), 11 deletions(-) diff --git a/shiftregister/app/templates/shift.html b/shiftregister/app/templates/shift.html index de22d58..df30a44 100644 --- a/shiftregister/app/templates/shift.html +++ b/shiftregister/app/templates/shift.html @@ -20,14 +20,18 @@ Dauer: {{ shift.duration }}
Treffpunkt: {{ shift.room.meeting_location|linebreaksbr }}

-{% if shift.room.description %} - Beschreibung: -

{{ shift.room.description|linebreaksbr }}

-{% endif %} -{% if shift.description %} - Zusatzinfo: -

{{ shift.description|linebreaksbr }}

-{% endif %} + {% if shift.room.description %} +
+ Beschreibung: +

{{ shift.room.description|linebreaksbr|safe }}

+
+ {% endif %} + {% if shift.description %} +
+ Zusatzinfo: +

{{ shift.description|linebreaksbr }}

+
+ {% endif %} {% if can_register and not shift.deleted %}
diff --git a/shiftregister/core/templates/base.html b/shiftregister/core/templates/base.html index e4237f1..7ccd80c 100644 --- a/shiftregister/core/templates/base.html +++ b/shiftregister/core/templates/base.html @@ -27,6 +27,10 @@ --background: #fff; } + .description { + margin-bottom: 1em; + } + .sticky-nav { background-color: var(--background); margin: 0 -0.75rem; diff --git a/shiftregister/team/templates/shift_detail.html b/shiftregister/team/templates/shift_detail.html index 89ef621..bdbf810 100644 --- a/shiftregister/team/templates/shift_detail.html +++ b/shiftregister/team/templates/shift_detail.html @@ -4,10 +4,17 @@ {% block content %}

{% if shift.deleted %}(gelöscht) {% endif %}{{ shift.room.name }} {{ shift.start_at }} ({{ shift.registration_count }}/{{ shift.required_helpers|default:shift.room.required_helpers }})

+{% if shift.room.description %} +
+ Beschreibung: +

{{ shift.room.description|safe|linebreaksbr }}

+
+{% endif %} {% if shift.description %} -
- {{ shift.description|linebreaksbr }} -
+
+ Zusatzinfo: +

{{ shift.description|linebreaksbr }}

+
{% endif %} {% if shift.shiftregistration_set.all %}
Helfer*innen