Skip to content

Open-source eCommerce platform for C# and ASP.NET Core 10 with MongoDB. Build multi-store shops and multi-vendor marketplaces with B2B/B2C, REST API, plugins, Vue 3 and Docker.

1.8 KB
Raw Blame
@{
    //page title
    ViewBag.Title = Loc["Admin.Content.Blog.Comments"];
    string filterByBlogPostId = ViewBag.FilterByBlogPostId;
    var area = ViewContext.RouteData.Values["area"]?.ToString();
    var readUrl = !string.IsNullOrEmpty(filterByBlogPostId) ? Url.Action("Comments", "Blog", new { filterByBlogPostId, area }) : Url.Action("Comments", "Blog", new { area });
}

<admin-page title="@Loc["Admin.Content.Blog.Comments"]" icon="bi-chat">
    <admin-card flush>
        <admin-grid id="comments-grid"
                    read-url="@readUrl"
                    destroy-url="@Url.Action("CommentDelete", "Blog", new { area })"
                    confirm-destroy="true">
            <grid-column field="BlogPostTitle" title="@Loc["Admin.Content.Blog.Comments.Fields.BlogPost"]" width="200">
                <cell-template>
                    <a class="text-decoration-none" href="@Url.Action("Edit", "Blog", new { area })/{{ BlogPostId }}">{{ BlogPostTitle }}</a>
                </cell-template>
            </grid-column>
            <grid-column field="CustomerId" title="@Loc["Admin.Content.Blog.Comments.Fields.Customer"]" width="200">
                <cell-template>
                    <a class="text-decoration-none" href="@Url.Action("Edit", "Customer", new { area })/{{ CustomerId }}">{{ CustomerInfo }}</a>
                </cell-template>
            </grid-column>
            @*Comment is encoded and has its line breaks turned into <br /> by the server (FormatText)*@
            <grid-column field="Comment" title="@Loc["Admin.Content.Blog.Comments.Fields.Comment"]" encoded="false"/>
            <grid-column field="CreatedOn" title="@Loc["Admin.Content.Blog.Comments.Fields.CreatedOn"]" width="200" format="{0:G}"/>
            <grid-commands destroy="true" title="@Loc["Admin.Common.Delete"]" width="100"/>
        </admin-grid>
    </admin-card>
</admin-page>