diff --git a/app/views/Admin/comments.asp b/app/views/Admin/comments.asp new file mode 100644 index 0000000..391589a --- /dev/null +++ b/app/views/Admin/comments.asp @@ -0,0 +1,88 @@ +
+
+

Manage Comments

+

Approve comments before they appear on posts.

+
+ ← Back to dashboard +
+ +<% If comments.Count = 0 Then %> +
No comments yet.
+<% Else %> +
+ + + + + + + + + + + + <% + Dim adminCommentIter, adminCommentItem, adminCommentPost, adminCommentPostTitle, adminCommentPostUrl + Set adminCommentIter = comments.Iterator() + Do While adminCommentIter.HasNext + Set adminCommentItem = adminCommentIter.GetNext() + adminCommentPostTitle = "Post #" & CStr(adminCommentItem.PostID) + adminCommentPostUrl = "" + Set adminCommentPost = Nothing + + On Error Resume Next + Set adminCommentPost = PostsRepository().FindByID(adminCommentItem.PostID) + If Err.Number = 0 Then + adminCommentPostTitle = adminCommentPost.Title + adminCommentPostUrl = PostUrl(adminCommentPost.Slug) + End If + Err.Clear + On Error GoTo 0 + %> + + + + + + + + <% + Loop + %> + +
CommentPostStatusCreatedActions
+ <%= H(adminCommentItem.AuthorName) %> + <% If Len(Trim(CStr(adminCommentItem.AuthorEmail))) > 0 Then %> +
<%= H(adminCommentItem.AuthorEmail) %>
+ <% End If %> +
<%= H(adminCommentItem.Body) %>
+
+ <% If Len(adminCommentPostUrl) > 0 Then %> + <%= H(adminCommentPostTitle) %> + <% Else %> + <%= H(adminCommentPostTitle) %> + <% End If %> + + <% If adminCommentItem.IsApproved = 1 Then %> + Approved + <% Else %> + Pending + <% End If %> + + <%= H(FormatDateTime(adminCommentItem.CreatedDate, vbShortDate)) %> + + <% If adminCommentItem.IsApproved = 1 Then %> +
+ +
+ <% Else %> +
+ +
+ <% End If %> +
+ +
+
+
+<% End If %>