@using MrCMS.Helpers
@using MrCMS.Web.Apps.Ecommerce.Pages
@model List<MrCMS.Web.Apps.Ecommerce.Entities.Products.ProductSpecificationAttribute>
@{
    var category = ViewData["category"] as EcommerceSearchablePage;
    Layout = "~/Areas/Admin/Views/Shared/_LayoutPopup.cshtml";
}
<fieldset>
    <legend>
        Hide a specification
        <span class="btn-group  display-inline  pull-right">
            <button id="close" class="btn-primary btn">Close</button>
        </span>
    </legend>

    @Html.Hidden("categoryId", category != null ? category.Id : 0)
    <div id="specifications">
        @if (Model.Any())
            {
            <table class="table table-striped table-condensed">
                <thead>
                    <tr>
                        <th>
                            Name
                        </th>
                        <th>
                        </th>
                    </tr>
                </thead>
                <tbody>
                    @foreach (var specification in Model)
                        {
                        <tr>
                            <td>@specification.Name</td>
                            <td>
                                <button class="btn btn-success add-specification" data-specification-id="@specification.Id">Add</button>

                            </td>
                        </tr>
                        }
                </tbody>
            </table>
            }
            else
            {
            <p>
                All available specifications are hidden
            </p>
            }
    </div>
</fieldset>
@{ Html.IncludeScript("~/Apps/Ecommerce/Areas/Admin/Content/Scripts/custom/async-paging.js"); }
@{ Html.IncludeScript("~/Apps/Ecommerce/Areas/Admin/Content/Scripts/custom/hide-specifications.js"); }