@model List<LuceneNet.Models.Books>
@if (Model != null && Model.Count > 0)
{
    string[] num = { "one", "two", "three", "four", "five", "six", "seven", "eight", "nine" };
    <ol class="round">
        @for (int i = 0; i < 9; i++)
        {
            <li class="@num[i]">
                <h5>@Model[i].Title</h5>
                @Html.Raw(Model[i].ContentDescription)
                <a href="#@Model[i].Id">Learn more…</a>
            </li>
        }
    </ol>


    <div>
        <div class="pager-container">
            <ul>
                @if (ViewBag.NowPages > 1)
                {
                    <li class="prev"><a href="" onclick="parent.but(@(ViewBag.NowPages - 1))">&larr; 上一页</a></li>
                }
                else
                {
                    <li class="prev" style="visibility:hidden"><a href="">&larr; 上一页</a></li>
                }
                @{
                    int begin = ViewBag.NowPages - 2 > 0 ? ViewBag.NowPages - 2 : 1;
                    int end = ViewBag.NowPages + 2 > ViewBag.TotalPages ? ViewBag.TotalPages : ViewBag.NowPages + 2;
                    for (int i = begin; i <= end; i++)
                    {
                        if (i == ViewBag.NowPages)
                        {
                            <li class="current"><a>@i</a></li>
                        }
                        else
                        {
                            <li><a href="" onclick="parent.but(@i)">@i</a></li>
                        }
                    }
                }

                @if (ViewBag.NowPages < ViewBag.TotalPages)
                {
                    <li class="next"><a href="" onclick="parent.but(@(ViewBag.NowPages + 1))">下一页 &rarr;</a></li>
                }
                else
                {
                    <li class="next" style="visibility:hidden"><a href="#">下一页 &rarr;</a></li>
                }
            </ul>
        </div>
    </div>
}

@*<ol class="round">
    <li class="one">
        <h5>Getting Started</h5>
        ASP.NET MVC gives you a powerful, patterns-based way to build dynamic websites that
        enables a clean separation of concerns and that gives you full control over markup
        for enjoyable, agile development. ASP.NET MVC includes many features that enable
        fast, TDD-friendly development for creating sophisticated applications that use
        the latest web standards.
        <a href="http://go.microsoft.com/fwlink/?LinkId=245151">Learn more…</a>
    </li>

    <li class="two">
        <h5>Add NuGet packages and jump-start your coding</h5>
        NuGet makes it easy to install and update free libraries and tools.
        <a href="http://go.microsoft.com/fwlink/?LinkId=245153">Learn more…</a>
    </li>

    <li class="three">
        <h5>Find Web Hosting</h5>
        You can easily find a web hosting company that offers the right mix of features
        and price for your applications.
        <a href="http://go.microsoft.com/fwlink/?LinkId=245157">Learn more…</a>
    </li>
    <li class="four">
        <h5>Find Web Hosting</h5>
        You can easily find a web hosting company that offers the right mix of features
        and price for your applications.
        <a href="http://go.microsoft.com/fwlink/?LinkId=245157">Learn more…</a>
    </li>
    <li class="five">
        <h5>Find Web Hosting</h5>
        You can easily find a web hosting company that offers the right mix of features
        and price for your applications.
        <a href="http://go.microsoft.com/fwlink/?LinkId=245157">Learn more…</a>
    </li>
    <li class="six">
        <h5>Find Web Hosting</h5>
        You can easily find a web hosting company that offers the right mix of features
        and price for your applications.
        <a href="http://go.microsoft.com/fwlink/?LinkId=245157">Learn more…</a>
    </li>
    <li class="seven">
        <h5>Find Web Hosting</h5>
        You can easily find a web hosting company that offers the right mix of features
        and price for your applications.
        <a href="http://go.microsoft.com/fwlink/?LinkId=245157">Learn more…</a>
    </li>
    <li class="eight">
        <h5>Find Web Hosting</h5>
        You can easily find a web hosting company that offers the right mix of features
        and price for your applications.
        <a href="http://go.microsoft.com/fwlink/?LinkId=245157">Learn more…</a>
    </li>
    <li class="nine">
        <h5>Find Web Hosting</h5>
        You can easily find a web hosting company that offers the right mix of features
        and price for your applications.
        <a href="http://go.microsoft.com/fwlink/?LinkId=245157">Learn more…</a>
    </li>
</ol>*@