коммит Никиты, у меня что-то появилось
This commit is contained in:
commit
abbe22a173
19
Polyclinic/PolyclinicWebView/SiteMenuItems.cs
Normal file
19
Polyclinic/PolyclinicWebView/SiteMenuItems.cs
Normal file
@ -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
|
||||
};
|
||||
}
|
||||
}
|
@ -2,8 +2,14 @@
|
||||
For more information on enabling MVC for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860
|
||||
*@
|
||||
@{
|
||||
ViewBag.SelectedSiteMenuItem = SiteMenuItems.Courses;
|
||||
}
|
||||
<div>
|
||||
<div class="d-flex flex-row">
|
||||
<button class="btn btn-primary">
|
||||
Добавить курс
|
||||
</button>
|
||||
</div>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
@ -12,16 +18,35 @@
|
||||
<th scope="col">Количество препаратов в день</th>
|
||||
<th scope="col">Комментарий</th>
|
||||
<th scope="col">Рецепт-комментарий</th>
|
||||
<th scope="col"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row">1</th>
|
||||
<td>12</td>
|
||||
<td>3</td>
|
||||
<td>Очень хороший курс приема</td>
|
||||
<td>Рецепт отличный</td>
|
||||
</tr>
|
||||
@{
|
||||
int count = 20;
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
<tr>
|
||||
<th scope="row">@i</th>
|
||||
<td>12</td>
|
||||
<td>3</td>
|
||||
<td>Очень хороший курс приема</td>
|
||||
<td>Рецепт отличный</td>
|
||||
<td>
|
||||
<a class="btn btn-danger">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-trash-fill" viewBox="0 0 16 16">
|
||||
<path d="M2.5 1a1 1 0 0 0-1 1v1a1 1 0 0 0 1 1H3v9a2 2 0 0 0 2 2h6a2 2 0 0 0 2-2V4h.5a1 1 0 0 0 1-1V2a1 1 0 0 0-1-1H10a1 1 0 0 0-1-1H7a1 1 0 0 0-1 1zm3 4a.5.5 0 0 1 .5.5v7a.5.5 0 0 1-1 0v-7a.5.5 0 0 1 .5-.5M8 5a.5.5 0 0 1 .5.5v7a.5.5 0 0 1-1 0v-7A.5.5 0 0 1 8 5m3 .5v7a.5.5 0 0 1-1 0v-7a.5.5 0 0 1 1 0" />
|
||||
</svg>
|
||||
</a>
|
||||
<a class="btn btn-warning text-light">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-pencil-fill" viewBox="0 0 16 16">
|
||||
<path d="M12.854.146a.5.5 0 0 0-.707 0L10.5 1.793 14.207 5.5l1.647-1.646a.5.5 0 0 0 0-.708zm.646 6.061L9.793 2.5 3.293 9H3.5a.5.5 0 0 1 .5.5v.5h.5a.5.5 0 0 1 .5.5v.5h.5a.5.5 0 0 1 .5.5v.5h.5a.5.5 0 0 1 .5.5v.207zm-7.468 7.468A.5.5 0 0 1 6 13.5V13h-.5a.5.5 0 0 1-.5-.5V12h-.5a.5.5 0 0 1-.5-.5V11h-.5a.5.5 0 0 1-.5-.5V10h-.5a.5.5 0 0 1-.175-.032l-.179.178a.5.5 0 0 0-.11.168l-2 5a.5.5 0 0 0 .65.65l5-2a.5.5 0 0 0 .168-.11z" />
|
||||
</svg>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
@ -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;
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
@{
|
||||
ViewData["Title"] = "Home Page";
|
||||
ViewBag.SelectedSiteMenuItem = SiteMenuItems.Index;
|
||||
}
|
||||
|
||||
<div class="text-center">
|
||||
|
@ -1,7 +1,7 @@
|
||||
@using PolyclinicContracts.ViewModels
|
||||
@model List<MedicamentViewModel>
|
||||
@{
|
||||
ViewData["Title"] = "Medicaments";
|
||||
ViewBag.SelectedSiteMenuItem = SiteMenuItems.Medicaments;
|
||||
}
|
||||
<div class="text-center">
|
||||
<h1 class="display-4">Препараты</h1>
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -3,7 +3,16 @@
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>@ViewData["Title"] - PolyclinicWebView</title>
|
||||
<title>
|
||||
@if (ViewData.ContainsKey("SelectedSiteMenuItem"))
|
||||
{
|
||||
@ViewBag.SelectedSiteMenuItem.Item2
|
||||
}
|
||||
else if (ViewData.ContainsKey("Title"))
|
||||
{
|
||||
@ViewData["Title"]
|
||||
}
|
||||
</title>
|
||||
<link rel="stylesheet" href="~/lib/bootstrap/dist/css/bootstrap.min.css" />
|
||||
<link rel="stylesheet" href="~/css/site.css" asp-append-version="true" />
|
||||
<link rel="stylesheet" href="~/PolyclinicWebView.styles.css" asp-append-version="true" />
|
||||
@ -18,33 +27,20 @@
|
||||
</button>
|
||||
<div class="navbar-collapse collapse d-sm-inline-flex justify-content-between">
|
||||
<ul class="navbar-nav flex-grow-1">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link text-dark fw-bold" asp-area="" asp-controller="Home" asp-action="Index">Главная</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="Register">Регистрация</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="Courses">Курсы приема препаратов</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="Diagnoses">Диагнозы</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="Medicaments">Препараты</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="Procedures">Процедуры</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="Recipes">Рецепты</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="Symptomes">Симптомы</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="Users">Пользователи</a>
|
||||
</li>
|
||||
@foreach (var menuItem in SiteMenuItems.MenuItemsOrder)
|
||||
{
|
||||
<li class="menu-item">
|
||||
@Html.RouteLink(menuItem.Title, new
|
||||
{
|
||||
controller = "Home",
|
||||
action = menuItem.Url
|
||||
}, new
|
||||
{
|
||||
@class = "nav-link text-dark" + (menuItem.Equals(ViewBag.SelectedSiteMenuItem) ? " fw-bold" : "")
|
||||
}
|
||||
)
|
||||
</li>
|
||||
}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user