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.5 KB
Raw Blame
@model BlogPostModel
@{
    var area = ViewContext.RouteData.Values["area"]?.ToString();
}
@if (!string.IsNullOrEmpty(Model.Id))
{
    <partial name="Partials/WidgetZone.Comments.Top" model="Model"/>
    <admin-card flush>
        <admin-grid id="comments-grid"
                    read-url="@Url.Action("Comments", "Blog", new { filterByBlogPostId = Model.Id, area })"
                    destroy-url="@Url.Action("CommentDelete", "Blog", new { area })"
                    confirm-destroy="true">
            <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>
    <partial name="Partials/WidgetZone.Comments.Bottom" model="Model"/>
}
else
{
    <div class="note note-info">
        @Loc["Admin.Content.Blog.BlogPosts.SaveBeforeEdit"]
    </div>
}