using System; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using CMS.CMSHelper; using CMS.GlobalHelper; using CMS.PortalControls; using CMS.PortalEngine; public partial class CMSWebParts_Forums_ForumPostsWaitingForApproval : CMSAbstractWebPart { #region "Properties" /// /// Groups for displayed forums. /// public string ForumGroups { get { return ValidationHelper.GetString(GetValue("ForumGroups"), String.Empty); } set { SetValue("ForumGroups", value); } } /// /// Site name filter. /// public string SiteName { get { return ValidationHelper.GetString(GetValue("SiteName"), String.Empty).Replace("##currentsite##", CMSContext.CurrentSiteName); } set { SetValue("SiteName", value); } } /// /// Gets or sets the value of items per page. /// public string ItemsPerPage { get { return ValidationHelper.GetString(GetValue("ItemsPerPage"), "25"); } set { SetValue("ItemsPerPage", value); } } /// /// Text if no data found. /// public string ZeroRowsText { get { return ValidationHelper.GetString(GetValue("ZeroRowsText"), "No data found"); } set { SetValue("ZeroRowsText", value); } } #endregion #region "Methods" /// /// Content loaded event handler. /// public override void OnContentLoaded() { base.OnContentLoaded(); SetupControl(); } /// /// Initializes the control properties. /// protected void SetupControl() { if (StopProcessing) { ucPosts.StopProcessing = true; } else { ucPosts.GroupNames = ForumGroups; ucPosts.ItemsPerPage = ItemsPerPage; ucPosts.ZeroRowText = ZeroRowsText; ucPosts.SiteName = SiteName; ucPosts.IsLiveSite = (CMSContext.ViewMode != ViewModeEnum.DashboardWidgets); } } #endregion }