<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage" %> <%@ Import Namespace="Orchard.Comments.Models"%> <%@ Import Namespace="Orchard.Comments.ViewModels"%> <%@ Import Namespace="Orchard.Mvc.Html"%> <% Html.Include("Header"); %> <% Html.BeginForm(); %>

Manage Comments

<%=Html.ValidationSummary() %>
<% int commentIndex = 0; foreach (var commentEntry in Model.Comments) { %> <% commentIndex++; } %>
<%----%> Status Author Comment Date Commented On
<% if (commentEntry.Comment.Status == CommentStatus.Spam) {%> Spam <% } %> <% else {%> Approved <% } %> <%= commentEntry.Comment.UserName %> <% if (commentEntry.Comment.CommentText != null) {%> <%= commentEntry.Comment.CommentText.Length > 23 ? commentEntry.Comment.CommentText.Substring(0, 24) : commentEntry.Comment.CommentText %> ... <% } %> <%= commentEntry.Comment.CommentDate %> <%=Html.ActionLink(commentEntry.CommentedOn, "Details", new {id = commentEntry.Comment.CommentedOn}) %> <%=Html.ActionLink("Edit", "Edit", new {commentEntry.Comment.Id}) %> | <%=Html.ActionLink("Delete", "Delete", new {id = commentEntry.Comment.Id, redirectToAction = "Index"}) %>
<% Html.EndForm(); %> <% Html.Include("Footer"); %>