diff options
| author | Michael <[email protected]> | 2017-05-07 11:50:53 -0400 |
|---|---|---|
| committer | Michael <[email protected]> | 2017-05-07 11:50:53 -0400 |
| commit | 4fa350c2cfd77a183e96665078823325b6d7d06d (patch) | |
| tree | 19fe7e5b37e89f693549e9f824e48376817f9d1f /Project-Unite/Views/Admin | |
| parent | ce5adf173437eb552b16b1d4d96927e0d62171aa (diff) | |
| download | project-unite-4fa350c2cfd77a183e96665078823325b6d7d06d.tar.gz project-unite-4fa350c2cfd77a183e96665078823325b6d7d06d.tar.bz2 project-unite-4fa350c2cfd77a183e96665078823325b6d7d06d.zip | |
users page
Diffstat (limited to 'Project-Unite/Views/Admin')
| -rw-r--r-- | Project-Unite/Views/Admin/Index.cshtml | 58 |
1 files changed, 57 insertions, 1 deletions
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 <p>Your changes will be applied after you push your commits to this repository, or your pull request gets merged.</p> </div> - </div> + <div class="tab-pane fade in" id="a_site_config"> + <h2>Site Configuration</h2> + + <p>This feature is not yet implemented.</p> + </div> + <div class="tab-pane fade in" id="a_users"> + <h2>Users</h2> + + <p>Below is a paginated list of all users in the database, most recent users first.</p> + + <ul class="pagination" data-tabs="usertabs" id="usertabs" > + @for (int i = 0; i < db.Users.GetPageCount(10); i++) + { + string htmlClass = ""; + if(i == 0) + { + htmlClass = "active"; + } + int page = i + 1; + <li class="@htmlClass"><a data-toggle="tab" href="#u_page_@i">@page</a></li> + } + </ul> + <div class="tab-content"> + @for(int i= 0; i < db.Users.GetPageCount(10); i++) + { + string htmlClass = "tab-pane fade in"; + if(i==0) + { + htmlClass += " active"; + } + <div class="@htmlClass" id="u_page_@i"> + <table class="table"> + <tr> + <th style="width:65%">User</th> + <th>Actions</th> + </tr> + @foreach (var user in db.Users.OrderByDescending(x=>x.JoinedAt).ToArray().GetItemsOnPage(i, 10)) + { + <tr> + <td> + @Html.UserLink(user.Id) <br/> + <p>Joined on: @user.JoinedAt • Banned: @user.IsBanned • Posts: @user.PostCount • Topics: @user.TopicCount</p> + </td> + <td> + <a href="@Url.Action("ViewProfile", "Profiles", new { id = user.DisplayName })" class="btn btn-default"><span class="glyphicon glyphicon-user"></span> View Profile</a> + <a href="@Url.Action("UserDetails", "Moderator", new {id=user.DisplayName})" class="btn btn-warning"><span class="glyphicon glyphicon-wrench"></span> Moderate</a> + </td> + </tr> + } + </table> + </div> + } + </div> + </div> + </div> </div> </div> </div>
\ No newline at end of file |
