{{define "topic.html"}}{{template "head" .}} {{$b := .Body}}{{$csrf := .CSRF}}{{$me := .User}} {{template "pollbox" .}}
{{template "pages" $b.Pages}}
{{if $b.CanPost}}New Reply Post Thread{{end}}

{{range $b.Posts}}{{$alt := "trow1"}}{{if not (odd .Num)}}{{$alt = "trow2"}}{{end}} {{end}}
« {{$b.Area.Name}}
{{$b.Root.Subject}}
{{if .Author}}{{.M.From}}{{else}}{{.M.From}}{{end}}{{template "flag" .}}
{{if .Author}}{{if .Author.Sysop}}Administrator{{else if ge .Author.Posts 100}}Senior Member{{else if ge .Author.Posts 50}}Member{{else}}Junior Member{{end}}{{else}}Unregistered{{end}}
{{if .Author}}{{if .Author.Sysop}}★★★★★{{else if ge .Author.Posts 100}}★★★{{else if ge .Author.Posts 50}}★★{{else}}★{{end}}{{end}}

{{template "avatar" (av .M.From "large")}}
{{if .Author}}Posts: {{num .Author.Posts}}
Joined: {{monthyear .Author.Created}}{{if .Author.Location}}
{{.Author.Location}}{{end}}
{{else if .Where}}{{.Where}}{{end}}
{{.M.Subject}}

{{body .M.Body}}

{{if .Likes}}
{{plural .Likes "member likes" "members like"}} this post.
{{end}}
{{if .Author}}Find{{end}} {{if .CanLike}}
{{end}} {{if .CanDelete}}
{{end}} {{if $b.CanPost}}Quote{{end}}
{{template "pages" $b.Pages}}
{{if $b.CanPost}}New Reply{{end}}

{{template "quickreply" .}} {{template "foot" .}}{{end}} {{define "pollbox"}}{{$b := .Body}}{{$me := .User}}{{with $b.Poll}} {{if or .Voted (not $me)}} {{range $i, $a := .Answers}}{{end}} {{end}} {{if $me}} {{else}}{{end}}
Poll: {{$b.Root.Subject}}
{{$a.Text}}{{if $a.Mine}} *{{end}}{{$a.Count}}{{$a.Pct}}%
Total{{.Total}} vote(s)100%
{{range .Answers}}{{end}}
You must login to vote.

{{end}}{{end}} {{define "quickreply"}}{{$b := .Body}}{{$me := .User}} {{if $b.CanPost}}
{{if $b.QuoteID}}{{end}}
Quick Reply
Message
Type your reply to this message here.

Quote with > at the start of a line.
{{if $b.Aliases}}
{{end}}
{{else if not .User}}

You must login to reply.

{{end}}{{end}}