@model DatesRangesSearchModel

<div class="card-body">
    <p>
        <em>@T("Admin.Configuration.Shipping.ProductAvailabilityRanges.Hint")</em>
    </p>
    @await Html.PartialAsync("Table", new DataTablesModel
    {
        Name = "productavailabilityrange-grid",
        UrlRead = new DataUrl("ProductAvailabilityRanges", "Shipping", null),
        SearchButtonId = "search-categories",
        Length = Model.ProductAvailabilityRangeSearchModel.PageSize,
        LengthMenu = Model.ProductAvailabilityRangeSearchModel.AvailablePageSizes,
        ColumnCollection = new List<ColumnProperty>
        {
            new ColumnProperty(nameof(ProductAvailabilityRangeModel.Name))
            {
                Title = T("Admin.Configuration.Shipping.ProductAvailabilityRanges.Fields.Name").Text
            },
            new ColumnProperty(nameof(ProductAvailabilityRangeModel.DisplayOrder))
            {
                Title = T("Admin.Configuration.Shipping.ProductAvailabilityRanges.Fields.DisplayOrder").Text,
                Width = "150",
                ClassName =  NopColumnClassDefaults.CenterAll
            },
            new ColumnProperty(nameof(ProductAvailabilityRangeModel.Id))
            {
                Title = T("Admin.Common.Edit").Text,
                Width = "100",
                ClassName =  NopColumnClassDefaults.Button,
                Render = new RenderButtonEdit(new DataUrl("~/Admin/Shipping/EditProductAvailabilityRange"))
            }
        }
    })
</div>
<div class="card-footer">
    <a asp-action="CreateProductAvailabilityRange" class="btn btn-primary">
        <i class="fas fa-square-plus"></i>
        @T("Admin.Common.AddNew")
    </a>
</div>         