diff options
| author | Michael <[email protected]> | 2017-03-20 16:45:17 -0400 |
|---|---|---|
| committer | Michael <[email protected]> | 2017-03-20 16:45:17 -0400 |
| commit | cdc61eb4ea5309769ad4db84d92594e4dc3dff67 (patch) | |
| tree | a8297a7aecc4376f07a497a5e02ab5ff165bfbd3 /Project-Unite/Views/Shared/_LoginPartial.cshtml | |
| parent | d9f475e1f33bbf39ca0d79d7a6b0c2fd501b4f2d (diff) | |
| download | project-unite-cdc61eb4ea5309769ad4db84d92594e4dc3dff67.tar.gz project-unite-cdc61eb4ea5309769ad4db84d92594e4dc3dff67.tar.bz2 project-unite-cdc61eb4ea5309769ad4db84d92594e4dc3dff67.zip | |
Initial commit (azure deploy test)
Diffstat (limited to 'Project-Unite/Views/Shared/_LoginPartial.cshtml')
| -rw-r--r-- | Project-Unite/Views/Shared/_LoginPartial.cshtml | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/Project-Unite/Views/Shared/_LoginPartial.cshtml b/Project-Unite/Views/Shared/_LoginPartial.cshtml new file mode 100644 index 0000000..ad6978c --- /dev/null +++ b/Project-Unite/Views/Shared/_LoginPartial.cshtml @@ -0,0 +1,40 @@ +@using Microsoft.AspNet.Identity +@if (Request.IsAuthenticated) +{ + using (Html.BeginForm("LogOff", "Account", FormMethod.Post, new { id = "logoutForm", @class = "navbar-right" })) + { + @Html.AntiForgeryToken() + + <ul class="nav navbar-nav navbar-right" style="margin-right:15px;"> + <li class="dropdown"><a href="#" data-toggle="dropdown" class="dropdown-toggle"><span class="glyphicon glyphicon-user"></span> @Html.UserName(User.Identity.GetUserId()) <span class="caret"></span></a> + <ul class="dropdown-menu"> + <li><a href="@Url.Action("ViewProfile", "Profiles", new { name = User.Identity.Name })"><span class="glyphicon glyphicon-user"></span> Profile</a></li> + <li class="divider"></li> + <li class="dropdown-header">Settings</li> + @if(ACL.Granted(User.Identity.Name, "CanAccessAdminCP")) + { + <li><a href="@Url.Action("Index", "Admin")"><span class="glyphicon glyphicon-cog"></span> Admin CP</a></li> + } + @if (ACL.Granted(User.Identity.Name, "CanAccessModCP")) + { + <li><a href="@Url.Action("Index", "Moderator")"><span class="glyphicon glyphicon-warning-sign"></span> Mod CP</a></li> + } + @if (ACL.Granted(User.Identity.Name, "CanAccessDevCP")) + { + <li><a href="@Url.Action("Index", "Developer")"><span class="glyphicon glyphicon-star"></span> Developer CP</a></li> + } + <li><a href="@Url.Action("Index", "Manage")"><span class="glyphicon glyphicon-adjust"></span> Account</a></li> + <li class="divider"></li> + <li><a href="javascript:document.getElementById('logoutForm').submit()"><span class="glyphicon glyphicon-log-out"></span> Log off</a></li> + </ul> + </li> + </ul> + } +} +else +{ + <ul class="nav navbar-nav navbar-right" style="margin-right:15px;"> + <li>@Html.ActionLink("Register", "Register", "Account", routeValues: null, htmlAttributes: new { id = "registerLink" })</li> + <li>@Html.ActionLink("Log in", "Login", "Account", routeValues: null, htmlAttributes: new { id = "loginLink" })</li> + </ul> +} |
