btcpayserver/BTCPayServer/Views/Shared/Monero/StoreNavMoneroExtension.cshtml
2019-09-30 20:43:15 +09:00

13 lines
722 B
Text

@using BTCPayServer.Controllers
@using BTCPayServer.Altcoins.Monero.Configuration
@using BTCPayServer.Altcoins.Monero.UI
@inject SignInManager<ApplicationUser> SignInManager;
@inject MoneroLikeConfiguration MoneroLikeConfiguration;
@{
var controller = ViewContext.RouteData.Values["Controller"].ToString();
var isMonero = controller.Equals(nameof(MoneroLikeStoreController), StringComparison.InvariantCultureIgnoreCase);
}
@if (SignInManager.IsSignedIn(User) && User.IsInRole(Roles.ServerAdmin) && MoneroLikeConfiguration.MoneroLikeConfigurationItems.Any())
{
<a class="nav-link @(isMonero ? "active" : string.Empty)" asp-action="GetStoreMoneroLikePaymentMethods" asp-controller="MoneroLikeStore">Monero</a>
}