oficina / calendar Public

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

Plain git — no account needed to clone.

Download

Download this file

1{{define "title"}}{{.Title}}{{end}}
2{{define "content"}}
3<header rst-page-header>
4 <div rst-page-header-titles>
5 <h1>Import a calendar</h1>
6 <p rst-page-header-sub>An .ics file exported from another calendar.</p>
7 </div>
8</header>
9
10{{with .Data.Error}}
11{{template "callout" dict "Tone" "negative" "Body" . "Alert" true}}
12{{end}}
13
14{{/* Said before the upload, not after: what this app does not yet
15 model is exactly what somebody importing a working calendar will
16 miss, and finding out afterwards is worse. */}}
17{{template "callout" dict "Tone" "info"
18 "Title" "What comes across, and what does not"
19 "Body" "Events, times, zones, notes and repeat rules all come across, including rules this app cannot itself create — those are kept exactly as they arrived. Guests and invitations do not: this app does not model them yet, and the report will say how many were dropped."}}
20
21<form rst-form method="post" action="/import" enctype="multipart/form-data">
22 {{template "field-select" dict
23 "ID" "calendar_id" "Name" "calendar_id" "Label" "Import into"
24 "Options" (calendarOptions .Data.Calendars 0)}}
25
26 <div rst-field>
27 <label rst-field-label for="file">The file</label>
28 <input rst-input id="file" name="file" type="file" accept=".ics,text/calendar" required>
29 <small rst-field-hint>Up to 10 MB.</small>
30 </div>
31
32 {{template "form-foot" dict "Submit" "Import" "CancelHref" "/today" "CancelLabel" "Cancel"}}
33</form>
34{{end}}
35