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

Poll: {{$b.Root.Subject}}

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

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}} {{range $b.Posts}}

#{{.Num}} {{stamp .M.Created}}

{{if .Author}}{{.M.From}}{{else}}{{.M.From}}{{end}}{{template "flag" .}}
{{if .Author}}{{if .Author.Sysop}}Administrator{{else if ge .Author.Posts 50}}Member{{else}}New member{{end}}{{else}}Guest{{end}}
{{template "avatar" (av .M.From "large")}}
{{if .Author}}{{if .Author.Location}}
From: {{.Author.Location}}
{{end}}
Registered: {{ymd .Author.Created}}
Posts: {{num .Author.Posts}}
{{else if .Where}}
From: {{.Where}}
{{end}}

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

{{body .M.Body}}
{{if .Likes}}

{{end}}

{{if .Author}}Offline{{else}}Guest{{end}}

    {{if .CanLike}}
  • {{end}} {{if .CanDelete}}
  • {{end}} {{if $b.CanPost}}
  • Quote
  • {{end}}
{{end}}
{{template "pages" $b.Pages}}{{if $b.CanPost}}{{end}}
{{template "crumbs" .}}
{{if $b.CanPost}}

Quick post

{{if $b.QuoteID}}{{end}}
Write your message and submit

{{else if not .User}}

You must login to post a reply.

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