mirror of
https://github.com/lempamo/Project-Unite.git
synced 2025-01-22 03:11:48 -05:00
users page
This commit is contained in:
parent
ce5adf1734
commit
4fa350c2cf
1 changed files with 57 additions and 1 deletions
|
@ -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>
|
Loading…
Reference in a new issue