@using System.Web.Mvc.Html
@using MrCMS.Helpers
@using MrCMS.Web.Apps.Amazon.Models
@model MrCMS.Paging.IPagedList<MrCMS.Web.Apps.Amazon.Entities.Listings.AmazonListingGroup>
@{
    ViewBag.Title = "Amazon Listing Groups";
    var amazonManageInventoryUrl = ViewData["AmazonManageInventoryUrl"] as string;
}

<fieldset>
    <legend>
        Amazon Listing Groups
        <span class="btn-group  display-inline  pull-right" style="margin-left: 10px">
            @if (!String.IsNullOrWhiteSpace(amazonManageInventoryUrl))
            {
                <a href='@amazonManageInventoryUrl' target="_blank" class="btn btn-default">
                    Manage Inventory on Amazon
                </a>
            }
            @Html.ActionLink("Logs", "Index", "Logs", new { type = AmazonLogType.ListingGroups }, new { @class = "btn btn-default" })
            @Html.ActionLink("Add", "Add", "ListingGroup", null, new { @class = "btn btn-primary", data_toggle = "fb-modal" })
        </span>
    </legend>
</fieldset>
<div class="input-group">
    @Html.TextBox("ListingGroupName", String.Empty, new { @class = "form-control search-query search-listing-groups", placeholder = "Enter listing group name..." })
    <span class="input-group-btn">
        <button class="btn btn-default" id="search-listings" type="button">Filter</button>
    </span>
</div>
<br />
<div class="row">
    <div class="col-lg-12">
        @{Html.RenderPartial("ListingGroups", Model); }
    </div>
</div>
@{ Html.IncludeScript("~/Apps/Amazon/Areas/Admin/Content/Scripts/custom/listing-groups.js"); }