コード例 #1
0
        public ActionResult Cleanup()
        {
            using (var editQueueManager = new EditQueueManager())
            {
                editQueueManager.CleanupRedundantEditQueueitems();

                return View();
            }
        }
コード例 #2
0
        public ActionResult Publish(int id)
        {
            //approves/publishes the given edit directly (if user has permission)
            using (var editQueueManager = new EditQueueManager())
            {
                editQueueManager.ProcessEditQueueItem(id, true, (int)Session["UserID"]);

                return RedirectToAction("Index", "EditQueue");
            }
        }
コード例 #3
0
        public ActionResult MarkAsProcessed(int id)
        {
            //marks item as processed without publishing the edit
            using (var editQueueManager = new EditQueueManager())
            {
                editQueueManager.ProcessEditQueueItem(id, false, (int)Session["UserID"]);

                return RedirectToAction("Index", "EditQueue");
            }
        }
コード例 #4
0
 //
 // GET: /EditQueue/
 public ActionResult Index(EditQueueFilter filter)
 {
     using (var editQueueManager = new EditQueueManager())
     {
         var list = editQueueManager.GetEditQueueItems(filter);
         ViewBag.EditFilter = filter;
         ViewBag.IsUserAdmin = (Session["IsAdministrator"] != null && (bool)Session["IsAdministrator"] == true);
         if (IsUserSignedIn)
         {
             ViewBag.UserProfile = new UserManager().GetUser(int.Parse(Session["UserID"].ToString()));
         }
         return View(list);
     }
 }