summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael <[email protected]>2017-05-07 12:17:58 -0400
committerMichael <[email protected]>2017-05-07 12:17:58 -0400
commit04b4862ab778d75bc15a1c53a28c339deb26d768 (patch)
tree5c650584c12e69721fd494abf195ee7d6f6aa982
parent28e16e286d9724c5dce7ef0c12e93a288128150e (diff)
downloadproject-unite-04b4862ab778d75bc15a1c53a28c339deb26d768.tar.gz
project-unite-04b4862ab778d75bc15a1c53a28c339deb26d768.tar.bz2
project-unite-04b4862ab778d75bc15a1c53a28c339deb26d768.zip
skins page
-rw-r--r--Project-Unite/Views/Admin/Index.cshtml55
1 files changed, 54 insertions, 1 deletions
diff --git a/Project-Unite/Views/Admin/Index.cshtml b/Project-Unite/Views/Admin/Index.cshtml
index 872f158..9ec5202 100644
--- a/Project-Unite/Views/Admin/Index.cshtml
+++ b/Project-Unite/Views/Admin/Index.cshtml
@@ -136,7 +136,7 @@ git clone https://github.com/MichaelTheShifter/Project-Unite
{
<a href="@Url.Action("DecreaseRolePriority", "Admin", new {id=role.Id})" class="btn btn-default"><span class="glyphicon glyphicon-arrow-down"></span></a>
}
- @if (role.Priority < roles.Length)
+ @if (role.Priority < roles.Length - 1)
{
<a href="@Url.Action("IncreaseRolePriority", "Admin", new {id=role.Id})" class="btn btn-default"><span class="glyphicon glyphicon-arrow-up"></span></a>
}
@@ -153,6 +153,59 @@ git clone https://github.com/MichaelTheShifter/Project-Unite
</div>
+ @*SKINS*@
+ <div class="tab-pane fade in" id="a_skins">
+ <h2>Skins</h2>
+
+ <p>Below is a list of all skins in the system.</p>
+
+ <ul class="pagination" data-tabs="skintabs" id="skintabs">
+ @for (int i = 0; i < db.Skins.GetPageCount(10); i++)
+ {
+ string htmlClass = "";
+ if (i == 0)
+ {
+ htmlClass = "active";
+ }
+ int page = i + 1;
+ <li class="@htmlClass"><a data-toggle="tab" href="#skn_page_@i">@page</a></li>
+ }
+ </ul>
+ <div class="tab-content">
+ @for (int i = 0; i < db.Skins.GetPageCount(10); i++)
+ {
+ string htmlClass = "tab-pane fade in";
+ if (i == 0)
+ {
+ htmlClass += " active";
+ }
+ <div class="@htmlClass" id="skn_page_@i">
+ <table class="table">
+ <tr>
+ <th style="width:65%">Skin</th>
+ <th>Actions</th>
+ </tr>
+ @foreach (var skin in db.Skins.OrderByDescending(x => x.PostedAt).ToArray().GetItemsOnPage(i, 10))
+ {
+ <tr>
+ <td>
+ @Html.ActionLink(skin.Name, "ViewSkin", "Skins", new { id = skin.Id }, null) <br />
+ <p>Created at: @skin.PostedAt &bull; Likes: @skin.Likes.Count() &bull; Dislikes: @skin.Dislikes.Count() &bull; Views: @skin.Views.Count()</p>
+ <p>@Html.Markdown(skin.ShortDescription)</p>
+ </td>
+ <td>
+ <a href="@Url.Action("ModerateSkin", "Moderator", new {id=skin.Id})" class="btn btn-warning"><span class="glyphicon glyphicon-wrench">Moderate</span></a>
+ </td>
+ </tr>
+ }
+ </table>
+ </div>
+ }
+ </div>
+ </div>
+
+
+