From cdc61eb4ea5309769ad4db84d92594e4dc3dff67 Mon Sep 17 00:00:00 2001 From: Michael Date: Mon, 20 Mar 2017 16:45:17 -0400 Subject: Initial commit (azure deploy test) --- Project-Unite/Views/Account/ConfirmEmail.cshtml | 10 + .../Views/Account/ExternalLoginConfirmation.cshtml | 36 ++ .../Views/Account/ExternalLoginFailure.cshtml | 8 + Project-Unite/Views/Account/ForgotPassword.cshtml | 29 + .../Account/ForgotPasswordConfirmation.cshtml | 13 + Project-Unite/Views/Account/Login.cshtml | 62 +++ Project-Unite/Views/Account/Register.cshtml | 47 ++ Project-Unite/Views/Account/ResendConf.cshtml | 23 + Project-Unite/Views/Account/ResetPassword.cshtml | 42 ++ .../Views/Account/ResetPasswordConfirmation.cshtml | 12 + Project-Unite/Views/Account/SendCode.cshtml | 24 + Project-Unite/Views/Account/VerifyCode.cshtml | 38 ++ .../Account/_ExternalLoginsListPartial.cshtml | 28 + Project-Unite/Views/Admin/AccessControl.cshtml | 59 ++ Project-Unite/Views/Admin/AddForumCategory.cshtml | 48 ++ Project-Unite/Views/Admin/AddUserToRole.cshtml | 24 + Project-Unite/Views/Admin/CreateRole.cshtml | 59 ++ Project-Unite/Views/Admin/DeleteRole.cshtml | 48 ++ Project-Unite/Views/Admin/EditForum.cshtml | 51 ++ Project-Unite/Views/Admin/EditRole.cshtml | 619 +++++++++++++++++++++ Project-Unite/Views/Admin/Forums.cshtml | 49 ++ Project-Unite/Views/Admin/Index.cshtml | 7 + Project-Unite/Views/Admin/Logs.cshtml | 25 + Project-Unite/Views/Admin/RoleDetails.cshtml | 44 ++ Project-Unite/Views/Admin/Roles.cshtml | 65 +++ Project-Unite/Views/Admin/Users.cshtml | 45 ++ Project-Unite/Views/Forum/CreateTopic.cshtml | 86 +++ Project-Unite/Views/Forum/EditPost.cshtml | 37 ++ Project-Unite/Views/Forum/Index.cshtml | 39 ++ Project-Unite/Views/Forum/PostReply.cshtml | 27 + Project-Unite/Views/Forum/ViewForum.cshtml | 166 ++++++ Project-Unite/Views/Forum/ViewTopic.cshtml | 69 +++ Project-Unite/Views/Home/About.cshtml | 7 + Project-Unite/Views/Home/Contact.cshtml | 17 + Project-Unite/Views/Home/Index.cshtml | 66 +++ Project-Unite/Views/Manage/AddPhoneNumber.cshtml | 29 + Project-Unite/Views/Manage/ChangePassword.cshtml | 40 ++ Project-Unite/Views/Manage/Index.cshtml | 81 +++ Project-Unite/Views/Manage/ManageLogins.cshtml | 70 +++ Project-Unite/Views/Manage/SetPassword.cshtml | 39 ++ .../Views/Manage/VerifyPhoneNumber.cshtml | 31 ++ Project-Unite/Views/Moderator/Bans.cshtml | 73 +++ Project-Unite/Views/Moderator/Index.cshtml | 7 + Project-Unite/Views/Moderator/Logs.cshtml | 25 + Project-Unite/Views/Moderator/UserDetails.cshtml | 116 ++++ Project-Unite/Views/Moderator/Users.cshtml | 28 + Project-Unite/Views/Shared/Error.cshtml | 9 + Project-Unite/Views/Shared/Lockout.cshtml | 10 + Project-Unite/Views/Shared/_Layout.cshtml | 162 ++++++ Project-Unite/Views/Shared/_LoginPartial.cshtml | 40 ++ Project-Unite/Views/Shared/_ModeratorBar.cshtml | 133 +++++ .../Views/Shared/_PostModerationBar.cshtml | 27 + Project-Unite/Views/Web.config | 43 ++ Project-Unite/Views/_ViewStart.cshtml | 3 + 54 files changed, 2995 insertions(+) create mode 100644 Project-Unite/Views/Account/ConfirmEmail.cshtml create mode 100644 Project-Unite/Views/Account/ExternalLoginConfirmation.cshtml create mode 100644 Project-Unite/Views/Account/ExternalLoginFailure.cshtml create mode 100644 Project-Unite/Views/Account/ForgotPassword.cshtml create mode 100644 Project-Unite/Views/Account/ForgotPasswordConfirmation.cshtml create mode 100644 Project-Unite/Views/Account/Login.cshtml create mode 100644 Project-Unite/Views/Account/Register.cshtml create mode 100644 Project-Unite/Views/Account/ResendConf.cshtml create mode 100644 Project-Unite/Views/Account/ResetPassword.cshtml create mode 100644 Project-Unite/Views/Account/ResetPasswordConfirmation.cshtml create mode 100644 Project-Unite/Views/Account/SendCode.cshtml create mode 100644 Project-Unite/Views/Account/VerifyCode.cshtml create mode 100644 Project-Unite/Views/Account/_ExternalLoginsListPartial.cshtml create mode 100644 Project-Unite/Views/Admin/AccessControl.cshtml create mode 100644 Project-Unite/Views/Admin/AddForumCategory.cshtml create mode 100644 Project-Unite/Views/Admin/AddUserToRole.cshtml create mode 100644 Project-Unite/Views/Admin/CreateRole.cshtml create mode 100644 Project-Unite/Views/Admin/DeleteRole.cshtml create mode 100644 Project-Unite/Views/Admin/EditForum.cshtml create mode 100644 Project-Unite/Views/Admin/EditRole.cshtml create mode 100644 Project-Unite/Views/Admin/Forums.cshtml create mode 100644 Project-Unite/Views/Admin/Index.cshtml create mode 100644 Project-Unite/Views/Admin/Logs.cshtml create mode 100644 Project-Unite/Views/Admin/RoleDetails.cshtml create mode 100644 Project-Unite/Views/Admin/Roles.cshtml create mode 100644 Project-Unite/Views/Admin/Users.cshtml create mode 100644 Project-Unite/Views/Forum/CreateTopic.cshtml create mode 100644 Project-Unite/Views/Forum/EditPost.cshtml create mode 100644 Project-Unite/Views/Forum/Index.cshtml create mode 100644 Project-Unite/Views/Forum/PostReply.cshtml create mode 100644 Project-Unite/Views/Forum/ViewForum.cshtml create mode 100644 Project-Unite/Views/Forum/ViewTopic.cshtml create mode 100644 Project-Unite/Views/Home/About.cshtml create mode 100644 Project-Unite/Views/Home/Contact.cshtml create mode 100644 Project-Unite/Views/Home/Index.cshtml create mode 100644 Project-Unite/Views/Manage/AddPhoneNumber.cshtml create mode 100644 Project-Unite/Views/Manage/ChangePassword.cshtml create mode 100644 Project-Unite/Views/Manage/Index.cshtml create mode 100644 Project-Unite/Views/Manage/ManageLogins.cshtml create mode 100644 Project-Unite/Views/Manage/SetPassword.cshtml create mode 100644 Project-Unite/Views/Manage/VerifyPhoneNumber.cshtml create mode 100644 Project-Unite/Views/Moderator/Bans.cshtml create mode 100644 Project-Unite/Views/Moderator/Index.cshtml create mode 100644 Project-Unite/Views/Moderator/Logs.cshtml create mode 100644 Project-Unite/Views/Moderator/UserDetails.cshtml create mode 100644 Project-Unite/Views/Moderator/Users.cshtml create mode 100644 Project-Unite/Views/Shared/Error.cshtml create mode 100644 Project-Unite/Views/Shared/Lockout.cshtml create mode 100644 Project-Unite/Views/Shared/_Layout.cshtml create mode 100644 Project-Unite/Views/Shared/_LoginPartial.cshtml create mode 100644 Project-Unite/Views/Shared/_ModeratorBar.cshtml create mode 100644 Project-Unite/Views/Shared/_PostModerationBar.cshtml create mode 100644 Project-Unite/Views/Web.config create mode 100644 Project-Unite/Views/_ViewStart.cshtml (limited to 'Project-Unite/Views') diff --git a/Project-Unite/Views/Account/ConfirmEmail.cshtml b/Project-Unite/Views/Account/ConfirmEmail.cshtml new file mode 100644 index 0000000..ed02ad8 --- /dev/null +++ b/Project-Unite/Views/Account/ConfirmEmail.cshtml @@ -0,0 +1,10 @@ +@{ + ViewBag.Title = "Confirm Email"; +} + +

@ViewBag.Title.

+
+

+ Thank you for confirming your email. Please @Html.ActionLink("Click here to Log in", "Login", "Account", routeValues: null, htmlAttributes: new { id = "loginLink" }) +

+
diff --git a/Project-Unite/Views/Account/ExternalLoginConfirmation.cshtml b/Project-Unite/Views/Account/ExternalLoginConfirmation.cshtml new file mode 100644 index 0000000..bcc491c --- /dev/null +++ b/Project-Unite/Views/Account/ExternalLoginConfirmation.cshtml @@ -0,0 +1,36 @@ +@model Project_Unite.Models.ExternalLoginConfirmationViewModel +@{ + ViewBag.Title = "Register"; +} +

@ViewBag.Title.

+

Associate your @ViewBag.LoginProvider account.

+ +@using (Html.BeginForm("ExternalLoginConfirmation", "Account", new { ReturnUrl = ViewBag.ReturnUrl }, FormMethod.Post, new { @class = "form-horizontal", role = "form" })) +{ + @Html.AntiForgeryToken() + +

Association Form

+
+ @Html.ValidationSummary(true, "", new { @class = "text-danger" }) +

+ You've successfully authenticated with @ViewBag.LoginProvider. + Please enter a user name for this site below and click the Register button to finish + logging in. +

+
+ @Html.LabelFor(m => m.Email, new { @class = "col-md-2 control-label" }) +
+ @Html.TextBoxFor(m => m.Email, new { @class = "form-control" }) + @Html.ValidationMessageFor(m => m.Email, "", new { @class = "text-danger" }) +
+
+
+
+ +
+
+} + +@section Scripts { + @Scripts.Render("~/bundles/jqueryval") +} diff --git a/Project-Unite/Views/Account/ExternalLoginFailure.cshtml b/Project-Unite/Views/Account/ExternalLoginFailure.cshtml new file mode 100644 index 0000000..3be4ab3 --- /dev/null +++ b/Project-Unite/Views/Account/ExternalLoginFailure.cshtml @@ -0,0 +1,8 @@ +@{ + ViewBag.Title = "Login Failure"; +} + +
+

@ViewBag.Title.

+

Unsuccessful login with service.

+
diff --git a/Project-Unite/Views/Account/ForgotPassword.cshtml b/Project-Unite/Views/Account/ForgotPassword.cshtml new file mode 100644 index 0000000..1bb2611 --- /dev/null +++ b/Project-Unite/Views/Account/ForgotPassword.cshtml @@ -0,0 +1,29 @@ +@model Project_Unite.Models.ForgotPasswordViewModel +@{ + ViewBag.Title = "Forgot your password?"; +} + +

@ViewBag.Title.

