@using Project_Unite.Controllers; @model Project_Unite.Models.ForumTopic @using Microsoft.AspNet.Identity @{ ViewBag.Title = Model.Subject; } @if(Model.IsUnlisted == true) {

This topic is unlisted. Only those with the topic link as well as moderators may see this topic. Please respect its privacy.

}

@Model.Subject

Started by @Html.UserLink(Model.AuthorId) at @Model.StartedAt

@foreach (Project_Unite.Models.ForumPost post in PaginationExtensions.GetItemsOnPage(Model.Posts.OrderBy(x => x.PostedAt).ToArray(), ViewBag.Page, ViewBag.PageSize)) { if (Request.IsAuthenticated) { if (ACL.IsUnread(User.Identity.GetUserId(), post.Id)) { ACL.MarkRead(User.Identity.GetUserId(), post.Id); } }

@Html.UserLink(post.AuthorId)
@{ var user = ACL.GetUserInfo(post.AuthorId);

@user.Codepoints Codepoints

@user.HighestRole.Name

@if (User?.Identity?.IsModerator()==true) { @Html.ActionLink("User info", "UserDetails", "Moderator", new { id = ACL.UserNameRaw(post.AuthorId) }, new { @class = "btn btn-default" }) }

}

@Model.Subject

@Html.UserLink(post.AuthorId) at @post.PostedAt

@Html.Markdown(post.Body)

@if (post.EditHistory.Length > 0) {

Latest edit

@{ var edit = post.EditHistory.OrderByDescending(x => x.EditedAt).First(); }

By @Html.UserLink(edit.UserId) at @edit.EditedAt

Reason: @Html.Markdown(edit.EditReason)

}
}

Pages: