mirror of https://github.com/abpframework/abp
parent
c6144db737
commit
8fcc06eab9
@ -0,0 +1 @@
|
|||||||
|
<a class="navbar-brand" href="~/"><i>Project</i>Name</a>
|
@ -1,31 +1,21 @@
|
|||||||
@using Localization.Resources.AbpUi
|
@using Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Views.Shared.Components.Theme.MainNavbar.Brand
|
||||||
@using Microsoft.AspNetCore.Mvc.Localization
|
@using Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Views.Shared.Components.Theme.MainNavbar.Menu
|
||||||
@using Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Views.Shared.Components.Theme.MainNavbarMenu
|
@using Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Views.Shared.Components.Theme.MainNavbar.Tools
|
||||||
@using Volo.Abp.MultiTenancy
|
|
||||||
@using Volo.Abp.Users
|
|
||||||
@inject ICurrentUser CurrentUser
|
|
||||||
@inject ICurrentTenant CurrentTenant
|
|
||||||
@inject IHtmlLocalizer<AbpUiResource> L
|
|
||||||
<nav class="navbar navbar-expand-md navbar-dark bg-dark fixed-top" id="main-navbar">
|
<nav class="navbar navbar-expand-md navbar-dark bg-dark fixed-top" id="main-navbar">
|
||||||
<a class="navbar-brand" href="~/"><i>Project</i>Name</a>
|
@(await Component.InvokeAsync<MainNavbarBrandViewComponent>())
|
||||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#main-navbar-collapse" aria-controls="navbarsExampleDefault" aria-expanded="false" aria-label="Toggle navigation">
|
<button class="navbar-toggler" type="button" data-toggle="collapse"
|
||||||
|
data-target="#main-navbar-collapse" aria-controls="main-navbar-collapse"
|
||||||
|
aria-expanded="false" aria-label="Toggle navigation">
|
||||||
<span class="navbar-toggler-icon"></span>
|
<span class="navbar-toggler-icon"></span>
|
||||||
</button>
|
</button>
|
||||||
<div class="collapse navbar-collapse" id="main-navbar-collapse">
|
<div class="collapse navbar-collapse" id="main-navbar-collapse">
|
||||||
<ul class="navbar-nav mr-auto">
|
<ul class="navbar-nav mr-auto">
|
||||||
@(await Component.InvokeAsync<MainNavbarMenuViewComponent>())
|
@(await Component.InvokeAsync<MainNavbarMenuViewComponent>())
|
||||||
@* TODO: Menu *@
|
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<span id="main-navbar-tools">
|
<span id="main-navbar-tools">
|
||||||
@if (CurrentUser.IsAuthenticated)
|
@(await Component.InvokeAsync<MainNavbarToolsViewComponent>())
|
||||||
{
|
|
||||||
<span style="color: #fff">@CurrentUser.UserName</span> <text>(<a href="/Account/Logout">@L["Logout"]</a>)</text>
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
<a href="/Account/Login">Login</a>
|
|
||||||
}
|
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
|
@ -0,0 +1,15 @@
|
|||||||
|
@using Localization.Resources.AbpUi
|
||||||
|
@using Microsoft.AspNetCore.Mvc.Localization
|
||||||
|
@using Volo.Abp.MultiTenancy
|
||||||
|
@using Volo.Abp.Users
|
||||||
|
@inject ICurrentUser CurrentUser
|
||||||
|
@inject ICurrentTenant CurrentTenant
|
||||||
|
@inject IHtmlLocalizer<AbpUiResource> L
|
||||||
|
@if (CurrentUser.IsAuthenticated)
|
||||||
|
{
|
||||||
|
<span style="color: #fff">@CurrentUser.UserName</span> <text>(<a href="/Account/Logout">@L["Logout"]</a>)</text>
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
<a href="/Account/Login">Login</a>
|
||||||
|
}
|
Loading…
Reference in new issue