From 4197f4e5578d7ef1644cc88f82739f996ab5c072 Mon Sep 17 00:00:00 2001 From: "ns.potapov" Date: Tue, 30 Apr 2024 15:34:48 +0400 Subject: [PATCH 1/2] =?UTF-8?q?=D0=9E=D1=82=D1=80=D0=B5=D0=B4=D0=B0=D0=BA?= =?UTF-8?q?=D1=82=D0=B8=D1=80=D0=BE=D0=B2=D0=B0=D0=BB=20layout?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Polyclinic/PolyclinicWebView/SiteMenuItems.cs | 19 +++++++ .../Views/Home/Courses.cshtml | 1 + .../Views/Home/Diagnoses.cshtml | 1 + .../PolyclinicWebView/Views/Home/Index.cshtml | 2 +- .../Views/Home/Medicaments.cshtml | 2 +- .../Views/Home/Procedures.cshtml | 1 + .../Views/Home/Recipes.cshtml | 1 + .../Views/Home/Symptomes.cshtml | 1 + .../PolyclinicWebView/Views/Home/Users.cshtml | 1 + .../Views/Shared/_Layout.cshtml | 52 +++++++++---------- 10 files changed, 51 insertions(+), 30 deletions(-) create mode 100644 Polyclinic/PolyclinicWebView/SiteMenuItems.cs diff --git a/Polyclinic/PolyclinicWebView/SiteMenuItems.cs b/Polyclinic/PolyclinicWebView/SiteMenuItems.cs new file mode 100644 index 0000000..60ba040 --- /dev/null +++ b/Polyclinic/PolyclinicWebView/SiteMenuItems.cs @@ -0,0 +1,19 @@ +namespace PolyclinicWebView +{ + public static class SiteMenuItems + { + public static (string Url, string Title) Index = ("", "Главная"); + public static (string Url, string Title) Courses = ("Courses", "Курсы"); + public static (string Url, string Title) Diagnoses = ("Diagnoses", "Болезни"); + public static (string Url, string Title) Medicaments = ("Medicaments", "Лекарства"); + public static (string Url, string Title) Procedures = ("Procedures", "Процедуры"); + public static (string Url, string Title) Recipes = ("Recipes", "Рецепты"); + public static (string Url, string Title) Symptomes = ("Symptomes", "Симптомы"); + public static (string Url, string Title) Users = ("Users", "Пользователи"); + + public static List<(string Url, string Title)> MenuItemsOrder = new List<(string Url, string Title)> + { + Index, Courses, Diagnoses, Medicaments, Procedures, Recipes, Symptomes, Users + }; + } +} diff --git a/Polyclinic/PolyclinicWebView/Views/Home/Courses.cshtml b/Polyclinic/PolyclinicWebView/Views/Home/Courses.cshtml index 12c53bc..4c513d4 100644 --- a/Polyclinic/PolyclinicWebView/Views/Home/Courses.cshtml +++ b/Polyclinic/PolyclinicWebView/Views/Home/Courses.cshtml @@ -2,6 +2,7 @@ For more information on enabling MVC for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860 *@ @{ + ViewBag.SelectedSiteMenuItem = SiteMenuItems.Courses; }
diff --git a/Polyclinic/PolyclinicWebView/Views/Home/Diagnoses.cshtml b/Polyclinic/PolyclinicWebView/Views/Home/Diagnoses.cshtml index e1dd794..e39cdf3 100644 --- a/Polyclinic/PolyclinicWebView/Views/Home/Diagnoses.cshtml +++ b/Polyclinic/PolyclinicWebView/Views/Home/Diagnoses.cshtml @@ -2,4 +2,5 @@ For more information on enabling MVC for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860 *@ @{ + ViewBag.SelectedSiteMenuItem = SiteMenuItems.Diagnoses; } diff --git a/Polyclinic/PolyclinicWebView/Views/Home/Index.cshtml b/Polyclinic/PolyclinicWebView/Views/Home/Index.cshtml index bcfd79a..4c22120 100644 --- a/Polyclinic/PolyclinicWebView/Views/Home/Index.cshtml +++ b/Polyclinic/PolyclinicWebView/Views/Home/Index.cshtml @@ -1,5 +1,5 @@ @{ - ViewData["Title"] = "Home Page"; + ViewBag.SelectedSiteMenuItem = SiteMenuItems.Index; }
diff --git a/Polyclinic/PolyclinicWebView/Views/Home/Medicaments.cshtml b/Polyclinic/PolyclinicWebView/Views/Home/Medicaments.cshtml index 9d2a20a..c02db4a 100644 --- a/Polyclinic/PolyclinicWebView/Views/Home/Medicaments.cshtml +++ b/Polyclinic/PolyclinicWebView/Views/Home/Medicaments.cshtml @@ -1,7 +1,7 @@ @using PolyclinicContracts.ViewModels @model List @{ - ViewData["Title"] = "Medicaments"; + ViewBag.SelectedSiteMenuItem = SiteMenuItems.Medicaments; }

Препараты

