addMask: improve layout and some user-facing texts/hints
This commit is contained in:
parent
f835616697
commit
12f394a122
1 changed files with 119 additions and 99 deletions
|
@ -17,121 +17,141 @@
|
||||||
content: ' *';
|
content: ' *';
|
||||||
color: red;
|
color: red;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.form-control ~ .form-text {
|
||||||
|
padding-left: 12px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
<form method="POST" action="addOfficeHour">
|
<div class="row">
|
||||||
<div class="form-floating mb-3">
|
<div class="col-lg-8 mb-4">
|
||||||
<select class="form-control form-select required" required name="veranstaltung" id="veranstaltung">
|
<form method="POST" action="addOfficeHour">
|
||||||
{{range $course := .Courses}}
|
|
||||||
<option value="{{$course.Id}}"{{if eq $course.Id $.SelectedCourse}} selected{{end}}>{{$course.Name}}</option>
|
|
||||||
{{end}}
|
|
||||||
</select>
|
|
||||||
<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>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-6">
|
|
||||||
|
|
||||||
<div class="form-floating mb-3">
|
<div class="form-floating mb-3">
|
||||||
<select class="form-select required" required name="woche" id="woche">
|
<input class="form-control required" required name="name" id="name" type="text" value="{{.Name}}" placeholder="">
|
||||||
<option value="0"{{if eq 0 $.Date.Week}} selected{{end}}>Jede</option>
|
<label for="name">Name</label>
|
||||||
<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>
|
|
||||||
<div class="col-md-6">
|
|
||||||
|
|
||||||
<div class="form-floating mb-3">
|
<div class="form-floating mb-3">
|
||||||
<select class="form-select required" required name="tag" id="tag">
|
<input class="form-control required" required name="email" id="email" type="email" value="{{.Email}}" placeholder="">
|
||||||
<option value="0"{{if eq 0 $.Date.Day}} selected{{end}}>Montag</option>
|
<label for="email">Email-Adresse</label>
|
||||||
<option value="1"{{if eq 1 $.Date.Day}} selected{{end}}>Dienstag</option>
|
<div class="form-text">
|
||||||
<option value="2"{{if eq 2 $.Date.Day}} selected{{end}}>Mittwoch</option>
|
{{if ne .Config.Tutor.MailSuffix ""}}
|
||||||
<option value="3"{{if eq 3 $.Date.Day}} selected{{end}}>Donnerstag</option>
|
Du musst hier eine Email-Adresse angeben, die auf „{{.Config.Tutor.MailSuffix}}“ endet.<br />
|
||||||
<option value="4"{{if eq 4 $.Date.Day}} selected{{end}}>Freitag</option>
|
{{end}}
|
||||||
</select>
|
Die Email-Adresse dient der Vermeidung von Spam und wird nicht veröffentlicht.
|
||||||
<label for="tag">Tag</label>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-6">
|
|
||||||
|
|
||||||
<div class="form-floating mb-3">
|
<div class="form-floating mb-3">
|
||||||
<input class="form-control required" required type="time" name="startzeit" id="startzeit"
|
<select class="form-control form-select required" required name="veranstaltung" id="veranstaltung">
|
||||||
min="{{printf "%02d" .EarliestStartTime.Hour}}:{{printf "%02d" .EarliestStartTime.Minute}}"
|
{{range $course := .Courses}}
|
||||||
max="{{printf "%02d" .LatestStartTime.Hour}}:{{printf "%02d" .LatestStartTime.Minute}}"
|
<option value="{{$course.Id}}"{{if eq $course.Id $.SelectedCourse}} selected{{end}}>{{$course.Name}}</option>
|
||||||
{{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"
|
|
||||||
min="{{.MinuteGranularity}}" max="120" step="{{.MinuteGranularity}}"
|
|
||||||
{{ 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-select required" required name="raum" id="raum">
|
|
||||||
{{range $room := .Rooms}}
|
|
||||||
<option value="{{$room.Id}}"{{if eq $room.Id $.SelectedRoom}} selected{{end}}>{{$room.Name}}</option>
|
|
||||||
{{end}}
|
{{end}}
|
||||||
</select>
|
</select>
|
||||||
<label for="raum">Raum</label>
|
<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>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
<div class="row">
|
||||||
<div class="col-md-6">
|
<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"
|
||||||
|
min="{{.MinuteGranularity}}" max="120" step="{{.MinuteGranularity}}"
|
||||||
|
{{ 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">
|
||||||
|
{{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>
|
||||||
|
|
||||||
<div class="form-floating mb-3">
|
<div class="form-floating mb-3">
|
||||||
<input class="form-control" type="text" name="raumname" id="raumname" value="{{.Roomname}}" placeholder="">
|
<input class="form-control" name="info" id="info" type="text" value="{{.Info}}" placeholder="" required>
|
||||||
<label for="raumname">Raumname (für Sonderräume)</label>
|
<label for="info">Info</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
<button class="btn btn-primary" type="submit">Sprechstunde erstellen</button>
|
||||||
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="col-lg-4">
|
||||||
|
<p>
|
||||||
|
Beachte, dass in den Arbeitsrräumen nur begrenzt viele Sprechstunden gleichzeitig stattfinden dürfen.
|
||||||
|
Das Formular wird dich warnen, falls du versuchst deine Sprechstunde in einem zu vollen Raum anzulegen.
|
||||||
|
</p>
|
||||||
|
<ul class="list-group">
|
||||||
|
{{range $room := .Rooms}}
|
||||||
|
<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}}
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="form-floating mb-3">
|
|
||||||
<input class="form-control required" required name="name" id="name" type="text" value="{{.Name}}" placeholder="">
|
|
||||||
<label for="name">Name</label>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-floating mb-3">
|
|
||||||
<input class="form-control required" required name="email" id="email" type="email" value="{{.Email}}" placeholder="">
|
|
||||||
<label for="email">Email-Adresse</label>
|
|
||||||
{{if ne .Config.Tutor.MailSuffix ""}}
|
|
||||||
<div class="form-text">
|
|
||||||
Du musst hier eine Email-Adresse angeben, die auf „{{.Config.Tutor.MailSuffix}}“ endet.<br>
|
|
||||||
</div>
|
|
||||||
{{end}}
|
|
||||||
</div>
|
|
||||||
<div class="form-floating mb-3">
|
|
||||||
<input class="form-control" name="info" id="info" type="text" value="{{.Info}}" placeholder="" required>
|
|
||||||
<label for="info">Info</label>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<input class="btn btn-primary" type="submit">
|
|
||||||
</form>
|
|
||||||
Außerdem dürfen in Räumen nur begrenzt viele Sprechstunden gleichzeitig stattfinden, nämlich
|
|
||||||
<dl>
|
|
||||||
{{range $room := .Rooms}}
|
|
||||||
<dt>{{$room.Name}}</dt>
|
|
||||||
<dd>{{$room.MaxOccupy}} Sprechstunde{{if gt $room.MaxOccupy 1}}n{{end}}</dd>
|
|
||||||
{{end}}
|
|
||||||
</dl>
|
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
Loading…
Reference in a new issue