diff --git a/controllers/timetable.go b/controllers/timetable.go index 654d310..cedc11c 100644 --- a/controllers/timetable.go +++ b/controllers/timetable.go @@ -50,10 +50,8 @@ func (b *BaseHandler) GetTimetable(officeHours []models.OfficeHour) (timetable m } func (b *BaseHandler) printTimetable(timetable map[models.Date]map[int]models.OfficeHour, slots []int, deleteIcons bool) template.HTML { - if len(timetable) == 0 { // no office hours to display - return template.HTML("
Aktuell sind keine passenden Sprechstunden eingetragen.
") - } var tableBody string + var anyOfficeHourExists bool = false // do not show table if no entry in there for hour := 8; hour < 19; hour += 1 { for minute := 0; minute < 60; minute += b.config.Date.MinuteGranularity { tableBody += "Aktuell sind keine passenden Sprechstunden eingetragen.
") + } var table bytes.Buffer tableData := struct {