summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael <[email protected]>2017-04-05 18:45:44 -0400
committerMichael <[email protected]>2017-04-05 18:45:50 -0400
commitb7457b5d532506abdae0ab74bfdc45f0f955a526 (patch)
treebe88f8714a5dd404041814cf5e077ab66e7c7291
parentd4c087381f96c56c628de84c725f7003c5119c2b (diff)
downloadproject-unite-b7457b5d532506abdae0ab74bfdc45f0f955a526.tar.gz
project-unite-b7457b5d532506abdae0ab74bfdc45f0f955a526.tar.bz2
project-unite-b7457b5d532506abdae0ab74bfdc45f0f955a526.zip
Add dev CP index.
-rw-r--r--Project-Unite/Controllers/DeveloperController.cs19
-rw-r--r--Project-Unite/Project-Unite.csproj2
-rw-r--r--Project-Unite/Views/Developer/index.cshtml9
-rw-r--r--Project-Unite/Views/Shared/_Layout.cshtml34
4 files changed, 55 insertions, 9 deletions
diff --git a/Project-Unite/Controllers/DeveloperController.cs b/Project-Unite/Controllers/DeveloperController.cs
new file mode 100644
index 0000000..301038d
--- /dev/null
+++ b/Project-Unite/Controllers/DeveloperController.cs
@@ -0,0 +1,19 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.Mvc;
+
+namespace Project_Unite.Controllers
+{
+ [Authorize]
+ public class DeveloperController : Controller
+ {
+ // GET: Developer
+ public ActionResult Index()
+ {
+ ViewBag.Developer = true;
+ return View();
+ }
+ }
+} \ No newline at end of file
diff --git a/Project-Unite/Project-Unite.csproj b/Project-Unite/Project-Unite.csproj
index 2872ce2..9fe031a 100644
--- a/Project-Unite/Project-Unite.csproj
+++ b/Project-Unite/Project-Unite.csproj
@@ -238,6 +238,7 @@
<Compile Include="App_Start\Startup.Auth.cs" />
<Compile Include="Controllers\AccountController.cs" />
<Compile Include="Controllers\AdminController.cs" />
+ <Compile Include="Controllers\DeveloperController.cs" />
<Compile Include="Controllers\DownloadController.cs" />
<Compile Include="Controllers\ForumController.cs" />
<Compile Include="Controllers\HomeController.cs" />
@@ -537,6 +538,7 @@
<Content Include="Views\Download\Index.cshtml" />
<Content Include="Views\Forum\ViewUnread.cshtml" />
<Content Include="Views\Wiki\Index.cshtml" />
+ <Content Include="Views\Developer\Index.cshtml" />
</ItemGroup>
<ItemGroup>
<Folder Include="App_Data\" />
diff --git a/Project-Unite/Views/Developer/index.cshtml b/Project-Unite/Views/Developer/index.cshtml
index a39b5fc..447df64 100644
--- a/Project-Unite/Views/Developer/index.cshtml
+++ b/Project-Unite/Views/Developer/index.cshtml
@@ -1 +1,8 @@
-This is/will be the developer cp page. its not done yet \ No newline at end of file
+
+@{
+ ViewBag.Title = "Dev Control Panel";
+}
+
+<h2>Welcome!</h2>
+
+<p>Hey devs! In the future, this page will give you fancy details on how ShiftOS and the website are progressing. But, that data is not yet available to me - so for now, here's some placeholder text telling you that the dev CP is work-in-progress.</p> \ No newline at end of file
diff --git a/Project-Unite/Views/Shared/_Layout.cshtml b/Project-Unite/Views/Shared/_Layout.cshtml
index 024c6bf..3a6487f 100644
--- a/Project-Unite/Views/Shared/_Layout.cshtml
+++ b/Project-Unite/Views/Shared/_Layout.cshtml
@@ -115,21 +115,37 @@
</ul>
@RenderBody();
}
- else if (ACL.Granted(User.Identity.Name, ViewBag.ACLRule))
+ else if (ViewBag.Developer)
{
- if (ViewBag.Admin == true)
+ <ul class="nav nav-pills">
+ <li>@Html.ActionLink("Home", "Index", "Developer")</li>
+ <li>@Html.ActionLink("Releases", "Releases", "Developer")</li>
+ <li>@Html.ActionLink("Wiki", "Wiki", "Developer")</li>
+ <li>@Html.ActionLink("Bugs", "Bugs", "Developer")</li>
+
+ </ul>
+
+
+ @RenderBody();
+ }
+ else if (ACL.Granted(User.Identity.Name, ViewBag.ACLRule))
{
- if (ACL.Granted(User.Identity.Name, "CanAccessAdminCP"))
+ if (ViewBag.Admin == true)
{
- <ul class="nav nav-tabs">
+ if (ACL.Granted(User.Identity.Name, "CanAccessAdminCP"))
+ {
+
+ <ul class="nav nav-tabs">
<li>@Html.ActionLink("Home", "Index", "Admin")</li>
- @if (ACL.Granted(User.Identity.Name, "CanEditRoles"))
+
+ @if (ACL.Granted(User.Identity.Name, "CanEditRoles"))
{
<li>@Html.ActionLink("Roles", "Roles", "Admin")</li>
<li>@Html.ActionLink("Access Control", "AccessControl", "Admin")</li>
}
- @if (ACL.Granted(User.Identity.Name, "CanEditProfiles"))
+
+ @if (ACL.Granted(User.Identity.Name, "CanEditProfiles"))
{
<li>@Html.ActionLink("Users", "Users", "Admin")</li>
}
@@ -139,7 +155,8 @@
}
<li>@Html.ActionLink("Audit logs", "Logs", "Admin")</li>
</ul>
- @RenderBody();
+
+ @RenderBody();
}
else
{
@@ -149,7 +166,8 @@
}
else
{
- @RenderBody()
+
+ @RenderBody()
}
}