<%@ Control Language="C#" AutoEventWireUp="true" %>
<%@ Register TagPrefix="CS" Namespace="CommunityServer.Controls" Assembly="CommunityServer.Controls" %>
<%@ Register TagPrefix="CSD" Namespace="CommunityServer.Discussions.Controls" Assembly="CommunityServer.Discussions" %>
<%@ Import Namespace="CommunityServer" %>
<%@ Import Namespace="CommunityServer.Controls" %>
<%@ Import Namespace="CommunityServer.Components" %>
<%@ Import Namespace="CommunityServer.Discussions.Components" %>

<div class="CommonContentArea">
	<div id="TopBreadCrumb" Runat="server" Visible="false">
		<div class="CommonBreadCrumbArea"><CSD:BreadCrumb ShowHome="true" runat="server" id="Breadcrumb1"/></div>
	</div>

	<CS:AdPart runat = "Server" contentname="StandardTop" ID="Adpart1">
	    <CS:Ads Zone="StandardTop" runat="server" id="Ads1" />
	</CS:AdPart>

	<h2 class="CommonTitle">
		<CSD:InlineTextEdit runat = "Server" id = "ForumGroupName" />
	</h2>

	<div class="CommonContent">
	<a runat="server" id="Personalize" />
	
	<asp:Repeater EnableViewState="false" runat="server" id="forumGroupRepeater">						
		<HeaderTemplate>
		</HeaderTemplate>
		<ItemTemplate>
			<div class="CommonListArea">
			<CSD:GroupCollapsableArea 
				runat="server" 
				id="GroupArea" 
				Group='<%# (CommunityServer.Components.Group) Container.DataItem %>' 
				ToggleLink='<%# Container.FindControl("ToggleLink") %>'
				ToggleCollapsedCssClass="ForumGroupToggleCollapsed"
				ToggleExpandedCssClass="ForumGroupToggleExpanded"
				HeaderCollapsedCssClass="CommonListTitle"
				HeaderExpandedCssClass="CommonListTitle"
				HeaderProcessingCssClass="CommonListTitle ForumGroupTitleProcessing"
				EnableHeaderDblClickToggle="false"
				>
				<Header>
					<table cellspacing="0" cellpadding="0" width="100%" border="0"><tr><td align="left">
					<a href="<%# Globals.GetSiteUrls().ForumGroup ( (int) DataBinder.Eval(Container.DataItem, "GroupID")) %>"><%# DataBinder.Eval(Container.DataItem, "Name") %></a> 
					<CS:Donut runat = "Server" visible=<%# !CSContext.Current.User.IsAnonymous && Request.QueryString["personalize"] == "true"  %>> (<CS:ResourceLabel runat="server" ResourceName="ForumGroupView_Personalize_GroupDisplay" />: 
					<cs:GroupSubscribeLinkButton Group='<%# (CommunityServer.Components.Group) Container.DataItem %>' runat="server" id="Sectionsubscribelinkbutton1" trackingresourcename="No" nottrackingresourcename="Yes" /> )
					</CS:Donut>
					</td><td align="right">
						<asp:HyperLink ID="ToggleLink" Runat="server">&nbsp;</asp:HyperLink>
					</td></tr></table>
				</Header>
				<Content>
					<CSD:ForumRepeater GroupID='<%# DataBinder.Eval(Container.DataItem, "GroupID") %>' HideForums='<%# DataBinder.Eval(Container.DataItem, "HideSections") %>' runat="server" EnableViewstate="false">										
						<HeaderTemplate>
							<table width="100%" cellpadding="0" cellspacing="0" border="0">
							<thead>
								<tr> 
									<th colspan="2" nowrap="true" class="CommonListHeaderLeftMost ForumGroupImageAndNameHeader" align="center"><CS:ResourceLabel runat="server" ResourceName="ForumGroupView_Inline1" id="Resourcelabel1"/></th>
									<th nowrap="true" class="CommonListHeader ForumGroupLastPostHeader"><CS:ResourceLabel runat="server" ResourceName="ForumGroupView_Inline4" id="Resourcelabel2"/></th>                                    
									<th nowrap="true" class="CommonListHeader ForumGroupTotalThreadsHeader" align="center"><CS:ResourceLabel runat="server" ResourceName="ForumGroupView_Inline2" id="Resourcelabel3"/></th>                                    
									<th nowrap="true" class="CommonListHeader ForumGroupTotalPostsHeader" align="center"><CS:ResourceLabel runat="server" ResourceName="ForumGroupView_Inline3" id="Resourcelabel4"/></th>
									<th class="CommonListHeader ForumGroupTotalPostsHeader" runat="server" visible=<%# !CSContext.Current.User.IsAnonymous && Request.QueryString["personalize"] == "true"  %>><CS:ResourceLabel runat="server" ResourceName="ForumGroupView_Inline5" id="Resourcelabel5"/></th> 
								</tr>
							</thead>
							<tbody>
						</HeaderTemplate>
						<ItemTemplate>
							<tr>
								<td class="ForumListCellLeftMostImageOnly  ForumGroupImageColumn">
									<%# ForumFormatter.StatusIcon( (Forum) Container.DataItem ) %>
								</td>
								<td class="CommonListCell ForumGroupNameColumn">
									<a class="<%# ForumFormatter.HasRead((Forum) Container.DataItem) ? "ForumGroupNameRead" : "ForumGroupNameUnRead" %>" href="<%# ForumUrls.Instance().Forum( ((Forum) Container.DataItem).SectionID ) %>"><%# DataBinder.Eval(Container.DataItem, "Name") %></a> <%# ForumFormatter.FormatUsersViewingForum( (Forum) Container.DataItem ) %><br />
									<%# DataBinder.Eval(Container.DataItem, "Description") %><%# ForumFormatter.FormatSubForum( (Forum) Container.DataItem ) %>
								</td>
								<td class="CommonListCell ForumGroupLastPostColumn" nowrap="true">
									<%# ForumFormatter.FormatLastPost( (Forum) Container.DataItem, (bool) true ) %>
								</td>
								<td class="CommonListCell ForumGroupTotalThreadsColumn" align="center">
									<%# Formatter.FormatNumber( ((Forum) Container.DataItem).TotalThreads ) %>
								</td>
								<td class="CommonListCell ForumGroupTotalPostsColumn" align="center">
									<%# Formatter.FormatNumber( ((Forum) Container.DataItem).TotalPosts ) %>
								</td>
								<td class="CommonListCell ForumGroupTotalPostsColumn" align="center" runat="server" visible=<%# !CSContext.Current.User.IsAnonymous && Request.QueryString["personalize"] == "true"  %>>
									<cs:sectionsubscribelinkbutton Section='<%# (Section) Container.DataItem %>' runat="server" id="BlogThreadButton" trackingresourcename="No" nottrackingresourcename="Yes" />
								</td> 
							</tr>
						</ItemTemplate>
						<FooterTemplate>
							</tbody>
							</table>				
						</FooterTemplate>
					</CSD:ForumRepeater>	
				</Content>
			</CSD:GroupCollapsableArea>
			</div>
		</ItemTemplate>
	</asp:Repeater>
	
	<CS:WhoIsOnline runat="server" />
	<CS:SiteStats runat="server" />
	<CSD:MarkAllRead runat="server" />

	</div>
	<CS:AdPart runat = "Server" contentname="StandardBottom" ID="Adpart2">
	    <CS:Ads Zone="StandardBottom" runat="server" id="Ads3" />
	</CS:AdPart>
</div>
