|
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<IEnumerable<Forum>>" %>
<% if (Model.Count() > 0)
{ %>
<table style="width: 100%; border: none;" cellpadding="5" cellspacing="0" class="ui-forum-list ui-widget-content">
<tr>
<th class="ui-state-active ui-border-bottom" style="padding: 10px;width: 30px;" align="center">
</th>
<th class="ui-state-active ui-border-rb" style="padding: 10px;" align="center">
<%=Html.Global("forums", "Forum")%>
</th>
<th class="ui-state-active ui-border-rb" style="padding: 10px;width:50px;" align="center">
<%=Html.Global("forums", "Threads")%>
</th>
<th class="ui-state-active ui-border-rb" style="padding: 10px;width:50px;" align="center">
<%=Html.Global("forums", "Posts")%>
</th>
<th class="ui-state-active ui-border-bottom" style="padding: 10px;width:150px;" align="center">
<%=Html.Global("forums","LastPost") %>
</th>
</tr>
<%
foreach (var forum in Model)
{ %>
<tr>
<td class="ui-widget-content ui-border-rb">
<%:Html.ForumIcon(forum) %>
</td>
<td class="ui-widget-content ui-border-rb">
<h4 style="margin: 2px;">
<%=Html.ActionLink(forum.Title, "Threads","Forum", new { id=forum.ID,index=1,size=20},null)%>
</h4>
<div style="font-weight: normal; padding-left: 2px;">
<%=forum.Description %></div>
<% Html.RenderAction("ForumList", "Forum", new { Area = "Community", parentID = forum.ID }); %>
</td>
<td class="ui-widget-content ui-state-active ui-border-rb" align="right">
<%=(forum.TotalThreads <=0 ? "-": forum.TotalThreads.ToString()) %>
</td>
<td class="ui-widget-content ui-state-active ui-border-rb" align="right">
<%=(forum.TotalPosts <= 0 ? "-":forum.TotalPosts.ToString())%>
</td>
<td class="ui-widget-content ui-border-bottom">
<%
Post _post = forum.LastPost();
if (_post == null)
{%>
<span>-</span>
<%}
else
Html.RenderPartial("LastPostCell", _post);
%>
</td>
</tr>
<%} %>
</table>
<script type="text/javascript">
$(function () {
$(".ui-forum-list tr:last td").css({ "border-bottom": "none" });
$(".ui-forum-list tr").hover(function () { $("td", this).addClass('ui-state-hover'); }, function () { $("td", this).removeClass('ui-state-hover'); });
});
</script>
<%} %>
<%=Html.StartupScripts() %>
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
In 1999, I started programming using Delphi, VB, VJ.From 2002 I started with .NET using C#.Since 2005 when i had became an EIP product manager I was focus on EIP and CMS technique. In 2008 i established dotnetage.com and started to shared my ideas and projects online. I believe "No shared no grow"
www.dotnetage.com