ildar-shaymukhametov_grandnode-refactorings/Grand.Web/Views/Profile/Components/ProfilePosts/Default.cshtml
@model ProfilePostsModel
@inject Grand.Services.Localization.ILocalizationService localizationService
@if (Model.Posts.Any())
{
    <div class="latest-posts">

        @foreach (var item in Model.Posts)
        {
            <div class="topic pt-1">
                <div class="topic-title">
                    <label><strong>@T("Profile.Topic"):</strong></label>
                    <strong>@Html.RouteLink(item.ForumTopicTitle, "TopicSlug", new { id = item.ForumTopicId, slug = item.ForumTopicSlug })</strong>
                </div>
                <div class="topic-body">
                    <p>@Html.Raw(item.ForumPostText)</p>
                </div>
                <div class="topic-data">
                    <label>@T("Profile.PostedOn"):</label>
                    <span>@item.Posted</span>
                </div>
            </div>
        }
    </div>
}
else
{
    <div class="no-data">
        @T("Profile.LatestPosts.NoPosts")
    </div>
}
@{
    var pager = Html.Pager(localizationService, Model.PagerModel);
}
@if (pager != null)
{
    <nav aria-label="Page navigation">
        @pager
    </nav>
}
