@using Nop.Services.Localization @model ForumTopicPageModel @inject ILocalizationService localizationService @{ Layout = "_ColumnsOne"; //title NopHtml.AddTitleParts(Model.Subject); //page class NopHtml.AppendPageCssClassParts("html-forum-topic-page"); }
@await Component.InvokeAsync(typeof(ForumBreadcrumbViewComponent), new { forumTopicId = Model.Id }) @await Html.PartialAsync("_ForumHeader") @await Component.InvokeAsync(typeof(WidgetViewComponent), new { widgetZone = PublicWidgetZones.BoardsTopicAfterHeader, additionalData = Model })

@Model.Subject

@if (Model.IsCustomerAllowedToEditTopic) { @Html.RouteLink(T("Forum.EditTopic").Text, "TopicEdit", new { id = Model.Id }, new { @class = "edit-topic-button" }) } @if (Model.IsCustomerAllowedToDeleteTopic) { @T("Forum.DeleteTopic").Text } @if (Model.IsCustomerAllowedToMoveTopic) { @Html.RouteLink(T("Forum.MoveTopic").Text, "TopicMove", new { id = Model.Id }, new { @class = "move-topic-button" }) } @Html.RouteLink(T("Forum.Reply").Text, "PostCreate", new { id = Model.Id }, new { @class = "reply-topic-button" }) @if (Model.IsCustomerAllowedToSubscribe) { @Model.WatchTopicText }
@{ var pager = await Html.PagerAsync(new PagerModel(localizationService) { PageSize = Model.PostsPageSize, TotalRecords = Model.PostsTotalRecords, PageIndex = Model.PostsPageIndex, ShowTotalSummary = false, RouteActionName = "TopicSlugPaged", UseRouteLinks = true, RouteValues = new SlugRouteValues { Id = Model.Id, Slug = Model.SeName } }); } @await Component.InvokeAsync(typeof(WidgetViewComponent), new { widgetZone = PublicWidgetZones.BoardsTopicTop, additionalData = Model }) @if (!string.IsNullOrEmpty(await pager.RenderHtmlContentAsync())) {
@pager
}
@foreach (var post in @Model.ForumPostModels) { await Html.RenderPartialAsync("_ForumPost", post); }
@Html.RouteLink(T("Forum.Reply").Text, "PostCreate", new {id = Model.Id}, new {@class = "reply-topic-button"}) @if (Model.IsCustomerAllowedToSubscribe) { @Model.WatchTopicText }
@if (!string.IsNullOrEmpty(await pager.RenderHtmlContentAsync())) {
@pager
}
@await Component.InvokeAsync(typeof(WidgetViewComponent), new { widgetZone = PublicWidgetZones.BoardsTopicBottom, additionalData = Model })