Download this file
| 1 | {{/* The booking availability pane: what the server read the sentence |
| 2 | to mean, and every part it could not read. |
| 3 | |
| 4 | Like the quick-add pane, this is the CONTRACT of the feature. The |
| 5 | windows the page will offer are printed here in words, and every |
| 6 | problem is listed — all of them, not the first — so the host fixes |
| 7 | the sentence once. One template, rendered two ways: inline on the |
| 8 | form's first paint and after a scriptless save with problems (422), |
| 9 | and as a standalone fragment for the live fetch. */}} |
| 10 | {{define "bookingpane"}} |
| 11 | {{if .Empty}} |
| 12 | <p cal-book-blank>Type when you are free — for example <q>mondays 12–3, tuesdays 12–2, 5–7</q>.</p> |
| 13 | {{else}} |
| 14 | {{with .Problems}} |
| 15 | <ul cal-book-problems role="alert"> |
| 16 | {{range .}}<li>{{.}}</li>{{end}} |
| 17 | </ul> |
| 18 | {{end}} |
| 19 | {{with .Lines}} |
| 20 | <ul cal-book-lines> |
| 21 | {{range .}}<li>{{.}}</li>{{end}} |
| 22 | </ul> |
| 23 | {{end}} |
| 24 | {{end}} |
| 25 | {{end}} |
| 26 | |