mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-02-23 06:35:13 +01:00
Fixing modify user page and it's title
This commit is contained in:
parent
8075273ec8
commit
cd1a4c4749
3 changed files with 5 additions and 4 deletions
|
@ -132,6 +132,7 @@ namespace BTCPayServer.Controllers
|
||||||
var roles = await _UserManager.GetRolesAsync(user);
|
var roles = await _UserManager.GetRolesAsync(user);
|
||||||
var userVM = new UserViewModel();
|
var userVM = new UserViewModel();
|
||||||
userVM.Id = user.Id;
|
userVM.Id = user.Id;
|
||||||
|
userVM.Email = user.Email;
|
||||||
userVM.IsAdmin = IsAdmin(roles);
|
userVM.IsAdmin = IsAdmin(roles);
|
||||||
return View(userVM);
|
return View(userVM);
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,9 +15,9 @@ namespace BTCPayServer.Views.Server
|
||||||
}
|
}
|
||||||
|
|
||||||
public const string ACTIVE_PAGE_KEY = "ActivePage";
|
public const string ACTIVE_PAGE_KEY = "ActivePage";
|
||||||
public static void SetActivePageAndTitle(this ViewDataDictionary viewData, Pages activePage, string titleOverride = null)
|
public static void SetActivePageAndTitle(this ViewDataDictionary viewData, Pages activePage)
|
||||||
{
|
{
|
||||||
viewData["Title"] = titleOverride ?? activePage.ToString();
|
viewData["Title"] = activePage.ToString();
|
||||||
viewData[ACTIVE_PAGE_KEY] = activePage;
|
viewData[ACTIVE_PAGE_KEY] = activePage;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
@model UserViewModel
|
@model UserViewModel
|
||||||
@{
|
@{
|
||||||
ViewData.SetActivePageAndTitle(ServerNavPages.Pages.Users, Model.Email);
|
ViewData.SetActivePageAndTitle(ServerNavPages.Pages.Users);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
<h4>@ViewData["Title"]</h4>
|
<h4>Modify User - @Model.Email</h4>
|
||||||
@Html.Partial("_StatusMessage", Model.StatusMessage)
|
@Html.Partial("_StatusMessage", Model.StatusMessage)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue