WikiNavigationActionVisible ListPages_GetNavigateActionsVisible() { WikiNavigationActionVisible result = WikiNavigationActionVisible.AddNewPage; if (isShowCat) { result |= WikiNavigationActionVisible.SubscriptionOnCategory; } else { result |= WikiNavigationActionVisible.SubscriptionOnNewPage; } return(result); }
private void SetVisibleActions() { WikiNavigationActionVisible result = WikiNavigationActionVisible.None; if (GetNavigateActionsVisible != null) { result = GetNavigateActionsVisible(); } niaAddNewPage.Visible = niaAddNewPage.Visible && (result & WikiNavigationActionVisible.AddNewPage) > 0 && CommunitySecurity.CheckPermissions(ASC.Web.Community.Wiki.Common.Constants.Action_AddPage); niaCreateThePage.Visible = niaCreateThePage.Visible && (result & WikiNavigationActionVisible.CreateThePage) > 0 && CommunitySecurity.CheckPermissions(ASC.Web.Community.Wiki.Common.Constants.Action_AddPage); niaUploadFile.Visible = niaUploadFile.Visible && (result & WikiNavigationActionVisible.UploadFile) > 0 && CommunitySecurity.CheckPermissions(ASC.Web.Community.Wiki.Common.Constants.Action_UploadFile) && !ASC.Web.Core.Mobile.MobileDetector.IsRequestMatchesMobile(Context); niaEditThePage.Visible = niaEditThePage.Visible && (result & WikiNavigationActionVisible.EditThePage) > 0; niaShowVersions.Visible = niaShowVersions.Visible && (result & WikiNavigationActionVisible.ShowVersions) > 0; niaPrintPage.Visible = niaPrintPage.Visible && (result & WikiNavigationActionVisible.PrintPage) > 0; niaDeleteThePage.Visible = niaDeleteThePage.Visible && (result & WikiNavigationActionVisible.DeleteThePage) > 0; niaSubscriptionOnNewPage.Visible = niaSubscriptionOnNewPage.Visible && (result & WikiNavigationActionVisible.SubscriptionOnNewPage) > 0; niaSubscriptionThePage.Visible = niaSubscriptionThePage.Visible && (result & WikiNavigationActionVisible.SubscriptionThePage) > 0; niaSubscriptionOnCategory.Visible = niaSubscriptionOnCategory.Visible && (result & WikiNavigationActionVisible.SubscriptionOnCategory) > 0; PanelManage.Visible = niaAddNewPage.Visible || niaCreateThePage.Visible || niaUploadFile.Visible || niaEditThePage.Visible || niaShowVersions.Visible || niaPrintPage.Visible || niaDeleteThePage.Visible || niaSubscriptionOnNewPage.Visible || niaSubscriptionThePage.Visible || niaSubscriptionOnCategory.Visible; }