diff --git a/Project-Unite/Controllers/DeveloperController.cs b/Project-Unite/Controllers/DeveloperController.cs index cbe1436..b635a21 100644 --- a/Project-Unite/Controllers/DeveloperController.cs +++ b/Project-Unite/Controllers/DeveloperController.cs @@ -14,9 +14,9 @@ namespace Project_Unite.Controllers public class DeveloperController : Controller { // GET: Developer - public ActionResult Index() + public ActionResult Index(string id = "home") { - ViewBag.Developer = true; + ViewBag.Page = id; return View(); } @@ -51,8 +51,7 @@ public ActionResult MakeStable(string id) public ActionResult Releases() { - var db = new ApplicationDbContext(); - return View(db.Downloads); + return RedirectToAction("Index", new { id = "releases" }); } public ActionResult AddRelease() @@ -154,10 +153,7 @@ public ActionResult AddRelease(PostDownloadViewModel model) [Authorize] public ActionResult Wiki() { - ViewBag.Developer = true; - var db = new ApplicationDbContext(); - var cats = db.WikiCategories; - return View(cats); + return RedirectToAction("Index", new { id = "wiki" }); } public ActionResult AddWikiCategory() diff --git a/Project-Unite/Project-Unite.csproj b/Project-Unite/Project-Unite.csproj index d2c2ee8..4d71663 100644 --- a/Project-Unite/Project-Unite.csproj +++ b/Project-Unite/Project-Unite.csproj @@ -130,6 +130,10 @@ ..\packages\Nito.AsyncEx.3.0.1\lib\net45\Nito.AsyncEx.Enlightenment.dll True + + ..\packages\Octokit.0.24.1-alpha0001\lib\net45\Octokit.dll + True + ..\packages\reachmail.2.0.0.87\lib\Reachmail.dll True diff --git a/Project-Unite/Views/Developer/index.cshtml b/Project-Unite/Views/Developer/index.cshtml index f371d32..8c5daee 100644 --- a/Project-Unite/Views/Developer/index.cshtml +++ b/Project-Unite/Views/Developer/index.cshtml @@ -1,57 +1,39 @@  @{ ViewBag.Title = "Dev Control Panel"; + string homeclass = (ViewBag.Page == "home") ? "active" : ""; + string releasesclass = (ViewBag.Page == "releases") ? "active" : ""; + string wikiclass = (ViewBag.Page == "wiki") ? "active" : ""; var db = new Project_Unite.Models.ApplicationDbContext(); - int fixedbugs = db.Bugs.Where(x => x.Open == false).Count(); - int notfixedbugs = db.Bugs.Where(x => x.Open == true).Count(); - + var releases = db.Downloads; + var cats = db.WikiCategories; } -

Welcome!

+

Developer Control Panel

-

Here, have a bunch of charts that tell you what you already know!

+

A place that only the best of the best ShiftOS developers can access.

-
-

Bugs

-

Here's a pie chart that tells you how many bugs have been fixed.

-
+
+

Places

+ +
-
+
+
+

Not yet implemented.

- - - - - - - - - - - \ No newline at end of file +

Please suggest things to put in here.

+
+
+ @Html.Partial("~/Views/Developer/Releases.cshtml", releases); +
+
+ @Html.Partial("~/Views/Developer/Wiki.cshtml", cats); +
+
+
\ No newline at end of file diff --git a/Project-Unite/packages.config b/Project-Unite/packages.config index 321930e..64a692e 100644 --- a/Project-Unite/packages.config +++ b/Project-Unite/packages.config @@ -42,6 +42,7 @@ +