Webiant Logo Webiant Logo
  1. No results found.

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

List.cshtml

@model NewsletterSubscriptionSearchModel

@using Nop.Services.Stores
@using Nop.Services.Localization

@inject IStoreService storeService

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

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

@T("Admin.Promotions.NewsLetterSubscriptions")

@await Component.InvokeAsync(typeof(AdminWidgetViewComponent), new { widgetZone = AdminWidgetZones.NewsLetterSubscriptionListButtons, additionalData = Model })
@await Html.PartialAsync("Table", new DataTablesModel { Name = "newsletter-subscriptions-grid", UrlRead = new DataUrl("SubscriptionList", "NewsLetterSubscription", null), UrlDelete = new DataUrl("SubscriptionDelete", "NewsLetterSubscription", null), UrlUpdate = new DataUrl("SubscriptionUpdate", "NewsLetterSubscription", null), SearchButtonId = "search-subscriptions", Length = Model.PageSize, LengthMenu = Model.AvailablePageSizes, Filters = new List { new FilterParameter(nameof(Model.StartDate), typeof(DateTime?)), new FilterParameter(nameof(Model.EndDate), typeof(DateTime?)), new FilterParameter(nameof(Model.SearchEmail)), new FilterParameter(nameof(Model.ActiveId)), new FilterParameter(nameof(Model.StoreId)), new FilterParameter(nameof(Model.CustomerRoleId)) }, ColumnCollection = new List { new ColumnProperty(nameof(NewsletterSubscriptionModel.Email)) { Title = T("Admin.Promotions.NewsLetterSubscriptions.Fields.Email").Text, Width = "300", Editable = true, EditType = EditType.String }, new ColumnProperty(nameof(NewsletterSubscriptionModel.Active)) { Title = T("Admin.Promotions.NewsLetterSubscriptions.Fields.Active").Text, Width = "100", ClassName = NopColumnClassDefaults.CenterAll, Render = new RenderBoolean(), Editable = true, EditType = EditType.Checkbox }, new ColumnProperty(nameof(NewsletterSubscriptionModel.StoreName)) { Title = T("Admin.Promotions.NewsLetterSubscriptions.Fields.Store").Text, Width = "150", Visible = (await storeService.GetAllStoresAsync()).Count > 1 }, new ColumnProperty(nameof(NewsletterSubscriptionModel.LanguageName)) { Title = T("Admin.Promotions.NewsLetterSubscriptions.Fields.Language").Text, Width = "150" }, new ColumnProperty(nameof(NewsletterSubscriptionModel.CreatedOn)) { Title = T("Admin.Promotions.NewsLetterSubscriptions.Fields.CreatedOn").Text, Width = "200" }, new ColumnProperty(nameof(NewsletterSubscriptionModel.Id)) { Title = T("Admin.Common.Edit").Text, Width = "200", ClassName = NopColumnClassDefaults.Button, Render = new RenderButtonsInlineEdit() }, new ColumnProperty(nameof(NewsletterSubscriptionModel.Id)) { Title = T("Admin.Common.Delete").Text, Width = "100", Render = new RenderButtonRemove(T("Admin.Common.Delete").Text), ClassName = NopColumnClassDefaults.Button } } })
@*import emails form*@