public void PopulateView(ISidebarView view, User user)
 {
     view.SidebarTags           = _tagRepository.RetrieveTagsByUserId(user.Id);
     view.SidebarAlbums         = _albumRepository.RetrieveTopLevelAlbumsByUserId(user.Id);
     view.SidebarFriends        = _friendRepository.RetrieveFriendsByUserId(user.Id);
     view.SidebarRecentActivity = _recentRepository.RetrieveLast30Days(user.Id);
     view.SidebarYearWithCount  = _recentRepository.RetrieveYearsForUser(user.Id);
     view.SidebarRecentUploads  = _recentRepository.RetrieveRecentUploads(user.Id, 6);
 }
예제 #2
0
        /// <summary>
        /// Indexes the specified photo count.
        /// </summary>
        /// <param name="photoCount">The photo count.</param>
        /// <returns></returns>
        public ActionResult Index(int photoCount = 100)
        {
            IDictionary <string, string> crumbs = new Dictionary <string, string>
            {
                { "home", UrlService.UserRoot() },
                { "recent uploads", UrlService.UserUrl("recent") }
            };
            List <RecentUploads> recentUploads = _recentRepository.RetrieveRecentUploads(Owner.Id, photoCount);
            RecentIndex          recentIndex   = ModelFactory <RecentIndex>(new
            {
                RecentUploads        = recentUploads,
                PersistentCollection = _persistentCollectionService,
                Cookie = SiteCookie
            });

            return(View(recentIndex, crumbs));
        }