@model List<MrCMS.Web.Apps.Ecommerce.Entities.Products.ProductSpecificationAttribute>
@{
    ViewBag.Title = "Product Specification Attributes";
}

<form>
    <fieldset>
        <legend>Product Specification Attributes
            <span class="btn-group  display-inline  pull-right">
                <a href="@Url.Action("Sort", "ProductSpecificationAttribute")" class="btn btn-default"  data-toggle="fb-modal">Sort</a>
                <a href="@Url.Action("Add", "ProductSpecificationAttribute")" class="btn btn-primary"  data-toggle="fb-modal">Add Attribute</a>

            </span>
        </legend>
        @if(Model.Count>0)
        {
        <table class="table table-condensed table-striped">
            <thead>
                <tr>
                    <th>Name
                    </th>
                    <th>Actions
                    </th>
                </tr>
            </thead>
            <tbody>
                @foreach (var productSpecificationAttribute in Model)
                {
                    <tr>
                        <td>
                            @productSpecificationAttribute.Name 
                        </td>
                        <td>
                            <div class="btn-group">
                                @Html.ActionLink("Edit", "Edit", "ProductSpecificationAttribute", new { id = productSpecificationAttribute.Id }, new { @class = "btn btn-xs btn-default", data_toggle = "fb-modal" })
                                @Html.ActionLink("Manage Options", "Index", "ProductSpecificationAttributeOption", new { attributeId = productSpecificationAttribute.Id }, new { @class = "btn btn-xs  btn-success" })
                                @Html.ActionLink("Delete", "Delete", "ProductSpecificationAttribute", new { id = productSpecificationAttribute.Id }, new { @class = "btn btn-xs btn-danger", data_toggle = "fb-modal" })
                            </div>
                        </td>
                    </tr>
                }
            </tbody>
        </table>
        }
        else
        {
            <span>No attributes yet.</span>
        }
    </fieldset>
</form>
