diff --git a/appview/pages/pages.go b/appview/pages/pages.go
index 27673b97..9e21f97c 100644
--- a/appview/pages/pages.go
+++ b/appview/pages/pages.go
@@ -1595,6 +1595,7 @@ type SingleStringParams struct {
IsStarred bool
StarCount int
Owner identity.Identity
+ CommentList []models.CommentListItem
}
func (p *Pages) SingleString(w io.Writer, params SingleStringParams) error {
diff --git a/appview/pages/templates/strings/string.html b/appview/pages/templates/strings/string.html
index f0fd65f1..f46d8d59 100644
--- a/appview/pages/templates/strings/string.html
+++ b/appview/pages/templates/strings/string.html
@@ -94,4 +94,61 @@
{{ template "fragments/multiline-select" }}
+
+ {{
+ template "fragments/comment/commentList"
+ (dict
+ "LoggedInUser" .LoggedInUser
+ "CommentList" .CommentList)
+ }}
+ {{ template "newComment" . }}
+
+{{ end }}
+
+{{ define "newComment" }}
+ {{ if .LoggedInUser }}
+
+ {{ else }}
+
+ {{ end }}
{{ end }}
diff --git a/appview/strings/strings.go b/appview/strings/strings.go
index 1c6627ac..f2465e89 100644
--- a/appview/strings/strings.go
+++ b/appview/strings/strings.go
@@ -156,6 +156,11 @@ func (s *Strings) contents(w http.ResponseWriter, r *http.Request) {
isStarred = db.GetStarStatus(s.Db, user.Active.Did, string.AtUri())
}
+ comments, err := db.GetComments(s.Db, orm.FilterEq("subject_uri", string.AtUri()))
+ if err != nil {
+ l.Error("failed to get comments", "err", err)
+ }
+
s.Pages.SingleString(w, pages.SingleStringParams{
LoggedInUser: user,
RenderToggle: renderToggle,
@@ -165,6 +170,7 @@ func (s *Strings) contents(w http.ResponseWriter, r *http.Request) {
IsStarred: isStarred,
StarCount: starCount,
Owner: id,
+ CommentList: models.NewCommentList(comments),
})
}