From ecc8647ded29df61d2ce313f86b0563c25eb5078 Mon Sep 17 00:00:00 2001 From: Paul Schneider Date: Sun, 19 Feb 2017 20:19:58 +0100 Subject: [PATCH] Home reloaded --- Yavsc/Controllers/HomeController.cs | 7 +++---- Yavsc/Views/Home/Index.cshtml | 16 ++++++++++++++-- Yavsc/Views/Shared/_Layout.cshtml | 2 +- 3 files changed, 18 insertions(+), 7 deletions(-) diff --git a/Yavsc/Controllers/HomeController.cs b/Yavsc/Controllers/HomeController.cs index 4bfef96a..a56add54 100644 --- a/Yavsc/Controllers/HomeController.cs +++ b/Yavsc/Controllers/HomeController.cs @@ -29,11 +29,11 @@ namespace Yavsc.Controllers DbContext = context; } - public IActionResult Index() + public IActionResult Index(string id) { - return View(DbContext.Activities.Include(a=>a.Forms).OrderByDescending(a=>a.Rate)); + return View(DbContext.Activities.Where(a=>a.ParentCode==id).Include(a=>a.Forms).Include(a=>a.Children) + .OrderByDescending(a=>a.Rate)); } - public IActionResult About() { return View(); @@ -45,7 +45,6 @@ namespace Yavsc.Controllers public IActionResult Contact() { - return View(); } diff --git a/Yavsc/Views/Home/Index.cshtml b/Yavsc/Views/Home/Index.cshtml index a705df4c..73dd92a6 100755 --- a/Yavsc/Views/Home/Index.cshtml +++ b/Yavsc/Views/Home/Index.cshtml @@ -25,16 +25,28 @@
i++; } diff --git a/Yavsc/Views/Shared/_Layout.cshtml b/Yavsc/Views/Shared/_Layout.cshtml index 6a43dad5..74d887c9 100755 --- a/Yavsc/Views/Shared/_Layout.cshtml +++ b/Yavsc/Views/Shared/_Layout.cshtml @@ -45,7 +45,7 @@ - @SiteSettings.Value.Title + @SiteSettings.Value.Title