blob: 8e26c2452fa282fca7c3b5fee053aa775fd151fb (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
@model IEnumerable<Project_Unite.Models.ForumCategory>
@{
ViewBag.Title = "Forums";
}
<h2>Welcome to the forums.</h2>
@foreach (var cat in Model)
{
<table class="table">
<tr>
<th>@cat.Name</th>
<th>Topics</th>
<th>Posts</th>
<th>Most Recent Post</th>
</tr>
@foreach (var subcat in cat.Children)
{
<tr>
<td>@Html.ActionLink(subcat.Name, "ViewForum", "Forum", new { id = subcat.Id }, null) <br/>
<p>@subcat.Description</p>
@if(subcat.Children.Length > 0)
{
<p><strong>Subforums: </strong>
@foreach(var subfrm in subcat.Children)
{
<em> @Html.ActionLink(subfrm.Name, "ViewForum", "Forum", new { id = subfrm.Id }, null) </em>
}
</p>
}
</td>
<td>@subcat.Topics.Length</td>
<td></td>
<td></td>
</tr>
}
</table>
}
|