{{define "topic.html"}}{{template "head" .}} {{$b := .Body}}{{$csrf := .CSRF}}{{$me := .User}}
{{template "pages" $b.Pages}} {{if $b.CanPost}}Reply{{end}}
{{with $b.Poll}}
Poll: {{$b.Root.Subject}}
{{if or .Voted (not $me)}} {{range $i, $a := .Answers}}{{end}}
{{$a.Text}}{{if $a.Mine}} (your vote){{end}}{{$a.Count}} ({{$a.Pct}}%)
Total votes: {{.Total}}{{if not $me}} · Login to vote{{end}}
{{end}} {{if $me}}
{{if .Voted}}Change your vote{{else}}Cast your vote{{end}}: {{range .Answers}}{{end}}
{{end}}
{{end}}
{{$b.Root.Subject}} ({{plural $b.Count "post" "posts"}})
{{range $b.Posts}}
{{if ne .Num 1}}Reply #{{add .Num -1}} - {{end}}{{template "yydate" .M.Created}}
{{template "avatar" (av .M.From "large")}}
{{if .Author}}{{.M.From}}{{else}}{{.M.From}}{{end}}{{template "flag" .}}   Offline
{{if .Author}}{{template "yyrank" .Author}}{{if .Author.Location}}
{{.Author.Location}}{{end}}{{else}}Guest{{if .Where}}
{{.Where}}{{end}}{{end}}
{{if .Author}}
Posts: {{num .Author.Posts}}
{{template "yystars" .Author}}
{{end}}
{{if $b.CanPost}}Quote{{end}} {{if .CanLike}}
{{end}} {{if .CanDelete}}
{{end}}
{{body .M.Body}}
{{if .Likes}}
{{plural .Likes "member likes" "members like"}} this post.
{{end}}
{{end}}
{{template "pages" $b.Pages}} {{if $b.CanPost}}Reply{{end}}
{{if $b.CanPost}}
{{if $b.QuoteID}}{{end}}
Quick Reply
Subject: Re: {{$b.Root.Subject}}
Quote with > at the start of a line.
{{if $b.Aliases}}{{end}}
{{else if not .User}}

Please login to reply to this topic.

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