Exemplo n.º 1
0
 public ActionResult Index()
 {
     // Show both pending topics and also pending posts
     // Use ajax for paging too
     var allowedCategories = _categoryService.GetAllowedCategories(UsersRole);
     var viewModel = new ModerateViewModel
     {
         Posts = _postService.GetPendingPosts(allowedCategories, UsersRole),
         Topics = _topicService.GetPendingTopics(allowedCategories, UsersRole)
     };
     return View(viewModel);
 }
Exemplo n.º 2
0
        public ActionResult Index()
        {
            // Show both pending topics and also pending posts
            // Use ajax for paging too
            var allowedCategories = _categoryService.GetAllowedCategories(UsersRole);
            var viewModel         = new ModerateViewModel
            {
                Posts  = _postService.GetPendingPosts(allowedCategories, UsersRole),
                Topics = _topicService.GetPendingTopics(allowedCategories, UsersRole)
            };

            return(View(viewModel));
        }
Exemplo n.º 3
0
        public virtual ActionResult Index()
        {
            var loggedOnUsersRole = LoggedOnReadOnlyUser.GetRole(RoleService);

            // Show both pending topics and also pending posts
            // Use ajax for paging too
            var allowedGroups = _groupService.GetAllowedGroups(loggedOnUsersRole, LoggedOnReadOnlyUser?.Id);
            var viewModel     = new ModerateViewModel
            {
                Posts  = _postService.GetPendingPosts(allowedGroups, loggedOnUsersRole),
                Topics = _topicService.GetPendingTopics(allowedGroups, loggedOnUsersRole)
            };

            return(View(viewModel));
        }
Exemplo n.º 4
0
        public virtual ActionResult Index()
        {
            var loggedOnReadOnlyUser = User.GetMembershipUser(MembershipService);
            var loggedOnUsersRole    = loggedOnReadOnlyUser.GetRole(RoleService);

            // Show both pending topics and also pending posts
            // Use ajax for paging too
            var allowedCategories = _categoryService.GetAllowedCategories(loggedOnUsersRole);
            var viewModel         = new ModerateViewModel
            {
                Posts  = _postService.GetPendingPosts(allowedCategories, loggedOnUsersRole),
                Topics = _topicService.GetPendingTopics(allowedCategories, loggedOnUsersRole)
            };

            return(View(viewModel));
        }