public ActionResult Index(string SearchTerms = "", int CurrentPageNumber = 1, int ItemsPerPage = 20) { ManageUIModulesViewModel vModel = new ManageUIModulesViewModel(TemplateCache.GetAll <IUIModule>()) { AuthedUser = UserManager.FindById(User.Identity.GetUserId()), CurrentPageNumber = CurrentPageNumber, ItemsPerPage = ItemsPerPage, SearchTerms = SearchTerms }; return(View("~/Views/GameAdmin/UIModules/Index.cshtml", vModel)); }
public ActionResult UIModules(string SearchTerms = "", int CurrentPageNumber = 1, int ItemsPerPage = 20) { ApplicationUser user = UserManager.FindById(User.Identity.GetUserId()); ManageUIModulesViewModel vModel = new ManageUIModulesViewModel(TemplateCache.GetAll <IUIModule>().Where(uimod => uimod.CreatorHandle.Equals(user.GameAccount.GlobalIdentityHandle))) { AuthedUser = user, CurrentPageNumber = CurrentPageNumber, ItemsPerPage = ItemsPerPage, SearchTerms = SearchTerms }; return(View("UIModules", vModel)); }