From 3600597812e550cda092796831c6400831b4accb Mon Sep 17 00:00:00 2001 From: Satyan JACQUENS Date: Wed, 19 Apr 2017 14:41:15 +0200 Subject: [PATCH] Hide teach icon when teachers are hidden Icon were still displayed when the teacher list was disabled by admin. --- .../classic_courses_without_category.tpl | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/main/template/default/user_portal/classic_courses_without_category.tpl b/main/template/default/user_portal/classic_courses_without_category.tpl index 49044c4ba0..76dfe62553 100644 --- a/main/template/default/user_portal/classic_courses_without_category.tpl +++ b/main/template/default/user_portal/classic_courses_without_category.tpl @@ -57,15 +57,17 @@
- {{ 'teacher.png' | img(16, 'Professor'|get_lang ) }} - {% for teacher in item.teachers %} - {% set counter = counter + 1 %} - {% if counter > 1 %} | {% endif %} - - {{ teacher.firstname }} {{ teacher.lastname }} - - {% endfor %} + {% if item.teachers|length > 0 %} + {{ 'teacher.png' | img(16, 'Professor'|get_lang ) }} + {% for teacher in item.teachers %} + {% set counter = counter + 1 %} + {% if counter > 1 %} | {% endif %} + + {{ teacher.firstname }} {{ teacher.lastname }} + + {% endfor %} + {% endif %}
{% if item.student_info %}