Filter users by active/disabled

This commit is contained in:
2020-08-27 21:41:36 -04:00
parent c58cc951d8
commit b5589103ec
7 changed files with 34 additions and 11 deletions
+4 -2
View File
@@ -1,9 +1,9 @@
@using MileageTraker.Web.Models
@model IEnumerable<User>
@model MileageTraker.Web.ViewModels.User.UserResultsViewModel
@{
ViewBag.Title = "Users";
var grid = new WebGrid(Model, rowsPerPage: 45);
var grid = new WebGrid(Model.Users, rowsPerPage: 45);
}
@Html.Partial("_StatusMessage")
@@ -20,6 +20,8 @@
<div class="btn-toolbar pull-left">
@Html.ActionLink("Add new User", "Create", null, new{@class="btn"})
@Html.ActionLink("Export", "Export", null, new{@class="btn"})
@Html.ActionLink(Model.Disabled ? "Show Active" : "Show Disabled Accts", "Index", new {disabled = !Model.Disabled}, new { @class = "btn" })
@if (User.IsInRole("Developer"))
{
@Html.ActionLink("Invite Uninintialized", "InviteUninitialized", null, new{@class="btn"})