+ +@using (Html.BeginForm("ForgotPassword", "Account", FormMethod.Post, new { @class = "form-horizontal", role = "form" })) +{ + @Html.AntiForgeryToken() +

Enter your email.

+
+ @Html.ValidationSummary("", new { @class = "text-danger" }) +
+ @Html.LabelFor(m => m.Email, new { @class = "col-md-2 control-label" }) +
+ @Html.TextBoxFor(m => m.Email, new { @class = "form-control" }) +
+
+
+
+ +
+
+} + +@section Scripts { + @Scripts.Render("~/bundles/jqueryval") +} diff --git a/Project-Unite/Views/Account/ForgotPasswordConfirmation.cshtml b/Project-Unite/Views/Account/ForgotPasswordConfirmation.cshtml new file mode 100644 index 0000000..dd7af8c --- /dev/null +++ b/Project-Unite/Views/Account/ForgotPasswordConfirmation.cshtml @@ -0,0 +1,13 @@ +@{ + ViewBag.Title = "Forgot Password Confirmation"; +} + +
+

@ViewBag.Title.

+
+
+

+ Please check your email to reset your password. +

+
+ diff --git a/Project-Unite/Views/Account/Login.cshtml b/Project-Unite/Views/Account/Login.cshtml new file mode 100644 index 0000000..1244c62 --- /dev/null +++ b/Project-Unite/Views/Account/Login.cshtml @@ -0,0 +1,62 @@ +@using Project_Unite.Models +@model LoginViewModel +@{ + ViewBag.Title = "Log in"; +} + +

@ViewBag.Title.

+
+
+
+ @using (Html.BeginForm("Login", "Account", new { ReturnUrl = ViewBag.ReturnUrl }, FormMethod.Post, new { @class = "form-horizontal", role = "form" })) + { + @Html.AntiForgeryToken() +

Use a local account to log in.

+
+ @Html.ValidationSummary(true, "", new { @class = "text-danger" }) +
+ @Html.LabelFor(m => m.Email, new { @class = "col-md-2 control-label" }) +
+ @Html.TextBoxFor(m => m.Email, new { @class = "form-control" }) + @Html.ValidationMessageFor(m => m.Email, "", new { @class = "text-danger" }) +
+
+
+ @Html.LabelFor(m => m.Password, new { @class = "col-md-2 control-label" }) +
+ @Html.PasswordFor(m => m.Password, new { @class = "form-control" }) + @Html.ValidationMessageFor(m => m.Password, "", new { @class = "text-danger" }) +
+
+
+
+
+ @Html.CheckBoxFor(m => m.RememberMe) + @Html.LabelFor(m => m.RememberMe) +
+
+
+
+
+ +
+
+

+ @Html.ActionLink("Register as a new user", "Register") +

+

+ @Html.ActionLink("Forgot your password?", "ForgotPassword") +

+ } +
+
+
+
+ @Html.Partial("_ExternalLoginsListPartial", new ExternalLoginListViewModel { ReturnUrl = ViewBag.ReturnUrl }) +
+
+
+ +@section Scripts { + @Scripts.Render("~/bundles/jqueryval") +} \ No newline at end of file diff --git a/Project-Unite/Views/Account/Register.cshtml b/Project-Unite/Views/Account/Register.cshtml new file mode 100644 index 0000000..a1d1225 --- /dev/null +++ b/Project-Unite/Views/Account/Register.cshtml @@ -0,0 +1,47 @@ +@model Project_Unite.Models.RegisterViewModel +@{ + ViewBag.Title = "Register"; +} + +

@ViewBag.Title.

+ +@using (Html.BeginForm("Register", "Account", FormMethod.Post, new { @class = "form-horizontal", role = "form" })) +{ + @Html.AntiForgeryToken() +

Create a new account.

+
+ @Html.ValidationSummary("", new { @class = "text-danger" }) +
+ @Html.LabelFor(m => m.Email, new { @class = "col-md-2 control-label" }) +
+ @Html.TextBoxFor(m => m.Email, new { @class = "form-control" }) +
+
+
+ @Html.LabelFor(m => m.Username, new { @class = "col-md-2 control-label" }) +
+ @Html.TextBoxFor(m => m.Username, new { @class = "form-control" }) +
+
+
+ @Html.LabelFor(m => m.Password, new { @class = "col-md-2 control-label" }) +
+ @Html.PasswordFor(m => m.Password, new { @class = "form-control" }) +
+
+
+ @Html.LabelFor(m => m.ConfirmPassword, new { @class = "col-md-2 control-label" }) +
+ @Html.PasswordFor(m => m.ConfirmPassword, new { @class = "form-control" }) +
+
+
+
+ +
+
+} + +@section Scripts { + @Scripts.Render("~/bundles/jqueryval") +} diff --git a/Project-Unite/Views/Account/ResendConf.cshtml b/Project-Unite/Views/Account/ResendConf.cshtml new file mode 100644 index 0000000..beb8c6f --- /dev/null +++ b/Project-Unite/Views/Account/ResendConf.cshtml @@ -0,0 +1,23 @@ + +@{ + ViewBag.Title = "Confirmation email resent."; +} +@if (ViewBag.IsConfirmed == true) +{ +

Email already confirmed!

+ +

We've already confirmed that your email is valid! There's no need to send a confirmation link! But, if that warning is still nagging you, there might be a bug on our end - contact @ACL.UserNameFromEmailRaw("michaelshiftos@gmail.com") ASAP!

+} +else +{ +

Confirmation email resent.

+ +

We have just sent an email to @User.Identity.Name

+ +

We value your security.

+ +

Security within the multi-user domain is paramount. You must protect yourself the best you can, and so must we. Since you are in the process of confirming your email address, we can soon ensure you are secure within the multi-user domain by allowing us to contact you when suspicious activity occurs on your account or when you need to reset your password.

+ +

Still not there? @Html.ActionLink("Resend it again, please.", "ResendConf")

+ +} \ No newline at end of file diff --git a/Project-Unite/Views/Account/ResetPassword.cshtml b/Project-Unite/Views/Account/ResetPassword.cshtml new file mode 100644 index 0000000..de239b8 --- /dev/null +++ b/Project-Unite/Views/Account/ResetPassword.cshtml @@ -0,0 +1,42 @@ +@model Project_Unite.Models.ResetPasswordViewModel +@{ + ViewBag.Title = "Reset password"; +} + +

@ViewBag.Title.

+ +@using (Html.BeginForm("ResetPassword", "Account", FormMethod.Post, new { @class = "form-horizontal", role = "form" })) +{ + @Html.AntiForgeryToken() +

Reset your password.

+
+ @Html.ValidationSummary("", new { @class = "text-danger" }) + @Html.HiddenFor(model => model.Code) +
+ @Html.LabelFor(m => m.Email, new { @class = "col-md-2 control-label" }) +
+ @Html.TextBoxFor(m => m.Email, new { @class = "form-control" }) +
+
+
+ @Html.LabelFor(m => m.Password, new { @class = "col-md-2 control-label" }) +
+ @Html.PasswordFor(m => m.Password, new { @class = "form-control" }) +
+
+
+ @Html.LabelFor(m => m.ConfirmPassword, new { @class = "col-md-2 control-label" }) +
+ @Html.PasswordFor(m => m.ConfirmPassword, new { @class = "form-control" }) +
+
+
+
+ +
+
+} + +@section Scripts { + @Scripts.Render("~/bundles/jqueryval") +} diff --git a/Project-Unite/Views/Account/ResetPasswordConfirmation.cshtml b/Project-Unite/Views/Account/ResetPasswordConfirmation.cshtml new file mode 100644 index 0000000..3804516 --- /dev/null +++ b/Project-Unite/Views/Account/ResetPasswordConfirmation.cshtml @@ -0,0 +1,12 @@ +@{ + ViewBag.Title = "Reset password confirmation"; +} + +
+

@ViewBag.Title.

+
+
+

+ Your password has been reset. Please @Html.ActionLink("click here to log in", "Login", "Account", routeValues: null, htmlAttributes: new { id = "loginLink" }) +

+
diff --git a/Project-Unite/Views/Account/SendCode.cshtml b/Project-Unite/Views/Account/SendCode.cshtml new file mode 100644 index 0000000..a11a3a6 --- /dev/null +++ b/Project-Unite/Views/Account/SendCode.cshtml @@ -0,0 +1,24 @@ +@model Project_Unite.Models.SendCodeViewModel +@{ + ViewBag.Title = "Send"; +} + +

@ViewBag.Title.

+ +@using (Html.BeginForm("SendCode", "Account", new { ReturnUrl = Model.ReturnUrl }, FormMethod.Post, new { @class = "form-horizontal", role = "form" })) { + @Html.AntiForgeryToken() + @Html.Hidden("rememberMe", @Model.RememberMe) +

Send verification code

+
+
+
+ Select Two-Factor Authentication Provider: + @Html.DropDownListFor(model => model.SelectedProvider, Model.Providers) + +
+
+} + +@section Scripts { + @Scripts.Render("~/bundles/jqueryval") +} diff --git a/Project-Unite/Views/Account/VerifyCode.cshtml b/Project-Unite/Views/Account/VerifyCode.cshtml new file mode 100644 index 0000000..0f47757 --- /dev/null +++ b/Project-Unite/Views/Account/VerifyCode.cshtml @@ -0,0 +1,38 @@ +@model Project_Unite.Models.VerifyCodeViewModel +@{ + ViewBag.Title = "Verify"; +} + +

@ViewBag.Title.

+ +@using (Html.BeginForm("VerifyCode", "Account", new { ReturnUrl = Model.ReturnUrl }, FormMethod.Post, new { @class = "form-horizontal", role = "form" })) { + @Html.AntiForgeryToken() + @Html.Hidden("provider", @Model.Provider) + @Html.Hidden("rememberMe", @Model.RememberMe) +

Enter verification code

+
+ @Html.ValidationSummary("", new { @class = "text-danger" }) +
+ @Html.LabelFor(m => m.Code, new { @class = "col-md-2 control-label" }) +
+ @Html.TextBoxFor(m => m.Code, new { @class = "form-control" }) +
+
+
+
+
+ @Html.CheckBoxFor(m => m.RememberBrowser) + @Html.LabelFor(m => m.RememberBrowser) +
+
+
+
+
+ +
+
+} + +@section Scripts { + @Scripts.Render("~/bundles/jqueryval") +} diff --git a/Project-Unite/Views/Account/_ExternalLoginsListPartial.cshtml b/Project-Unite/Views/Account/_ExternalLoginsListPartial.cshtml new file mode 100644 index 0000000..8b85588 --- /dev/null +++ b/Project-Unite/Views/Account/_ExternalLoginsListPartial.cshtml @@ -0,0 +1,28 @@ +@model Project_Unite.Models.ExternalLoginListViewModel +@using Microsoft.Owin.Security + +

Use another service to log in.

+
+@{ + var loginProviders = Context.GetOwinContext().Authentication.GetExternalAuthenticationTypes(); + if (loginProviders.Count() == 0) { +
+

+ There are no external authentication services configured. See this article + for details on setting up this ASP.NET application to support logging in via external services. +

+
+ } + else { + using (Html.BeginForm("ExternalLogin", "Account", new { ReturnUrl = Model.ReturnUrl })) { + @Html.AntiForgeryToken() +
+

+ @foreach (AuthenticationDescription p in loginProviders) { + + } +

+
+ } + } +} diff --git a/Project-Unite/Views/Admin/AccessControl.cshtml b/Project-Unite/Views/Admin/AccessControl.cshtml new file mode 100644 index 0000000..8d51d54 --- /dev/null +++ b/Project-Unite/Views/Admin/AccessControl.cshtml @@ -0,0 +1,59 @@ +@model Project_Unite.Models.AdminAccessControlViewModel + + +@{ + ViewBag.Title = "Access control"; + + Dictionary EnumNames = new Dictionary { + { "None", "No permissions" }, + { "CanRead", "Read only" }, + { "CanPost", "Can post new topics" }, + {"CanReply", "Can reply" } + }; + + var availablePermissions = new List(); + foreach (var v in Enum.GetValues(typeof(Project_Unite.Models.PermissionPreset))) + { + availablePermissions.Add(new SelectListItem + { + Value = v.ToString(), + Text = EnumNames[v.ToString()] + }); + } + +} + +

Access control

+ +

Below, you can modify the access control list (ACL) definitions for all forum categories.

+ + @foreach (var key in Model.IDs) + { +

@key

+ + + + + + @foreach (var p in Model.ACLList.Where(x => x.CategoryId == key)) + { + + + + + } +
Role IDValue
@Html.DisplayFor(v => p.RoleId) + @foreach(var r in EnumNames) + { + if(r.Key == p.Permissions.ToString()) + { + @r.Value + } + else + { + @Html.ActionLink(r.Value, "SetPermission", "Admin", new { id=p.CategoryId, role=p.RoleId, permission=r.Key}, new { @class = "btn btn-default" }) + } + } +
+ + } \ No newline at end of file diff --git a/Project-Unite/Views/Admin/AddForumCategory.cshtml b/Project-Unite/Views/Admin/AddForumCategory.cshtml new file mode 100644 index 0000000..4b3e9fd --- /dev/null +++ b/Project-Unite/Views/Admin/AddForumCategory.cshtml @@ -0,0 +1,48 @@ +@model Project_Unite.Models.AddForumCategoryViewModel +@{ + ViewBag.Title = "Add forum category"; +} + +

Add forum category

+ +

This page allows you to add a new forum category to ShiftOS and define a set of ACL rules for this category.

+ +
+ @if(ViewBag.Error != null) + { +

@ViewBag.Error

+ } +
+ +@using (Html.BeginForm()) +{ + @Html.AntiForgeryToken() + @Html.HiddenFor(Model => Model.PossibleParents) + + + + + + + + + + + + + +
@Html.DisplayNameFor(Model => Model.Name)@Html.TextBoxFor(Model => Model.Name)
@Html.DisplayNameFor(Model => Model.Description)@Html.TextBoxFor(Model => Model.Description)
@Html.DisplayNameFor(Model => Model.Parent)@Html.DropDownListFor(Model => Model.Parent, Model.PossibleParents)
+ +

ACL rule definitions

+

ACL rules for this forum can be edited in the Access Control section. Additionally, you can select an existing forum to copy ACL data from.

+ +

Copy ACL data from: @Html.DropDownListFor(Model=>Model.StealPermissionsFrom, Model.PossibleParents)

+

Leave this value as "Top Level" to not copy permissions. Default permission values are 'Can Post' for all roles.

+

Adding new roles

+

When you add a new role to the site, the ACL system will automatically add it to this forum, however its permission data will be set to the default "Can Post" value.

+
+ + + + @Html.ActionLink("Cancel", "Forums", "Admin", null, new { @class="btn btn-default"}) +} \ No newline at end of file diff --git a/Project-Unite/Views/Admin/AddUserToRole.cshtml b/Project-Unite/Views/Admin/AddUserToRole.cshtml new file mode 100644 index 0000000..386507c --- /dev/null +++ b/Project-Unite/Views/Admin/AddUserToRole.cshtml @@ -0,0 +1,24 @@ +@model Project_Unite.Models.AddUserToRoleViewModel + +@{ + ViewBag.Title = "Add user to role"; +} + +

Add user to role

+ +@using (Html.BeginForm()) +{ + + + + + + + + + + +
@Html.DisplayNameFor(model => model.Username)@Html.TextBoxFor(model => model.Username)
@Html.DisplayNameFor(model => model.RoleId)@Html.TextBoxFor(model => model.RoleId)
+ +} + diff --git a/Project-Unite/Views/Admin/CreateRole.cshtml b/Project-Unite/Views/Admin/CreateRole.cshtml new file mode 100644 index 0000000..736f09d --- /dev/null +++ b/Project-Unite/Views/Admin/CreateRole.cshtml @@ -0,0 +1,59 @@ +@model Project_Unite.Models.Role + +@{ + ViewBag.Title = "Create"; +} + +

Create

+ +@using (Html.BeginForm()) +{ + @Html.AntiForgeryToken() + +
+

Role

+
+ @Html.ValidationSummary(true, "", new { @class = "text-danger" }) +
+ @Html.LabelFor(model => model.Id, htmlAttributes: new { @class = "control-label col-md-2" }) +
+ @Html.EditorFor(model => model.Id, new { htmlAttributes = new { @class = "form-control" } }) + @Html.ValidationMessageFor(model => model.Id, "", new { @class = "text-danger" }) +
+
+ +
+ @Html.LabelFor(model => model.Name, htmlAttributes: new { @class = "control-label col-md-2" }) +
+ @Html.EditorFor(model => model.Name, new { htmlAttributes = new { @class = "form-control" } }) + @Html.ValidationMessageFor(model => model.Name, "", new { @class = "text-danger" }) +
+
+ +
+ @Html.LabelFor(model => model.Description, htmlAttributes: new { @class = "control-label col-md-2" }) +
+ @Html.EditorFor(model => model.Description, new { htmlAttributes = new { @class = "form-control" } }) + @Html.ValidationMessageFor(model => model.Description, "", new { @class = "text-danger" }) +
+
+ +
+ @Html.LabelFor(model => model.ColorHex, htmlAttributes: new { @class = "control-label col-md-2" }) +
+ @Html.EditorFor(model => model.ColorHex, new { htmlAttributes = new { @class = "form-control" } }) + @Html.ValidationMessageFor(model => model.ColorHex, "", new { @class = "text-danger" }) +
+
+ +
+
+ +
+
+
+} + +
+ @Html.ActionLink("Back to List", "Index") +
diff --git a/Project-Unite/Views/Admin/DeleteRole.cshtml b/Project-Unite/Views/Admin/DeleteRole.cshtml new file mode 100644 index 0000000..2344d1d --- /dev/null +++ b/Project-Unite/Views/Admin/DeleteRole.cshtml @@ -0,0 +1,48 @@ +@model Project_Unite.Models.Role + +@{ + ViewBag.Title = "Delete"; +} + +

Delete

+ +

Are you sure you want to delete this?

+
+

Role

+
+
+
+ @Html.DisplayNameFor(model => model.Name) +
+ +
+ @Html.DisplayFor(model => model.Name) +
+ +
+ @Html.DisplayNameFor(model => model.Description) +
+ +
+ @Html.DisplayFor(model => model.Description) +
+ +
+ @Html.DisplayNameFor(model => model.ColorHex) +
+ +
+ @Html.DisplayFor(model => model.ColorHex) +
+ +
+ + @using (Html.BeginForm()) { + @Html.AntiForgeryToken() + +
+ | + @Html.ActionLink("Back to List", "Index") +
+ } +
diff --git a/Project-Unite/Views/Admin/EditForum.cshtml b/Project-Unite/Views/Admin/EditForum.cshtml new file mode 100644 index 0000000..af22f81 --- /dev/null +++ b/Project-Unite/Views/Admin/EditForum.cshtml @@ -0,0 +1,51 @@ +@model Project_Unite.Models.AddForumCategoryViewModel +@{ + ViewBag.Title = "Edit " + Model.Name; +} + +

Add forum category

