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.
 
 
 
 
 

43 lines
1.7 KiB

@using Microsoft.AspNet.Identity
<ul class="nav navbar-nav pull-right">
@if (Request.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.Action("Index", "Profile", new { area = "Profile" })/@User.Identity.Name">Profile</a>
</li>
<li>
<a href="@Url.Action("Index", "Blog", new { area = "Blog" })/@User.Identity.Name">Blog</a>
</li>
@if (User.IsInRole("Admin"))
{
<li>
<a href="@Url.Action("Index", "Admin", new { area = "Admin" })">Administration</a>
</li>
}
<li>
@Html.ActionLink("Sign Out", "Logout", "Profile", new { area = "Profile" }, null)
</li>
</ul>
</li>
}
else
{
<li class="dropdown">
<a class="dropdown-toggle" href="#" data-toggle="dropdown" id="reg_dropdown">Sign Up <strong class="caret"></strong></a>
<div class="dropdown-menu" style="padding: 15px; padding-bottom: 0px;">
@Html.Partial("../../Areas/Profile/Views/Profile/Register", new Teknik.Areas.Profile.ViewModels.RegisterViewModel())
</div>
</li>
<li class="dropdown">
<a class="dropdown-toggle" href="#" data-toggle="dropdown" id="login_dropdown">Sign In <strong class="caret"></strong></a>
<div class="dropdown-menu" style="padding: 15px; padding-bottom: 0px;">
@Html.Partial("../../Areas/Profile/Views/Profile/Login", new Teknik.Areas.Profile.ViewModels.LoginViewModel())
</div>
</li>
}
</ul>