示例#1
0
        public virtual ActionResult OpenFilters()
        {
            var feedState = _feedFilterStateService.GetFiltersState();

            feedState.IsFiltersOpened = !feedState.IsFiltersOpened;
            _feedFilterStateService.SaveFiltersState(feedState);
            return(new EmptyResult());
        }
示例#2
0
        protected virtual CentralFeedOverviewModel GetOverviewModel()
        {
            var tabType          = _centralFeedContentService.GetFeedTabType(CurrentPage);
            var centralFeedState = _feedFilterStateService.GetFiltersState();

            var activityTabs = GetActivityTabs().Map <List <ActivityFeedTabViewModel> >();

            var model = new CentralFeedOverviewModel
            {
                Tabs = activityTabs,
                TabsWithCreateUrl = GetTabsWithCreateUrl(activityTabs)
                                    .Where(tab => _permissionsService.IsCurrentUserHasAccess(tab.Type, IntranetActivityActionEnum.Create)),
                CurrentType     = tabType,
                IsFiltersOpened = centralFeedState.IsFiltersOpened
            };

            return(model);
        }
        protected virtual CentralFeedOverviewModel GetOverviewModel()
        {
            var tabType          = _centralFeedContentService.GetFeedTabType(CurrentPage);
            var centralFeedState = _feedFilterStateService.GetFiltersState();

            var activityTabs = GetActivityTabs().Map <List <ActivityFeedTabViewModel> >();

            var model = new CentralFeedOverviewModel
            {
                Tabs = activityTabs,
                TabsWithCreateUrl = GetTabsWithCreateUrl(activityTabs)
                                    .Where(tab => _permissionsService.Check(
                                               _permissionResourceTypeProvider[tab.Type.ToInt()],
                                               PermissionActionEnum.Create)),
                CurrentType       = tabType,
                IsFiltersOpened   = centralFeedState.IsFiltersOpened,
                CanCreateBulletin = _permissionsService.Check(
                    PermissionResourceTypeEnum.Bulletins,
                    PermissionActionEnum.Create)
            };

            return(model);
        }