mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-09-19 18:27: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.ContentTypes.ViewModels;
|
||||||
using Orchard.Localization;
|
using Orchard.Localization;
|
||||||
using Orchard.Mvc.Results;
|
using Orchard.Mvc.Results;
|
||||||
|
using Orchard.UI.Notify;
|
||||||
|
|
||||||
namespace Orchard.ContentTypes.Controllers {
|
namespace Orchard.ContentTypes.Controllers {
|
||||||
public class AdminController : Controller {
|
public class AdminController : Controller {
|
||||||
@@ -186,6 +187,8 @@ namespace Orchard.ContentTypes.Controllers {
|
|||||||
return View(viewModel);
|
return View(viewModel);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Services.Notifier.Information(T("\"{0}\" settings have been saved.", viewModel.DisplayName));
|
||||||
|
|
||||||
return RedirectToAction("Index");
|
return RedirectToAction("Index");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -294,6 +297,8 @@ namespace Orchard.ContentTypes.Controllers {
|
|||||||
contentPartFields.Add(new ContentPartDefinition.Field(new ContentFieldDefinition(viewModel.FieldTypeName), viewModel.DisplayName, null));
|
contentPartFields.Add(new ContentPartDefinition.Field(new ContentFieldDefinition(viewModel.FieldTypeName), viewModel.DisplayName, null));
|
||||||
_contentDefinitionService.AlterPartDefinition(new ContentPartDefinition(contentPartDefinition.Name, contentPartFields, contentPartDefinition.Settings));
|
_contentDefinitionService.AlterPartDefinition(new ContentPartDefinition(contentPartDefinition.Name, contentPartFields, contentPartDefinition.Settings));
|
||||||
|
|
||||||
|
Services.Notifier.Information(T("The \"{0}\" field has been added.", viewModel.DisplayName));
|
||||||
|
|
||||||
if (contentTypeDefinition != null)
|
if (contentTypeDefinition != null)
|
||||||
return RedirectToAction("Edit", new { id });
|
return RedirectToAction("Edit", new { id });
|
||||||
|
|
||||||
|
@@ -45,7 +45,7 @@ namespace Orchard.ContentTypes.Services {
|
|||||||
//.WithPart("RoutableAspect") //need to go the new routable route
|
//.WithPart("RoutableAspect") //need to go the new routable route
|
||||||
.WithPart("BodyAspect"));
|
.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) {
|
public void AlterTypeDefinition(ContentTypeDefinition contentTypeDefinition) {
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<Orchard.ContentTypes.ViewModels.AddFieldViewModel>" %>
|
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<Orchard.ContentTypes.ViewModels.AddFieldViewModel>" %>
|
||||||
<%
|
<%
|
||||||
Html.RegisterStyle("admin.css"); %>
|
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()) { %>
|
using (Html.BeginFormAntiForgeryPost()) { %>
|
||||||
<%:Html.ValidationSummary() %>
|
<%:Html.ValidationSummary() %>
|
||||||
<fieldset>
|
<fieldset>
|
||||||
|
Reference in New Issue
Block a user