+ +
+ @if (ViewBag.Error != null) + { +

@ViewBag.Error

+ } +
+ +@using (Html.BeginForm(new { id = Model.Id })) +{ + @Html.AntiForgeryToken() + @Html.HiddenFor(Model => Model.Id) + @Html.HiddenFor(Model => Model.PossibleParents) + + + + + + + + + + + + + +
@Html.DisplayNameFor(Model => Model.Name)@Html.TextBoxFor(Model => Model.Name)
@Html.DisplayNameFor(Model => Model.Description)@Html.TextBoxFor(Model => Model.Description)
@Html.DisplayNameFor(Model => Model.Parent)@Html.DropDownListFor(Model => Model.Parent, Model.PossibleParents)
+ +

ACL rule definitions

+

Below you can specify what roles can see, reply or post to this category.

+
+ + + + + + + + +
Role nameCan see?Can reply?Can post?
+

ACL rules for this forum may be altered in the "Forum ACL Editor" page.

+ + + @Html.ActionLink("Cancel", "Forums", "Admin", null, new { @class = "btn btn-default" }) +} \ No newline at end of file diff --git a/Project-Unite/Views/Admin/EditRole.cshtml b/Project-Unite/Views/Admin/EditRole.cshtml new file mode 100644 index 0000000..b9c1f91 --- /dev/null +++ b/Project-Unite/Views/Admin/EditRole.cshtml @@ -0,0 +1,619 @@ +@model Project_Unite.Models.Role + +@{ + ViewBag.Title = "Edit role: " + Model.Id; +} + +@using (Html.BeginForm()) +{ + @Html.AntiForgeryToken() + +
+

Role

+
+ @Html.ValidationSummary(true, "", new { @class = "text-danger" }) + @Html.HiddenFor(model => model.Id) + +
+ @Html.LabelFor(model => model.Name, htmlAttributes: new { @class = "control-label col-md-2" }) +
+ @Html.EditorFor(model => model.Name, new { htmlAttributes = new { @class = "form-control" } }) + @Html.ValidationMessageFor(model => model.Name, "", new { @class = "text-danger" }) +
+
+ +
+ @Html.LabelFor(model => model.Description, htmlAttributes: new { @class = "control-label col-md-2" }) +
+ @Html.EditorFor(model => model.Description, new { htmlAttributes = new { @class = "form-control" } }) + @Html.ValidationMessageFor(model => model.Description, "", new { @class = "text-danger" }) +
+
+ +
+ @Html.LabelFor(model => model.ColorHex, htmlAttributes: new { @class = "control-label col-md-2" }) +
+ @Html.EditorFor(model => model.ColorHex, new { htmlAttributes = new { @class = "form-control" } }) + @Html.ValidationMessageFor(model => model.ColorHex, "", new { @class = "text-danger" }) +
+
+ +
+ @Html.LabelFor(model => model.Priority, htmlAttributes: new { @class = "control-label col-md-2" }) +
+ @Html.EditorFor(model => model.Priority, new { htmlAttributes = new { @class = "form-control" } }) + @Html.ValidationMessageFor(model => model.Priority, "", new { @class = "text-danger" }) +
+
+ +
+ @Html.LabelFor(model => model.CanViewProfiles, htmlAttributes: new { @class = "control-label col-md-2" }) +
+
+ @Html.EditorFor(model => model.CanViewProfiles) + @Html.ValidationMessageFor(model => model.CanViewProfiles, "", new { @class = "text-danger" }) +
+
+
+ +
+ @Html.LabelFor(model => model.CanEditOwnProfile, htmlAttributes: new { @class = "control-label col-md-2" }) +
+
+ @Html.EditorFor(model => model.CanEditOwnProfile) + @Html.ValidationMessageFor(model => model.CanEditOwnProfile, "", new { @class = "text-danger" }) +
+
+
+ +
+ @Html.LabelFor(model => model.CanEditProfiles, htmlAttributes: new { @class = "control-label col-md-2" }) +
+
+ @Html.EditorFor(model => model.CanEditProfiles) + @Html.ValidationMessageFor(model => model.CanEditProfiles, "", new { @class = "text-danger" }) +
+
+
+ +
+ @Html.LabelFor(model => model.CanEditUsername, htmlAttributes: new { @class = "control-label col-md-2" }) +
+
+ @Html.EditorFor(model => model.CanEditUsername) + @Html.ValidationMessageFor(model => model.CanEditUsername, "", new { @class = "text-danger" }) +
+
+
+ +
+ @Html.LabelFor(model => model.CanEditUsernames, htmlAttributes: new { @class = "control-label col-md-2" }) +
+
+ @Html.EditorFor(model => model.CanEditUsernames) + @Html.ValidationMessageFor(model => model.CanEditUsernames, "", new { @class = "text-danger" }) +
+
+
+ +
+ @Html.LabelFor(model => model.CanIssueBan, htmlAttributes: new { @class = "control-label col-md-2" }) +
+
+ @Html.EditorFor(model => model.CanIssueBan) + @Html.ValidationMessageFor(model => model.CanIssueBan, "", new { @class = "text-danger" }) +
+
+
+ +
+ @Html.LabelFor(model => model.CanIssueIPBan, htmlAttributes: new { @class = "control-label col-md-2" }) +
+
+ @Html.EditorFor(model => model.CanIssueIPBan) + @Html.ValidationMessageFor(model => model.CanIssueIPBan, "", new { @class = "text-danger" }) +
+
+
+ +
+ @Html.LabelFor(model => model.CanIssueEmailBan, htmlAttributes: new { @class = "control-label col-md-2" }) +
+
+ @Html.EditorFor(model => model.CanIssueEmailBan) + @Html.ValidationMessageFor(model => model.CanIssueEmailBan, "", new { @class = "text-danger" }) +
+
+
+ +
+ @Html.LabelFor(model => model.CanIssueMute, htmlAttributes: new { @class = "control-label col-md-2" }) +
+
+ @Html.EditorFor(model => model.CanIssueMute) + @Html.ValidationMessageFor(model => model.CanIssueMute, "", new { @class = "text-danger" }) +
+
+
+ +
+ @Html.LabelFor(model => model.CanReleaseBuild, htmlAttributes: new { @class = "control-label col-md-2" }) +
+
+ @Html.EditorFor(model => model.CanReleaseBuild) + @Html.ValidationMessageFor(model => model.CanReleaseBuild, "", new { @class = "text-danger" }) +
+
+
+ +
+ @Html.LabelFor(model => model.CanBlog, htmlAttributes: new { @class = "control-label col-md-2" }) +
+
+ @Html.EditorFor(model => model.CanBlog) + @Html.ValidationMessageFor(model => model.CanBlog, "", new { @class = "text-danger" }) +
+
+
+ +
+ @Html.LabelFor(model => model.CanAccessModCP, htmlAttributes: new { @class = "control-label col-md-2" }) +
+
+ @Html.EditorFor(model => model.CanAccessModCP) + @Html.ValidationMessageFor(model => model.CanAccessModCP, "", new { @class = "text-danger" }) +
+
+
+ +
+ @Html.LabelFor(model => model.CanAccessAdminCP, htmlAttributes: new { @class = "control-label col-md-2" }) +
+
+ @Html.EditorFor(model => model.CanAccessAdminCP) + @Html.ValidationMessageFor(model => model.CanAccessAdminCP, "", new { @class = "text-danger" }) +
+
+
+ +
+ @Html.LabelFor(model => model.CanAccessDevCP, htmlAttributes: new { @class = "control-label col-md-2" }) +
+
+ @Html.EditorFor(model => model.CanAccessDevCP) + @Html.ValidationMessageFor(model => model.CanAccessDevCP, "", new { @class = "text-danger" }) +
+
+
+ +
+ @Html.LabelFor(model => model.CanEditForumCategories, htmlAttributes: new { @class = "control-label col-md-2" }) +
+
+ @Html.EditorFor(model => model.CanEditForumCategories) + @Html.ValidationMessageFor(model => model.CanEditForumCategories, "", new { @class = "text-danger" }) +
+
+
+ +
+ @Html.LabelFor(model => model.CanPostTopics, htmlAttributes: new { @class = "control-label col-md-2" }) +
+
+ @Html.EditorFor(model => model.CanPostTopics) + @Html.ValidationMessageFor(model => model.CanPostTopics, "", new { @class = "text-danger" }) +
+
+
+ +
+ @Html.LabelFor(model => model.CanPostPolls, htmlAttributes: new { @class = "control-label col-md-2" }) +
+
+ @Html.EditorFor(model => model.CanPostPolls) + @Html.ValidationMessageFor(model => model.CanPostPolls, "", new { @class = "text-danger" }) +
+
+
+ +
+ @Html.LabelFor(model => model.CanPostReplies, htmlAttributes: new { @class = "control-label col-md-2" }) +
+
+ @Html.EditorFor(model => model.CanPostReplies) + @Html.ValidationMessageFor(model => model.CanPostReplies, "", new { @class = "text-danger" }) +
+
+
+ +
+ @Html.LabelFor(model => model.CanPostStatuses, htmlAttributes: new { @class = "control-label col-md-2" }) +
+
+ @Html.EditorFor(model => model.CanPostStatuses) + @Html.ValidationMessageFor(model => model.CanPostStatuses, "", new { @class = "text-danger" }) +
+
+
+ +
+ @Html.LabelFor(model => model.CanEditRoles, htmlAttributes: new { @class = "control-label col-md-2" }) +
+
+ @Html.EditorFor(model => model.CanEditRoles) + @Html.ValidationMessageFor(model => model.CanEditRoles, "", new { @class = "text-danger" }) +
+
+
+ +
+ @Html.LabelFor(model => model.CanDeleteRoles, htmlAttributes: new { @class = "control-label col-md-2" }) +
+
+ @Html.EditorFor(model => model.CanDeleteRoles) + @Html.ValidationMessageFor(model => model.CanDeleteRoles, "", new { @class = "text-danger" }) +
+
+
+ +
+ @Html.LabelFor(model => model.CanDeleteOwnTopics, htmlAttributes: new { @class = "control-label col-md-2" }) +
+
+ @Html.EditorFor(model => model.CanDeleteOwnTopics) + @Html.ValidationMessageFor(model => model.CanDeleteOwnTopics, "", new { @class = "text-danger" }) +
+
+
+ +
+ @Html.LabelFor(model => model.CanDeleteTopics, htmlAttributes: new { @class = "control-label col-md-2" }) +
+
+ @Html.EditorFor(model => model.CanDeleteTopics) + @Html.ValidationMessageFor(model => model.CanDeleteTopics, "", new { @class = "text-danger" }) +
+
+
+ +
+ @Html.LabelFor(model => model.CanDeleteOwnPosts, htmlAttributes: new { @class = "control-label col-md-2" }) +
+
+ @Html.EditorFor(model => model.CanDeleteOwnPosts) + @Html.ValidationMessageFor(model => model.CanDeleteOwnPosts, "", new { @class = "text-danger" }) +
+
+
+ +
+ @Html.LabelFor(model => model.CanDeletePosts, htmlAttributes: new { @class = "control-label col-md-2" }) +
+
+ @Html.EditorFor(model => model.CanDeletePosts) + @Html.ValidationMessageFor(model => model.CanDeletePosts, "", new { @class = "text-danger" }) +
+
+
+ +
+ @Html.LabelFor(model => model.CanDeleteOwnStatuses, htmlAttributes: new { @class = "control-label col-md-2" }) +
+
+ @Html.EditorFor(model => model.CanDeleteOwnStatuses) + @Html.ValidationMessageFor(model => model.CanDeleteOwnStatuses, "", new { @class = "text-danger" }) +
+
+
+ +
+ @Html.LabelFor(model => model.CanDeleteStatuses, htmlAttributes: new { @class = "control-label col-md-2" }) +
+
+ @Html.EditorFor(model => model.CanDeleteStatuses) + @Html.ValidationMessageFor(model => model.CanDeleteStatuses, "", new { @class = "text-danger" }) +
+
+
+ +
+ @Html.LabelFor(model => model.CanEditOwnTopics, htmlAttributes: new { @class = "control-label col-md-2" }) +
+
+ @Html.EditorFor(model => model.CanEditOwnTopics) + @Html.ValidationMessageFor(model => model.CanEditOwnTopics, "", new { @class = "text-danger" }) +
+
+
+ +
+ @Html.LabelFor(model => model.CanEditTopics, htmlAttributes: new { @class = "control-label col-md-2" }) +
+
+ @Html.EditorFor(model => model.CanEditTopics) + @Html.ValidationMessageFor(model => model.CanEditTopics, "", new { @class = "text-danger" }) +
+
+
+ +
+ @Html.LabelFor(model => model.CanEditOwnPosts, htmlAttributes: new { @class = "control-label col-md-2" }) +
+
+ @Html.EditorFor(model => model.CanEditOwnPosts) + @Html.ValidationMessageFor(model => model.CanEditOwnPosts, "", new { @class = "text-danger" }) +
+
+
+ +
+ @Html.LabelFor(model => model.CanEditPosts, htmlAttributes: new { @class = "control-label col-md-2" }) +
+
+ @Html.EditorFor(model => model.CanEditPosts) + @Html.ValidationMessageFor(model => model.CanEditPosts, "", new { @class = "text-danger" }) +
+
+
+ +
+ @Html.LabelFor(model => model.CanEditOwnStatuses, htmlAttributes: new { @class = "control-label col-md-2" }) +
+
+ @Html.EditorFor(model => model.CanEditOwnStatuses) + @Html.ValidationMessageFor(model => model.CanEditOwnStatuses, "", new { @class = "text-danger" }) +
+
+
+ +
+ @Html.LabelFor(model => model.CanVoteInPolls, htmlAttributes: new { @class = "control-label col-md-2" }) +
+
+ @Html.EditorFor(model => model.CanVoteInPolls) + @Html.ValidationMessageFor(model => model.CanVoteInPolls, "", new { @class = "text-danger" }) +
+
+
+ +
+ @Html.LabelFor(model => model.CanDeleteUsers, htmlAttributes: new { @class = "control-label col-md-2" }) +
+
+ @Html.EditorFor(model => model.CanDeleteUsers) + @Html.ValidationMessageFor(model => model.CanDeleteUsers, "", new { @class = "text-danger" }) +
+
+
+ +
+ @Html.LabelFor(model => model.CanAnonymizeUsers, htmlAttributes: new { @class = "control-label col-md-2" }) +
+
+ @Html.EditorFor(model => model.CanAnonymizeUsers) + @Html.ValidationMessageFor(model => model.CanAnonymizeUsers, "", new { @class = "text-danger" }) +
+
+
+ +
+ @Html.LabelFor(model => model.CanPostSkins, htmlAttributes: new { @class = "control-label col-md-2" }) +
+
+ @Html.EditorFor(model => model.CanPostSkins) + @Html.ValidationMessageFor(model => model.CanPostSkins, "", new { @class = "text-danger" }) +
+
+
+ +
+ @Html.LabelFor(model => model.CanEditOwnSkins, htmlAttributes: new { @class = "control-label col-md-2" }) +
+
+ @Html.EditorFor(model => model.CanEditOwnSkins) + @Html.ValidationMessageFor(model => model.CanEditOwnSkins, "", new { @class = "text-danger" }) +
+
+
+ +
+ @Html.LabelFor(model => model.CanEditSkins, htmlAttributes: new { @class = "control-label col-md-2" }) +
+
+ @Html.EditorFor(model => model.CanEditSkins) + @Html.ValidationMessageFor(model => model.CanEditSkins, "", new { @class = "text-danger" }) +
+
+
+ +
+ @Html.LabelFor(model => model.CanDeleteOwnSkins, htmlAttributes: new { @class = "control-label col-md-2" }) +
+
+ @Html.EditorFor(model => model.CanDeleteOwnSkins) + @Html.ValidationMessageFor(model => model.CanDeleteOwnSkins, "", new { @class = "text-danger" }) +
+
+
+ +
+ @Html.LabelFor(model => model.CanDeleteSkins, htmlAttributes: new { @class = "control-label col-md-2" }) +
+
+ @Html.EditorFor(model => model.CanDeleteSkins) + @Html.ValidationMessageFor(model => model.CanDeleteSkins, "", new { @class = "text-danger" }) +
+
+
+ +
+ @Html.LabelFor(model => model.CanUpvoteSkins, htmlAttributes: new { @class = "control-label col-md-2" }) +
+
+ @Html.EditorFor(model => model.CanUpvoteSkins) + @Html.ValidationMessageFor(model => model.CanUpvoteSkins, "", new { @class = "text-danger" }) +
+
+
+ +
+ @Html.LabelFor(model => model.CanDownvoteSkins, htmlAttributes: new { @class = "control-label col-md-2" }) +
+
+ @Html.EditorFor(model => model.CanDownvoteSkins) + @Html.ValidationMessageFor(model => model.CanDownvoteSkins, "", new { @class = "text-danger" }) +
+
+
+ +
+ @Html.LabelFor(model => model.CanStickyOwnTopics, htmlAttributes: new { @class = "control-label col-md-2" }) +
+
+ @Html.EditorFor(model => model.CanStickyOwnTopics) + @Html.ValidationMessageFor(model => model.CanStickyOwnTopics, "", new { @class = "text-danger" }) +
+
+
+ +
+ @Html.LabelFor(model => model.CanStickyTopics, htmlAttributes: new { @class = "control-label col-md-2" }) +
+
+ @Html.EditorFor(model => model.CanStickyTopics) + @Html.ValidationMessageFor(model => model.CanStickyTopics, "", new { @class = "text-danger" }) +
+
+
+ +
+ @Html.LabelFor(model => model.CanAnnounceOwnTopics, htmlAttributes: new { @class = "control-label col-md-2" }) +
+
+ @Html.EditorFor(model => model.CanAnnounceOwnTopics) + @Html.ValidationMessageFor(model => model.CanAnnounceOwnTopics, "", new { @class = "text-danger" }) +
+
+
+ +
+ @Html.LabelFor(model => model.CanAnnounceTopics, htmlAttributes: new { @class = "control-label col-md-2" }) +
+
+ @Html.EditorFor(model => model.CanAnnounceTopics) + @Html.ValidationMessageFor(model => model.CanAnnounceTopics, "", new { @class = "text-danger" }) +
+
+
+ +
+ @Html.LabelFor(model => model.CanGlobalOwnTopics, htmlAttributes: new { @class = "control-label col-md-2" }) +
+
+ @Html.EditorFor(model => model.CanGlobalOwnTopics) + @Html.ValidationMessageFor(model => model.CanGlobalOwnTopics, "", new { @class = "text-danger" }) +
+
+
+ +
+ @Html.LabelFor(model => model.CanGlobalTopics, htmlAttributes: new { @class = "control-label col-md-2" }) +
+
+ @Html.EditorFor(model => model.CanGlobalTopics) + @Html.ValidationMessageFor(model => model.CanGlobalTopics, "", new { @class = "text-danger" }) +
+
+
+ +
+ @Html.LabelFor(model => model.CanMoveOwnTopics, htmlAttributes: new { @class = "control-label col-md-2" }) +
+
+ @Html.EditorFor(model => model.CanMoveOwnTopics) + @Html.ValidationMessageFor(model => model.CanMoveOwnTopics, "", new { @class = "text-danger" }) +
+
+
+ +
+ @Html.LabelFor(model => model.CanMoveTopics, htmlAttributes: new { @class = "control-label col-md-2" }) +
+
+ @Html.EditorFor(model => model.CanMoveTopics) + @Html.ValidationMessageFor(model => model.CanMoveTopics, "", new { @class = "text-danger" }) +
+
+
+ +
+ @Html.LabelFor(model => model.CanUnlistOwnTopics, htmlAttributes: new { @class = "control-label col-md-2" }) +
+
+ @Html.EditorFor(model => model.CanUnlistOwnTopics) + @Html.ValidationMessageFor(model => model.CanUnlistOwnTopics, "", new { @class = "text-danger" }) +
+
+
+ +
+ @Html.LabelFor(model => model.CanUnlistTopics, htmlAttributes: new { @class = "control-label col-md-2" }) +
+
+ @Html.EditorFor(model => model.CanUnlistTopics) + @Html.ValidationMessageFor(model => model.CanUnlistTopics, "", new { @class = "text-danger" }) +
+
+
+ +
+ @Html.LabelFor(model => model.CanLockOwnTopics, htmlAttributes: new { @class = "control-label col-md-2" }) +
+
+ @Html.EditorFor(model => model.CanLockOwnTopics) + @Html.ValidationMessageFor(model => model.CanLockOwnTopics, "", new { @class = "text-danger" }) +
+
+
+ +
+ @Html.LabelFor(model => model.CanUnlockOwnTopics, htmlAttributes: new { @class = "control-label col-md-2" }) +
+
+ @Html.EditorFor(model => model.CanUnlockOwnTopics) + @Html.ValidationMessageFor(model => model.CanUnlockOwnTopics, "", new { @class = "text-danger" }) +
+
+
+ +
+ @Html.LabelFor(model => model.CanLockTopics, htmlAttributes: new { @class = "control-label col-md-2" }) +
+
+ @Html.EditorFor(model => model.CanLockTopics) + @Html.ValidationMessageFor(model => model.CanLockTopics, "", new { @class = "text-danger" }) +
+
+
+ +
+ @Html.LabelFor(model => model.CanUnlockTopics, htmlAttributes: new { @class = "control-label col-md-2" }) +
+
+ @Html.EditorFor(model => model.CanUnlockTopics) + @Html.ValidationMessageFor(model => model.CanUnlockTopics, "", new { @class = "text-danger" }) +
+
+
+ +
+
+ +
+
+
+} + +
+ @Html.ActionLink("Back to List", "Index") +
diff --git a/Project-Unite/Views/Admin/Forums.cshtml b/Project-Unite/Views/Admin/Forums.cshtml new file mode 100644 index 0000000..904e3c5 --- /dev/null +++ b/Project-Unite/Views/Admin/Forums.cshtml @@ -0,0 +1,49 @@ +@model IEnumerable +@{ + ViewBag.Title = "Manage forums"; + ViewBag.Modals = new Dictionary(); +} + +

