The next generation of the Teknik Services. Written in ASP.NET. https://www.teknik.io/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

49 lines
2.1 KiB

@if (Config.UserConfig.RegistrationEnabled || Config.UserConfig.LoginEnabled)
{
<div class="nav navbar-nav pull-right">
@if (User.Identity.IsAuthenticated)
{
<li class="dropdown">
<a href="#" id="user_menu" class="dropdown-toggle" data-toggle="dropdown">@User.Identity.Name <strong class="caret"></strong></a>
<ul class="dropdown-menu" role="menu" aria-labelledby="user_menu">
<li>
<a href="@Url.SubRouteUrl("user", "User.ViewProfile", new { username = User.Identity.Name })">Profile</a>
</li>
<li>
<a href="@Url.SubRouteUrl("blog", "Blog.Blog", new { username = User.Identity.Name })">View Blog</a>
</li>
<li>
<a href="@Url.SubRouteUrl("user", "User.ViewServiceData")">Service Data</a>
</li>
<li>
<a href="@Url.SubRouteUrl("user", "User.Settings")">Settings</a>
</li>
@if (User.IsInRole("Admin"))
{
<li>
<a href="@Url.SubRouteUrl("admin", "Admin.Dashboard")">Administration</a>
</li>
}
<li>
<a href="@Url.SubRouteUrl("user", "User.Logout")">Log Out</a>
</li>
</ul>
</li>
}
else
{
if (Config.UserConfig.RegistrationEnabled)
{
<button id="registerButton" data-toggle="modal" data-target="#registerModal" class="btn btn-default navbar-btn hide">Register</button>
<noscript>
<a href="@Url.SubRouteUrl("user", "User.Register")" class="btn btn-default navbar-btn">Register</a>
</noscript>
}
if (Config.UserConfig.LoginEnabled)
{
@*<button id="loginButton" data-toggle="modal" data-target="#loginModal" class="btn btn-default navbar-btn hide">Log In</button>*@
<a href="@Url.SubRouteUrl("user", "User.Login", new { returnUrl = @Context.Request.GetDisplayUrl() })" class="btn btn-default navbar-btn">Log In</a>
}
}
</div>
}