Admin auth functionally complete
This commit is contained in:
@@ -12,9 +12,20 @@
|
||||
<h2 class="center-content">@ViewBag.Title</h2>
|
||||
|
||||
<div class="center-content well">
|
||||
|
||||
<dl class="dl-horizontal username">
|
||||
<dt>
|
||||
@Html.DisplayNameFor(m => m.Username)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.Encode(Model.Username)
|
||||
@Html.Partial("_UserStatusLabels")
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
@Html.DisplayFor(m => m.Email)
|
||||
@Html.DisplayFor(m => m.Username)
|
||||
|
||||
@Html.DisplayFor(m => m.FullName)
|
||||
|
||||
<dl class="dl-horizontal roles">
|
||||
<dt>
|
||||
@@ -33,7 +44,7 @@
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<dl class="dl-horizontal lastActivity">
|
||||
<dl class="dl-horizontal lastActivityDate">
|
||||
<dt>
|
||||
@Html.DisplayNameFor(m => m.LastActivityDate)
|
||||
</dt>
|
||||
@@ -50,14 +61,73 @@
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<dl class="dl-horizontal lastLoginDate">
|
||||
<dt>
|
||||
@Html.DisplayNameFor(m => m.LastLoginDate)
|
||||
</dt>
|
||||
<dd>
|
||||
@if (!Model.LastLoginDate.IsSqlMinValue())
|
||||
{
|
||||
@Html.Encode(Model.LastLoginDate)
|
||||
<span class="muted">(@Html.Encode((DateTime.Now - Model.LastLoginDate).ToVerboseStringHistoric()))</span>
|
||||
}
|
||||
else
|
||||
{
|
||||
<span class='label label-info'>Never Logged In</span>
|
||||
}
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<dl class="dl-horizontal lastPasswordChangedDate">
|
||||
<dt>
|
||||
@Html.DisplayNameFor(m => m.LastPasswordChangedDate)
|
||||
</dt>
|
||||
<dd>
|
||||
@if (!Model.LastPasswordChangedDate.IsSqlMinValue())
|
||||
{
|
||||
@Html.Encode(Model.LastPasswordChangedDate)
|
||||
<span class="muted">(@Html.Encode((DateTime.Now - Model.LastPasswordChangedDate).ToVerboseStringHistoric()))</span>
|
||||
}
|
||||
else
|
||||
{
|
||||
<span class='label label-info'>Never Changed</span>
|
||||
}
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
@if (Model.IsLockedOut) {
|
||||
<p class="alert alert-info">
|
||||
Locked out on @Html.DisplayTextFor(m => m.LastLockoutDate)
|
||||
</p>
|
||||
<dl class="dl-horizontal lastLockoutDate">
|
||||
<dt>
|
||||
Lockout Password Date
|
||||
</dt>
|
||||
<dd>
|
||||
@if (!Model.LastLockoutDate.IsSqlMinValue())
|
||||
{
|
||||
@Html.Encode(Model.LastLockoutDate)
|
||||
<span class="muted">(@Html.Encode((DateTime.Now - Model.LastLockoutDate).ToVerboseStringHistoric()))</span>
|
||||
}
|
||||
else
|
||||
{
|
||||
<span class='label label-info'>Never Locked (?)</span>
|
||||
}
|
||||
</dd>
|
||||
</dl>
|
||||
}
|
||||
</div>
|
||||
|
||||
<div class="btn-toolbar center-content">
|
||||
@Html.ActionLink("Edit", "Edit", new { id = Model.UserId }, new { @class = "btn" })
|
||||
@Html.ActionLink("Set Password", "SetPassword", new { id = Model.UserId }, new { @class = "btn" })
|
||||
@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"})
|
||||
}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user