diff --git a/Controllers/ServiceController.cs b/Controllers/ServiceController.cs index 0564132..ebe58c0 100644 --- a/Controllers/ServiceController.cs +++ b/Controllers/ServiceController.cs @@ -45,7 +45,12 @@ public ServiceController( public ActionResult Index() { var viewModel = new ViewModel.AdminIndexViewModel(); - viewModel.Items = this.Services.ContentManager.Query().List().ToList(); + var queries = this.Services.ContentManager.Query() + .List() + .ToList(); + + viewModel.Items = queries.Where(e => e.Layouts.Any(layout => layout.Category.IndexOf("JSON", StringComparison.InvariantCultureIgnoreCase) >= 0)) + .ToList(); return View(viewModel); } diff --git a/Views/Service/index.cshtml b/Views/Service/index.cshtml index e56a1d1..2c0ee57 100644 --- a/Views/Service/index.cshtml +++ b/Views/Service/index.cshtml @@ -1,8 +1,27 @@ @model JsonProjection.ViewModel.AdminIndexViewModel -

Feeds

- + + + + + + + + + + + + + + + @foreach (var item in Model.Items) + { + + + + + + } + +
+ Json Feeds +
NamePreviewFeed Source
@item.Name@Html.ActionLink("Preview", "Preview", "Service", new { Id = item.Id }, new { Class = "button" })@Html.ActionLink("Source", "Feed", "Service", new { Id = item.Id }, new { Class = "button" })