Webiant Logo Webiant Logo
  1. No results found.

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

CustomerSubscriptions.cshtml

@model CustomerBackInStockSubscriptionsModel

@using Nop.Core.Domain.Catalog

@{    
    Layout = "_ColumnsTwo";

    //title
    NopHtml.AddTitleParts(T("PageTitle.BackInStockSubscriptions").Text);
    //page class
    NopHtml.AppendPageCssClassParts("html-account-page");
    NopHtml.AppendPageCssClassParts("html-back-in-stock-subscription-list-page");
}
@section left
{
    @await Component.InvokeAsync(typeof(CustomerNavigationViewComponent), new { selectedTabId = CustomerNavigationEnum.BackInStockSubscriptions })
}
<div class="page account-page back-in-stock-subscription-list-page">
    <div class="page-title">
        <h1>@T("Account.MyAccount") - @T("Account.BackInStockSubscriptions")</h1>
    </div>
    <div class="page-body">
        @await Component.InvokeAsync(typeof(WidgetViewComponent), new { widgetZone = PublicWidgetZones.CustomerBackInStockSubscriptionsTop, additionalData = Model })
        @if (Model.Subscriptions.Count > 0)
        {
            <div class="description">
                @T("Account.BackInStockSubscriptions.Description")
            </div>
            <script asp-location="Footer">
                $(function() {
                    $('#selectall').on('click', function () {
                        $('.subscription-list .rowcheckbox').prop('checked', $(this).is(':checked')).trigger('change');
                    });

                    $('.subscription-list .rowcheckbox').on('change', function (e) {
                        var numChkBoxes = $('.subscription-list .rowcheckbox').length;
                        var numChkBoxesChecked = $('.subscription-list .rowcheckbox:checked').length;
                        $('#selectall').prop('checked', numChkBoxes == numChkBoxesChecked && numChkBoxes > 0);
                    });
                });
            </script>
            <form asp-route="@NopRouteNames.Standard.CUSTOMER_BACK_IN_STOCK_SUBSCRIPTIONS" method="post">
                <div class="subscription-list">
                    <div class="table-wrapper">
                        <table class="data-table">
                            <colgroup>
                                <col width="1" />
                                <col />
                            </colgroup>
                            <thead>
                            <tr>
                                <th class="select-boxes">
                                    <input type="checkbox" id="selectall" />
                                </th>
                                <th class="product">
                                    @T("Account.BackInStockSubscriptions.ProductColumn")
                                </th>
                            </tr>
                            </thead>
                            <tbody>
                            @for (var i = 0; i < Model.Subscriptions.Count; i++)
                            {
                                var item = Model.Subscriptions[i];
                                <tr @(i % 2 == 0 ? Html.Raw(" class=\"odd\"") : Html.Raw(" class=\"even\""))>
                                    <td class="select-boxes">
                                        <input type="checkbox" name="biss@(item.Id)" class="rowcheckbox" />
                                    </td>
                                    <td class="product">
                                            <a href="@(await NopUrl.RouteGenericUrlAsync<Product>(new { SeName = item.SeName }))">@item.ProductName</a>
                                    </td>
                                </tr>
                            }
                            </tbody>
                        </table>
                    </div>
                    @{
                        var pager = await Html.PagerAsync(Model.PagerModel);
                    }
                    @if (!string.IsNullOrEmpty(await pager.RenderHtmlContentAsync()))
                    {
                        <div class="pager">
                            @pager
                        </div>
                    }
                    <div class="buttons">
                        <button type="submit" name="save" class="button-1 delete-selected-biss-button">@T("Account.BackInStockSubscriptions.DeleteSelected")</button>
                    </div>
                </div>
            </form>
        }
        else
        {
            <div class="no-data">
                @T("Account.BackInStockSubscriptions.NoSubscriptions")
            </div>
        }
        @await Component.InvokeAsync(typeof(WidgetViewComponent), new { widgetZone = PublicWidgetZones.CustomerBackInStockSubscriptionsBottom, additionalData = Model })
    </div>
</div>