Forums

+ +

The forums are a way for users to start conversations about various topics. Here you can define where users can post and what roles can post where.

+ +@foreach (var cat in Model) +{ + + + + + + + + @foreach (var subcat in cat.Children) + { + + + + + + + ViewBag.Modals.Add(subcat.Id, "/Admin/DeleteForum?id=" + subcat.Id); + } + +
@cat.Name [@Html.ActionLink("Edit", "EditForum", "Admin", new { id = cat.Id }, null) | Delete] + + + TopicsPostsActions
+ @Html.ActionLink(subcat.Name, "ViewForum", "Forum", new { id = subcat.Id })
+

@subcat.Description

+
@subcat.Topics?.Count + @Html.ActionLink("Edit", "EditForum", "Admin", new { id = subcat.Id }, new { @class = "btn btn-default" }) + + + + + +
+ ViewBag.Modals.Add(cat.Id, "/Admin/DeleteForum?id=" + cat.Id); + +} + +@Html.ActionLink("Add category", "AddForumCategory", "Admin", null, new { @class = "btn btn-default"}) diff --git a/Project-Unite/Views/Admin/Index.cshtml b/Project-Unite/Views/Admin/Index.cshtml new file mode 100644 index 0000000..d282f60 --- /dev/null +++ b/Project-Unite/Views/Admin/Index.cshtml @@ -0,0 +1,7 @@ + +@{ + ViewBag.Title = "Administration Control Panel"; +} + +

Wow, an actual index page.

+ diff --git a/Project-Unite/Views/Admin/Logs.cshtml b/Project-Unite/Views/Admin/Logs.cshtml new file mode 100644 index 0000000..3fa066d --- /dev/null +++ b/Project-Unite/Views/Admin/Logs.cshtml @@ -0,0 +1,25 @@ +@model IEnumerable +@{ + ViewBag.Admin = true; + ViewBag.Title = "Audit logs"; +} + +

Audit logs

+ +

Below is a list of all actions carried out by all users on this site.

+ + + + + + + + @foreach(var i in Model.OrderByDescending(x=>x.Timestamp)) + { + + + + + + } +
ActionUser & TimestampLevel
@i.Description@Html.UserLink(i.UserId) at @i.Timestamp@i.Level
\ No newline at end of file diff --git a/Project-Unite/Views/Admin/RoleDetails.cshtml b/Project-Unite/Views/Admin/RoleDetails.cshtml new file mode 100644 index 0000000..25b4146 --- /dev/null +++ b/Project-Unite/Views/Admin/RoleDetails.cshtml @@ -0,0 +1,44 @@ +@using Microsoft.AspNet.Identity + +@model Project_Unite.Models.Role + +@{ + ViewBag.Title = "Details for " + Model.Name; +} + +

Role details

+ +

@Model.Name

+

ID: @Model.Id

+

Description:

+

@Model.Description

+

Priority: @Model.Priority

+ +
+ +

Users

+ +

Below is a list of users in this role.

+ + + + + + + @foreach(var user in Model.Users) + { + + + + + } +
UserActions
@Html.UserLink(user.UserId) + @if(User.Identity.GetUserId() != user.UserId) + { + @Html.ActionLink("Remove", "RemoveUserFromRole", "Admin", new { id = user.RoleId, usr = user.UserId}, new { @class="btn btn-danger"}) + + } + @Html.ActionLink("User details", "UserDetails", "Moderator", new { id = user.UserId }, new { @class = "btn btn-default" }) + + +
\ No newline at end of file diff --git a/Project-Unite/Views/Admin/Roles.cshtml b/Project-Unite/Views/Admin/Roles.cshtml new file mode 100644 index 0000000..0c490f2 --- /dev/null +++ b/Project-Unite/Views/Admin/Roles.cshtml @@ -0,0 +1,65 @@ +@model IEnumerable + +@{ + ViewBag.Title = "Administrator Control Panel"; +} + +

Roles

+ +

+ @Html.ActionLink("Create New", "CreateRole") +

+ + + + + + + +@foreach (var item in Model.OrderByDescending(x=>x.Priority)) { + if (ACL.CanManageRole(User.Identity.Name, item.Id)) + { + + + + + + } +} + +
+ Role + PriorityActions
+ @Html.DisplayFor(modelItem => item.Name) (@Html.DisplayFor(modelItem => item.Id)) +

@Html.DisplayFor(modelItem => item.Description)

+
+ @item.Priority + @if (item.Priority < Model.Count() - 1) + { + + } + @if (item.Priority > 0) + { + + } + + + @Html.ActionLink("Edit", "EditRole", new { id = item.Id }, new { @class = "btn btn-default" }) + @Html.ActionLink("Details", "RoleDetails", new { id = item.Id }, new { @class = "btn btn-default" }) + @if (ACL.Granted(User.Identity.Name, "CanDeleteRoles")) + { + @Html.ActionLink("Delete", "DeleteRole", new { id = item.Id }, new { @class = "btn btn-danger" }) + } +
+ +
+ +

Role priorities

+ +

ShiftOS users can have multiple roles at once - and me, Michael, as a programmer, had to find a way to get the user's most granting role - the one with the most permissions. Since this could change at any time (new roles, new permission definitions, etc) I needed a way to arbitrarily determine what the best role to use when determining what users can and can't do.

+ +

So, I set up a role priority system. You can use the buttons above to modify a role's priority. The role listing will display all roles on the site, sorted by priority, from highest to lowest. The highest-priority role assigned to a user will determine the color of their username and the permissions they are given. It will also determine what roles the user can modify - we don't want developers messing up admin permissions, do we?

+ +

You will only see roles on this page that you have permission to alter.

+ +

Also, the lowest-priority role in the system will become the role of all future users - so don't be giving it admin privileges, pretty please.

\ No newline at end of file diff --git a/Project-Unite/Views/Admin/Users.cshtml b/Project-Unite/Views/Admin/Users.cshtml new file mode 100644 index 0000000..a9830c5 --- /dev/null +++ b/Project-Unite/Views/Admin/Users.cshtml @@ -0,0 +1,45 @@ +@model IEnumerable +@{ + ViewBag.Admin = true; + ViewBag.Title = "Users"; +} + +

Users

+ +

Below is a list of all users in the database.

+ + + + + + + @foreach (var user in Model) + { + + + + + } +
UserActions
@Html.UserLink(user.Id) + + @Html.ActionLink("User details", "UserDetails", "Moderator", new { id = user.DisplayName }, new { @class = "btn btn-default" }) + @if (ACL.Granted(User.Identity.Name, "CanAnonymizeUser")) + { + Anonymize this user + + } +
\ No newline at end of file diff --git a/Project-Unite/Views/Forum/CreateTopic.cshtml b/Project-Unite/Views/Forum/CreateTopic.cshtml new file mode 100644 index 0000000..cb080dd --- /dev/null +++ b/Project-Unite/Views/Forum/CreateTopic.cshtml @@ -0,0 +1,86 @@ +@model Project_Unite.Models.CreateTopicViewModel +@{ + ViewBag.Title = "Create topic"; +} + +

