@model IEnumerable<MVC121.Areas.Administrator.Models.Comment>

@{
    ViewBag.Title = "مدیریت دیدگاهها";
    Layout = "~/Areas/Administrator/Views/Shared/_Layout.cshtml";
}
<hr />

<img src="~/Areas/Administrator/img/comment_s.png" alt="category" />

<h2>مدیریت دیدگاه</h2>

<p>
    @Html.ActionLink("دیدگاه جدید", "Create")
</p>
<table class="table">
    <tr>
        <th>
            @Html.DisplayNameFor(model => model.Post.Name)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Name)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Email)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.URL)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.PublishTime)
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.Post.Name)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Name)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Email)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.URL)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.PublishTime)
        </td>
        <td>
            @Html.ActionLink("جزئیات", "Details", new { id = item.ID }, new { @class = "btn btn-success" }) |
            @Html.ActionLink("ویرایش", "Edit", new { id = item.ID }, new { @class = "btn btn-warning" }) |
            @Html.ActionLink("حذف", "Delete", new { id = item.ID }, new { @class = "btn btn-danger" })
        </td>
    </tr>
}

</table>
