{{ define "thread/post" }}
{{ if .Thread }}
{{ else }} {{ end }} {{ if .PreviousError }} {{ end }} {{ if ne .Config.Captcha.Mode "disabled" }} {{ end }}
Error {{.PreviousError}}
TripCode
Comment
Image File
Captcha {{ $captchaId := makeCaptcha }} Captcha Image

{{ end }} {{ define "thread/reply" }} {{dateFromID .Reply.ID | formatDate}} {{ if .Session }} {{ if eq (.Session.CAttr "mode") "admin" }}
{{ end }} {{ end }} {{printf "[SpamScore: %f]" (rateSpam .Reply.Text) }} No.{{.Reply.ID}} {{ if .Reply.Thumbnail }}
{{ end }} {{ if .Reply.Metadata.deleted }}
{{ renderText .Reply.Text }}
{{ else }}
{{ renderText .Reply.Text}}
{{ end }} {{ end }} {{ define "thread/main" }}
{{ $boardlink := .Board.ShortName }} {{ $threadrid := .Thread.GetReply.ID }} {{ $threadid := .Thread.ID }} {{ $csrf := .CSRFToken }} {{ $session := .Session }} {{ with .Thread }} {{ with .GetReply }} {{ with dict "Reply" . "Boardlink" $boardlink "CSRF" $csrf "ThreadID" $threadid "Session" $session }} {{ template "thread/reply" . }} {{ end }} {{ end }} {{range .GetReplies}} {{ if ne .ID $threadrid }}
>> {{ with dict "Reply" . "Boardlink" $boardlink "CSRF" $csrf "ThreadID" $threadid "Session" $session }} {{ template "thread/reply" . }} {{ end }}
{{end}} {{end}} {{end}}

{{ end }} {{ template "thread/main" . }}