using System;
using CMS.Forums;
using CMS.GlobalHelper;
using CMS.UIControls;
public partial class CMSModules_Forums_Tools_Groups_Group_Header : CMSForumsPage
{
protected int groupId;
protected int siteId;
protected void Page_Load(object sender, EventArgs e)
{
string currentForumGroup = GetString("");
groupId = QueryHelper.GetInteger("groupid", 0);
if (groupId > 0)
{
ForumGroupInfo group = ForumGroupInfoProvider.GetForumGroupInfo(groupId);
if (group != null)
{
currentForumGroup = HTMLHelper.HTMLEncode(group.GroupDisplayName);
InitalizeMasterPage(currentForumGroup);
InitalizeMenu();
}
}
}
///
/// Initializes Master page properties.
///
protected void InitalizeMasterPage(string currentForumGroup)
{
// Initialize title and help
Title = "Group header";
CurrentMaster.Title.HelpTopicName = "forum_list2";
CurrentMaster.Title.HelpName = "helpTopic";
// Initialize title label
CurrentMaster.Title.TitleText = GetString("Group_General.HeaderCaption");
CurrentMaster.Title.TitleImage = GetImageUrl("Objects/Forums_ForumGroup/object.png");
// Initialize breadcrumbs
string[,] tabs = new string[2,3];
tabs[0, 0] = GetString("Forums.ForumGroups");
tabs[0, 1] = "~/CMSModules/Forums/Tools/Groups/Group_List.aspx";
tabs[0, 2] = "_parent";
tabs[1, 0] = currentForumGroup;
tabs[1, 1] = "";
tabs[1, 2] = "";
CurrentMaster.Title.Breadcrumbs = tabs;
}
///
/// Initializes user edit menu.
///
protected void InitalizeMenu()
{
string generalString = GetString("general.general");
string forumsString = GetString("Group_General.Forums");
string viewString = GetString("general.view");
string[,] tabs = new string[3,4];
tabs[0, 0] = forumsString;
tabs[0, 1] = "SetHelpTopic('helpTopic', 'forum_list2');";
tabs[0, 2] = "../Forums/Forum_List.aspx?groupid=" + groupId;
tabs[1, 0] = generalString;
tabs[1, 1] = "SetHelpTopic('helpTopic', 'forum_group_general_tab');";
tabs[1, 2] = "Group_General.aspx?groupid=" + groupId;
tabs[2, 0] = viewString;
tabs[2, 1] = "SetHelpTopic('helpTopic', 'view_tab');";
tabs[2, 2] = "Group_View.aspx?groupid=" + groupId;
CurrentMaster.Tabs.UrlTarget = "groupsContent";
CurrentMaster.Tabs.Tabs = tabs;
}
}