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

Post reply

{{end}}

Posts [ {{num $b.Count}} ] {{$b.Root.Subject}}

{{with $b.Poll}}

Poll

{{$b.Root.Subject}}

{{if or .Voted (not $me)}}
    {{range $i, $a := .Answers}}{{$a.Text}} {{$a.Pct}}% [{{$a.Count}}]{{end}}

Users voted: {{.Total}}{{if not $me}} · Login to vote{{end}}

{{end}} {{if $me}}
{{if .Voted}}Change vote{{else}}Vote{{end}} {{range .Answers}}
{{end}}
{{end}}
{{end}}
{{range $b.Posts}}

{{.Num}}

{{if ne .Num 1}}Re: {{end}}{{$b.Root.Subject}}

{{body .M.Body}}
{{if .Likes}}
{{plural .Likes "member likes" "members like"}} this post.
{{end}}

{{if .Author}}{{end}}

{{if .CanLike}}

{{end}} {{if .CanDelete}}
{{end}} {{if $b.CanPost}}Quote{{end}}

{{end}}

Posts [ {{num $b.Count}} ]

{{template "pages" $b.Pages}} {{if $b.CanPost}}

Post reply

{{end}}
{{if $b.CanPost}}

Quick reply to “{{$b.Root.Subject}}”

{{if $b.QuoteID}}{{end}}
Compose your post
{{if $b.Aliases}}
{{end}}
{{else if not .User}}

You must login to post a reply.

{{end}} {{template "foot" .}}{{end}}