Skip to content
Snippets Groups Projects
Commit 634fce4a authored by Frank Poetzsch-Heffter's avatar Frank Poetzsch-Heffter
Browse files

teachers in for-loop

parent b6b37c90
No related branches found
No related tags found
1 merge request!86Merge school-apps
......@@ -47,20 +47,13 @@
{# Show class teacher and deputy class teacher #}
{% if type == 2 and el.teachers %}
<h5>Klassenlehrkräfte:
<span data-position="bottom" class="tooltipped"
data-tooltip="{{ el.teachers.0 }}">
<a href="{% url "timetable_smart_plan" "teacher" el.teachers.0.id %}">
{{ el.teachers.0.shortcode }}
</a>,
</span>
{% if el.teachers.1 %}
{% for teacher in el.teachers %}
<span data-position="bottom" class="tooltipped"
data-tooltip="{{ el.teachers.1 }}">
<a href="{% url "timetable_smart_plan" "teacher" el.teachers.1.id %}">
{{ el.teachers.1.shortcode }}
</a>
</span>
{% endif %}
data-tooltip="{{ teacher }}">
<a href="{% url "timetable_smart_plan" "teacher" teacher.id %}">
{{ teacher.shortcode }}</a></span>{% if not forloop.last %},{% endif %}
{% endfor %}
</h5>
{% endif %}
</div>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment