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

{{$b.Root.Subject}}

{{with $b.Poll}}

{{$b.Root.Subject}}

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

    {{$a.Count}} vote(s){{$a.Pct}}%
  • {{end}}
Total voters {{.Total}}{{if not $me}} · Log in to vote{{end}}
{{end}} {{if $me}}
{{range .Answers}}{{end}}
{{end}}
{{end}}
{{template "pages" $b.Pages}}
{{range $b.Posts}}
{{if .Author}}{{template "avatar" (av .M.From "m")}}{{else}}{{template "avatar" (av .M.From "m")}}{{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}}
{{if .CanDelete}}
{{end}}
{{if .CanLike}}
{{end}} {{if $b.CanPost}} Reply{{end}}
{{if .Likes}}
{{plural .Likes "member" "members"}}
{{end}}
{{end}}
{{template "pages" $b.Pages}}{{$b.Area.Name}}
{{if $b.CanPost}}
{{if $b.QuoteID}}{{end}}
{{template "avatar" (av $me.Name "s")}}
{{if $b.Aliases}}{{else}}Quote with > at the start of a line.{{end}}
{{else if not .User}}
You must log in{{if .Register}} or register{{end}} to reply here.
{{end}} {{template "foot" .}}{{end}}