2022-08-31 20:49:14 +00:00
< html >
< head >
< title > Sprechstunde anlegen< / title >
< / head >
< body >
< p >
{{range .Errors}}{{.}}< br / > {{end}}
< / p >
< p >
< form method = "POST" action = "addOfficeHour" >
< label for = "veranstaltung" > Veranstaltung< / label > :
< select name = "veranstaltung" > {{range $course := .Courses}}
< option value = "{{$course.Id}}" { { if eq $ course . Id $ . SelectedCourse } } selected { { end } } > {{$course.Name}}< / option > {{end}}
< / select > < br / >
< label for = "woche" > Woche< / label > :
< select name = "woche" >
2022-09-07 19:48:40 +00:00
< option value = "0" { { if eq 0 $ . Date . Week } } selected { { end } } > Jede< / option >
< option value = "1" { { if eq 1 $ . Date . Week } } selected { { end } } > Gerade< / option >
< option value = "2" { { if eq 2 $ . Date . Week } } selected { { end } } > Ungerade< / option >
2022-08-31 20:49:14 +00:00
< / select > < br / >
< label for = "tag" > Tag< / label > : < select name = "tag" >
2022-09-07 19:48:40 +00:00
< option value = "0" { { if eq 0 $ . Date . Day } } selected { { end } } > Montag< / option >
< option value = "1" { { if eq 1 $ . Date . Day } } selected { { end } } > Dienstag< / option >
< option value = "2" { { if eq 2 $ . Date . Day } } selected { { end } } > Mittwoch< / option >
< option value = "3" { { if eq 3 $ . Date . Day } } selected { { end } } > Donnerstag< / option >
< option value = "4" { { if eq 4 $ . Date . Day } } selected { { end } } > Freitag< / option >
2022-08-31 20:49:14 +00:00
< / select > < br / >
2022-09-07 19:48:40 +00:00
< label for = "startzeit" > Startzeit< / label > : < input type = "time" name = "startzeit" min = "08:00" max = "17:30" { { if gt $ . Date . Hour 7 } } value = "{{printf " % 02d " $ . Date . Hour } } : { { printf " % 02d " $ . Date . Minute } } " { { end } } required / > < br / >
< label for = "dauer" > Dauer in Minuten< / label > : < input name = "dauer" type = "number" min = "{{.MinuteGranularity}}" max = "120" step = "{{.MinuteGranularity}}" value = "{{.Duration}}" required / > < br / >
2022-08-31 20:49:14 +00:00
< label for = "raum" > Raum< / label > :
< select name = "raum" > {{range $room := .Rooms}}
< option value = "{{$room.Id}}" { { if eq $ room . Id $ . SelectedRoom } } selected { { end } } > {{$room.Name}}< / option > {{end}}
< / select > < br / >
< label for = "raumname" > Raumname (für Sonderräume)< / label > : < input type = "text" name = "raumname" value = "{{.Roomname}}" / > < br / >
2022-09-07 19:48:40 +00:00
< label for = "name" > Name< / label > : < input name = "name" type = "text" size = "50" value = "{{.Name}}" required / > < br / >
2022-08-31 20:49:14 +00:00
< label for = "email" > Email-Adresse< / label > :
2022-09-07 19:48:40 +00:00
< input name = "email" type = "email" size = "50" value = "{{.Email}}" required / > < br / >
2022-08-31 20:49:14 +00:00
< label for = "info" > Info< / label > : < input name = "info" type = "text" size = "50" value = "{{.Info}}" / > < br / >
< input type = "submit" >
< / form >
< / p >
2022-09-19 15:00:19 +00:00
{{if ne .Config.Tutor.MailSuffix ""}}Du musst hier eine Email-Adresse angeben, die auf „{{.Config.Tutor.MailSuffix}}“ endet.< br / > {{end}}
2022-08-31 20:49:14 +00:00
Außerdem dürfen in Räumen nur begrenzt viele Sprechstunden gleichzeitig stattfinden, nämlich
< dl >
{{range $room := .Rooms}}
< dt > {{$room.Name}}< / dt > < dl > {{$room.MaxOccupy}} Sprechstunde{{if gt $room.MaxOccupy 1}}n{{end}}< / dl > < br / > {{end}}
< / dl >
2022-09-19 15:00:19 +00:00
{{template "footer.html" .}}
2022-08-31 20:49:14 +00:00
< / body >
< / html >