The next generation of the Teknik Services. Written in ASP.NET.
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.
 
 
 
 

53 lines
2.1 KiB

@model Teknik.ViewModels.ViewModelBase
@using Teknik.Utilities
@using Microsoft.AspNet.Identity
@if (Model.Config.UserConfig.RegistrationEnabled || Model.Config.UserConfig.LoginEnabled)
{
<div 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.SubRouteUrl("blog", "Blog.Blog", new { username = User.Identity.Name })">View Blog</a>
</li>
<li>
<a href="@Url.SubRouteUrl("user", "User.ViewProfile", new { username = User.Identity.Name })">Profile</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")">Sign Out</a>
</li>
</ul>
</li>
}
else
{
if (Model.Config.UserConfig.RegistrationEnabled)
{
<button id="registerButton" data-toggle="modal" data-target="#registerModal" class="btn btn-default navbar-btn hide">Sign Up</button>
<noscript>
<a href="@Url.SubRouteUrl("user", "User.Register")" class="btn btn-default navbar-btn">Sign Up</a>
</noscript>
}
if (Model.Config.UserConfig.LoginEnabled)
{
<button id="loginButton" data-toggle="modal" data-target="#loginModal" class="btn btn-default navbar-btn hide">Sign In</button>
<noscript>
<a href="@Url.SubRouteUrl("user", "User.Login")" class="btn btn-default navbar-btn">Sign In</a>
</noscript>
}
}
</div>
}