public virtual IActionResult List(NewsPagingFilteringModel command) { if (!_newsSettings.Enabled) { return(RedirectToRoute("Homepage")); } var model = _newsModelFactory.PrepareNewsItemListModel(command); return(View(model)); }
public virtual IActionResult List(NewsItemSearchModel searchModel) { if (!_permissionService.Authorize(StandardPermissionProvider.ManageNews)) { return(AccessDeniedDataTablesJson()); } //prepare model var model = _newsModelFactory.PrepareNewsItemListModel(searchModel); return(Json(model)); }