{{/* abono/plan: GET /subscribe/{plan}, one plan with a card per interval it is sold at and a promotion code field, and the page a failed POST /subscribe/{plan} comes back to with its message. Data: Title string, the page title's message key Open bool, something is for sale Cards []abonoCard, this plan's cards; none when the plan is not on sale SignedIn bool PlansURL string, the pricing page Error string, a message key, or "" L the request's localizer */}} {{define "content"}}{{$L := localizer $}} {{template "back-nav" dict "Href" .PlansURL "Label" (T $L "abono.pages.plan_back")}} {{if .Cards}}{{$offer := (index .Cards 0).Offer}} {{if gt (len .Cards) 1}}{{template "page-header" dict "L" $L "Title" $offer.Name "Sub" (T $L "abono.pages.plan_intro")}}{{else}}{{template "page-header" dict "L" $L "Title" $offer.Name}}{{end}} {{with .Error}}{{template "callout" dict "L" $L "Tone" "negative" "Focus" true "Body" (T $L .)}}{{end}} {{range .Cards}}{{template "abono-plan-card" dict "L" $L "Offer" .Offer "Interval" .Interval "Action" .Action "Code" true}} {{end}} {{if not .SignedIn}}
{{T $L "abono.pages.plan_signed_out"}}
{{end}} {{else if .Open}} {{template "page-header" dict "L" $L "Title" (T $L "abono.pages.pricing_title")}} {{with .Error}}{{template "callout" dict "L" $L "Tone" "negative" "Focus" true "Body" (T $L .)}}{{end}} {{else}} {{template "page-header" dict "L" $L "Title" (T $L "abono.pages.pricing_title")}} {{with .Error}}{{template "callout" dict "L" $L "Tone" "negative" "Focus" true "Body" (T $L .)}}{{end}} {{template "empty-state" dict "L" $L "Title" (T $L "abono.pages.closed_title") "Body" (T $L "abono.pages.closed_body")}} {{end}} {{end}}