<%@ Page Language="C#" Inherits="Orchard.Mvc.ViewPage" %> <%@ Import Namespace="Orchard.Comments.Models"%> <%@ Import Namespace="Orchard.Comments.ViewModels"%>

<%=Html.TitleForPage(T("Manage Comments").ToString())%>

<% using(Html.BeginFormAntiForgeryPost()) { %> <%=Html.ValidationSummary() %>
" />
"/>
"> <% int commentIndex = 0; foreach (var commentEntry in Model.Comments) { var ci = commentIndex; %> <% commentIndex++; } %>
 ↓<%-- todo: (heskew) something more appropriate for "this applies to the bulk actions --%> <%=_Encoded("Status") %> <%=_Encoded("Author") %> <%=_Encoded("Comment") %> <%=_Encoded("Date") %> <%=_Encoded("Commented On") %>
<% if (commentEntry.Comment.Status == CommentStatus.Spam) { %><%=_Encoded("Spam") %><% } else if (commentEntry.Comment.Status == CommentStatus.Pending) { %><%=_Encoded("Pending") %><% } else { %><%=_Encoded("Approved") %><% } %> <%: commentEntry.Comment.UserName %> <% if (commentEntry.Comment.CommentText != null) {%> <%-- todo: (heskew) same text processing comment as on the public display, also need to use the ellipsis character instead of ... --%> <%: commentEntry.Comment.CommentText.Length > 23 ? commentEntry.Comment.CommentText.Substring(0, 24) : commentEntry.Comment.CommentText %><%=_Encoded(" ...") %> <% } %> <%=Html.DateTime(commentEntry.Comment.CommentDateUtc.GetValueOrDefault()) %> <%=Html.ActionLink(commentEntry.CommentedOn, "Details", new { id = commentEntry.Comment.CommentedOn }) %>
  • " title="<%=_Encoded("Edit")%>"><%=_Encoded("Edit")%>
  • <%-- a form in a form doesn't quite work <% using (Html.BeginFormAntiForgeryPost(Url.Action("Delete", new {id = commentEntry.Comment.Id, redirectToAction = "Details"}), FormMethod.Post, new { @class = "inline" })) { %>
    <% } %> --%>
<% } %>