oficina / calendar Public

Clone
git clone https://amadan.net/oficina/calendar

Plain git — no account needed to clone.

Download

Download this file

1{{/* The quick-add detail pane: what the server understood.
2
3 This is the CONTRACT of the feature. Everything the parser decided
4 — including everything it defaulted — is printed here in words
5 before anything is saved. If a field is not in this pane, the
6 parser did not set it.
7
8 One template, rendered two ways: inline on first paint, and as a
9 standalone fragment for the live update. Two templates would be two
10 descriptions of one parse, free to disagree. */}}
11{{define "quickpane"}}
12{{if .Empty}}
13<p cal-quick-blank>Start typing and this will show what gets saved.</p>
14{{else}}
15<dl cal-quick-detail>
16 <div cal-quick-row>
17 <dt>What</dt>
18 <dd>{{if .Title}}{{.Title}}{{else}}<em>No title yet</em>{{end}}</dd>
19 </div>
20 <div cal-quick-row>
21 <dt>When</dt>
22 <dd>{{.When}}</dd>
23 </div>
24 {{if .Location}}
25 <div cal-quick-row>
26 <dt>Where</dt>
27 <dd>{{.Location}}</dd>
28 </div>
29 {{end}}
30 {{if .Repeat}}
31 <div cal-quick-row>
32 <dt>Repeats</dt>
33 <dd>{{.Repeat}}</dd>
34 </div>
35 {{end}}
36 {{if .Attendees}}
37 <div cal-quick-row>
38 {{/* "not emailed" sits in the LABEL, not in a footnote. Somebody
39 who reads only the left column still learns the one thing that
40 could mislead them. */}}
41 <dt>Who's coming <span cal-quick-caveat>(not emailed)</span></dt>
42 <dd>
43 <ul cal-quick-people>
44 {{range .Attendees}}<li>{{.}}</li>{{end}}
45 </ul>
46 </dd>
47 </div>
48 {{end}}
49</dl>
50{{if .Notes}}
51<ul cal-quick-notes>
52 {{range .Notes}}<li>{{.}}</li>{{end}}
53</ul>
54{{end}}
55{{end}}
56{{end}}
57