Create topic

+ +@using (Html.BeginForm()) +{ + @Html.AntiForgeryToken() + @Html.HiddenFor(Model => Model.Category) + + + + + + + + + + + + + + +
@Html.DisplayNameFor(Model => Model.Subject)@Html.TextBoxFor(Model => Model.Subject, new { @class = "form-control", style = "width:100%" })
@Html.DisplayNameFor(Model => Model.Body) +

This is the content of your topic. You can use Markdown formatting to style your post.

+
@Html.TextAreaFor(Model => Model.Body, new { @class = "form-control", style = "width:100%", rows = "10" })
+ +

Topic options

+ + + bool showGeneral = false; + if (ACL.Granted(User.Identity.Name, "CanStickyOwnTopics") || ACL.Granted(User.Identity.Name, "CanGlobalOwnTopics") || ACL.Granted(User.Identity.Name, "CanAnnounceOwnTopics")) + { + showGeneral = true; + } + string generalStyle = "tab-pane fade in"; + string pollStyle = "tab-pane fade in"; + if (showGeneral == true) { + generalStyle += " active"; + + } + else + { + pollStyle += " active"; + } + + + + +
+
+

Topic status

+ +

Below you can set the status of your topic.

+ + @if (ACL.Granted(User.Identity.Name, "CanStickyOwnTopics")) + { +

Sticky: @Html.CheckBoxFor(Model => Model.IsSticky, new { @class = "form-control" })

+ } + @if (ACL.Granted(User.Identity.Name, "CanAnnounceOwnTopics")) + { +

Announcement: @Html.CheckBoxFor(Model => Model.IsAnnounce, new { @class = "form-control" })

+ } + @if (ACL.Granted(User.Identity.Name, "CanGlobalOwnTopics")) + { +

Global announcement: @Html.CheckBoxFor(Model => Model.IsGlobal, new { @class = "form-control" })

+ } +
+
+

Polls

+

Not yet implemented.

+
+
+} \ No newline at end of file diff --git a/Project-Unite/Views/Forum/EditPost.cshtml b/Project-Unite/Views/Forum/EditPost.cshtml new file mode 100644 index 0000000..ea02f6f --- /dev/null +++ b/Project-Unite/Views/Forum/EditPost.cshtml @@ -0,0 +1,37 @@ +@model Project_Unite.Models.EditPostViewModel +@{ + ViewBag.Title = "Edit post"; +} + +

Edit post

+ +@using (Html.BeginForm()) +{ + @Html.AntiForgeryToken() + @Html.HiddenFor(Model=>Model.Id) + + + + + + + + + + + + + +
+

Body:

+

Make your edits to the post in this field. CommonMark-compliant Markdown is supported.

+
+ @Html.TextAreaFor(Model=>Model.Contents, new { rows = "10", @class="form-control" }) +
+

Edit reason:

+

Why did you edit the post? This reason is displayed in the Moderator Control Panel as well as at the bottom of the post.

+
+ @Html.TextBoxFor(Model => Model.EditReason, new { @class = "form-control" }) +
+} + diff --git a/Project-Unite/Views/Forum/Index.cshtml b/Project-Unite/Views/Forum/Index.cshtml new file mode 100644 index 0000000..8e26c24 --- /dev/null +++ b/Project-Unite/Views/Forum/Index.cshtml @@ -0,0 +1,39 @@ +@model IEnumerable + +@{ + ViewBag.Title = "Forums"; +} + +

Welcome to the forums.

+ +@foreach (var cat in Model) +{ + + + + + + + + @foreach (var subcat in cat.Children) + { + + + + + + + } +
@cat.NameTopicsPostsMost Recent Post
@Html.ActionLink(subcat.Name, "ViewForum", "Forum", new { id = subcat.Id }, null)
+

@subcat.Description

+ @if(subcat.Children.Length > 0) + { +

Subforums: + @foreach(var subfrm in subcat.Children) + { + @Html.ActionLink(subfrm.Name, "ViewForum", "Forum", new { id = subfrm.Id }, null)  + } +

+ } +
@subcat.Topics.Length
+} \ No newline at end of file diff --git a/Project-Unite/Views/Forum/PostReply.cshtml b/Project-Unite/Views/Forum/PostReply.cshtml new file mode 100644 index 0000000..2305204 --- /dev/null +++ b/Project-Unite/Views/Forum/PostReply.cshtml @@ -0,0 +1,27 @@ +@model Project_Unite.Models.CreateTopicViewModel +@{ + ViewBag.Title = "Post reply"; +} + +

Post reply

+ +@using (Html.BeginForm()) +{ + @Html.AntiForgeryToken() + @Html.HiddenFor(Model => Model.Category) + + + + + + + + + + +
@Html.DisplayNameFor(Model => Model.Body) +

This is the content of your topic. You can use Markdown formatting to style your post.

+
@Html.TextAreaFor(Model => Model.Body, new { @class = "form-control", style = "width:100%", rows = "10" })
+ + +} \ No newline at end of file diff --git a/Project-Unite/Views/Forum/ViewForum.cshtml b/Project-Unite/Views/Forum/ViewForum.cshtml new file mode 100644 index 0000000..01f1d01 --- /dev/null +++ b/Project-Unite/Views/Forum/ViewForum.cshtml @@ -0,0 +1,166 @@ +@model Project_Unite.Models.ForumCategory +@{ + ViewBag.Title = "View forum"; +} + +

@Model.Name

+ +@if (Model.Parent == "root") +{ + @Html.ActionLink("Back", "Index", "Forum", null, new { @class = "btn btn-default" }) + +} +else +{ + @Html.ActionLink("Back", "ViewForum", "Forum", new { id=Model.Parent}, new { @class = "btn btn-default" }) +} + +@if(ACL.CanPost(User.Identity.Name, Model.Id)) +{ + @Html.ActionLink("New topic", "CreateTopic", "Forum", new { id=Model.Id}, new { @class = "btn btn-default" }) +} + +

@Model.Description

+ +@if (Model.Children.Length > 0) +{ + + + + + + + + @foreach (var cat in Model.Children) + { + + + + + + + } +
SubforumsTopicsPostsMost Recent Post
@Html.ActionLink(cat.Name, "ViewForum", "Forum", new { id = cat.Id }, null) +

@cat.Description

+
+ @cat.Topics.Length +
+} + +
+ +@if (Model.Topics.Length > 0) +{ + + + + + + + @{ + var stickies = Model.Topics.Where(x => x.IsSticky == true); + var stickiesSorted = stickies.OrderByDescending(x => x.StartedAt); + var topicsSorted = Model.Topics.Where(x => x.IsSticky != true).OrderByDescending(x => x.StartedAt); + } + + @foreach (var topic in stickiesSorted) + { + bool showTopic = true; + if (topic.IsUnlisted == true) + { + if(!ACL.Granted(User.Identity.Name, "CanSeeUnlistedTopics")) + { + showTopic = false; + } + } + + if (showTopic == true) + { + + + + + + } + } + @foreach (var topic in topicsSorted) + { + + bool showTopic = true; + if (topic.IsUnlisted == true) + { + if (!ACL.Granted(User.Identity.Name, "CanSeeUnlistedTopics")) + { + showTopic = false; + } + } + + if (showTopic == true) + { + + + + + + } + } + + +
TopicsPostsMost recent post
  + @if(topic.IsUnlisted == true) + { + + } + @if (topic.IsLocked == true) + { + + } + + @Html.ActionLink(topic.Subject, "ViewTopic", "Forum", new { id = topic.Discriminator }, null) +

Started by @Html.UserLink(topic.AuthorId) on @topic.StartedAt

+
+ @topic.Posts.Length + + @if (topic.Posts.Length > 0) + { + var mostRecent = topic.Posts.OrderByDescending(x => x.PostedAt).First(); + Re: @topic.Subject + by @Html.UserLink(mostRecent.AuthorId) +

at @mostRecent.PostedAt

+ } + else + { + No posts. + } +
+ @if(topic.IsUnlisted == true) + { + + } + + @if (topic.IsLocked == true) + { + + } + @Html.ActionLink(topic.Subject, "ViewTopic", "Forum", new { id = topic.Discriminator }, null) +

Started by @Html.UserLink(topic.AuthorId) on @topic.StartedAt

+
+ @topic.Posts.Length + + @if (topic.Posts.Length > 0) + { + var mostRecent = topic.Posts.OrderByDescending(x => x.PostedAt).First(); + Re: @topic.Subject + by @Html.UserLink(mostRecent.AuthorId) +

at @mostRecent.PostedAt

+ } + else + { + No posts. + } +
+} +else +{ +

No topics exist in this category. Be the first to start one!

+} \ No newline at end of file diff --git a/Project-Unite/Views/Forum/ViewTopic.cshtml b/Project-Unite/Views/Forum/ViewTopic.cshtml new file mode 100644 index 0000000..4348518 --- /dev/null +++ b/Project-Unite/Views/Forum/ViewTopic.cshtml @@ -0,0 +1,69 @@ +@model Project_Unite.Models.ForumTopic +@using Microsoft.AspNet.Identity +@{ + ViewBag.Title = Model.Subject; +} + +@if(ViewBag.Error != null) +{ +
+
+

@ViewBag.Error

+
+
+} + +@if(Model.IsUnlisted == true) +{ +
+
+

This topic is unlisted. Only those with the topic link as well as moderators may see this topic. Please respect its privacy.

+
+
+} + +

@Model.Subject

+ +

Started by @Html.UserLink(Model.AuthorId) at @Model.StartedAt

+ +@{ + Html.RenderPartial("~/Views/Shared/_ModeratorBar.cshtml", Model); +} + +@foreach (var post in Model.Posts.OrderBy(x => x.PostedAt)) +{ +
+
+
+
+ @Html.UserLink(post.AuthorId)
+ @{ + var user = ACL.GetUserInfo(post.AuthorId); +

@user.Codepoints Codepoints

+

@user.HighestRole.Name

+

+ @if (ACL.Granted(User.Identity.Name, "CanAccessModCP")) + { + if (ACL.Granted(User.Identity.Name, "CanViewUserInfo")) + { + @Html.ActionLink("User info", "UserDetails", "Moderator", new { id = ACL.UserNameRaw(post.AuthorId) }, new { @class = "btn btn-default" }) + } + } +

+ } +
+
+

@Model.Subject

+

@Html.UserLink(post.AuthorId) at @post.PostedAt

+

@Html.Markdown(post.Body)

+ @{ + Html.RenderPartial("~/Views/Shared/_PostModerationBar.cshtml", post); + } +
+
+
+} + +@{ + Html.RenderPartial("~/Views/Shared/_ModeratorBar.cshtml", Model); +} diff --git a/Project-Unite/Views/Home/About.cshtml b/Project-Unite/Views/Home/About.cshtml new file mode 100644 index 0000000..4b2d9e8 --- /dev/null +++ b/Project-Unite/Views/Home/About.cshtml @@ -0,0 +1,7 @@ +@{ + ViewBag.Title = "About"; +} +

@ViewBag.Title.

+

@ViewBag.Message

+ +

Use this area to provide additional information.

diff --git a/Project-Unite/Views/Home/Contact.cshtml b/Project-Unite/Views/Home/Contact.cshtml new file mode 100644 index 0000000..0f4327e --- /dev/null +++ b/Project-Unite/Views/Home/Contact.cshtml @@ -0,0 +1,17 @@ +@{ + ViewBag.Title = "Contact"; +} +

@ViewBag.Title.

+

@ViewBag.Message

