2023-06-09 20:18:00 +00:00
{{define "title"}}Sprechstunde anlegen{{end}}
2022-09-21 20:18:39 +00:00
{{define "content"}}
2023-06-08 23:12:32 +00:00
2023-07-07 18:43:51 +00:00
< div class = "col-md-12" >
2023-06-09 21:42:45 +00:00
< div class = "alert alert-info" >
Für die vorlesungsfreie Zeit müssen und können keine Sprechstunden gebucht werden.
Nutzt die offenen Arbeitsräume in dieser Zeit, wann immer ihr sie braucht.
< / div >
{{range .Errors}}
< div class = "alert alert-danger" >
< strong > Fehler: < / strong > {{.}}
< / div >
{{end}}
2023-06-08 23:12:32 +00:00
< / div >
2023-06-09 21:00:00 +00:00
< div class = "row" >
< div class = "col-lg-8 mb-4" >
< form method = "POST" action = "addOfficeHour" >
2023-06-09 20:18:00 +00:00
< div class = "form-floating mb-3" >
2023-06-09 21:00:00 +00:00
< input class = "form-control required" required name = "name" id = "name" type = "text" value = "{{.Name}}" placeholder = "" >
< label for = "name" > Name< / label >
2023-06-09 20:18:00 +00:00
< / div >
< div class = "form-floating mb-3" >
2023-06-09 21:00:00 +00:00
< input class = "form-control required" required name = "email" id = "email" type = "email" value = "{{.Email}}" placeholder = "" >
< label for = "email" > Email-Adresse< / label >
< div class = "form-text" >
{{if ne .Config.Tutor.MailSuffix ""}}
2023-07-10 11:29:03 +00:00
Du musst hier eine Email-Adresse angeben, die auf „{{.Config.Tutor.MailSuffix}}“ endet.< br >
2023-06-09 21:00:00 +00:00
{{end}}
Die Email-Adresse dient der Vermeidung von Spam und wird nicht veröffentlicht.
< / div >
2024-01-03 16:04:38 +00:00
< div class = "form-check" >
< input class = "form-check-input" name = "subscribeToMailinglist" id = "subscribeToMailinglist" type = "checkbox" value = "subscribe" { { if eq . SubscribeToMailinglist true } } checked { { end } } >
< label class = "form-check-label" for = "subscribeToMailinglist" > < a href = "https://lists.mathebau.de/postorius/lists/shk.mathebau.de/" > Mailingliste für SHK< / a > abbonieren< / label >
< / div >
2023-06-09 20:18:00 +00:00
< / div >
< div class = "form-floating mb-3" >
2023-06-09 21:00:00 +00:00
< select class = "form-control form-select required" required name = "veranstaltung" id = "veranstaltung" >
2023-11-10 13:12:45 +00:00
< option disabled { { if eq $ . SelectedCourse 0 } } selected { { end } } value > – – auswählen – – < / option >
2023-06-09 21:00:00 +00:00
{{range $course := .Courses}}
< option value = "{{$course.Id}}" { { if eq $ course . Id $ . SelectedCourse } } selected { { end } } > {{$course.Name}}< / option >
2023-06-09 20:18:00 +00:00
{{end}}
< / select >
2023-06-09 21:00:00 +00:00
< label for = "veranstaltung" > Veranstaltung< / label >
< div class = "form-text" >
Wenn du eine Veranstaltung hier vermisst, schreibe an
< a href = "mailto:sprechstundentool@mathebau.de?subject=Sprechstundentool: Neue Veranstaltung&body=Hey liebe Sprechstundentool-Admins,%0D%0A%0D%0Ameine Veranstaltung fehlt im Auswahlmenü.%0D%0AEs ist die Veranstaltung%0D%0A%0D%0AViele Grüße%0D%0A" tabindex = "-1" > sprechstundentool@mathebau.de< / a > .
< / div >
2023-06-09 20:18:00 +00:00
< / div >
2023-06-09 21:00:00 +00:00
< div class = "row" >
< div class = "col-md-6" >
< div class = "form-floating mb-3" >
< select class = "form-control form-select required" required name = "woche" id = "woche" >
< option value = "0" { { if eq 0 $ . Date . Week } } selected { { end } } > Jede< / option >
< option value = "1" { { if eq 1 $ . Date . Week } } selected { { end } } > Ungerade< / option >
< option value = "2" { { if eq 2 $ . Date . Week } } selected { { end } } > Gerade< / option >
< / select >
< label for = "woche" > Vorlesungswoche< / label >
< / div >
< / div >
< div class = "col-md-6" >
< div class = "form-floating mb-3" >
< select class = "form-control form-select required" required name = "tag" id = "tag" >
< 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 >
< / select >
< label for = "tag" > Tag< / label >
< / div >
< / div >
< / div >
< div class = "row" >
< div class = "col-md-6" >
< div class = "form-floating mb-3" >
< input class = "form-control required" required type = "time" name = "startzeit" id = "startzeit"
min="{{printf "%02d" .EarliestStartTime.Hour}}:{{printf "%02d" .EarliestStartTime.Minute}}"
max="{{printf "%02d" .LatestStartTime.Hour}}:{{printf "%02d" .LatestStartTime.Minute}}"
{{if ge $.Date.Hour .EarliestStartTime.Hour}}value="{{printf "%02d" $.Date.Hour}}:{{printf "%02d" $.Date.Minute}}" {{end}}>
< label for = "startzeit" > Startzeit< / label >
< / div >
< / div >
< div class = "col-md-6" >
< div class = "form-floating mb-3" >
< input class = "form-control required" required name = "dauer" id = "dauer" type = "number"
2023-10-26 09:29:42 +00:00
min="{{.MinuteGranularity}}" max="{{.MaxDuration}}" step="{{.MinuteGranularity}}"
2023-06-09 21:00:00 +00:00
{{ if ne .Duration 0}}value="{{.Duration}}"{{end}} placeholder="">
< label for = "dauer" > Dauer in Minuten< / label >
< / div >
< / div >
< / div >
< div class = "row" >
< div class = "col-md-6" >
< div class = "form-floating mb-3" >
< select class = "form-control form-select required" required name = "raum" id = "raum" >
2023-11-10 13:12:45 +00:00
< option disabled { { if eq $ . SelectedRoom 0 } } selected { { end } } value > – – auswählen – – < / option >
2023-06-09 21:00:00 +00:00
{{range $room := .Rooms}}
< option value = "{{$room.Id}}" { { if eq $ room . Id $ . SelectedRoom } } selected { { end } } > {{$room.Name}}< / option >
{{end}}
< / select >
< label for = "raum" > Raum< / label >
< / div >
< / div >
< div class = "col-md-6" >
< div class = "form-floating mb-3" >
< input class = "form-control" type = "text" name = "raumname" id = "raumname" value = "{{.Roomname}}" placeholder = "" >
< label for = "raumname" > Raumname (für Sonderräume)< / label >
< / div >
< / div >
< / div >
2023-06-09 20:18:00 +00:00
< div class = "form-floating mb-3" >
2023-06-09 21:42:45 +00:00
< input class = "form-control" name = "info" id = "info" type = "text" value = "{{.Info}}" placeholder = "" >
2023-06-09 21:00:00 +00:00
< label for = "info" > Info< / label >
2023-06-09 20:18:00 +00:00
< / div >
2023-06-09 21:42:45 +00:00
< div class = "text-center" >
2023-07-09 10:27:17 +00:00
< button class = "btn btn-outline-primary" type = "submit" > Sprechstunde erstellen< / button >
2023-06-09 21:42:45 +00:00
< / div >
2023-06-09 21:00:00 +00:00
< / form >
2023-06-09 20:18:00 +00:00
< / div >
2023-06-09 21:00:00 +00:00
< div class = "col-lg-4" >
< p >
2023-07-07 18:43:51 +00:00
Beachte, dass in den Arbeitsräumen nur begrenzt viele Sprechstunden gleichzeitig stattfinden dürfen.
2023-06-09 21:00:00 +00:00
Das Formular wird dich warnen, falls du versuchst deine Sprechstunde in einem zu vollen Raum anzulegen.
< / p >
< ul class = "list-group" >
{{range $room := .Rooms}}
2023-07-07 18:43:51 +00:00
{{ if ge 42 $room.MaxOccupy}}
2023-06-09 21:00:00 +00:00
< li class = "list-group-item d-flex justify-content-between align-items-center" >
{{$room.Name}}
< span class = "badge bg-secondary rounded-pill" >
{{$room.MaxOccupy}} Sprechstunde{{if gt $room.MaxOccupy 1}}n{{end}}
< / span >
< / li >
{{end}}
2023-07-07 18:43:51 +00:00
{{end}}
2023-06-09 21:00:00 +00:00
< / ul >
2023-06-09 20:18:00 +00:00
< / div >
2023-06-09 21:00:00 +00:00
< / div >
2023-06-09 20:18:00 +00:00
2022-09-21 20:18:39 +00:00
{{end}}