From f9d9c98b2007d4bf5da5b7c88c2e23f18bbb437c Mon Sep 17 00:00:00 2001 From: Jonathan Weth <git@jonathanweth.de> Date: Mon, 13 Jan 2020 15:27:53 +0100 Subject: [PATCH] Show group owners correctly --- aleksis/apps/chronos/templates/chronos/plan.html | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/aleksis/apps/chronos/templates/chronos/plan.html b/aleksis/apps/chronos/templates/chronos/plan.html index 7d25724d..b79727c5 100644 --- a/aleksis/apps/chronos/templates/chronos/plan.html +++ b/aleksis/apps/chronos/templates/chronos/plan.html @@ -40,14 +40,13 @@ </h4> {# Show class teacher and deputy class teacher #} - {% if type == 2 and el.teachers %} + {% if type == "group" and el.owners.all %} <h5>Klassenlehrkräfte: - {% for teacher in el.teachers %} - + {% for teacher in el.owners.all %} <span data-position="bottom" class="tooltipped" data-tooltip="{{ teacher }}"> - <a href="{% url "timetable" "teacher" teacher.id %}"> - {{ teacher.shortcode }}</a></span>{% if not forloop.last %},{% endif %} + <a href="{% url "timetable" "teacher" teacher.pk %}"> + {{ teacher.short_name }}</a></span>{% if not forloop.last %},{% endif %} {% endfor %} </h5> {% endif %} -- GitLab