{{/* abono/owner-members: GET /admin/members, every holding with its status and where it came from, "sync with Stripe now", the paying subscriptions no plan recognises (each with a form that puts it onto a plan), and the form that gives a free membership (a comp). A comp still granting has a link to its own confirm page, which ends it. A subscription held only by abono's 30-day backstop is flagged with the day access stops. Data: Title string, the page title's message key On bool, Stripe (or the sandbox) is configured Members []abonoMember, {Subject, Label, Holding, EndURL}: Label is what to call the member Unrecognised []abonoUnrecognised, {SubscriptionID, PriceID, Subject, Label, ...}; empty while Stripe is off Now time.Time, the moment holdings are described at Offers []abono.Offer, the plans a comp can give PlanOptions []abonoOption, the same as field-select options AdoptOptions []abonoOption, the plans, none selected, for adopting Form abonoCompForm, {Member, Plan, Ends, Note, Errors}: the comp form as posted, Errors a message key by field SyncAction string, where "sync now" posts CompAction string, where the comp form posts AdoptAction string, where an adopt form posts (with from=members) StripeURL string, the Stripe page Done *abonoNotice, {Kind, N, Plan}: what the last action did Error string, a message key, or "" L the request's localizer */}} {{define "content"}}{{$L := localizer $}} {{template "page-header" dict "L" $L "Title" (T $L .Title) "Sub" (T $L "abono.owner.members_intro")}} {{with .Done}}{{if eq .Kind "sync"}}{{if eq .N 1}}{{template "notice" (T $L "abono.owner.sync_done_one")}}{{else}}{{template "notice" (Tf $L "abono.owner.sync_done" "n" .N)}}{{end}}{{else if eq .Kind "comp"}}{{template "notice" (Tf $L "abono.owner.free_given" "plan" .Plan)}}{{else if eq .Kind "end"}}{{template "notice" (T $L "abono.owner.end_done")}}{{else if eq .Kind "adopt"}}{{template "notice" (Tf $L "abono.owner.adopted" "plan" .Plan)}}{{end}}{{end}} {{with .Error}}{{template "callout" dict "L" $L "Tone" "negative" "Focus" true "Body" (T $L .)}}{{end}} {{if .On}}
{{T $L "abono.owner.sync_help"}}
{{else}}{{T $L "abono.owner.nothing_for_sale"}} {{T $L "abono.owner.stripe_title"}}
{{end}} {{if .Members}}| {{T $L "abono.owner.col_member"}} | {{T $L "abono.owner.col_plan"}} | {{T $L "abono.owner.col_status"}} | {{T $L "abono.owner.col_source"}} |
|---|---|---|---|
| {{.Label}} | {{.Plan}} | {{template "abono-status" dict "L" $L "Holding" .Holding "Now" $.Now}}{{if .Holding.Backstop}}{{$s := .Holding.Describe $.Now}} {{$s.Sentence (T $L "abono.owner.backstop") ""}}{{end}} | {{if eq .Source "comp"}}{{T $L "abono.owner.source_free"}}{{with .EndURL}} {{T $L "abono.button.end_free"}}{{end}}{{else}}{{T $L "abono.owner.source_paid"}}{{end}} |
{{T $L "abono.owner.unrecognised_body"}}
{{T $L "abono.owner.unrecognised_warn"}}
{{range .Unrecognised}} {{end}} {{else}}{{T $L "abono.owner.unrecognised_none"}}
{{end}}{{T $L "abono.owner.free_help"}}