diff --git a/Polyclinic/PolyclinicWebAppImplementer/Controllers/HomeController.cs b/Polyclinic/PolyclinicWebAppImplementer/Controllers/HomeController.cs index 109828d..13ecb68 100644 --- a/Polyclinic/PolyclinicWebAppImplementer/Controllers/HomeController.cs +++ b/Polyclinic/PolyclinicWebAppImplementer/Controllers/HomeController.cs @@ -90,6 +90,20 @@ namespace PolyclinicWebAppImplementer.Controllers return View(); } + [HttpGet] + [HttpPost] + public IActionResult AddRecipeToCourse() + { + if (HttpContext.Request.Method == "POST") + { + return Redirect("~/"); + } + else + { + return View(); + } + } + [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)] public IActionResult Error() { diff --git a/Polyclinic/PolyclinicWebAppImplementer/SiteMenuItems.cs b/Polyclinic/PolyclinicWebAppImplementer/SiteMenuItems.cs index 07da28a..17a027e 100644 --- a/Polyclinic/PolyclinicWebAppImplementer/SiteMenuItems.cs +++ b/Polyclinic/PolyclinicWebAppImplementer/SiteMenuItems.cs @@ -12,10 +12,11 @@ public static (string Url, string Title) Login = ("Login", "Вход"); public static (string Url, string Title) Register = ("Register", "Регистрация"); public static (string Url, string Title) Privacy = ("Privacy", "Политика приватности"); + public static (string Url, string Title) AddRecipeToCourse = ("AddRecipeToCourse", "Привязка рецепта"); public static List<(string Url, string Title)> MenuItemsOrder = new List<(string Url, string Title)> { - Index, Courses, Diagnoses, Symptomes, Login, Register + Index, Courses, Diagnoses, Symptomes, Login, Register, AddRecipeToCourse }; } } diff --git a/Polyclinic/PolyclinicWebAppImplementer/Views/Home/AddRecipeToCourse.cshtml b/Polyclinic/PolyclinicWebAppImplementer/Views/Home/AddRecipeToCourse.cshtml new file mode 100644 index 0000000..dcb83dc --- /dev/null +++ b/Polyclinic/PolyclinicWebAppImplementer/Views/Home/AddRecipeToCourse.cshtml @@ -0,0 +1,41 @@ +@{ + ViewBag.SelectedSiteMenuItem = SiteMenuItems.Course; +} +