+ +
+ One Microsoft Way
+ Redmond, WA 98052-6399
+ P: + 425.555.0100 +
+ +
+ Support: Support@example.com
+ Marketing: Marketing@example.com +
\ No newline at end of file diff --git a/Project-Unite/Views/Home/Index.cshtml b/Project-Unite/Views/Home/Index.cshtml new file mode 100644 index 0000000..419ca0e --- /dev/null +++ b/Project-Unite/Views/Home/Index.cshtml @@ -0,0 +1,66 @@ +@{ + ViewBag.Title = "Home Page"; +} + +
+
+
+

Welcome to the multi-user domain.

+
+

You are walking into a world of skins, applications, games, websites, viruses, and untold mysteries. Shift it your way while you uncover the truth behind ShiftOS and the multi-user domain.

+ I'm in. +
+
+
+ +
+
+ +
+
+

Shift it your way.

+

With ShiftOS's extensive skinning system, you can make ShiftOS look any way you want. All it takes is your imagination, and some time, and soon you'll be using the OS of your dreams.

+ +
ArtPad and the Shifter
+ +

Want to make your very own skin? We've made it easy! Just use the ArtPad application to make textures for the various UI elements - then use the Shifter to apply them and move and resize things, and set the fonts, colors and behaviours you want.

+ +
The Skin Repository
+ +

Want to download pre-made skins to shape up your user-experience? Have a look at the Skin Repository! You can even post your own skins there!

+ + Open the Skin Repository! +
+
+ +
+
+

Share the way you shift it.

+

ShiftOS is not just an evolving operating system, it's a community as well! Come jump in, say hi, show off what you've done, and get to know us!

+ +
Join us on this very site
+ +

You don't have to leave the website to be a part of the community! Just create a user account, and you'll unlock a whole new world of things to do!

+ +
We have a Discord server!
+ +

Discord is the perfect way to get in touch with us live, anywhere you want. Just click the link below and say hi!

+ + Join the Discord. +
+
+ +
+ +
+ + +
+

Ready to jump in?

+ +

Ready to jump into the world of ShiftOS? Cool! First, let's get you set up with a client. Simply click "Download" at the top of the page - and download the latest stable or unstable client - or you can download our AppVeyor release of the game or compile from source.

+ + Build status - Click that to go to our AppVeyor page. + +

...Or you can get the source code: ShiftOS Code on GitHub

+
\ No newline at end of file diff --git a/Project-Unite/Views/Manage/AddPhoneNumber.cshtml b/Project-Unite/Views/Manage/AddPhoneNumber.cshtml new file mode 100644 index 0000000..07f35b0 --- /dev/null +++ b/Project-Unite/Views/Manage/AddPhoneNumber.cshtml @@ -0,0 +1,29 @@ +@model Project_Unite.Models.AddPhoneNumberViewModel +@{ + ViewBag.Title = "Phone Number"; +} + +

@ViewBag.Title.

+ +@using (Html.BeginForm("AddPhoneNumber", "Manage", FormMethod.Post, new { @class = "form-horizontal", role = "form" })) +{ + @Html.AntiForgeryToken() +

Add a phone number

+
+ @Html.ValidationSummary("", new { @class = "text-danger" }) +
+ @Html.LabelFor(m => m.Number, new { @class = "col-md-2 control-label" }) +
+ @Html.TextBoxFor(m => m.Number, new { @class = "form-control" }) +
+
+
+
+ +
+
+} + +@section Scripts { + @Scripts.Render("~/bundles/jqueryval") +} diff --git a/Project-Unite/Views/Manage/ChangePassword.cshtml b/Project-Unite/Views/Manage/ChangePassword.cshtml new file mode 100644 index 0000000..f008697 --- /dev/null +++ b/Project-Unite/Views/Manage/ChangePassword.cshtml @@ -0,0 +1,40 @@ +@model Project_Unite.Models.ChangePasswordViewModel +@{ + ViewBag.Title = "Change Password"; +} + +

@ViewBag.Title.

+ +@using (Html.BeginForm("ChangePassword", "Manage", FormMethod.Post, new { @class = "form-horizontal", role = "form" })) +{ + @Html.AntiForgeryToken() +

Change Password Form

+
+ @Html.ValidationSummary("", new { @class = "text-danger" }) +
+ @Html.LabelFor(m => m.OldPassword, new { @class = "col-md-2 control-label" }) +
+ @Html.PasswordFor(m => m.OldPassword, new { @class = "form-control" }) +
+
+
+ @Html.LabelFor(m => m.NewPassword, new { @class = "col-md-2 control-label" }) +
+ @Html.PasswordFor(m => m.NewPassword, new { @class = "form-control" }) +
+
+
+ @Html.LabelFor(m => m.ConfirmPassword, new { @class = "col-md-2 control-label" }) +
+ @Html.PasswordFor(m => m.ConfirmPassword, new { @class = "form-control" }) +
+
+
+
+ +
+
+} +@section Scripts { + @Scripts.Render("~/bundles/jqueryval") +} \ No newline at end of file diff --git a/Project-Unite/Views/Manage/Index.cshtml b/Project-Unite/Views/Manage/Index.cshtml new file mode 100644 index 0000000..8b18401 --- /dev/null +++ b/Project-Unite/Views/Manage/Index.cshtml @@ -0,0 +1,81 @@ +@model Project_Unite.Models.ApplicationUser +@{ + ViewBag.Title = "My profile"; +} + +
+

@if (string.IsNullOrWhiteSpace(Model.FullName)) + { @Model.DisplayName } + else { + @Model.FullName (@Model.DisplayName) + }

+
+ + +

@ViewBag.StatusMessage

+ +
+ + +
+
+ + + + + + + + + + + + + + + + + +
Full name: + @if (string.IsNullOrWhiteSpace(Model.FullName)) + { +

Not provided.

+ } + else + { +

@Model.FullName

+ } +
Display name:

@Model.DisplayName

Codepoints:

If you have your in-game system linked with your account, your Codepoints will be shown here.

@Model.Codepoints

Links + @if (!string.IsNullOrWhiteSpace(Model.YoutubeUrl)) { + + } +    + @if (!string.IsNullOrWhiteSpace(Model.Website)) { + Website + } +
+
+
+

Not yet implemented.

+

This feature has not been implemented just yet.

+
+
+

Not yet implemented.

+

This feature has not been implemented just yet.

+
+
+

Not yet implemented.

+

This feature has not been implemented just yet.

+
+
+

Not yet implemented.

+

This feature has not been implemented just yet.

+
+
+
\ No newline at end of file diff --git a/Project-Unite/Views/Manage/ManageLogins.cshtml b/Project-Unite/Views/Manage/ManageLogins.cshtml new file mode 100644 index 0000000..709cedc --- /dev/null +++ b/Project-Unite/Views/Manage/ManageLogins.cshtml @@ -0,0 +1,70 @@ +@model Project_Unite.Models.ManageLoginsViewModel +@using Microsoft.Owin.Security +@{ + ViewBag.Title = "Manage your external logins"; +} + +

@ViewBag.Title.

+ +

@ViewBag.StatusMessage

+@{ + var loginProviders = Context.GetOwinContext().Authentication.GetExternalAuthenticationTypes(); + if (loginProviders.Count() == 0) { +
+

+ There are no external authentication services configured. See this article + for details on setting up this ASP.NET application to support logging in via external services. +

+
+ } + else + { + if (Model.CurrentLogins.Count > 0) + { +

Registered Logins

+ + + @foreach (var account in Model.CurrentLogins) + { + + + + + } + +
@account.LoginProvider + @if (ViewBag.ShowRemoveButton) + { + using (Html.BeginForm("RemoveLogin", "Manage")) + { + @Html.AntiForgeryToken() +
+ @Html.Hidden("loginProvider", account.LoginProvider) + @Html.Hidden("providerKey", account.ProviderKey) + +
+ } + } + else + { + @:   + } +
+ } + if (Model.OtherLogins.Count > 0) + { + using (Html.BeginForm("LinkLogin", "Manage")) + { + @Html.AntiForgeryToken() +
+

+ @foreach (AuthenticationDescription p in Model.OtherLogins) + { + + } +

+
+ } + } + } +} diff --git a/Project-Unite/Views/Manage/SetPassword.cshtml b/Project-Unite/Views/Manage/SetPassword.cshtml new file mode 100644 index 0000000..e8711e9 --- /dev/null +++ b/Project-Unite/Views/Manage/SetPassword.cshtml @@ -0,0 +1,39 @@ +@model Project_Unite.Models.SetPasswordViewModel +@{ + ViewBag.Title = "Create Password"; +} + +

@ViewBag.Title.

+

+ You do not have a local username/password for this site. Add a local + account so you can log in without an external login. +

+ +@using (Html.BeginForm("SetPassword", "Manage", FormMethod.Post, new { @class = "form-horizontal", role = "form" })) +{ + @Html.AntiForgeryToken() + +

Create Local Login

+
+ @Html.ValidationSummary("", new { @class = "text-danger" }) +
+ @Html.LabelFor(m => m.NewPassword, new { @class = "col-md-2 control-label" }) +
+ @Html.PasswordFor(m => m.NewPassword, new { @class = "form-control" }) +
+
+
+ @Html.LabelFor(m => m.ConfirmPassword, new { @class = "col-md-2 control-label" }) +
+ @Html.PasswordFor(m => m.ConfirmPassword, new { @class = "form-control" }) +
+
+
+
+ +
+
+} +@section Scripts { + @Scripts.Render("~/bundles/jqueryval") +} \ No newline at end of file diff --git a/Project-Unite/Views/Manage/VerifyPhoneNumber.cshtml b/Project-Unite/Views/Manage/VerifyPhoneNumber.cshtml new file mode 100644 index 0000000..8d3098d --- /dev/null +++ b/Project-Unite/Views/Manage/VerifyPhoneNumber.cshtml @@ -0,0 +1,31 @@ +@model Project_Unite.Models.VerifyPhoneNumberViewModel +@{ + ViewBag.Title = "Verify Phone Number"; +} + +

@ViewBag.Title.

+ +@using (Html.BeginForm("VerifyPhoneNumber", "Manage", FormMethod.Post, new { @class = "form-horizontal", role = "form" })) +{ + @Html.AntiForgeryToken() + @Html.Hidden("phoneNumber", @Model.PhoneNumber) +

Enter verification code

+
@ViewBag.Status
+
+ @Html.ValidationSummary("", new { @class = "text-danger" }) +
+ @Html.LabelFor(m => m.Code, new { @class = "col-md-2 control-label" }) +
+ @Html.TextBoxFor(m => m.Code, new { @class = "form-control" }) +
+
+
+
+ +
+
+} + +@section Scripts { + @Scripts.Render("~/bundles/jqueryval") +} diff --git a/Project-Unite/Views/Moderator/Bans.cshtml b/Project-Unite/Views/Moderator/Bans.cshtml new file mode 100644 index 0000000..90e20fc --- /dev/null +++ b/Project-Unite/Views/Moderator/Bans.cshtml @@ -0,0 +1,73 @@ +@model Project_Unite.Models.ModeratorBanListViewModel +@{ + ViewBag.Moderator = true; + ViewBag.Title = "Bans"; +} + +

Bans

+ + + +
+
+

User bans

+

Below is a list of all user bans. User bans prevent users from logging into their accounts.

+ + + + + + + + + @foreach(var u in Model.UserBans.OrderByDescending(x=>x.BannedAt)) + { + + + + + + + } +
UserBannerTimestampActions
@Html.UserLink(u.Id)@Html.UserLink(u.BannedBy)@u.BannedAt + @if(ACL.Granted(User.Identity.Name, "CanIssueBan")) + { + if(ACL.CanManageRole(User.Identity.Name, u.HighestRole.Id)) + { + @Html.ActionLink("Unban", "Unban", "Moderator", new { id=u.Id}, new { @class="btn btn-default"}) + } + } + +
+
+
+

IP address bans

+

