Some notification additions/updates for content type editing.

--HG--
branch : dev
This commit is contained in:
Nathan Heskew
2010-06-30 14:22:31 -07:00
parent 7ee31c8e7c
commit d3d88dd6ff
3 changed files with 7 additions and 2 deletions

View File

@@ -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 });

View File

@@ -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) {

View File

@@ -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>