Поправил общий шаблон, добавил фио залогининого пользователя

This commit is contained in:
Никита Потапов 2024-05-29 12:55:40 +04:00
parent 3bfc9cf130
commit ea7b4f252b

View File

@ -3,16 +3,16 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>
@if (ViewData.ContainsKey("SelectedSiteMenuItem"))
{
@ViewBag.SelectedSiteMenuItem.Item2
}
else if (ViewData.ContainsKey("Title"))
{
@if (ViewData.ContainsKey("Title"))
{
<title>
@ViewData["Title"]
}
</title>
</title>
}
else
{
<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" />
@ -50,11 +50,14 @@
}
}
</ul>
@if(LoginManager.LogginedUser != null)
@if (LoginManager.LogginedUser != null)
{
<form method="post" asp-action="Logout" asp-controller="User">
<button class="btn btn-secondary" type="submit">Выйти</button>
</form>
<div class="d-flex align-items-center">
@Html.RouteLink(LoginManager.LogginedUser.FIO, new { controller = "User", action = "Privacy" }, new { @title = "Личный кабинет" })
<form class="ms-3" method="post" asp-action="Logout" asp-controller="User">
<button class="btn btn-secondary" type="submit">Выйти</button>
</form>
</div>
}
</div>
</div>