public async Task <IActionResult> Index(FeatureUpdateOptions opts) { // Ensure we have permission if (!await _authorizationService.AuthorizeAsync(User, Permissions.ManageFeatureUpdates)) { return(Unauthorized()); } if (opts == null) { opts = new FeatureUpdateOptions(); } // Build breadcrumb _breadCrumbManager.Configure(builder => { builder .Add(S["Home"], home => home .Action("Index", "Admin", "Plato.Admin") .LocalNav()) .Add(S["Features"], features => features .Action("Index", "Admin", "Plato.Features") .LocalNav()) .Add(S["Updates"]); }); var model = new FeatureUpdatesViewModel() { Options = opts }; return(View((LayoutViewModel)await _viewProvider.ProvideIndexAsync(model, this))); }
public async Task <IViewComponentResult> InvokeAsync(FeatureUpdateOptions options) { return(View(new FeatureUpdatesViewModel() { Options = options, Features = await _featureFacade.GetFeatureUpdatesAsync() })); }