@model ForumTopicPageModel
@using SmartStore.Services.Seo;
@using SmartStore.Web;
@using SmartStore.Web.Models;
@using SmartStore.Web.Models.Boards;
@using SmartStore.Web.Models.Common;
@using SmartStore.Web.Framework.UI;
@{
Layout = "~/Views/Shared/_ColumnsOne.cshtml";
Html.AddTitleParts(Model.Subject);
Html.AddMetaDescriptionParts(Model.Subject);
}
@Html.Action("ForumBreadcrumb", new { forumTopicId = Model.Id })
@Html.Partial("_SearchBox")
@Model.Subject
@if (Model.IsCustomerAllowedToEditTopic || Model.IsCustomerAllowedToDeleteTopic || Model.IsCustomerAllowedToMoveTopic)
{
}
@if (Model.IsCustomerAllowedToSubscribe)
{
@Ajax.ActionLink(Model.WatchTopicText,
"TopicWatch",
new { id = @Model.Id },
new AjaxOptions { HttpMethod = "Post", OnSuccess = "handleTopicWatch" },
new { id = "watch-topic-top", @class = "watch-topic-link-button" })
}
@{
var pager = Html.SmartStore().Pager(Model.PostsPageIndex, Model.PostsPageSize, Model.PostsTotalRecords)
.Name("paginator")
.Size(PagerSize.Small)
.Alignment(PagerAlignment.Centered)
.Route("TopicSlug", new RouteValues { id = Model.Id, slug = Model.SeName });
}
@pager
@{
var index = 0;
}
@foreach (var post in @Model.ForumPostModels)
{
index++;
Html.RenderPartial("_ForumPost", post);
@*if(index < @Model.ForumPostModels.Count)
{
}*@
}
@if (Model.IsCustomerAllowedToSubscribe)
{
@Ajax.ActionLink(Model.WatchTopicText,
"TopicWatch",
new { id = @Model.Id },
new AjaxOptions { HttpMethod = "Post", OnSuccess = "handleTopicWatch" },
new { id = "watch-topic-bottom", @class = "watch-topic-link-button" })
}
@pager