protected void Page_Init(object sender, System.EventArgs e) { m_user_list = (Ektron.Cms.UserData[])Array.CreateInstance(typeof(Ektron.Cms.UserData), 0); _CalendarApi = new Ektron.Cms.Content.Calendar.WebCalendar(m_refContentApi.RequestInformationRef); commGroup = new Ektron.Cms.Community.CommunityGroup(m_refContentApi.RequestInformationRef); }
protected void ViewGroup() { DirectoryData[] m_aCategories = (DirectoryData[])Array.CreateInstance(typeof(Ektron.Cms.DirectoryData), 0); Ektron.Cms.Community.CommunityGroup communityGroup; communityGroup = new Ektron.Cms.Community.CommunityGroup(m_refContentApi.RequestInformationRef); List<Ektron.Cms.UserData> groupAdmins = new List<UserData>(); cgGroup = this.m_refCommunityGroupApi.GetCommunityGroupByID(this.m_iID); groupAdmins = communityGroup.GetAllCommunityGroupAdmins(this.m_iID); if (m_refContentApi.RequestInformationRef.IsMembershipUser == 1 && !IsUserGroupAdmin(groupAdmins)) { return; } panel3.Visible = true; SetLabels(); m_aCategories = this.m_refContentApi.EkContentRef.GetAllAssignedDirectory(this.m_iID, Ektron.Cms.Common.EkEnumeration.TaxonomyItemType.Group); lbl_id.Text = cgGroup.GroupId.ToString(); lbl_id.ToolTip = lbl_id.Text; SetTitleBarToMessage("lbl view cgroup"); PopulateData(cgGroup,groupAdmins, m_aCategories); TD_personalTags.InnerHtml = GetGroupTags(); bAccess = System.Convert.ToBoolean(this.m_refContentApi.IsARoleMember(Ektron.Cms.Common.EkEnumeration.CmsRoleIds.CommunityGroupAdmin) || IsUserGroupAdmin(groupAdmins)); // buttons base.AddBackButton("groups.aspx"); if (this.bAccess == true) { base.AddButtonwithMessages(m_refContentApi.AppPath + "images/UI/Icons/contentEdit.png", (string)("../communitygroupaddedit.aspx?action=addeditgroup&LangType=" + this.ContentLanguage + "&id=" + cgGroup.GroupId.ToString()), "alt edit community group", "lbl edit community group", "", StyleHelper.EditButtonCssClass, true); // MyBase.AddButtonwithMessages(AppImgPath & "menu/folders.gif", "workspace.aspx?groupid=" & Me.m_iID & "&LangType=" & ContentLanguage, "alt view group directory", "btn view group directory", "") base.AddButtonwithMessages(m_refContentApi.AppPath + "images/ui/icons/usersMemberGroups.png", (string)("groupmembers.aspx?action=viewallusers&LangType=" + ContentLanguage + "&id=" + this.m_iID), "alt view cgroup members", "btn view cgroup members", "", StyleHelper.ViewGroupMembersButtonCssClass); base.AddButtonwithMessages(m_refContentApi.AppPath + "images/UI/Icons/delete.png", (string)("groups.aspx?action=delete&id=" + cgGroup.GroupId.ToString()), "alt del community group", "lbl del community group", " onclick=\"javascript:return confirm(\'" + GetMessage("js confirm del community group") + "\');\" ", StyleHelper.DeleteButtonCssClass); } SetAlias(this.m_iID); AddHelpButton("viewcommunitygroup"); }
protected void EditGroup() { CommonApi refCommonAPI = new CommonApi(); BuildJS(); if (this.m_iID > 0) { cgGroup = m_refCommunityGroupApi.GetCommunityGroupByID(this.m_iID); lbl_id.Text = cgGroup.GroupId.ToString(); List<Ektron.Cms.UserData> groupAdmins = new List<UserData>(); //groupAdmins = commGroup.GetAllCommunityGroupAdmins(this.m_iID); commGroup = new Ektron.Cms.Community.CommunityGroup(m_refContentApi.RequestInformationRef); groupAdmins = commGroup.GetAllCommunityGroupAdmins(m_iID); PopulateData(cgGroup, groupAdmins); } else { this.PublicJoinYes_RB.Checked = true; if (!Ektron.Cms.DataIO.LicenseManager.LicenseManager.IsFeatureEnable(m_refContentApi.RequestInformationRef, Ektron.Cms.DataIO.LicenseManager.Feature.MembershipUsers)) { this.FeaturesCalendar_CB.Checked = true; this.FeaturesForum_CB.Checked = true; this.EnableDistributeToSite_CB.Checked = true; } tr_ID.Visible = false; ucEktronGroupEmailSetting.Attributes.Add("style", "display:none;"); ektouserid__Page.Value = m_refCommunityGroupApi.RequestInformationRef.CallerId.ToString(); } TD_GroupTags.InnerHtml = GetGroupTags(); txtEmailReplyServer.Value = mailServer.POPServer; txtEmailReplyServerPort.Value = mailServer.POPPort.ToString(); chkUseSsl.Checked = mailServer.POPSSL; this.chkEnableEmail.Enabled = _activityApi.IsActivityEmailReplyEnabled || cgGroup.EnableGroupEmail; this.lblEmailServerPortValue.Text = mailServer.POPPort.ToString(); this.lblEmailServerValue.Text = mailServer.POPServer; }