@using OurUmbraco.Release
@inherits UmbracoTemplatePage
@{
    Layout = "~/Views/Master.cshtml";
    var allReleases = Release.GetAllReleaseFromFile();
}

<div class="has-sidebar">
    <!-- Apply to body -->
    <div class="page-content">
        <div class="sidebar-area">
            <div class="sidebar-content">
                <div class="content-wrapper">
                    <nav>
                        <ul class="level-1">
                            @foreach (var currentRelease in allReleases.Where(x => x.released && x.currentRelease))
                            {
                                <li>
                                    <a class="active" href="/contribute/releases/@(currentRelease.version.Replace(".", string.Empty))">
                                        <h3>Latest Release - v@(currentRelease.version)</h3>
                                    </a>
                                </li>
                            }
                            <li>
                                <a href="/contribute/progress"><h3>In Progress</h3></a>
                            </li>
                            <li class="active open">
                                <a href="/contribute/releases"><h3>All releases</h3></a>
                                <ul class="level-2">
                                    <li>
                                        <a href="/contribute/releases/compare"><h4>Compare Versions</h4></a>
                                    </li>
                                </ul>
                            </li>
                        </ul>
                    </nav>
                </div><!-- .content-wrapper -->
            </div><!-- .sidebar-content -->
        </div>
        <div class="main-area">
            <div class="main-content">
                <div class="content-wrapper">
                    <div>
                        @Html.Action("Render", "Breadcrumb", new { linkToCurrent = true })
                    </div>
                    <!-- <div class="markdown-syntax"><div data-bind="template: { name: 'releases-template', foreach: currentReleases }"></div></div>-->
                    <div class="markdown-syntax">
                        @Html.Partial("~/Views/Partials/Releases/AllReleases.cshtml")
                    </div>
                </div><!-- .content-wrapper -->
            </div><!-- .main-content -->
        </div><!-- .main-area -->
    </div><!-- .page-content -->
</div>