//------------------------------------------------------------------------------
// <copyright company="Telligent Systems">
//     Copyright (c) Telligent Systems Corporation.  All rights reserved.
// </copyright> 
//------------------------------------------------------------------------------

using System;
using System.Web.UI.WebControls;
using CommunityServer.Components;
using CommunityServer.Controls;

namespace CommunityServer.Blogs.Controls
{
	/// <summary>
	/// Summary description for AboutView.
	/// </summary>
	public class About : WeblogThemedControl
	{
		public About()
		{
			//
			// TODO: Add constructor logic here
			//
		}

	    protected override void AttachChildControls()
	    {
            if(CurrentWeblog.EnableAbout)
            {

                IText AboutTitle = FindText("AboutTitle");
                if(AboutTitle != null) 
                    AboutTitle.Text = CurrentWeblog.AboutTitle;

                IText AboutDesc = FindText("AboutDesc");
                if(AboutDesc != null)
                    AboutDesc.Text = CurrentWeblog.AboutDescription;
            }
            else
            {
                Globals.Return404(Context);
            }
	    }
	}
}
