ildar-shaymukhametov_grandnode-refactorings/Grand.Web/Views/Blog/Components/BlogMonths/Default.cshtml
@model IList<BlogPostYearModel>
@using Grand.Web.Models.Blogs;
@if (Model.Any())
{
    <section id="block-blog-archive" class="block block-blog-archive mt-1">
        <h5 class="generalTitle"><strong>@T("Blog.Archive")</strong></h5>
        <div class="viewBox">
            <ul class="list" id="blog-month-list">
                @foreach (var yearItem in Model)
                {
                    <li class="year">
                        <strong class="number">@(yearItem.Year)</strong>
                        <ul class="sublist" id="blog-year-@(yearItem.Year)">
                            @foreach (var monthItem in yearItem.Months)
                            {
                                <li class="month">
                                    <a href="@Url.RouteUrl("BlogByMonth", new { month = yearItem.Year + "-" + monthItem.Month })">
                                        @(new DateTime(yearItem.Year, monthItem.Month, 1).ToString("MMMM"))
                                        (@(monthItem.BlogPostCount))
                                    </a>
                                </li>
                            }
                        </ul>
                    </li>
                }
            </ul>
        </div>
    </section>
}