Admin auth functionally complete

This commit is contained in:
2012-12-31 14:49:41 -05:00
parent 8739251066
commit 2ec2a752cd
30 changed files with 260 additions and 79 deletions
+15 -18
View File
@@ -1,5 +1,5 @@
@using MileageTraker.Web.Utility
@model IEnumerable<MileageTraker.Web.Models.User>
@using MileageTraker.Web.Models
@model IEnumerable<User>
@{
ViewBag.Title = "Users";
@@ -21,23 +21,20 @@
grid.Columns(
grid.Column("Username", format:
@<text>
<span title="@Html.Encode(item.Email)">
@Html.Encode(item.Username)
</span>
@if (item.LastActivityDate > CustomExtensions.UserOnlineThreshold()) {
<span class='label label-info'>Online</span>
}
@if (item.IsLockedOut) {
<span class='label label-warning' title="@string.Format("Locked out on {0:d}", item.LastLockoutDate)">Locked Out</span>
}
@if (!item.IsApproved)
{
<span class='label label-inverse'>Account Disabled</span>
}</text> ),
<span title="@Html.Encode(item.Email)">
@Html.Encode(item.Username)
</span>
@Html.Partial("_UserStatusLabels",
new User{
LastActivityDate = item.LastActivityDate,
IsLockedOut = item.IsLockedOut,
LastLockoutDate = item.LastLockoutDate,
IsApproved = item.IsApproved})
</text> ),
grid.Column("FullName", "Full Name"),
grid.Column("Roles", format:
@<text>
@{ var roles = Roles.Provider.GetRolesForUser(item.Username); }
@{var roles = Roles.Provider.GetRolesForUser(item.Username);}
@if (roles.Length > 0)
{
@Html.Encode(string.Join(", ", roles))
@@ -49,8 +46,8 @@
</text>),
grid.Column(format:
@<div class='btn-group'>
@Html.ActionLink("Edit", "Edit", new { id = item.UserId }, new { @class = "btn btn-mini" })
@Html.ActionLink("Details", "Details", new { id = item.UserId }, new { @class = "btn btn-mini" })
@*Html.ActionLink("Edit", "Edit", new { id = item.UserId }, new { @class = "btn btn-mini" })*@
@Html.ActionLink("Details / Edit", "Details", new { id = item.UserId }, new { @class = "btn btn-mini" })
</div>)
),
htmlAttributes: new { @class = "table table-striped table-bordered table-hover table-condensed"},