Below is a list of IP address bans on the site. IP bans prevent users with a certain IP address from even attempting to access the website and multi-user domain by sending back "Forbidden" responses and denying connection.

+
BE EXTREMELY CAUTIOUS.
+

The system does NOT associate IP addresses with usernames - it can't. If you are unsure who's IP address you are unbanning, contact someone who is sure before taking any action. We have no idea what that computer or network is capable of.

+ + + + + + + + + @foreach (var u in Model.IPBans) + { + + + + + } +
UserBannerTimestampActions
@u.Address + @if (ACL.Granted(User.Identity.Name, "CanIssueIPBan")) + { + @Html.ActionLink("Unban", "UnbanIP", "Moderator", new { id = u.Id }, new { @class = "btn btn-danger" }) + } +
+
+
\ No newline at end of file diff --git a/Project-Unite/Views/Moderator/Index.cshtml b/Project-Unite/Views/Moderator/Index.cshtml new file mode 100644 index 0000000..d4b6569 --- /dev/null +++ b/Project-Unite/Views/Moderator/Index.cshtml @@ -0,0 +1,7 @@ + +@{ + ViewBag.Title = "Moderator CP"; +} + + + diff --git a/Project-Unite/Views/Moderator/Logs.cshtml b/Project-Unite/Views/Moderator/Logs.cshtml new file mode 100644 index 0000000..bf3ed4d --- /dev/null +++ b/Project-Unite/Views/Moderator/Logs.cshtml @@ -0,0 +1,25 @@ +@model IEnumerable +@{ + ViewBag.Moderator = true; + ViewBag.Title = "Audit logs"; +} + +

Moderator audit logs

+ +

Below is a list of all actions carried out by moderators and users that can be reviewed as evidence when investigating a guideline break.

+ + + + + + + + @foreach(var i in Model.OrderByDescending(x=>x.Timestamp)) + { + + + + + + } +
ActionUser & TimestampLevel
@i.Description@Html.UserLink(i.UserId) at @i.Timestamp@i.Level
\ No newline at end of file diff --git a/Project-Unite/Views/Moderator/UserDetails.cshtml b/Project-Unite/Views/Moderator/UserDetails.cshtml new file mode 100644 index 0000000..74556df --- /dev/null +++ b/Project-Unite/Views/Moderator/UserDetails.cshtml @@ -0,0 +1,116 @@ +@model Project_Unite.Models.ApplicationUser +@{ + ViewBag.Moderator = true; + ViewBag.Title = "User details"; +} + +

User details

+ +

@Html.UserLink(Model.Id)

+ +
    +
  • Email address: Email @Model.Email
  • +
  • Display name: @Model.DisplayName + + @if (ACL.Granted(User.Identity.Name, "CanEditUsernames")) + { + if (ACL.CanManageRole(User.Identity.Name, Model.HighestRole.Id)) + { + + Change + + + + } + } +
  • + @if(ACL.Granted(User.Identity.Name, "CanIssueIPBan")) + { +
  • Last known IP address: @Model.LastKnownIPAddress
  • + } +
  • Banned: + @if (Model.IsBanned) + { + Yes + if (Model.UserName != User.Identity.Name && ACL.CanManageRole(User.Identity.Name, Model.HighestRole.Id)) + { + @Html.ActionLink("Unban", "Unban", "Moderator", new { id = Model.Id }, null) + } + } + else + { + No + if (Model.UserName != User.Identity.Name && ACL.CanManageRole(User.Identity.Name, Model.HighestRole.Id)) + { + @Html.ActionLink("Ban", "Ban", "Moderator", new { id = Model.Id }, null) + } + } +
  • + @if(Model.IsBanned == true) + { +
  • Banned on: @Model.BannedAt
  • +
  • Banned by: @Html.UserLink(Model.BannedBy)
  • + } +
  • + Muted: + @if (Model.IsMuted) + { + Yes + if (Model.UserName != User.Identity.Name && ACL.CanManageRole(User.Identity.Name, Model.HighestRole.Id)) + { + @Html.ActionLink("Unmute", "Unmute", "Moderator", new { id = Model.Id }, null) + } + } + else + { + No + if (Model.UserName != User.Identity.Name && ACL.CanManageRole(User.Identity.Name, Model.HighestRole.Id)) + { + @Html.ActionLink("Mute", "Mute", "Moderator", new { id = Model.Id }, null) + } + } +
  • + @if (Model.IsMuted == true) + { +
  • Muted on: @Model.MutedAt
  • +
  • Muted by: @Html.UserLink(Model.MutedBy)
  • + } +
  • Bio: +

    @Html.Markdown(Model.Bio)

    +
  • +
  • + Interests: +

    @Model.Interests

    +
  • +
  • + Hobbies: +

    @Model.Hobbies

    +
  • + + +
\ No newline at end of file diff --git a/Project-Unite/Views/Moderator/Users.cshtml b/Project-Unite/Views/Moderator/Users.cshtml new file mode 100644 index 0000000..b352d53 --- /dev/null +++ b/Project-Unite/Views/Moderator/Users.cshtml @@ -0,0 +1,28 @@ +@model IEnumerable +@{ + ViewBag.Moderator = true; + ViewBag.Title = "Users"; +} + +

Users

+ +

Below is a list of all users in the database.

+ + + + + + + @foreach (var user in Model) + { + + + + + } +
UserActions
@Html.UserLink(user.Id) + + @Html.ActionLink("User details", "UserDetails", "Moderator", new { id = user.DisplayName }, new { @class = "btn btn-default" }) + + +
\ No newline at end of file diff --git a/Project-Unite/Views/Shared/Error.cshtml b/Project-Unite/Views/Shared/Error.cshtml new file mode 100644 index 0000000..be55b17 --- /dev/null +++ b/Project-Unite/Views/Shared/Error.cshtml @@ -0,0 +1,9 @@ +@model System.Web.Mvc.HandleErrorInfo + +@{ + ViewBag.Title = "Error"; +} + +

Error.

+

An error occurred while processing your request.

+ diff --git a/Project-Unite/Views/Shared/Lockout.cshtml b/Project-Unite/Views/Shared/Lockout.cshtml new file mode 100644 index 0000000..8658ff2 --- /dev/null +++ b/Project-Unite/Views/Shared/Lockout.cshtml @@ -0,0 +1,10 @@ +@model System.Web.Mvc.HandleErrorInfo + +@{ + ViewBag.Title = "Locked Out"; +} + +
+

Locked out.

+

This account has been locked out, please try again later.

+
diff --git a/Project-Unite/Views/Shared/_Layout.cshtml b/Project-Unite/Views/Shared/_Layout.cshtml new file mode 100644 index 0000000..0e64010 --- /dev/null +++ b/Project-Unite/Views/Shared/_Layout.cshtml @@ -0,0 +1,162 @@ + + + + + + @ViewBag.Title - My ASP.NET Application + @Styles.Render("~/Content/css") + @Styles.Render("~/Content/bootstrap-theme.css") + @Styles.Render("~/Content/Site.css") + + + @Scripts.Render("~/bundles/modernizr") + + + + @Scripts.Render("~/Scripts/highlight.js") + + + @if (ViewBag.Modals != null) + { + + foreach (var id in ViewBag.Modals) + { + + + } + + } + +
+ @if (!ACL.UserEmailConfirmed(User.Identity.Name)) + { +
+
+ Email address not confirmed! Hi! It appears that your email has not been confirmed. Please check your email. @Html.ActionLink("Resend confirmation link", "ResendConf", "Account") +
+
+ } + + @if (ViewBag.Moderator == true) + { + + @RenderBody(); + } + else if (ACL.Granted(User.Identity.Name, ViewBag.ACLRule)) + { + if (ViewBag.Admin == true) + { + if (ACL.Granted(User.Identity.Name, "CanAccessAdminCP")) + { + + @RenderBody(); + } + else + { +

Access denied.

+

You do not have permission to access this page. Contact an admin if this is in error.

+ } + } + else + { + @RenderBody() + + } + } + else + { +

Access denied.

+

You do not have permission to access this page. Contact an admin if this is in error.

+ + }
+ +
+ +

© @DateTime.Now.Year Michael VanOverbeek and the ShiftOS Dev Team

+ @if (ACL.Granted(User.Identity.Name, "CanAccessAdminCP")) + { +

@Html.ActionLink("Administrator Control Panel", "Index", "Admin")

+ } +
+
+ + @Scripts.Render("~/bundles/jquery") + @Scripts.Render("~/bundles/bootstrap") + @RenderSection("scripts", required: false) + + diff --git a/Project-Unite/Views/Shared/_LoginPartial.cshtml b/Project-Unite/Views/Shared/_LoginPartial.cshtml new file mode 100644 index 0000000..ad6978c --- /dev/null +++ b/Project-Unite/Views/Shared/_LoginPartial.cshtml @@ -0,0 +1,40 @@ +@using Microsoft.AspNet.Identity +@if (Request.IsAuthenticated) +{ + using (Html.BeginForm("LogOff", "Account", FormMethod.Post, new { id = "logoutForm", @class = "navbar-right" })) + { + @Html.AntiForgeryToken() + + + } +} +else +{ + +} diff --git a/Project-Unite/Views/Shared/_ModeratorBar.cshtml b/Project-Unite/Views/Shared/_ModeratorBar.cshtml new file mode 100644 index 0000000..8f8196e --- /dev/null +++ b/Project-Unite/Views/Shared/_ModeratorBar.cshtml @@ -0,0 +1,133 @@ +@using Microsoft.AspNet.Identity +@model Project_Unite.Models.ForumTopic + +@{ + string acl_perm_announce = "CanAnnounceTopics"; + string acl_perm_unlist = "CanUnlistTopics"; + string acl_perm_sticky = "CanStickyTopics"; + string acl_perm_global = "CanGlobalTopics"; + string acl_perm_unlock = "CanUnlockTopics"; + string acl_perm_lock = "CanLockTopics"; + + string like_link = Url.Action("Like", "Forum", new { id = Model.Discriminator }); + string dislike_link = Url.Action("Dislike", "Forum", new { id = Model.Discriminator }); + + if (User.Identity.GetUserId() == Model.AuthorId) + { + acl_perm_announce = "CanAnnounceOwnTopics"; + acl_perm_unlist = "CanUnlistOwnTopics"; + acl_perm_sticky = "CanStickyOwnTopics"; + acl_perm_global = "CanGlobalOwnTopics"; + acl_perm_unlock = "CanUnlockOwnTopics"; + acl_perm_lock = "CanLockOwnTopics"; + } + + +} + + + +
\ No newline at end of file diff --git a/Project-Unite/Views/Shared/_PostModerationBar.cshtml b/Project-Unite/Views/Shared/_PostModerationBar.cshtml new file mode 100644 index 0000000..a647447 --- /dev/null +++ b/Project-Unite/Views/Shared/_PostModerationBar.cshtml @@ -0,0 +1,27 @@ +@using Microsoft.AspNet.Identity +@model Project_Unite.Models.ForumPost + +@{ + string acl_perm_delete = "CanDeletePosts"; + string acl_perm_edit = "CanEditPosts"; + + if (User.Identity.GetUserId() == Model.AuthorId) + { + acl_perm_delete = "CanDeleteOwnPosts"; + acl_perm_edit = "CanEditOwnPosts"; + } +} + + + +
\ No newline at end of file diff --git a/Project-Unite/Views/Web.config b/Project-Unite/Views/Web.config new file mode 100644 index 0000000..5a35efd --- /dev/null +++ b/Project-Unite/Views/Web.config @@ -0,0 +1,43 @@ + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Project-Unite/Views/_ViewStart.cshtml b/Project-Unite/Views/_ViewStart.cshtml new file mode 100644 index 0000000..2de6241 --- /dev/null +++ b/Project-Unite/Views/_ViewStart.cshtml @@ -0,0 +1,3 @@ +@{ + Layout = "~/Views/Shared/_Layout.cshtml"; +} -- cgit v1.2.3