{{define "topic.html"}}{{template "head" .}} {{$b := .Body}}{{$csrf := .CSRF}}{{$me := .User}}

{{$b.Root.Subject}}

Discussion in '{{$b.Area.Name}}' started by {{$b.Root.From}}, {{ago $b.Root.Created}}.

{{with $b.Poll}}

?

{{$b.Root.Subject}}

{{if or .Voted (not $me)}}
    {{range $i, $a := .Answers}}
  1. {{$a.Text}}{{if $a.Mine}} (you voted){{end}}

    {{$a.Count}} vote(s){{$a.Pct}}%
  2. {{end}}

Total voters: {{.Total}}{{if not $me}} · Log in to vote{{end}}

{{end}} {{if $me}}
{{range .Answers}}{{end}}
{{end}}
{{end}}
    {{range $b.Posts}}
  1. {{if .Author}}{{template "avatar" (av .M.From "large")}}{{else}}{{template "avatar" (av .M.From "large")}}{{end}}

    {{if .Author}}{{.M.From}}{{else}}{{.M.From}}{{end}}{{template "flag" .}} {{if .Author}}{{if .Author.Sysop}}Administrator{{else if ge .Author.Posts 100}}Well-Known Member{{else if ge .Author.Posts 30}}Active Member{{else}}New Member{{end}}{{else}}Guest{{end}} {{if .Author}}{{if .Author.Sysop}}Staff Member{{end}}{{end}}

    {{if .Author}}
    Joined:
    {{monthyear .Author.Created}}
    Messages:
    {{num .Author.Posts}}
    {{if .Author.Location}}
    Location:
    {{.Author.Location}}
    {{end}}
    {{end}}
    {{body .M.Body}}
    {{.M.From}}, {{ago .M.Created}}{{if .CanDelete}}
    {{end}}
    #{{.Num}} {{if .CanLike}}
    {{end}} {{if $b.CanPost}}Reply{{end}}
    {{if .Likes}}
    {{plural .Likes "person likes" "people like"}} this.
    {{end}}
  2. {{end}}
{{if $b.CanPost}}
{{if $b.QuoteID}}{{end}}
{{template "avatar" (av $me.Name "large")}}
{{if $b.Aliases}}{{else}}Quote with > at the start of a line.{{end}}
{{else if not .User}}
You must log in or sign up to reply here.
{{end}} {{template "foot" .}}{{end}}