@model Project_Unite.Models.ForumCategory @{ ViewBag.Title = "View forum"; }

@Model.Name

@Model.Description

@if (Model.Children.Length > 0) {
Subforums
Topics
Posts
Most Recent Post
foreach (var cat in Model.Children) {
@Html.ActionLink(cat.Name, "ViewForum", "Forum", new { id = cat.Id }, null)

@cat.Description

@cat.Topics.Length
} }
@if (Model.Topics.Length > 0) {
Topics
Posts
Most recent post
var topics = Model.Topics.Where(x => x.ShouldShow == true).OrderByDescending(x=>x.StartedAt).ThenByDescending(x=>x.Priority); foreach(var topic in topics) {
@Html.ActionLink(topic.Subject, "ViewTopic", "Forum", new { id = topic.Discriminator }, null)

Started by @Html.UserLink(topic.AuthorId) at @topic.StartedAt • @topic.Likes.Length • @topic.Dislikes.Length

@topic.Posts.Length
} } else {

No topics exist in this category. Be the first to start one!

}