gophertype/pvt-www/_builtin/comments/comments.partial.gohtml

28 lines
554 B
Plaintext

<hr>
<h1 id="comments">Comments</h1>
<p>
There
{{ if eq (len .V.Comments) 1 }}
is one comment
{{ else if eq (len .V.Comments) 0 }}
are no comments
{{ else }}
are {{ len .V.Comments }} comments
{{ end }}
on this page.
</p>
{{ range .V.Comments }}
{{ RenderComment $.ResponseWriter $.Request . $.V.OriginURL true }}
{{ end }}
<h3 id="add-comment">Add a Comment</h3>
{{ if .V.Readonly }}
<em>Comments are disabled on this page.</em>
{{ else }}
{{ RenderCommentForm .Request .V.NewComment .V.Subject .V.ThreadID .V.OriginURL }}
{{ end }}