diff --git a/src/Orchard.Web/Modules/Orchard.Setup/Orchard.Setup.csproj b/src/Orchard.Web/Modules/Orchard.Setup/Orchard.Setup.csproj index 7ce5ccdf6..ad162b46a 100644 --- a/src/Orchard.Web/Modules/Orchard.Setup/Orchard.Setup.csproj +++ b/src/Orchard.Web/Modules/Orchard.Setup/Orchard.Setup.csproj @@ -59,6 +59,7 @@ False ..\..\..\..\lib\aspnetmvc\System.Web.Mvc.dll + True diff --git a/src/Orchard.Web/Modules/Orchard.Users/Controllers/AdminController.cs b/src/Orchard.Web/Modules/Orchard.Users/Controllers/AdminController.cs index 32c1a5e66..d1ddc4a49 100644 --- a/src/Orchard.Web/Modules/Orchard.Users/Controllers/AdminController.cs +++ b/src/Orchard.Web/Modules/Orchard.Users/Controllers/AdminController.cs @@ -50,7 +50,7 @@ namespace Orchard.Users.Controllers { .ToList() }; - return View(Shape.Model(model)); + return View(model); } public ActionResult Create() { @@ -61,7 +61,7 @@ namespace Orchard.Users.Controllers { var model = new UserCreateViewModel { User = Services.ContentManager.BuildEditorModel(user) }; - return View(Shape.Model(model)); + return View(model); } [HttpPost, ActionName("Create")] @@ -73,7 +73,7 @@ namespace Orchard.Users.Controllers { model.User = Services.ContentManager.UpdateEditorModel(user, this); if (!ModelState.IsValid) { Services.TransactionManager.Cancel(); - return View(Shape.Model(model)); + return View(model); } string userExistsMessage = _userService.VerifyUserUnicity(model.UserName, model.Email); @@ -95,7 +95,7 @@ namespace Orchard.Users.Controllers { if (ModelState.IsValid == false) { Services.TransactionManager.Cancel(); - return View(Shape.Model(model)); + return View(model); } return RedirectToAction("edit", new { user.Id }); @@ -106,7 +106,7 @@ namespace Orchard.Users.Controllers { return new HttpUnauthorizedResult(); return View(new UserEditViewModel { - User = Services.ContentManager.BuildEditorShape(id) + User = Services.ContentManager.Get(id) }); } @@ -116,7 +116,7 @@ namespace Orchard.Users.Controllers { return new HttpUnauthorizedResult(); var model = new UserEditViewModel { - User = Services.ContentManager.UpdateEditorShape(id, this) + User = Services.ContentManager.Get(id) }; TryUpdateModel(model); diff --git a/src/Orchard.Web/Modules/Orchard.Users/Orchard.Users.csproj b/src/Orchard.Web/Modules/Orchard.Users/Orchard.Users.csproj index 39c143755..9eec6d7fb 100644 --- a/src/Orchard.Web/Modules/Orchard.Users/Orchard.Users.csproj +++ b/src/Orchard.Web/Modules/Orchard.Users/Orchard.Users.csproj @@ -96,20 +96,18 @@ - - - - - - - - - - - - - - + + + + + + + + + + + + diff --git a/src/Orchard.Web/Modules/Orchard.Users/Views/Account/AccessDenied.ascx b/src/Orchard.Web/Modules/Orchard.Users/Views/Account/AccessDenied.ascx deleted file mode 100644 index dfab5f245..000000000 --- a/src/Orchard.Web/Modules/Orchard.Users/Views/Account/AccessDenied.ascx +++ /dev/null @@ -1,4 +0,0 @@ -<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl" %> -<%@ Import Namespace="Orchard.Mvc.ViewModels"%> -

<%: Html.TitleForPage(T("Access Denied").ToString()) %>

-

<%: T("You do not have permission to complete your request.")%>

diff --git a/src/Orchard.Web/Modules/Orchard.Users/Views/Account/AccessDenied.cshtml b/src/Orchard.Web/Modules/Orchard.Users/Views/Account/AccessDenied.cshtml new file mode 100644 index 000000000..8a6bf8ba3 --- /dev/null +++ b/src/Orchard.Web/Modules/Orchard.Users/Views/Account/AccessDenied.cshtml @@ -0,0 +1,3 @@ +@model dynamic +

@Html.TitleForPage(T("Access Denied").ToString())

+

@T("You do not have permission to complete your request.")

diff --git a/src/Orchard.Web/Modules/Orchard.Users/Views/Account/ChallengeEmailFail.ascx b/src/Orchard.Web/Modules/Orchard.Users/Views/Account/ChallengeEmailFail.ascx deleted file mode 100644 index 647e83954..000000000 --- a/src/Orchard.Web/Modules/Orchard.Users/Views/Account/ChallengeEmailFail.ascx +++ /dev/null @@ -1,3 +0,0 @@ -<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl" %> -

<%: Html.TitleForPage(T("Challenge Email").ToString()) %>

-

<%: T("Your email address could not be validated.") %>

diff --git a/src/Orchard.Web/Modules/Orchard.Users/Views/Account/ChallengeEmailFail.cshtml b/src/Orchard.Web/Modules/Orchard.Users/Views/Account/ChallengeEmailFail.cshtml new file mode 100644 index 000000000..036b43b65 --- /dev/null +++ b/src/Orchard.Web/Modules/Orchard.Users/Views/Account/ChallengeEmailFail.cshtml @@ -0,0 +1,3 @@ +@model dynamic +

@Html.TitleForPage(T("Challenge Email").ToString())

+

@T("Your email address could not be validated.")

diff --git a/src/Orchard.Web/Modules/Orchard.Users/Views/Account/ChallengeEmailSent.ascx b/src/Orchard.Web/Modules/Orchard.Users/Views/Account/ChallengeEmailSent.ascx deleted file mode 100644 index 1f4c973ea..000000000 --- a/src/Orchard.Web/Modules/Orchard.Users/Views/Account/ChallengeEmailSent.ascx +++ /dev/null @@ -1,3 +0,0 @@ -<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl" %> -

<%: Html.TitleForPage(T("Challenge Email Sent").ToString()) %>

-

<%: T("An email has been sent to you. Please click on the link it contains in order to have access on this site.") %>

diff --git a/src/Orchard.Web/Modules/Orchard.Users/Views/Account/ChallengeEmailSent.cshtml b/src/Orchard.Web/Modules/Orchard.Users/Views/Account/ChallengeEmailSent.cshtml new file mode 100644 index 000000000..5960246f3 --- /dev/null +++ b/src/Orchard.Web/Modules/Orchard.Users/Views/Account/ChallengeEmailSent.cshtml @@ -0,0 +1,3 @@ +@model dynamic +

@Html.TitleForPage(T("Challenge Email Sent").ToString())

+

@T("An email has been sent to you. Please click on the link it contains in order to have access on this site.")

diff --git a/src/Orchard.Web/Modules/Orchard.Users/Views/Account/ChallengeEmailSuccess.ascx b/src/Orchard.Web/Modules/Orchard.Users/Views/Account/ChallengeEmailSuccess.ascx deleted file mode 100644 index d7b8a4d1a..000000000 --- a/src/Orchard.Web/Modules/Orchard.Users/Views/Account/ChallengeEmailSuccess.ascx +++ /dev/null @@ -1,3 +0,0 @@ -<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl" %> -

<%: Html.TitleForPage(T("Challenge Email").ToString()) %>

-

<%: T("Your email address has been validated.") %>

diff --git a/src/Orchard.Web/Modules/Orchard.Users/Views/Account/ChallengeEmailSuccess.cshtml b/src/Orchard.Web/Modules/Orchard.Users/Views/Account/ChallengeEmailSuccess.cshtml new file mode 100644 index 000000000..06160a412 --- /dev/null +++ b/src/Orchard.Web/Modules/Orchard.Users/Views/Account/ChallengeEmailSuccess.cshtml @@ -0,0 +1,3 @@ +@model dynamic +

@Html.TitleForPage(T("Challenge Email").ToString())

+

@T("Your email address has been validated.")

diff --git a/src/Orchard.Web/Modules/Orchard.Users/Views/Account/ChangePassword.ascx b/src/Orchard.Web/Modules/Orchard.Users/Views/Account/ChangePassword.ascx deleted file mode 100644 index 04792d2a0..000000000 --- a/src/Orchard.Web/Modules/Orchard.Users/Views/Account/ChangePassword.ascx +++ /dev/null @@ -1,28 +0,0 @@ -<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl" %> -

<%: Html.TitleForPage(T("Change Password").ToString()) %>

-

<%: T("Use the form below to change your password.")%>

-

<%: T("New passwords are required to be a minimum of {0} characters in length.", ViewData["PasswordLength"] as string) %>

-<%: Html.ValidationSummary(T("Password change was unsuccessful. Please correct the errors and try again.").ToString())%> -<% using (Html.BeginFormAntiForgeryPost()) { %> -
- <%: T("Account Information")%> -
- - <%: Html.Password("currentPassword") %> - <%: Html.ValidationMessage("currentPassword") %> -
-
- - <%: Html.Password("newPassword") %> - <%: Html.ValidationMessage("newPassword") %> -
-
- - <%: Html.Password("confirmPassword") %> - <%: Html.ValidationMessage("confirmPassword") %> -
-
- " /> -
-
-<% } %> \ No newline at end of file diff --git a/src/Orchard.Web/Modules/Orchard.Users/Views/Account/ChangePassword.cshtml b/src/Orchard.Web/Modules/Orchard.Users/Views/Account/ChangePassword.cshtml new file mode 100644 index 000000000..54538fd65 --- /dev/null +++ b/src/Orchard.Web/Modules/Orchard.Users/Views/Account/ChangePassword.cshtml @@ -0,0 +1,28 @@ +@model dynamic +

@Html.TitleForPage(T("Change Password").ToString())

+

@T("Use the form below to change your password.")

+

@T("New passwords are required to be a minimum of {0} characters in length.", ViewData.PasswordLength as string)

+@Html.ValidationSummary(T("Password change was unsuccessful. Please correct the errors and try again.").ToString()) +@using (Html.BeginFormAntiForgeryPost()) { +
+ @T("Account Information") +
+ + @Html.Password("currentPassword") + @Html.ValidationMessage("currentPassword") +
+
+ + @Html.Password("newPassword") + @Html.ValidationMessage("newPassword") +
+
+ + @Html.Password("confirmPassword") + @Html.ValidationMessage("confirmPassword") +
+
+ +
+
+ } \ No newline at end of file diff --git a/src/Orchard.Web/Modules/Orchard.Users/Views/Account/ChangePasswordSuccess.ascx b/src/Orchard.Web/Modules/Orchard.Users/Views/Account/ChangePasswordSuccess.ascx deleted file mode 100644 index e1b226da8..000000000 --- a/src/Orchard.Web/Modules/Orchard.Users/Views/Account/ChangePasswordSuccess.ascx +++ /dev/null @@ -1,3 +0,0 @@ -<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl" %> -

<%: Html.TitleForPage(T("Change Password").ToString()) %>

-

<%: T("Your password has been changed successfully.")%>

diff --git a/src/Orchard.Web/Modules/Orchard.Users/Views/Account/ChangePasswordSuccess.cshtml b/src/Orchard.Web/Modules/Orchard.Users/Views/Account/ChangePasswordSuccess.cshtml new file mode 100644 index 000000000..ab998b456 --- /dev/null +++ b/src/Orchard.Web/Modules/Orchard.Users/Views/Account/ChangePasswordSuccess.cshtml @@ -0,0 +1,3 @@ +@model dynamic +

@Html.TitleForPage(T("Change Password").ToString())

+

@T("Your password has been changed successfully.")

diff --git a/src/Orchard.Web/Modules/Orchard.Users/Views/Account/LogOn.ascx b/src/Orchard.Web/Modules/Orchard.Users/Views/Account/LogOn.ascx deleted file mode 100644 index 3afe78167..000000000 --- a/src/Orchard.Web/Modules/Orchard.Users/Views/Account/LogOn.ascx +++ /dev/null @@ -1,25 +0,0 @@ -<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl" %> -<%@ Import Namespace="Orchard.Users.ViewModels"%> -

<%: Html.TitleForPage(Model.Title)%>

-

<%: T("Please enter your username and password.")%> <%: Html.ActionLink("Register", "Register")%><%: T(" if you don't have an account.")%>

-<%: Html.ValidationSummary(T("Login was unsuccessful. Please correct the errors and try again.").ToString())%> -<% -using (Html.BeginFormAntiForgeryPost(Url.Action("LogOn", new {ReturnUrl = Request.QueryString["ReturnUrl"]}))) { %> -
- <%: T("Account Information")%> -
- - <%: Html.TextBox("userNameOrEmail", "", new { autofocus = "autofocus" })%> - <%: Html.ValidationMessage("userNameOrEmail")%> -
-
- - <%: Html.Password("password")%> - <%: Html.ValidationMessage("password")%> -
-
- <%: Html.CheckBox("rememberMe")%> -
- " /> -
<% -} %> \ No newline at end of file diff --git a/src/Orchard.Web/Modules/Orchard.Users/Views/Account/LogOn.cshtml b/src/Orchard.Web/Modules/Orchard.Users/Views/Account/LogOn.cshtml new file mode 100644 index 000000000..80f10f300 --- /dev/null +++ b/src/Orchard.Web/Modules/Orchard.Users/Views/Account/LogOn.cshtml @@ -0,0 +1,25 @@ +@model Orchard.Users.ViewModels.LogOnViewModel + +

@Html.TitleForPage(Model.Title)

+

@T("Please enter your username and password.") @Html.ActionLink("Register", "Register") @T(" if you don't have an account.")

+@Html.ValidationSummary(T("Login was unsuccessful. Please correct the errors and try again.").ToString()) + +@using (Html.BeginFormAntiForgeryPost(Url.Action("LogOn", new {ReturnUrl = Request.QueryString["ReturnUrl"]}))) { + +} \ No newline at end of file diff --git a/src/Orchard.Web/Modules/Orchard.Users/Views/Account/Register.ascx b/src/Orchard.Web/Modules/Orchard.Users/Views/Account/Register.ascx deleted file mode 100644 index 1a14223ce..000000000 --- a/src/Orchard.Web/Modules/Orchard.Users/Views/Account/Register.ascx +++ /dev/null @@ -1,33 +0,0 @@ -<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl" %> -

<%: Html.TitleForPage(T("Create a New Account").ToString()) %>

-

<%: T("Use the form below to create a new account.")%>

-

<%: T("Passwords are required to be a minimum of {0} characters in length.", ViewData["PasswordLength"] as string)%>

-<%: Html.ValidationSummary(T("Account creation was unsuccessful. Please correct the errors and try again.").ToString()) %> -<% using (Html.BeginFormAntiForgeryPost()) { %> -
- <%: T("Account Information")%> -
- - <%: Html.TextBox("username") %> - <%: Html.ValidationMessage("username") %> -
-
- - <%: Html.TextBox("email") %> - <%: Html.ValidationMessage("email") %> -
-
- - <%: Html.Password("password") %> - <%: Html.ValidationMessage("password") %> -
-
- - <%: Html.Password("confirmPassword") %> - <%: Html.ValidationMessage("confirmPassword") %> -
-
- " /> -
-
-<% } %> \ No newline at end of file diff --git a/src/Orchard.Web/Modules/Orchard.Users/Views/Account/Register.cshtml b/src/Orchard.Web/Modules/Orchard.Users/Views/Account/Register.cshtml new file mode 100644 index 000000000..796760f0b --- /dev/null +++ b/src/Orchard.Web/Modules/Orchard.Users/Views/Account/Register.cshtml @@ -0,0 +1,32 @@ +

@Html.TitleForPage(T("Create a New Account").ToString())

+

@T("Use the form below to create a new account.")

+

@T("Passwords are required to be a minimum of {0} characters in length.", ViewData["PasswordLength"] as string)

+@Html.ValidationSummary(T("Account creation was unsuccessful. Please correct the errors and try again.").ToString()) +@using (Html.BeginFormAntiForgeryPost()) { +
+ @T("Account Information") +
+ + @Html.TextBox("username") + @Html.ValidationMessage("username") +
+
+ + @Html.TextBox("email") + @Html.ValidationMessage("email") +
+
+ + @Html.Password("password") + @Html.ValidationMessage("password") +
+
+ + @Html.Password("confirmPassword") + @Html.ValidationMessage("confirmPassword") +
+
+ +
+
+ } \ No newline at end of file diff --git a/src/Orchard.Web/Modules/Orchard.Users/Views/Admin/Create.aspx b/src/Orchard.Web/Modules/Orchard.Users/Views/Admin/Create.aspx deleted file mode 100644 index cda251f20..000000000 --- a/src/Orchard.Web/Modules/Orchard.Users/Views/Admin/Create.aspx +++ /dev/null @@ -1,14 +0,0 @@ -<%@ Page Language="C#" Inherits="Orchard.Mvc.ViewPage" %> -<%@ Import Namespace="Orchard.Users.ViewModels"%> -

<%: Html.TitleForPage(T("Add User").ToString()) %>

-<%using (Html.BeginFormAntiForgeryPost()) { %> - <%: Html.ValidationSummary() %> - <%: Html.EditorFor(m=>m.UserName, "inputTextLarge")%> - <%: Html.EditorFor(m=>m.Email, "inputTextLarge") %> - <%: Html.EditorFor(m=>m.Password, "inputPasswordLarge") %> - <%: Html.EditorFor(m=>m.ConfirmPassword, "inputPasswordLarge") %> - <%: Html.EditorForItem(Model.User) %> -
- " /> -
-<% } %> diff --git a/src/Orchard.Web/Modules/Orchard.Users/Views/Admin/Create.cshtml b/src/Orchard.Web/Modules/Orchard.Users/Views/Admin/Create.cshtml new file mode 100644 index 000000000..b054b7cea --- /dev/null +++ b/src/Orchard.Web/Modules/Orchard.Users/Views/Admin/Create.cshtml @@ -0,0 +1,34 @@ +@model Orchard.Users.ViewModels.UserCreateViewModel + +

@Html.TitleForPage(T("Add User").ToString())

+@using (Html.BeginFormAntiForgeryPost()) { + @Html.ValidationSummary() + +
+ @Html.LabelFor(m=>m.UserName) + @Html.TextBoxFor(m=>m.UserName, new { @class = "textMedium" }) + @Html.ValidationMessageFor(m=>m.UserName, "*") +
+ +
+ @Html.LabelFor(m=>m.Email) + @Html.TextBoxFor(m=>m.Email, new { @class = "textMedium" }) + @Html.ValidationMessageFor(m=>m.Email, "*") +
+ +
+ @Html.LabelFor(m=>m.Password) + @Html.PasswordFor(m=>m.Password, new { @class = "textMedium" }) + @Html.ValidationMessageFor(m=>m.Password, "*") +
+ +
+ @Html.LabelFor(m=>m.ConfirmPassword) + @Html.PasswordFor(m=>m.ConfirmPassword, new { @class = "textMedium" }) + @Html.ValidationMessageFor(m=>m.ConfirmPassword, "*") +
+ +
+ +
+ } diff --git a/src/Orchard.Web/Modules/Orchard.Users/Views/Admin/Edit.aspx b/src/Orchard.Web/Modules/Orchard.Users/Views/Admin/Edit.aspx deleted file mode 100644 index 752c813e7..000000000 --- a/src/Orchard.Web/Modules/Orchard.Users/Views/Admin/Edit.aspx +++ /dev/null @@ -1,13 +0,0 @@ -<%@ Page Language="C#" Inherits="Orchard.Mvc.ViewPage" %> -<%@ Import Namespace="Orchard.Users.ViewModels"%> -

<%: Html.TitleForPage(T("Edit User").ToString()) %>

-<%using (Html.BeginFormAntiForgeryPost()) { %> - <%: Html.ValidationSummary() %> - <%: Html.EditorFor(m=>m.Id) %> - <%: Html.EditorFor(m=>m.UserName, "inputTextLarge") %> - <%: Html.EditorFor(m=>m.Email, "inputTextLarge") %> - <%: Html.EditorForItem(Model.User) %> -
- " /> -
-<% } %> diff --git a/src/Orchard.Web/Modules/Orchard.Users/Views/Admin/Edit.cshtml b/src/Orchard.Web/Modules/Orchard.Users/Views/Admin/Edit.cshtml new file mode 100644 index 000000000..7e52c85f5 --- /dev/null +++ b/src/Orchard.Web/Modules/Orchard.Users/Views/Admin/Edit.cshtml @@ -0,0 +1,22 @@ +@model Orchard.Users.ViewModels.UserEditViewModel + +

@Html.TitleForPage(T("Edit User").ToString())

+@using (Html.BeginFormAntiForgeryPost()) { + @Html.ValidationSummary() + @Html.EditorFor(m=>m.Id) +
+ @Html.LabelFor(m=>m.UserName) + @Html.TextBoxFor(m=>m.UserName, new { @class = "textMedium" }) + @Html.ValidationMessageFor(m=>m.UserName, "*") +
+ +
+ @Html.LabelFor(m=>m.Email) + @Html.TextBoxFor(m=>m.Email, new { @class = "textMedium" }) + @Html.ValidationMessageFor(m=>m.Email, "*") +
+ +
+ +
+ } diff --git a/src/Orchard.Web/Modules/Orchard.Users/Views/Admin/EditorTemplates/inputPasswordLarge.ascx b/src/Orchard.Web/Modules/Orchard.Users/Views/Admin/EditorTemplates/inputPasswordLarge.ascx deleted file mode 100644 index af63afe1f..000000000 --- a/src/Orchard.Web/Modules/Orchard.Users/Views/Admin/EditorTemplates/inputPasswordLarge.ascx +++ /dev/null @@ -1,6 +0,0 @@ -<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %> -
- <%: Html.LabelForModel() %> - <%: Html.Password("", Model, new { @class = "textMedium" })%> - <%: Html.ValidationMessage("", "*") %> -
\ No newline at end of file diff --git a/src/Orchard.Web/Modules/Orchard.Users/Views/Admin/EditorTemplates/inputTextLarge.ascx b/src/Orchard.Web/Modules/Orchard.Users/Views/Admin/EditorTemplates/inputTextLarge.ascx deleted file mode 100644 index 0ce85934c..000000000 --- a/src/Orchard.Web/Modules/Orchard.Users/Views/Admin/EditorTemplates/inputTextLarge.ascx +++ /dev/null @@ -1,6 +0,0 @@ -<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %> -
- <%: Html.LabelForModel() %> - <%: Html.TextBox("", Model, new { @class = "textMedium" })%> - <%: Html.ValidationMessage("", "*") %> -
\ No newline at end of file diff --git a/src/Orchard.Web/Modules/Orchard.Users/Views/Admin/Index.aspx b/src/Orchard.Web/Modules/Orchard.Users/Views/Admin/Index.aspx deleted file mode 100644 index 1ae630b13..000000000 --- a/src/Orchard.Web/Modules/Orchard.Users/Views/Admin/Index.aspx +++ /dev/null @@ -1,49 +0,0 @@ -<%@ Page Language="C#" Inherits="Orchard.Mvc.ViewPage" %> -<%@ Import Namespace="Orchard.Users.Models" %> -<%@ Import Namespace="Orchard.Users.ViewModels"%> -

<%: Html.TitleForPage(T("Manage Users").ToString()) %>

-<% using (Html.BeginFormAntiForgeryPost()) { %> - <%: Html.ValidationSummary()%> -
<%: Html.ActionLink(T("Add a new user").ToString(), "Create", new { }, new { @class = "button primaryAction" })%>
-
- - - - - - - - - - - - - - <% foreach (var row in Model.Rows) - { %> - - - - - - <%}%> -
<%: T("Name")%><%: T("Email")%><%: T("") %>
- <% if(row.UserPart.RegistrationStatus == UserStatus.Approved) { %> - " alt="<%:T("Approved") %>" title="<%:T("User is approved") %>" /> - <% } - else { %> - " alt="<%:T("Moderated") %>" title="<%:T("User is moderated") %>" /> - <% } %> - <%: row.UserPart.UserName %> - - <%: row.UserPart.Email %> - - <%: Html.ActionLink(T("Edit").ToString(), "Edit", new { row.UserPart.Id })%> | - <%: Html.ActionLink(T("Remove").ToString(), "Delete", new { row.UserPart.Id })%> | - <%: row.UserPart.RegistrationStatus == UserStatus.Pending ? Html.ActionLink(T("Approve").ToString(), "Approve", new { row.UserPart.Id }) : Html.ActionLink(T("Disable").ToString(), "Moderate", new { row.UserPart.Id })%> - <% if ( row.UserPart.EmailStatus == UserStatus.Pending ) { %> | - <%: Html.ActionLink(T("Challenge Email").ToString(), "SendChallengeEmail", new { row.UserPart.Id })%> - <% } %> -
-
-<% } %> \ No newline at end of file diff --git a/src/Orchard.Web/Modules/Orchard.Users/Views/Admin/Index.cshtml b/src/Orchard.Web/Modules/Orchard.Users/Views/Admin/Index.cshtml new file mode 100644 index 000000000..e50093e6c --- /dev/null +++ b/src/Orchard.Web/Modules/Orchard.Users/Views/Admin/Index.cshtml @@ -0,0 +1,52 @@ +@model Orchard.Users.ViewModels.UsersIndexViewModel +@using Orchard.Users.Models + +

@Html.TitleForPage(T("Manage Users").ToString())

+@using (Html.BeginFormAntiForgeryPost()) { + @Html.ValidationSummary() +
@Html.ActionLink(T("Add a new user").ToString(), "Create", new { }, new { @class = "button primaryAction" })
+
+ + + + + + + + + + + + + + @foreach (var row in Model.Rows) { + + + + + + } +
@T("Name")@T("Email")@T("")
+ @if(row.UserPart.RegistrationStatus == UserStatus.Approved) { + @T( + } + else { + @T( + } + @row.UserPart.UserName + + @row.UserPart.Email + + @Html.ActionLink(T("Edit").ToString(), "Edit", new { row.UserPart.Id }) | + @Html.ActionLink(T("Remove").ToString(), "Delete", new { row.UserPart.Id }) | + @if(row.UserPart.RegistrationStatus == UserStatus.Pending) { + @Html.ActionLink(T("Approve").ToString(), "Approve", new { row.UserPart.Id }) + } else { + @Html.ActionLink(T("Disable").ToString(), "Moderate", new { row.UserPart.Id }) + } + @if ( row.UserPart.EmailStatus == UserStatus.Pending ) { | + @Html.ActionLink(T("Challenge Email").ToString(), "SendChallengeEmail", new { row.UserPart.Id }) + } +
+
+} \ No newline at end of file diff --git a/src/Orchard.Web/Modules/Orchard.Users/Views/EditorTemplates/Parts/Users.RegistrationSettings.ascx b/src/Orchard.Web/Modules/Orchard.Users/Views/EditorTemplates/Parts/Users.RegistrationSettings.ascx deleted file mode 100644 index 0b2ed2f7f..000000000 --- a/src/Orchard.Web/Modules/Orchard.Users/Views/EditorTemplates/Parts/Users.RegistrationSettings.ascx +++ /dev/null @@ -1,25 +0,0 @@ -<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl" %> -<%@ Import Namespace="Orchard.Users.Models"%> -
- <%: T("Users registration")%> -
- <%: Html.EditorFor(m => m.UsersCanRegister) %> - - <%: Html.ValidationMessage("UsersCanRegister", "*")%> -
-
- <%: Html.EditorFor(m => m.UsersMustValidateEmail)%> - - <%: Html.ValidationMessage("UsersMustValidateEmail", "*")%> -
-
- <%: Html.EditorFor(m => m.UsersAreModerated)%> - - <%: Html.ValidationMessage("UsersAreModerated", "*")%> -
-
- <%: Html.EditorFor(m => m.NotifyModeration)%> - - <%: Html.ValidationMessage("NotifyModeration", "*")%> -
-
\ No newline at end of file diff --git a/src/Orchard.Web/Modules/Orchard.Users/Views/EditorTemplates/Parts/Users.RegistrationSettings.cshtml b/src/Orchard.Web/Modules/Orchard.Users/Views/EditorTemplates/Parts/Users.RegistrationSettings.cshtml new file mode 100644 index 000000000..b34c9c324 --- /dev/null +++ b/src/Orchard.Web/Modules/Orchard.Users/Views/EditorTemplates/Parts/Users.RegistrationSettings.cshtml @@ -0,0 +1,25 @@ +@model Orchard.Users.Models.RegistrationSettingsPartRecord + +
+ @T("Users registration") +
+ @Html.EditorFor(m => m.UsersCanRegister) + + @Html.ValidationMessage("UsersCanRegister", "*") +
+
+ @Html.EditorFor(m => m.UsersMustValidateEmail) + + @Html.ValidationMessage("UsersMustValidateEmail", "*") +
+
+ @Html.EditorFor(m => m.UsersAreModerated) + + @Html.ValidationMessage("UsersAreModerated", "*") +
+
+ @Html.EditorFor(m => m.NotifyModeration) + + @Html.ValidationMessage("NotifyModeration", "*") +
+
\ No newline at end of file diff --git a/src/Orchard.Web/Orchard.Web.csproj b/src/Orchard.Web/Orchard.Web.csproj index 2f3b2da1a..a8b015879 100644 --- a/src/Orchard.Web/Orchard.Web.csproj +++ b/src/Orchard.Web/Orchard.Web.csproj @@ -216,7 +216,7 @@ - + diff --git a/src/Orchard.Web/Themes/Contoso/Views/LogOn.ascx b/src/Orchard.Web/Themes/Contoso/Views/LogOn.ascx_ similarity index 100% rename from src/Orchard.Web/Themes/Contoso/Views/LogOn.ascx rename to src/Orchard.Web/Themes/Contoso/Views/LogOn.ascx_