diff --git a/Polyclinic/PolyclinicWebView/Views/Home/Procedures.cshtml b/Polyclinic/PolyclinicWebView/Views/Home/Procedures.cshtml index e1dd794..6ade4eb 100644 --- a/Polyclinic/PolyclinicWebView/Views/Home/Procedures.cshtml +++ b/Polyclinic/PolyclinicWebView/Views/Home/Procedures.cshtml @@ -2,4 +2,5 @@ For more information on enabling MVC for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860 *@ @{ + ViewBag.SelectedSiteMenuItem = SiteMenuItems.Procedures; } diff --git a/Polyclinic/PolyclinicWebView/Views/Home/Recipes.cshtml b/Polyclinic/PolyclinicWebView/Views/Home/Recipes.cshtml index e1dd794..ba14a0e 100644 --- a/Polyclinic/PolyclinicWebView/Views/Home/Recipes.cshtml +++ b/Polyclinic/PolyclinicWebView/Views/Home/Recipes.cshtml @@ -2,4 +2,5 @@ For more information on enabling MVC for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860 *@ @{ + ViewBag.SelectedSiteMenuItem = SiteMenuItems.Recipes; } diff --git a/Polyclinic/PolyclinicWebView/Views/Home/Symptomes.cshtml b/Polyclinic/PolyclinicWebView/Views/Home/Symptomes.cshtml index e1dd794..abe41e2 100644 --- a/Polyclinic/PolyclinicWebView/Views/Home/Symptomes.cshtml +++ b/Polyclinic/PolyclinicWebView/Views/Home/Symptomes.cshtml @@ -2,4 +2,5 @@ For more information on enabling MVC for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860 *@ @{ + ViewBag.SelectedSiteMenuItem = SiteMenuItems.Symptomes; } diff --git a/Polyclinic/PolyclinicWebView/Views/Home/Users.cshtml b/Polyclinic/PolyclinicWebView/Views/Home/Users.cshtml index e1dd794..e07e1fb 100644 --- a/Polyclinic/PolyclinicWebView/Views/Home/Users.cshtml +++ b/Polyclinic/PolyclinicWebView/Views/Home/Users.cshtml @@ -2,4 +2,5 @@ For more information on enabling MVC for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860 *@ @{ + ViewBag.SelectedSiteMenuItem = SiteMenuItems.Users; } diff --git a/Polyclinic/PolyclinicWebView/Views/Shared/_Layout.cshtml b/Polyclinic/PolyclinicWebView/Views/Shared/_Layout.cshtml index ba0243b..860264b 100644 --- a/Polyclinic/PolyclinicWebView/Views/Shared/_Layout.cshtml +++ b/Polyclinic/PolyclinicWebView/Views/Shared/_Layout.cshtml @@ -3,7 +3,16 @@ - @ViewData["Title"] - PolyclinicWebView + + @if (ViewData.ContainsKey("SelectedSiteMenuItem")) + { + @ViewBag.SelectedSiteMenuItem.Item2 + } + else if (ViewData.ContainsKey("Title")) + { + @ViewData["Title"] + } + @@ -18,33 +27,20 @@
From a68a4e3dc466b5dd923424196911ad3e2fb0e962 Mon Sep 17 00:00:00 2001 From: "ns.potapov" Date: Tue, 30 Apr 2024 15:51:51 +0400 Subject: [PATCH 2/2] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8=D0=BB?= =?UTF-8?q?=20=D1=81=D1=82=D0=B0=D1=82=D0=B8=D1=87=D0=BD=D1=8B=D1=85=20?= =?UTF-8?q?=D0=B7=D0=B0=D0=BF=D0=B8=D1=81=D0=B5=D0=B9=20=D0=B2=20=D1=82?= =?UTF-8?q?=D0=B0=D0=B1=D0=BB=D0=B8=D1=86=D1=83=20=D0=BA=D1=83=D1=80=D1=81?= =?UTF-8?q?=D0=BE=D0=B2,=20=D0=B4=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8=D0=BB=20?= =?UTF-8?q?=D0=BA=D0=BD=D0=BE=D0=BF=D0=BA=D0=B8=20=D1=81=D0=BE=D0=B7=D0=B4?= =?UTF-8?q?=D0=B0=D0=BD=D0=B8=D1=8F,=20=D1=83=D0=B4=D0=B0=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D1=8F,=20=D1=80=D0=B5=D0=B4=D0=B0=D0=BA=D1=82?= =?UTF-8?q?=D0=B8=D1=80=D0=BE=D0=B2=D0=B0=D0=BD=D0=B8=D1=8F=20=D0=BA=D1=83?= =?UTF-8?q?=D1=80=D1=81=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Views/Home/Courses.cshtml | 38 +++++++++++++++---- 1 file changed, 31 insertions(+), 7 deletions(-) diff --git a/Polyclinic/PolyclinicWebView/Views/Home/Courses.cshtml b/Polyclinic/PolyclinicWebView/Views/Home/Courses.cshtml index 4c513d4..6fee98f 100644 --- a/Polyclinic/PolyclinicWebView/Views/Home/Courses.cshtml +++ b/Polyclinic/PolyclinicWebView/Views/Home/Courses.cshtml @@ -5,6 +5,11 @@ ViewBag.SelectedSiteMenuItem = SiteMenuItems.Courses; }
+
+ +
@@ -13,16 +18,35 @@ + - - - - - - - + @{ + int count = 20; + for (int i = 0; i < count; i++) + { + + + + + + + + + } + }
Количество препаратов в день Комментарий Рецепт-комментарий
1123Очень хороший курс приемаРецепт отличный
@i123Очень хороший курс приемаРецепт отличный + + + + + + + + + + +
\ No newline at end of file