{{ if not .Comment }}
<div class="outline">
<form action="/savecomment" method="POST">
<input type="hidden" name="CSRF" value="{{ .SaveCSRF }}">
<input type="hidden" name="parentxid" value="{{ .Parent.Xid }}">
<input type="hidden" name="postxid" value="{{ .Post.Xid }}">
Create a new comment.
<br><textarea class="medium" tabindex=1 name="content"></textarea>
<br><button tabindex=1>create</button>
</form>
</div>
{{ else }}
{{ template "fragcomment.html" map "Comment" .Comment "UserInfo" .UserInfo }}
<div class="outline">
{{ if .Comment.CanEdit .UserInfo }}
<form action="/savecomment" method="POST">
<input type="hidden" name="CSRF" value="{{ .SaveCSRF }}">
<input type="hidden" name="commentxid" value="{{ .Comment.Xid }}">
<input type="hidden" name="update" value="1">
<p><label for=content>comment:</label><br>
<textarea class="medium" tabindex=1 name="content">{{ .Comment.Content }}</textarea>
<br><button tabindex=1>update</button>
</form>
{{ end }}
<form action="/savecomment" method="POST">
<input type="hidden" name="CSRF" value="{{ .SaveCSRF }}">
<input type="hidden" name="commentxid" value="{{ .Comment.Xid }}">
<input type="hidden" name="delete" value="1">
<p><label for=confirm>confirm:</label><br>
<input tabindex=1 type="text" name="confirm" autocomplete=off>
<p><button tabindex=1>delete</button>
</form>
</div>
{{ end }}

