Webiant Logo Webiant Logo
  1. No results found.

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

List.cshtml

@model CampaignSearchModel

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

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


@T("Admin.Promotions.Campaigns")

@T("Admin.Common.AddNew") @await Component.InvokeAsync(typeof(AdminWidgetViewComponent), new { widgetZone = AdminWidgetZones.CampaignListButtons, additionalData = Model })
@*hide the entire search block if no elements are displayed*@
@await Html.PartialAsync("Table", new DataTablesModel { Name = "campaigns-grid", UrlRead = new DataUrl("List", "Campaign", null), SearchButtonId = "search-campaigns", Length = Model.PageSize, LengthMenu = Model.AvailablePageSizes, Filters = new List { new FilterParameter(nameof(Model.StoreId)) }, ColumnCollection = new List { new ColumnProperty(nameof(CampaignModel.Name)) { Title = T("Admin.Promotions.Campaigns.Fields.Name").Text }, new ColumnProperty(nameof(CampaignModel.CreatedOn)) { Title = T("Admin.Promotions.Campaigns.Fields.CreatedOn").Text, Width = "200", Render = new RenderDate() }, new ColumnProperty(nameof(CampaignModel.DontSendBeforeDate)) { Title = T("Admin.Promotions.Campaigns.Fields.DontSendBeforeDate").Text, Width = "200", Render = new RenderDate() }, new ColumnProperty(nameof(CampaignModel.Id)) { Title = T("Admin.Common.Edit").Text, Width = "100", ClassName = NopColumnClassDefaults.Button, Render = new RenderButtonEdit(new DataUrl("Edit")) } } })