Exemplo n.º 1
0
        protected virtual LatestActivitiesViewModel GetLatestActivities(LatestActivitiesPanelModel panelModel)
        {
            var settings        = _centralFeedService.GetAllSettings();
            var centralFeedType = _centralFeedTypeProvider[panelModel.ActivityTypeId];

            var latestActivities = GetLatestActivities(centralFeedType, panelModel.ActivityAmount);
            var feedItems        = GetFeedItems(latestActivities.activities, settings);
            var tab = GetTabForActivityType(centralFeedType);

            return(new LatestActivitiesViewModel
            {
                Title = panelModel.Title,
                Teaser = panelModel.Teaser,
                Feed = feedItems,
                Tab = tab,
                ShowSeeAllButton = latestActivities.activities.Count() < latestActivities.totalCount
            });
        }
Exemplo n.º 2
0
        public virtual ActionResult LatestActivities(LatestActivitiesPanelModel panelModel)
        {
            var viewModel = GetLatestActivities(panelModel);

            return(PartialView(LatestActivitiesViewPath, viewModel));
        }