<%@ Control Language="C#" AutoEventWireup="true" Inherits="NopSolutions.NopCommerce.Web.Administration.Modules.ForumControl"
    CodeBehind="Forums.ascx.cs" %>
<%@ Register TagPrefix="nopCommerce" TagName="ToolTipLabel" Src="ToolTipLabelControl.ascx" %>
<%@ Register TagPrefix="nopCommerce" TagName="NumericTextBox" Src="NumericTextBox.ascx" %>
<div class="section-header">
    <div class="title">
        <img src="Common/ico-content.png" alt="Forums" />
        Manage Forums
    </div>
    <div class="options">
        <input type="button" onclick="location.href='ForumGroupAdd.aspx'" value="Add new forum group"
            id="btnAddNewForumGroup" class="adminButtonBlue" title="Add new forum group" />
        <asp:Button runat="server" Text="Add new forum" CssClass="adminButtonBlue" ID="btnAddNewForum"
            OnClick="btnAddNewForum_Click" ToolTip="Add new forum" />
    </div>
</div>
<p>
</p>
<asp:Repeater ID="rptrForumGroups" runat="server" OnItemDataBound="rptrForumGroups_ItemDataBound">
    <HeaderTemplate>
        <table class="forumtable">
            <tr class="headerstyle">
                <th>
                    Name
                </th>
                <th>
                    Display order
                </th>
                <th>
                    Created on
                </th>
                <th>
                    Edit
                </th>
            </tr>
    </HeaderTemplate>
    <ItemTemplate>
        <tr class="forumgroup">
            <td class="name">
                <a href="ForumGroupDetails.aspx?ForumGroupID=<%#Eval("ForumGroupID")%>">
                    <%#Server.HtmlEncode(Eval("Name").ToString())%>
                </a>
            </td>
            <td>
                <%#Eval("DisplayOrder")%>
            </td>
            <td>
                <%#DateTimeHelper.ConvertToUserTime((DateTime)Eval("CreatedOn")).ToString()%>
            </td>
            <td>
                <a href="ForumGroupDetails.aspx?ForumGroupID=<%#Eval("ForumGroupID")%>">Edit </a>
            </td>
        </tr>
        <asp:Repeater ID="rptrForums" runat="server">
            <ItemTemplate>
                <tr class="forum">
                    <td class="name">
                        <a href="ForumDetails.aspx?ForumID=<%#Eval("ForumID")%>">
                            <%#Server.HtmlEncode(Eval("Name").ToString())%>
                        </a>
                    </td>
                    <td>
                        <%#Eval("DisplayOrder")%>
                    </td>
                    <td>
                        <%#DateTimeHelper.ConvertToUserTime((DateTime)Eval("CreatedOn")).ToString()%>
                    </td>
                    <td>
                        <a href="ForumDetails.aspx?ForumID=<%#Eval("ForumID")%>">Edit </a>
                    </td>
                </tr>
            </ItemTemplate>
        </asp:Repeater>
    </ItemTemplate>
    <FooterTemplate>
        </table>
    </FooterTemplate>
</asp:Repeater>
