Webiant Logo Webiant Logo
  1. No results found.

    Try your search with a different keyword or use * as a wildcard.

BlogPosts.cshtml

@model BlogContentModel

@{
    //page title
    ViewBag.PageTitle = T("Admin.ContentManagement.Blog.BlogPosts").Text;
    //active menu item (system name)
    NopHtml.SetActiveMenuItemSystemName("Blog posts");
}

@{
    const string hideSearchBlockAttributeName = "BlogPostsPage.HideSearchBlock";
    var hideSearchBlock = await genericAttributeService.GetAttributeAsync(await workContext.GetCurrentCustomerAsync(), hideSearchBlockAttributeName);
}


@T("Admin.ContentManagement.Blog.BlogPosts")

@T("Admin.Common.AddNew") @await Component.InvokeAsync(typeof(AdminWidgetViewComponent), new { widgetZone = AdminWidgetZones.BlogListButtons, additionalData = Model })
@*hide the entire search block if no elements are displayed*@
@await Html.PartialAsync("Table", new DataTablesModel { Name = "blogpost-grid", UrlRead = new DataUrl("List", "Blog", null), SearchButtonId = "search-blogpost", Length = Model.BlogPosts.PageSize, LengthMenu = Model.BlogPosts.AvailablePageSizes, Filters = new List { new FilterParameter(nameof(Model.BlogPosts.SearchStoreId), nameof(Model.BlogPosts)), new FilterParameter(nameof(Model.SearchTitle)) }, ColumnCollection = new List { new ColumnProperty(nameof(BlogPostModel.Title)) { Title = T("Admin.ContentManagement.Blog.BlogPosts.Fields.Title").Text, Width = "400" }, new ColumnProperty(nameof(BlogPostModel.LanguageName)) { Title = T("Admin.ContentManagement.Blog.BlogPosts.Fields.Language").Text, Width = "150" }, new ColumnProperty(nameof(BlogPostModel.Id)) { Title = T("Admin.ContentManagement.Blog.BlogPosts.Fields.Comments").Text, Width = "200", ClassName = NopColumnClassDefaults.Button, Render = new RenderCustom("renderColumnComments") }, new ColumnProperty(nameof(BlogPostModel.StartDateUtc)) { Title = T("Admin.ContentManagement.Blog.BlogPosts.Fields.StartDate").Text, Width = "200", Render = new RenderDate() }, new ColumnProperty(nameof(BlogPostModel.EndDateUtc)) { Title = T("Admin.ContentManagement.Blog.BlogPosts.Fields.EndDate").Text, Width = "200", Render = new RenderDate() }, new ColumnProperty(nameof(BlogPostModel.CreatedOn)) { Title = T("Admin.ContentManagement.Blog.BlogPosts.Fields.CreatedOn").Text, Width = "200", Render = new RenderDate() }, new ColumnProperty(nameof(BlogPostModel.Id)) { Title = T("Admin.Common.Edit").Text, Width = "100", ClassName = NopColumnClassDefaults.Button, Render = new RenderButtonEdit(new DataUrl("BlogPostEdit")) } } })