{{define "content"}}{{$d := .Data}}{{$page := $d.Page}} {{template "mapa-doc-head" dict "Page" $page "Edit" (or (and (not $d.Editing) (printf "/d/%s/edit" $page.Date)) "") "Day" $d.Pill}} {{template "notice" $d.Notice}} {{with $d.Draft}}{{template "mapa-unsaved" dict "Draft" . "Save" (printf "/d/%s/draft/save" $page.Date) "Discard" (printf "/d/%s/draft/discard" $page.Date) "Href" (or (and $d.Written (not $d.Editing) $page.Href) "") "Saved" $d.Saved}}{{end}} {{range $d.Orphans}}

You have unsaved changes to a page that was deleted.

{{end}} {{range $d.Elsewhere}}

You have unsaved changes on another page. Open it

{{end}} {{if $d.Editing}}
{{template "mapa-editor" dict "Body" $d.Body "Error" $d.Error "Upload" (printf "/d/%s?upload=1" $page.Date)}}
{{if $d.Written}}Cancel{{end}}
{{if not $d.Written}}

Nothing is saved until you write something and save it.

{{end}}
{{template "mapa-page-images" dict "Images" $d.Images "Back" (printf "/d/%s/edit" $page.Date)}} {{else}} {{template "mapa-island" $d.Island}}
{{$page.HTML}}
{{end}} {{template "mapa-links-panel" dict "Page" $page "Week" $d.Week "State" $.Frame.Panel}} {{end}}