mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
Migrated Orchard.Users
--HG-- branch : theming
This commit is contained in:
@@ -59,6 +59,7 @@
|
||||
<Reference Include="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\..\lib\aspnetmvc\System.Web.Mvc.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.Routing" />
|
||||
<Reference Include="System.Xml" />
|
||||
|
@@ -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<UserPart>(id)
|
||||
User = Services.ContentManager.Get<UserPart>(id)
|
||||
});
|
||||
}
|
||||
|
||||
@@ -116,7 +116,7 @@ namespace Orchard.Users.Controllers {
|
||||
return new HttpUnauthorizedResult();
|
||||
|
||||
var model = new UserEditViewModel {
|
||||
User = Services.ContentManager.UpdateEditorShape<UserPart>(id, this)
|
||||
User = Services.ContentManager.Get<UserPart>(id)
|
||||
};
|
||||
|
||||
TryUpdateModel(model);
|
||||
|
@@ -96,20 +96,18 @@
|
||||
<Content Include="Content\Admin\images\offline.gif" />
|
||||
<Content Include="Content\Admin\images\online.gif" />
|
||||
<Content Include="Module.txt" />
|
||||
<Content Include="Views\Account\ChangePassword.ascx" />
|
||||
<Content Include="Views\Account\ChangePasswordSuccess.ascx" />
|
||||
<Content Include="Views\Account\AccessDenied.ascx" />
|
||||
<Content Include="Views\Account\ChallengeEmailSuccess.ascx" />
|
||||
<Content Include="Views\Account\ChallengeEmailSent.ascx" />
|
||||
<Content Include="Views\Account\ChallengeEmailFail.ascx" />
|
||||
<Content Include="Views\Account\LogOn.ascx" />
|
||||
<Content Include="Views\Account\Register.ascx" />
|
||||
<Content Include="Views\Admin\Edit.aspx" />
|
||||
<Content Include="Views\Admin\Create.aspx" />
|
||||
<Content Include="Views\Admin\EditorTemplates\inputPasswordLarge.ascx" />
|
||||
<Content Include="Views\Admin\EditorTemplates\inputTextLarge.ascx" />
|
||||
<Content Include="Views\Admin\Index.aspx" />
|
||||
<Content Include="Views\EditorTemplates\Parts\Users.RegistrationSettings.ascx" />
|
||||
<None Include="Views\Account\ChangePassword.cshtml" />
|
||||
<None Include="Views\Account\ChangePasswordSuccess.cshtml" />
|
||||
<None Include="Views\Account\AccessDenied.cshtml" />
|
||||
<None Include="Views\Account\ChallengeEmailSuccess.cshtml" />
|
||||
<None Include="Views\Account\ChallengeEmailSent.cshtml" />
|
||||
<None Include="Views\Account\ChallengeEmailFail.cshtml" />
|
||||
<None Include="Views\Account\LogOn.cshtml" />
|
||||
<None Include="Views\Account\Register.cshtml" />
|
||||
<None Include="Views\Admin\Edit.cshtml" />
|
||||
<None Include="Views\Admin\Create.cshtml" />
|
||||
<None Include="Views\Admin\Index.cshtml" />
|
||||
<None Include="Views\EditorTemplates\Parts\Users.RegistrationSettings.cshtml" />
|
||||
<Content Include="Web.config" />
|
||||
<Content Include="Views\Web.config" />
|
||||
</ItemGroup>
|
||||
|
@@ -1,4 +0,0 @@
|
||||
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<BaseViewModel>" %>
|
||||
<%@ Import Namespace="Orchard.Mvc.ViewModels"%>
|
||||
<h1><%: Html.TitleForPage(T("Access Denied").ToString()) %></h1>
|
||||
<p><%: T("You do not have permission to complete your request.")%></p>
|
@@ -0,0 +1,3 @@
|
||||
@model dynamic
|
||||
<h1>@Html.TitleForPage(T("Access Denied").ToString())</h1>
|
||||
<p>@T("You do not have permission to complete your request.")</p>
|
@@ -1,3 +0,0 @@
|
||||
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<object>" %>
|
||||
<h1><%: Html.TitleForPage(T("Challenge Email").ToString()) %></h1>
|
||||
<p><%: T("Your email address could not be validated.") %></p>
|
@@ -0,0 +1,3 @@
|
||||
@model dynamic
|
||||
<h1>@Html.TitleForPage(T("Challenge Email").ToString()) </h1>
|
||||
<p>@T("Your email address could not be validated.") </p>
|
@@ -1,3 +0,0 @@
|
||||
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<object>" %>
|
||||
<h1><%: Html.TitleForPage(T("Challenge Email Sent").ToString()) %></h1>
|
||||
<p><%: T("An email has been sent to you. Please click on the link it contains in order to have access on this site.") %></p>
|
@@ -0,0 +1,3 @@
|
||||
@model dynamic
|
||||
<h1>@Html.TitleForPage(T("Challenge Email Sent").ToString()) </h1>
|
||||
<p>@T("An email has been sent to you. Please click on the link it contains in order to have access on this site.") </p>
|
@@ -1,3 +0,0 @@
|
||||
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<object>" %>
|
||||
<h1><%: Html.TitleForPage(T("Challenge Email").ToString()) %></h1>
|
||||
<p><%: T("Your email address has been validated.") %></p>
|
@@ -0,0 +1,3 @@
|
||||
@model dynamic
|
||||
<h1>@Html.TitleForPage(T("Challenge Email").ToString()) </h1>
|
||||
<p>@T("Your email address has been validated.") </p>
|
@@ -1,28 +0,0 @@
|
||||
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<object>" %>
|
||||
<h1><%: Html.TitleForPage(T("Change Password").ToString()) %></h1>
|
||||
<p><%: T("Use the form below to change your password.")%></p>
|
||||
<p><%: T("New passwords are required to be a minimum of {0} characters in length.", ViewData["PasswordLength"] as string) %></p>
|
||||
<%: Html.ValidationSummary(T("Password change was unsuccessful. Please correct the errors and try again.").ToString())%>
|
||||
<% using (Html.BeginFormAntiForgeryPost()) { %>
|
||||
<fieldset>
|
||||
<legend><%: T("Account Information")%></legend>
|
||||
<div>
|
||||
<label for="currentPassword"><%: T("Current password:")%></label>
|
||||
<%: Html.Password("currentPassword") %>
|
||||
<%: Html.ValidationMessage("currentPassword") %>
|
||||
</div>
|
||||
<div>
|
||||
<label for="newPassword"><%: T("New password:")%></label>
|
||||
<%: Html.Password("newPassword") %>
|
||||
<%: Html.ValidationMessage("newPassword") %>
|
||||
</div>
|
||||
<div>
|
||||
<label for="confirmPassword"><%: T("Confirm new password:")%></label>
|
||||
<%: Html.Password("confirmPassword") %>
|
||||
<%: Html.ValidationMessage("confirmPassword") %>
|
||||
</div>
|
||||
<div>
|
||||
<input type="submit" value="<%: T("Change Password") %>" />
|
||||
</div>
|
||||
</fieldset>
|
||||
<% } %>
|
@@ -0,0 +1,28 @@
|
||||
@model dynamic
|
||||
<h1>@Html.TitleForPage(T("Change Password").ToString()) </h1>
|
||||
<p>@T("Use the form below to change your password.")</p>
|
||||
<p>@T("New passwords are required to be a minimum of {0} characters in length.", ViewData.PasswordLength as string) </p>
|
||||
@Html.ValidationSummary(T("Password change was unsuccessful. Please correct the errors and try again.").ToString())
|
||||
@using (Html.BeginFormAntiForgeryPost()) {
|
||||
<fieldset>
|
||||
<legend>@T("Account Information")</legend>
|
||||
<div>
|
||||
<label for="currentPassword">@T("Current password:")</label>
|
||||
@Html.Password("currentPassword")
|
||||
@Html.ValidationMessage("currentPassword")
|
||||
</div>
|
||||
<div>
|
||||
<label for="newPassword">@T("New password:")</label>
|
||||
@Html.Password("newPassword")
|
||||
@Html.ValidationMessage("newPassword")
|
||||
</div>
|
||||
<div>
|
||||
<label for="confirmPassword">@T("Confirm new password:")</label>
|
||||
@Html.Password("confirmPassword")
|
||||
@Html.ValidationMessage("confirmPassword")
|
||||
</div>
|
||||
<div>
|
||||
<input type="submit" value="@T("Change Password") " />
|
||||
</div>
|
||||
</fieldset>
|
||||
}
|
@@ -1,3 +0,0 @@
|
||||
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<object>" %>
|
||||
<h1><%: Html.TitleForPage(T("Change Password").ToString()) %></h1>
|
||||
<p><%: T("Your password has been changed successfully.")%></p>
|
@@ -0,0 +1,3 @@
|
||||
@model dynamic
|
||||
<h1>@Html.TitleForPage(T("Change Password").ToString())</h1>
|
||||
<p>@T("Your password has been changed successfully.")</p>
|
@@ -1,25 +0,0 @@
|
||||
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<LogOnViewModel>" %>
|
||||
<%@ Import Namespace="Orchard.Users.ViewModels"%>
|
||||
<h1><%: Html.TitleForPage(Model.Title)%></h1>
|
||||
<p><%: T("Please enter your username and password.")%> <%: Html.ActionLink("Register", "Register")%><%: T(" if you don't have an account.")%></p>
|
||||
<%: 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"]}))) { %>
|
||||
<fieldset>
|
||||
<legend><%: T("Account Information")%></legend>
|
||||
<div>
|
||||
<label for="userNameOrEmail"><%: T("Username or Email:")%></label>
|
||||
<%: Html.TextBox("userNameOrEmail", "", new { autofocus = "autofocus" })%>
|
||||
<%: Html.ValidationMessage("userNameOrEmail")%>
|
||||
</div>
|
||||
<div>
|
||||
<label for="password"><%: T("Password:")%></label>
|
||||
<%: Html.Password("password")%>
|
||||
<%: Html.ValidationMessage("password")%>
|
||||
</div>
|
||||
<div>
|
||||
<%: Html.CheckBox("rememberMe")%><label class="forcheckbox" for="rememberMe"><%: T("Remember me?")%></label>
|
||||
</div>
|
||||
<input type="submit" value="<%: T("Log On") %>" />
|
||||
</fieldset><%
|
||||
} %>
|
@@ -0,0 +1,25 @@
|
||||
@model Orchard.Users.ViewModels.LogOnViewModel
|
||||
|
||||
<h1 class="page-title">@Html.TitleForPage(Model.Title)</h1>
|
||||
<p>@T("Please enter your username and password.") @Html.ActionLink("Register", "Register") @T(" if you don't have an account.")</p>
|
||||
@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"]}))) {
|
||||
<fieldset class="login-form">
|
||||
<legend>@T("Account Information")</legend>
|
||||
<div class="group">
|
||||
<label for="userNameOrEmail">@T("Username:")</label>
|
||||
@Html.TextBox("userNameOrEmail", "", new { autofocus = "autofocus" })
|
||||
@Html.ValidationMessage("userNameOrEmail")
|
||||
</div>
|
||||
<div class="group">
|
||||
<label for="password">@T("Password:")</label>
|
||||
@Html.Password("password")
|
||||
@Html.ValidationMessage("password")
|
||||
</div>
|
||||
<div class="group">
|
||||
@Html.CheckBox("rememberMe")<label class="forcheckbox" for="rememberMe">@T("Remember me?")</label>
|
||||
</div>
|
||||
<input type="submit" value="@T("Log On")" />
|
||||
</fieldset>
|
||||
}
|
@@ -1,33 +0,0 @@
|
||||
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<object>" %>
|
||||
<h1><%: Html.TitleForPage(T("Create a New Account").ToString()) %></h1>
|
||||
<p><%: T("Use the form below to create a new account.")%></p>
|
||||
<p><%: T("Passwords are required to be a minimum of {0} characters in length.", ViewData["PasswordLength"] as string)%></p>
|
||||
<%: Html.ValidationSummary(T("Account creation was unsuccessful. Please correct the errors and try again.").ToString()) %>
|
||||
<% using (Html.BeginFormAntiForgeryPost()) { %>
|
||||
<fieldset>
|
||||
<legend><%: T("Account Information")%></legend>
|
||||
<div>
|
||||
<label for="username"><%: T("Username:")%></label>
|
||||
<%: Html.TextBox("username") %>
|
||||
<%: Html.ValidationMessage("username") %>
|
||||
</div>
|
||||
<div>
|
||||
<label for="email"><%: T("Email:")%></label>
|
||||
<%: Html.TextBox("email") %>
|
||||
<%: Html.ValidationMessage("email") %>
|
||||
</div>
|
||||
<div>
|
||||
<label for="password"><%: T("Password:")%></label>
|
||||
<%: Html.Password("password") %>
|
||||
<%: Html.ValidationMessage("password") %>
|
||||
</div>
|
||||
<div>
|
||||
<label for="confirmPassword"><%: T("Confirm password:")%></label>
|
||||
<%: Html.Password("confirmPassword") %>
|
||||
<%: Html.ValidationMessage("confirmPassword") %>
|
||||
</div>
|
||||
<div>
|
||||
<input type="submit" value="<%: T("Register") %>" />
|
||||
</div>
|
||||
</fieldset>
|
||||
<% } %>
|
@@ -0,0 +1,32 @@
|
||||
<h1>@Html.TitleForPage(T("Create a New Account").ToString())</h1>
|
||||
<p>@T("Use the form below to create a new account.")</p>
|
||||
<p>@T("Passwords are required to be a minimum of {0} characters in length.", ViewData["PasswordLength"] as string)</p>
|
||||
@Html.ValidationSummary(T("Account creation was unsuccessful. Please correct the errors and try again.").ToString())
|
||||
@using (Html.BeginFormAntiForgeryPost()) {
|
||||
<fieldset>
|
||||
<legend>@T("Account Information")</legend>
|
||||
<div>
|
||||
<label for="username">@T("Username:")</label>
|
||||
@Html.TextBox("username")
|
||||
@Html.ValidationMessage("username")
|
||||
</div>
|
||||
<div>
|
||||
<label for="email">@T("Email:")</label>
|
||||
@Html.TextBox("email")
|
||||
@Html.ValidationMessage("email")
|
||||
</div>
|
||||
<div>
|
||||
<label for="password">@T("Password:")</label>
|
||||
@Html.Password("password")
|
||||
@Html.ValidationMessage("password")
|
||||
</div>
|
||||
<div>
|
||||
<label for="confirmPassword">@T("Confirm password:")</label>
|
||||
@Html.Password("confirmPassword")
|
||||
@Html.ValidationMessage("confirmPassword")
|
||||
</div>
|
||||
<div>
|
||||
<input type="submit" value="@T("Register") " />
|
||||
</div>
|
||||
</fieldset>
|
||||
}
|
@@ -1,14 +0,0 @@
|
||||
<%@ Page Language="C#" Inherits="Orchard.Mvc.ViewPage<UserCreateViewModel>" %>
|
||||
<%@ Import Namespace="Orchard.Users.ViewModels"%>
|
||||
<h1><%: Html.TitleForPage(T("Add User").ToString()) %></h1>
|
||||
<%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) %>
|
||||
<fieldset>
|
||||
<input class="button primaryAction" type="submit" value="<%: T("Add") %>" />
|
||||
</fieldset>
|
||||
<% } %>
|
@@ -0,0 +1,34 @@
|
||||
@model Orchard.Users.ViewModels.UserCreateViewModel
|
||||
|
||||
<h1>@Html.TitleForPage(T("Add User").ToString()) </h1>
|
||||
@using (Html.BeginFormAntiForgeryPost()) {
|
||||
@Html.ValidationSummary()
|
||||
|
||||
<fieldset>
|
||||
@Html.LabelFor(m=>m.UserName)
|
||||
@Html.TextBoxFor(m=>m.UserName, new { @class = "textMedium" })
|
||||
@Html.ValidationMessageFor(m=>m.UserName, "*")
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
@Html.LabelFor(m=>m.Email)
|
||||
@Html.TextBoxFor(m=>m.Email, new { @class = "textMedium" })
|
||||
@Html.ValidationMessageFor(m=>m.Email, "*")
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
@Html.LabelFor(m=>m.Password)
|
||||
@Html.PasswordFor(m=>m.Password, new { @class = "textMedium" })
|
||||
@Html.ValidationMessageFor(m=>m.Password, "*")
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
@Html.LabelFor(m=>m.ConfirmPassword)
|
||||
@Html.PasswordFor(m=>m.ConfirmPassword, new { @class = "textMedium" })
|
||||
@Html.ValidationMessageFor(m=>m.ConfirmPassword, "*")
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<input class="button primaryAction" type="submit" value="@T("Add")" />
|
||||
</fieldset>
|
||||
}
|
@@ -1,13 +0,0 @@
|
||||
<%@ Page Language="C#" Inherits="Orchard.Mvc.ViewPage<UserEditViewModel>" %>
|
||||
<%@ Import Namespace="Orchard.Users.ViewModels"%>
|
||||
<h1><%: Html.TitleForPage(T("Edit User").ToString()) %></h1>
|
||||
<%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) %>
|
||||
<fieldset>
|
||||
<input class="button primaryAction" type="submit" value="<%: T("Save") %>" />
|
||||
</fieldset>
|
||||
<% } %>
|
@@ -0,0 +1,22 @@
|
||||
@model Orchard.Users.ViewModels.UserEditViewModel
|
||||
|
||||
<h1>@Html.TitleForPage(T("Edit User").ToString()) </h1>
|
||||
@using (Html.BeginFormAntiForgeryPost()) {
|
||||
@Html.ValidationSummary()
|
||||
@Html.EditorFor(m=>m.Id)
|
||||
<fieldset>
|
||||
@Html.LabelFor(m=>m.UserName)
|
||||
@Html.TextBoxFor(m=>m.UserName, new { @class = "textMedium" })
|
||||
@Html.ValidationMessageFor(m=>m.UserName, "*")
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
@Html.LabelFor(m=>m.Email)
|
||||
@Html.TextBoxFor(m=>m.Email, new { @class = "textMedium" })
|
||||
@Html.ValidationMessageFor(m=>m.Email, "*")
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<input class="button primaryAction" type="submit" value="@T("Save") " />
|
||||
</fieldset>
|
||||
}
|
@@ -1,6 +0,0 @@
|
||||
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<string>" %>
|
||||
<fieldset>
|
||||
<%: Html.LabelForModel() %>
|
||||
<%: Html.Password("", Model, new { @class = "textMedium" })%>
|
||||
<%: Html.ValidationMessage("", "*") %>
|
||||
</fieldset>
|
@@ -1,6 +0,0 @@
|
||||
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<string>" %>
|
||||
<fieldset>
|
||||
<%: Html.LabelForModel() %>
|
||||
<%: Html.TextBox("", Model, new { @class = "textMedium" })%>
|
||||
<%: Html.ValidationMessage("", "*") %>
|
||||
</fieldset>
|
@@ -1,49 +0,0 @@
|
||||
<%@ Page Language="C#" Inherits="Orchard.Mvc.ViewPage<UsersIndexViewModel>" %>
|
||||
<%@ Import Namespace="Orchard.Users.Models" %>
|
||||
<%@ Import Namespace="Orchard.Users.ViewModels"%>
|
||||
<h1><%: Html.TitleForPage(T("Manage Users").ToString()) %></h1>
|
||||
<% using (Html.BeginFormAntiForgeryPost()) { %>
|
||||
<%: Html.ValidationSummary()%>
|
||||
<div class="manage"><%: Html.ActionLink(T("Add a new user").ToString(), "Create", new { }, new { @class = "button primaryAction" })%></div>
|
||||
<fieldset>
|
||||
<table class="items">
|
||||
<colgroup>
|
||||
<col id="Name" />
|
||||
<col id="Email" />
|
||||
<col id="Edit" />
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col"><%: T("Name")%></th>
|
||||
<th scope="col"><%: T("Email")%></th>
|
||||
<th scope="col"><%: T("") %></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<% foreach (var row in Model.Rows)
|
||||
{ %>
|
||||
<tr>
|
||||
<td>
|
||||
<% if(row.UserPart.RegistrationStatus == UserStatus.Approved) { %>
|
||||
<img class="icon" src="<%=ResolveUrl("~/Modules/Orchard.Users/Content/Admin/images/online.gif") %>" alt="<%:T("Approved") %>" title="<%:T("User is approved") %>" />
|
||||
<% }
|
||||
else { %>
|
||||
<img class="icon" src="<%=ResolveUrl("~/Modules/Orchard.Users/Content/Admin/images/offline.gif") %>" alt="<%:T("Moderated") %>" title="<%:T("User is moderated") %>" />
|
||||
<% } %>
|
||||
<%: row.UserPart.UserName %>
|
||||
</td>
|
||||
<td>
|
||||
<%: row.UserPart.Email %>
|
||||
</td>
|
||||
<td>
|
||||
<%: 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 })%>
|
||||
<% } %>
|
||||
</td>
|
||||
</tr>
|
||||
<%}%>
|
||||
</table>
|
||||
</fieldset>
|
||||
<% } %>
|
@@ -0,0 +1,52 @@
|
||||
@model Orchard.Users.ViewModels.UsersIndexViewModel
|
||||
@using Orchard.Users.Models
|
||||
|
||||
<h1>@Html.TitleForPage(T("Manage Users").ToString()) </h1>
|
||||
@using (Html.BeginFormAntiForgeryPost()) {
|
||||
@Html.ValidationSummary()
|
||||
<div class="manage">@Html.ActionLink(T("Add a new user").ToString(), "Create", new { }, new { @class = "button primaryAction" })</div>
|
||||
<fieldset>
|
||||
<table class="items">
|
||||
<colgroup>
|
||||
<col id="Name" />
|
||||
<col id="Email" />
|
||||
<col id="Edit" />
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">@T("Name")</th>
|
||||
<th scope="col">@T("Email")</th>
|
||||
<th scope="col">@T("") </th>
|
||||
</tr>
|
||||
</thead>
|
||||
@foreach (var row in Model.Rows) {
|
||||
<tr>
|
||||
<td>
|
||||
@if(row.UserPart.RegistrationStatus == UserStatus.Approved) {
|
||||
<img class="icon" src="@Href("~/Modules/Orchard.Users/Content/Admin/images/online.gif") " alt="@T("Approved") " title="@T("User is approved") " />
|
||||
}
|
||||
else {
|
||||
<img class="icon" src="@Href("~/Modules/Orchard.Users/Content/Admin/images/offline.gif") " alt="@T("Moderated") " title="@T("User is moderated") " />
|
||||
}
|
||||
@row.UserPart.UserName
|
||||
</td>
|
||||
<td>
|
||||
@row.UserPart.Email
|
||||
</td>
|
||||
<td>
|
||||
@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 ) { <text>|</text>
|
||||
@Html.ActionLink(T("Challenge Email").ToString(), "SendChallengeEmail", new { row.UserPart.Id })
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</table>
|
||||
</fieldset>
|
||||
}
|
@@ -1,25 +0,0 @@
|
||||
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<RegistrationSettingsPartRecord>" %>
|
||||
<%@ Import Namespace="Orchard.Users.Models"%>
|
||||
<fieldset>
|
||||
<legend><%: T("Users registration")%></legend>
|
||||
<div>
|
||||
<%: Html.EditorFor(m => m.UsersCanRegister) %>
|
||||
<label class="forcheckbox" for="<%: Html.FieldIdFor( m => m.UsersCanRegister) %>"><%: T("Users can create new accounts on the site")%></label>
|
||||
<%: Html.ValidationMessage("UsersCanRegister", "*")%>
|
||||
</div>
|
||||
<div>
|
||||
<%: Html.EditorFor(m => m.UsersMustValidateEmail)%>
|
||||
<label class="forcheckbox" for="<%: Html.FieldIdFor( m => m.UsersMustValidateEmail) %>"><%: T("Users must justify their email address")%></label>
|
||||
<%: Html.ValidationMessage("UsersMustValidateEmail", "*")%>
|
||||
</div>
|
||||
<div>
|
||||
<%: Html.EditorFor(m => m.UsersAreModerated)%>
|
||||
<label class="forcheckbox" for="<%: Html.FieldIdFor( m => m.UsersAreModerated) %>"><%: T("Users must be approved before they can log in")%></label>
|
||||
<%: Html.ValidationMessage("UsersAreModerated", "*")%>
|
||||
</div>
|
||||
<div data-controllerid="<%:Html.FieldIdFor(m => m.UsersAreModerated) %>">
|
||||
<%: Html.EditorFor(m => m.NotifyModeration)%>
|
||||
<label class="forcheckbox" for="<%: Html.FieldIdFor( m => m.NotifyModeration) %>"><%: T("Send a notification when a user needs moderation")%></label>
|
||||
<%: Html.ValidationMessage("NotifyModeration", "*")%>
|
||||
</div>
|
||||
</fieldset>
|
@@ -0,0 +1,25 @@
|
||||
@model Orchard.Users.Models.RegistrationSettingsPartRecord
|
||||
|
||||
<fieldset>
|
||||
<legend>@T("Users registration")</legend>
|
||||
<div>
|
||||
@Html.EditorFor(m => m.UsersCanRegister)
|
||||
<label class="forcheckbox" for="@Html.FieldIdFor( m => m.UsersCanRegister)">@T("Users can create new accounts on the site")</label>
|
||||
@Html.ValidationMessage("UsersCanRegister", "*")
|
||||
</div>
|
||||
<div>
|
||||
@Html.EditorFor(m => m.UsersMustValidateEmail)
|
||||
<label class="forcheckbox" for="@Html.FieldIdFor( m => m.UsersMustValidateEmail)">@T("Users must justify their email address")</label>
|
||||
@Html.ValidationMessage("UsersMustValidateEmail", "*")
|
||||
</div>
|
||||
<div>
|
||||
@Html.EditorFor(m => m.UsersAreModerated)
|
||||
<label class="forcheckbox" for="@Html.FieldIdFor( m => m.UsersAreModerated)">@T("Users must be approved before they can log in")</label>
|
||||
@Html.ValidationMessage("UsersAreModerated", "*")
|
||||
</div>
|
||||
<div data-controllerid="@Html.FieldIdFor(m => m.UsersAreModerated)">
|
||||
@Html.EditorFor(m => m.NotifyModeration)
|
||||
<label class="forcheckbox" for="@Html.FieldIdFor( m => m.NotifyModeration)">@T("Send a notification when a user needs moderation")</label>
|
||||
@Html.ValidationMessage("NotifyModeration", "*")
|
||||
</div>
|
||||
</fieldset>
|
@@ -216,7 +216,7 @@
|
||||
<Content Include="Themes\Contoso\Theme.txt" />
|
||||
<Content Include="Themes\Contoso\Views\Footer.ascx" />
|
||||
<Content Include="Themes\Contoso\Views\ListOfComments.ascx" />
|
||||
<Content Include="Themes\Contoso\Views\LogOn.ascx" />
|
||||
<None Include="Themes\Contoso\Views\LogOn.ascx_" />
|
||||
<None Include="Themes\Contoso\Views\User.ascx_" />
|
||||
<Content Include="Themes\Corporate\Content\Images\bkg.jpg" />
|
||||
<Content Include="Themes\Corporate\Content\Images\consult-bkg.png" />
|
||||
|
Reference in New Issue
Block a user