mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-09-19 10:07:55 +08:00
Some notification additions/updates for content type editing.
--HG-- branch : dev
This commit is contained in:
@@ -8,6 +8,7 @@ using Orchard.ContentTypes.Services;
|
||||
using Orchard.ContentTypes.ViewModels;
|
||||
using Orchard.Localization;
|
||||
using Orchard.Mvc.Results;
|
||||
using Orchard.UI.Notify;
|
||||
|
||||
namespace Orchard.ContentTypes.Controllers {
|
||||
public class AdminController : Controller {
|
||||
@@ -186,6 +187,8 @@ namespace Orchard.ContentTypes.Controllers {
|
||||
return View(viewModel);
|
||||
}
|
||||
|
||||
Services.Notifier.Information(T("\"{0}\" settings have been saved.", viewModel.DisplayName));
|
||||
|
||||
return RedirectToAction("Index");
|
||||
}
|
||||
|
||||
@@ -294,6 +297,8 @@ namespace Orchard.ContentTypes.Controllers {
|
||||
contentPartFields.Add(new ContentPartDefinition.Field(new ContentFieldDefinition(viewModel.FieldTypeName), viewModel.DisplayName, null));
|
||||
_contentDefinitionService.AlterPartDefinition(new ContentPartDefinition(contentPartDefinition.Name, contentPartFields, contentPartDefinition.Settings));
|
||||
|
||||
Services.Notifier.Information(T("The \"{0}\" field has been added.", viewModel.DisplayName));
|
||||
|
||||
if (contentTypeDefinition != null)
|
||||
return RedirectToAction("Edit", new { id });
|
||||
|
||||
|
@@ -45,7 +45,7 @@ namespace Orchard.ContentTypes.Services {
|
||||
//.WithPart("RoutableAspect") //need to go the new routable route
|
||||
.WithPart("BodyAspect"));
|
||||
|
||||
Services.Notifier.Information(T("Created content type: {0}", displayName));
|
||||
Services.Notifier.Information(T("The \"{0}\" content type has created.", displayName));
|
||||
}
|
||||
|
||||
public void AlterTypeDefinition(ContentTypeDefinition contentTypeDefinition) {
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<Orchard.ContentTypes.ViewModels.AddFieldViewModel>" %>
|
||||
<%
|
||||
Html.RegisterStyle("admin.css"); %>
|
||||
<h1><%:Html.TitleForPage(T("Add a new field to {0}", Model.Part.Name).ToString())%></h1><%
|
||||
<h1><%:Html.TitleForPage(T("Add a new field to \"{0}\"", Model.Part.Name).ToString())%></h1><%
|
||||
using (Html.BeginFormAntiForgeryPost()) { %>
|
||||
<%:Html.ValidationSummary() %>
|
||||
<fieldset>
|
||||
|
Reference in New Issue
Block a user