mirror of
https://github.com/lempamo/Project-Unite.git
synced 2025-01-22 17:22:15 +00:00
Add dev CP index.
This commit is contained in:
parent
d4c087381f
commit
b7457b5d53
4 changed files with 55 additions and 9 deletions
19
Project-Unite/Controllers/DeveloperController.cs
Normal file
19
Project-Unite/Controllers/DeveloperController.cs
Normal file
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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\" />
|
||||
|
|
|
@ -1 +1,8 @@
|
|||
This is/will be the developer cp page. its not done yet
|
||||
|
||||
@{
|
||||
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>
|
|
@ -115,21 +115,37 @@
|
|||
</ul>
|
||||
@RenderBody();
|
||||
}
|
||||
else if (ViewBag.Developer)
|
||||
{
|
||||
<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 (ViewBag.Admin == true)
|
||||
{
|
||||
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()
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue