rework template rendering, cache parsed templates
adapt error wrapping principle
This commit is contained in:
parent
7a1448d6f9
commit
f04396809d
21 changed files with 175 additions and 82 deletions
25
templating/templates/index.html
Normal file
25
templating/templates/index.html
Normal file
|
@ -0,0 +1,25 @@
|
|||
{{define "title"}}Übersicht{{end}}
|
||||
|
||||
{{define "content"}}
|
||||
<form method="GET" action="/getByCourse">
|
||||
<label for="veranstaltung">Veranstaltung: </label>
|
||||
<select name="veranstaltung" id="veranstaltung" size="1" onchange="document.forms[0].submit()">
|
||||
<option value="">Alle</option>
|
||||
{{range $course := .Courses}}
|
||||
<option value="{{$course.Id}}"{{if eq $course.Id $.SelectedCourse}} selected{{end}}>{{$course.Name}}</option>
|
||||
{{end}}
|
||||
</select>
|
||||
<input type="submit" value="Auswählen" />
|
||||
</form>
|
||||
<form method="GET" action="/getByRoom">
|
||||
<label for="raum">Raum: </label>
|
||||
<select name="raum" id="raum" size="1" onchange="document.forms[1].submit()">
|
||||
<option value="">Alle</option>
|
||||
{{range $room := .Rooms}}
|
||||
<option value="{{$room.Id}}"{{if eq $room.Id $.SelectedRoom}} selected{{end}}>{{$room.Name}}</option>
|
||||
{{end}}
|
||||
</select>
|
||||
<input type="submit" value="Auswählen" />
|
||||
</form>
|
||||
{{.Timetable}}
|
||||
{{end}}
|
Loading…
Add table
Add a link
Reference in a new issue