@model MileageTraker.Web.Models.User @{ ViewBag.Title = "User Details"; } @{ Html.RenderPartial("BackToUsers"); } @Html.Partial("_StatusMessage")

@ViewBag.Title

@Html.DisplayFor(m => m.FullName)
@Html.DisplayNameFor(m => m.Username)
@Html.Encode(Model.Username) @Html.Partial("_UserStatusLabels")
@Html.DisplayFor(m => m.Email)
@Html.DisplayNameFor(m => m.Roles)
@{ var roles = Roles.Provider.GetRolesForUser(Model.Username); } @if (roles.Length > 0) { @Html.Encode(string.Join(", ", roles)) } else { No Role }
@Html.DisplayNameFor(m => m.LastActivityDate)
@Html.Partial("_DateTimeHistoric", new Tuple(Model.LastActivityDate, "No Activity"))
@Html.DisplayNameFor(m => m.LastLoginDate)
@Html.Partial("_DateTimeHistoric", new Tuple(Model.LastLoginDate, "Never Logged In"))
@Html.DisplayNameFor(m => m.LastPasswordChangedDate)
@Html.Partial("_DateTimeHistoric", new Tuple(Model.LastPasswordChangedDate, "Never Changed"))
@if (Model.IsLockedOut) {
Lockout Password Date
@Html.Partial("_DateTimeHistoric", new Tuple(Model.LastLockoutDate, "Never Locked (?)"))
}
@Html.ActionLink("Edit", "Edit", new { id = Model.UserId }, new { @class = "btn" })
Password
@if (Model.IsApproved) { @Html.ActionLink("Disable Account", "DisableUser", new {id = Model.UserId}, new {@class = "btn"}) } else { @Html.ActionLink("Enable Account", "EnableUser", new {id = Model.UserId}, new {@class = "btn"}) } @if (Model.IsLockedOut) { @Html.ActionLink("Unlock", "UnlockUser", new {id = Model.UserId}, new {@class = "btn"}) } @Html.ActionLink("Logs", "Index", "Log", new { EmployeeName = Model.FullName}, new { @class = "btn" })