From 4fa350c2cfd77a183e96665078823325b6d7d06d Mon Sep 17 00:00:00 2001 From: Michael Date: Sun, 7 May 2017 11:50:53 -0400 Subject: [PATCH] users page --- Project-Unite/Views/Admin/Index.cshtml | 58 +++++++++++++++++++++++++- 1 file changed, 57 insertions(+), 1 deletion(-) diff --git a/Project-Unite/Views/Admin/Index.cshtml b/Project-Unite/Views/Admin/Index.cshtml index 16c0b82..942838e 100644 --- a/Project-Unite/Views/Admin/Index.cshtml +++ b/Project-Unite/Views/Admin/Index.cshtml @@ -1,5 +1,7 @@ @using Project_Unite.Models; @using Microsoft.AspNet.Identity; +@using Project_Unite.Controllers; + @{ ViewBag.Title = "Administration Control Panel"; var db = new ApplicationDbContext(); @@ -79,7 +81,61 @@ git clone https://github.com/MichaelTheShifter/Project-Unite

Your changes will be applied after you push your commits to this repository, or your pull request gets merged.

- +
+

Site Configuration

+ +

This feature is not yet implemented.

+
+
+

Users

+ +

Below is a paginated list of all users in the database, most recent users first.

+ + +
+ @for(int i= 0; i < db.Users.GetPageCount(10); i++) + { + string htmlClass = "tab-pane fade in"; + if(i==0) + { + htmlClass += " active"; + } +
+ + + + + + @foreach (var user in db.Users.OrderByDescending(x=>x.JoinedAt).ToArray().GetItemsOnPage(i, 10)) + { + + + + + } +
UserActions
+ @Html.UserLink(user.Id)
+

Joined on: @user.JoinedAt • Banned: @user.IsBanned • Posts: @user.PostCount • Topics: @user.TopicCount

+
+ View Profile + Moderate +
+
+ } +
+
+ \ No newline at end of file