From dd37d8693cbc78852abd7f39bdf339e6859536ea Mon Sep 17 00:00:00 2001 From: Szymon Seliga Date: Tue, 22 Mar 2016 21:16:39 +0100 Subject: [PATCH 1/3] #6140 Added NotifyType.Success and replaced most usages of NotifyType.Information with it. Added appropriate styles in css files. Some minor fixes - wrong notification types. Conflicts: src/Orchard.Web/Modules/Orchard.ImportExport/Controllers/AdminController.cs src/Orchard.Web/Modules/Orchard.Taxonomies/Controllers/TermAdminController.cs src/Orchard.Web/Modules/Orchard.Themes/Controllers/AdminController.cs --- src/Orchard.Tests/UI/Notify/NotifierTests.cs | 4 ++- .../Contents/Controllers/AdminController.cs | 18 ++++++------ .../Navigation/Controllers/AdminController.cs | 2 +- .../Settings/Controllers/AdminController.cs | 2 +- .../Controllers/AdminController.cs | 6 ++-- .../Controllers/ContentController.cs | 2 +- .../Controllers/RecycleBinController.cs | 6 ++-- .../Controllers/AssetController.cs | 4 +-- .../Controllers/JobController.cs | 6 ++-- .../Controllers/MediaController.cs | 2 +- .../Controllers/SettingsController.cs | 8 +++--- .../Drivers/CloudVideoPartDriver.cs | 2 +- .../Controllers/BlogAdminController.cs | 6 ++-- .../Controllers/BlogPostAdminController.cs | 16 +++++------ .../Controllers/CommentController.cs | 10 +++---- .../Drivers/CommentPartDriver.cs | 8 +++--- .../Controllers/AdminController.cs | 28 +++++++++---------- .../Controllers/ItemController.cs | 2 +- .../Controllers/DashboardController.cs | 6 ++-- .../Controllers/SubmissionAdminController.cs | 4 +-- .../Handlers/FormSubmissionCoordinator.cs | 2 +- .../Controllers/AdminController.cs | 2 +- .../Services/IndexingService.cs | 6 ++-- .../Controllers/BlueprintAdminController.cs | 8 +++--- .../Orchard.Layouts/Styles/admin-dialog.css | 7 ++++- .../Controllers/AdminController.cs | 22 +++++++-------- .../Controllers/AdminController.cs | 2 +- .../Controllers/AdminController.cs | 16 +++++------ .../Controllers/FolderController.cs | 6 ++-- .../MediaFileName/MediaFileNameDriver.cs | 3 +- .../Controllers/AdminController.cs | 2 +- .../Controllers/FilterController.cs | 2 +- .../Controllers/AdminController.cs | 4 +-- .../Orchard.Modules/Services/ModuleService.cs | 4 +-- .../Controllers/AdminController.cs | 2 +- .../Controllers/AdminController.cs | 2 +- .../Controllers/GalleryController.cs | 4 +-- .../PackagingServicesController.cs | 10 +++---- .../Services/PackageInstaller.cs | 6 ++-- .../Controllers/AdminController.cs | 2 +- .../Controllers/BindingController.cs | 10 +++---- .../Controllers/FilterController.cs | 2 +- .../Controllers/LayoutController.cs | 6 ++-- .../Controllers/PropertyController.cs | 2 +- .../Controllers/SortCriteriaController.cs | 2 +- .../Controllers/AdminController.cs | 4 +-- .../Controllers/ActionController.cs | 2 +- .../Controllers/AdminController.cs | 8 +++--- .../Controllers/EventController.cs | 2 +- .../Controllers/AdminController.cs | 2 +- .../Controllers/TermAdminController.cs | 6 ++-- .../Drivers/TaxonomyFieldDriver.cs | 2 +- .../Controllers/AdminController.cs | 6 ++-- .../Controllers/AdminController.cs | 2 +- .../Orchard.Themes/Services/ThemeService.cs | 4 +-- .../Controllers/AdminController.cs | 13 ++++----- .../Controllers/AdminController.cs | 2 +- .../Controllers/AdminController.cs | 12 ++++---- .../Controllers/AdminController.cs | 8 +++--- .../Controllers/ContentPickerController.cs | 4 +-- .../Upgrade/Controllers/FieldController.cs | 4 +-- .../Upgrade/Controllers/InfosetController.cs | 4 +-- .../Upgrade/Controllers/MenuController.cs | 4 +-- .../Controllers/MessagingController.cs | 2 +- .../Upgrade/Controllers/RouteController.cs | 2 +- .../Upgrade/Controllers/TaxonomyController.cs | 2 +- .../Themes/SafeMode/Styles/site.css | 7 ++++- .../Themes/TheAdmin/Styles/site.css | 7 ++++- .../Themes/TheThemeMachine/Styles/Site.css | 3 +- src/Orchard/UI/Notify/NotifierExtensions.cs | 9 ++++++ src/Orchard/UI/Notify/NotifyEntry.cs | 3 +- 71 files changed, 214 insertions(+), 186 deletions(-) diff --git a/src/Orchard.Tests/UI/Notify/NotifierTests.cs b/src/Orchard.Tests/UI/Notify/NotifierTests.cs index a439b0653..916c58d33 100644 --- a/src/Orchard.Tests/UI/Notify/NotifierTests.cs +++ b/src/Orchard.Tests/UI/Notify/NotifierTests.cs @@ -14,11 +14,13 @@ namespace Orchard.Tests.UI.Notify { notifier.Warning(T("Hello world")); notifier.Information(T("More Info")); notifier.Error(T("Boom")); + notifier.Success(T("Success")); - Assert.That(notifier.List(), Has.Count.EqualTo(3)); + Assert.That(notifier.List(), Has.Count.EqualTo(4)); Assert.That(notifier.List(), Has.Some.Property("Message").EqualTo(T("Hello world"))); Assert.That(notifier.List(), Has.Some.Property("Message").EqualTo(T("More Info"))); Assert.That(notifier.List(), Has.Some.Property("Message").EqualTo(T("Boom"))); + Assert.That(notifier.List(), Has.Some.Property("Message").EqualTo(T("Success"))); } } } \ No newline at end of file diff --git a/src/Orchard.Web/Core/Contents/Controllers/AdminController.cs b/src/Orchard.Web/Core/Contents/Controllers/AdminController.cs index 4437ab0e1..39d44e50c 100644 --- a/src/Orchard.Web/Core/Contents/Controllers/AdminController.cs +++ b/src/Orchard.Web/Core/Contents/Controllers/AdminController.cs @@ -193,7 +193,7 @@ namespace Orchard.Core.Contents.Controllers { _contentManager.Publish(item); } - Services.Notifier.Information(T("Content successfully published.")); + Services.Notifier.Success(T("Content successfully published.")); break; case ContentsBulkAction.Unpublish: foreach (var item in checkedContentItems) { @@ -204,7 +204,7 @@ namespace Orchard.Core.Contents.Controllers { _contentManager.Unpublish(item); } - Services.Notifier.Information(T("Content successfully unpublished.")); + Services.Notifier.Success(T("Content successfully unpublished.")); break; case ContentsBulkAction.Remove: foreach (var item in checkedContentItems) { @@ -215,7 +215,7 @@ namespace Orchard.Core.Contents.Controllers { _contentManager.Remove(item); } - Services.Notifier.Information(T("Content successfully removed.")); + Services.Notifier.Success(T("Content successfully removed.")); break; default: throw new ArgumentOutOfRangeException(); @@ -296,7 +296,7 @@ namespace Orchard.Core.Contents.Controllers { conditionallyPublish(contentItem); - Services.Notifier.Information(string.IsNullOrWhiteSpace(contentItem.TypeDefinition.DisplayName) + Services.Notifier.Success(string.IsNullOrWhiteSpace(contentItem.TypeDefinition.DisplayName) ? T("Your content has been created.") : T("Your {0} has been created.", contentItem.TypeDefinition.DisplayName)); if (!string.IsNullOrEmpty(returnUrl)) { @@ -375,7 +375,7 @@ namespace Orchard.Core.Contents.Controllers { returnUrl = Url.ItemDisplayUrl(contentItem); } - Services.Notifier.Information(string.IsNullOrWhiteSpace(contentItem.TypeDefinition.DisplayName) + Services.Notifier.Success(string.IsNullOrWhiteSpace(contentItem.TypeDefinition.DisplayName) ? T("Your content has been saved.") : T("Your {0} has been saved.", contentItem.TypeDefinition.DisplayName)); @@ -400,7 +400,7 @@ namespace Orchard.Core.Contents.Controllers { return this.RedirectLocal(returnUrl, () => RedirectToAction("List")); } - Services.Notifier.Information(T("Successfully cloned. The clone was saved as a draft.")); + Services.Notifier.Success(T("Successfully cloned. The clone was saved as a draft.")); return this.RedirectLocal(returnUrl, () => RedirectToAction("List")); } @@ -414,7 +414,7 @@ namespace Orchard.Core.Contents.Controllers { if (contentItem != null) { _contentManager.Remove(contentItem); - Services.Notifier.Information(string.IsNullOrWhiteSpace(contentItem.TypeDefinition.DisplayName) + Services.Notifier.Success(string.IsNullOrWhiteSpace(contentItem.TypeDefinition.DisplayName) ? T("That content has been removed.") : T("That {0} has been removed.", contentItem.TypeDefinition.DisplayName)); } @@ -433,7 +433,7 @@ namespace Orchard.Core.Contents.Controllers { _contentManager.Publish(contentItem); - Services.Notifier.Information(string.IsNullOrWhiteSpace(contentItem.TypeDefinition.DisplayName) ? T("That content has been published.") : T("That {0} has been published.", contentItem.TypeDefinition.DisplayName)); + Services.Notifier.Success(string.IsNullOrWhiteSpace(contentItem.TypeDefinition.DisplayName) ? T("That content has been published.") : T("That {0} has been published.", contentItem.TypeDefinition.DisplayName)); return this.RedirectLocal(returnUrl, () => RedirectToAction("List")); } @@ -449,7 +449,7 @@ namespace Orchard.Core.Contents.Controllers { _contentManager.Unpublish(contentItem); - Services.Notifier.Information(string.IsNullOrWhiteSpace(contentItem.TypeDefinition.DisplayName) ? T("That content has been unpublished.") : T("That {0} has been unpublished.", contentItem.TypeDefinition.DisplayName)); + Services.Notifier.Success(string.IsNullOrWhiteSpace(contentItem.TypeDefinition.DisplayName) ? T("That content has been unpublished.") : T("That {0} has been unpublished.", contentItem.TypeDefinition.DisplayName)); return this.RedirectLocal(returnUrl, () => RedirectToAction("List")); } diff --git a/src/Orchard.Web/Core/Navigation/Controllers/AdminController.cs b/src/Orchard.Web/Core/Navigation/Controllers/AdminController.cs index d807b1eac..b173fab71 100644 --- a/src/Orchard.Web/Core/Navigation/Controllers/AdminController.cs +++ b/src/Orchard.Web/Core/Navigation/Controllers/AdminController.cs @@ -227,7 +227,7 @@ namespace Orchard.Core.Navigation.Controllers { return View(model); } - Services.Notifier.Information(T("Your {0} has been added.", menuPart.TypeDefinition.DisplayName)); + Services.Notifier.Success(T("Your {0} has been added.", menuPart.TypeDefinition.DisplayName)); return this.RedirectLocal(returnUrl, () => RedirectToAction("Index")); } diff --git a/src/Orchard.Web/Core/Settings/Controllers/AdminController.cs b/src/Orchard.Web/Core/Settings/Controllers/AdminController.cs index 2fc607a04..c7e9dcd68 100644 --- a/src/Orchard.Web/Core/Settings/Controllers/AdminController.cs +++ b/src/Orchard.Web/Core/Settings/Controllers/AdminController.cs @@ -82,7 +82,7 @@ namespace Orchard.Core.Settings.Controllers { return View(model); } - Services.Notifier.Information(T("Settings updated")); + Services.Notifier.Success(T("Settings updated")); return RedirectToAction("Index"); } diff --git a/src/Orchard.Web/Modules/Orchard.Alias/Controllers/AdminController.cs b/src/Orchard.Web/Modules/Orchard.Alias/Controllers/AdminController.cs index 0d2759b81..41d7b76b6 100644 --- a/src/Orchard.Web/Modules/Orchard.Alias/Controllers/AdminController.cs +++ b/src/Orchard.Web/Modules/Orchard.Alias/Controllers/AdminController.cs @@ -181,7 +181,7 @@ namespace Orchard.Alias.Controllers { return View(); } - Services.Notifier.Information(T("Alias {0} created", aliasPath)); + Services.Notifier.Success(T("Alias {0} created", aliasPath)); return RedirectToAction("IndexUnmanaged"); } @@ -251,7 +251,7 @@ namespace Orchard.Alias.Controllers { _aliasService.Delete(path == "/" ? String.Empty : path); } - Services.Notifier.Information(T("Alias {0} updated", path)); + Services.Notifier.Success(T("Alias {0} updated", path)); return RedirectToAction("IndexUnmanaged"); } @@ -267,7 +267,7 @@ namespace Orchard.Alias.Controllers { _aliasService.Delete(path); - Services.Notifier.Information(T("Alias {0} deleted", path)); + Services.Notifier.Success(T("Alias {0} deleted", path)); return this.RedirectLocal(returnUrl, Url.Action("IndexUnmanaged")); } diff --git a/src/Orchard.Web/Modules/Orchard.AuditTrail/Controllers/ContentController.cs b/src/Orchard.Web/Modules/Orchard.AuditTrail/Controllers/ContentController.cs index 43a67cade..960b6fe24 100644 --- a/src/Orchard.Web/Modules/Orchard.AuditTrail/Controllers/ContentController.cs +++ b/src/Orchard.Web/Modules/Orchard.AuditTrail/Controllers/ContentController.cs @@ -54,7 +54,7 @@ namespace Orchard.AuditTrail.Controllers { var restoredContentItem = _contentManager.Restore(contentItem, VersionOptions.Restore(version, publish: !draftable)); var restoredContentItemTitle = _contentManager.GetItemMetadata(restoredContentItem).DisplayText; - _notifier.Information(T(""{0}" has been restored.", restoredContentItemTitle)); + _notifier.Success(T(""{0}" has been restored.", restoredContentItemTitle)); return this.RedirectReturn(returnUrl, () => Url.Action("Index", "Admin")); } diff --git a/src/Orchard.Web/Modules/Orchard.AuditTrail/Controllers/RecycleBinController.cs b/src/Orchard.Web/Modules/Orchard.AuditTrail/Controllers/RecycleBinController.cs index 967b6f96a..79dfe114e 100644 --- a/src/Orchard.Web/Modules/Orchard.AuditTrail/Controllers/RecycleBinController.cs +++ b/src/Orchard.Web/Modules/Orchard.AuditTrail/Controllers/RecycleBinController.cs @@ -56,7 +56,7 @@ namespace Orchard.AuditTrail.Controllers { var restoredContentItem = _recycleBin.Restore(contentItem); var restoredContentItemTitle = _contentManager.GetItemMetadata(restoredContentItem).DisplayText; - _notifier.Information(T(""{0}" has been restored.", restoredContentItemTitle)); + _notifier.Success(T(""{0}" has been restored.", restoredContentItemTitle)); return this.RedirectReturn(returnUrl, () => Url.Action("Index", "RecycleBin")); } @@ -115,7 +115,7 @@ namespace Orchard.AuditTrail.Controllers { } _recycleBin.Restore(contentItem); - _notifier.Information(T(""{0}" has been restored.", contentItemTitle)); + _notifier.Success(T(""{0}" has been restored.", contentItemTitle)); } } @@ -131,7 +131,7 @@ namespace Orchard.AuditTrail.Controllers { try { _contentManager.Destroy(contentItem); - _notifier.Information(T(""{0}" has been permanently deleted.", contentItemTitle)); + _notifier.Success(T(""{0}" has been permanently deleted.", contentItemTitle)); } catch (Exception ex) { Logger.Error(ex, "An exception occurred while trying to permanently delete content with ID {0}.", contentItem.Id); diff --git a/src/Orchard.Web/Modules/Orchard.Azure.MediaServices/Controllers/AssetController.cs b/src/Orchard.Web/Modules/Orchard.Azure.MediaServices/Controllers/AssetController.cs index 57892711d..3354a121c 100644 --- a/src/Orchard.Web/Modules/Orchard.Azure.MediaServices/Controllers/AssetController.cs +++ b/src/Orchard.Web/Modules/Orchard.Azure.MediaServices/Controllers/AssetController.cs @@ -108,7 +108,7 @@ namespace Orchard.Azure.MediaServices.Controllers { return View(viewModel); } - _notifier.Information(T("The Asset has been saved.")); + _notifier.Success(T("The Asset has been saved.")); return RedirectToAction("Edit", new { id = id }); }); } @@ -141,7 +141,7 @@ namespace Orchard.Azure.MediaServices.Controllers { _assetManager.DeleteAsset(asset); Logger.Information("Asset with ID {0} was deleted.", id); - _notifier.Information(T("The asset '{0}' was successfully deleted.", asset.Name)); + _notifier.Success(T("The asset '{0}' was successfully deleted.", asset.Name)); } catch (Exception ex) { _transactionManager.Cancel(); diff --git a/src/Orchard.Web/Modules/Orchard.Azure.MediaServices/Controllers/JobController.cs b/src/Orchard.Web/Modules/Orchard.Azure.MediaServices/Controllers/JobController.cs index bf50b9438..a4448cb1a 100644 --- a/src/Orchard.Web/Modules/Orchard.Azure.MediaServices/Controllers/JobController.cs +++ b/src/Orchard.Web/Modules/Orchard.Azure.MediaServices/Controllers/JobController.cs @@ -156,7 +156,7 @@ namespace Orchard.Azure.MediaServices.Controllers { }); Logger.Information("Job was created with task of type {0} on cloud video item with ID {1}.", task, id); - _notifier.Information(T("The job '{0}' was successfully created.", job.Name)); + _notifier.Success(T("The job '{0}' was successfully created.", job.Name)); return Redirect(Url.ItemEditUrl(cloudVideoPart)); } @@ -187,7 +187,7 @@ namespace Orchard.Azure.MediaServices.Controllers { job.Status = JobStatus.Archived; Logger.Information("Job with ID {0} was archived.", id); - _notifier.Information(T("The job '{0}' was successfully archived.", job.Name)); + _notifier.Success(T("The job '{0}' was successfully archived.", job.Name)); return RedirectToReturnUrl(returnUrl, Url.ItemEditUrl(job.CloudVideoPart)); } @@ -212,7 +212,7 @@ namespace Orchard.Azure.MediaServices.Controllers { wamsJob.Cancel(); Logger.Information("Job with ID {0} was canceled.", id); - _notifier.Information(T("The job '{0}' was successfully canceled.", job.Name)); + _notifier.Success(T("The job '{0}' was successfully canceled.", job.Name)); } catch (Exception ex) { _transactionManager.Cancel(); diff --git a/src/Orchard.Web/Modules/Orchard.Azure.MediaServices/Controllers/MediaController.cs b/src/Orchard.Web/Modules/Orchard.Azure.MediaServices/Controllers/MediaController.cs index caf05adda..e77fc4a11 100644 --- a/src/Orchard.Web/Modules/Orchard.Azure.MediaServices/Controllers/MediaController.cs +++ b/src/Orchard.Web/Modules/Orchard.Azure.MediaServices/Controllers/MediaController.cs @@ -148,7 +148,7 @@ namespace Orchard.Azure.MediaServices.Controllers { _contentManager.Publish(mediaPart.ContentItem); Logger.Information("Cloud video item with ID {0} was saved.", part.Id); - _notifier.Information(notification); + _notifier.Success(notification); } catch (Exception ex) { _transactionManager.Cancel(); diff --git a/src/Orchard.Web/Modules/Orchard.Azure.MediaServices/Controllers/SettingsController.cs b/src/Orchard.Web/Modules/Orchard.Azure.MediaServices/Controllers/SettingsController.cs index 97a086052..e942e7686 100644 --- a/src/Orchard.Web/Modules/Orchard.Azure.MediaServices/Controllers/SettingsController.cs +++ b/src/Orchard.Web/Modules/Orchard.Azure.MediaServices/Controllers/SettingsController.cs @@ -94,7 +94,7 @@ namespace Orchard.Azure.MediaServices.Controllers { return View("Index", viewModel); } else { - _services.Notifier.Information(T("The new account credentials were successfully verified.")); + _services.Notifier.Success(T("The new account credentials were successfully verified.")); } } } @@ -132,7 +132,7 @@ namespace Orchard.Azure.MediaServices.Controllers { if (addedOrigins.Any()) { Logger.Information("CORS rules were added to the configured storage account for the following URLs: {0}.", String.Join("; ", addedOrigins)); - _services.Notifier.Information(T("CORS rules have been configured on your storage account for the following URLs: {0}.", String.Join("; ", addedOrigins))); + _services.Notifier.Success(T("CORS rules have been configured on your storage account for the following URLs: {0}.", String.Join("; ", addedOrigins))); } } catch (Exception ex) { @@ -143,7 +143,7 @@ namespace Orchard.Azure.MediaServices.Controllers { } Logger.Information("Module settings were saved."); - _services.Notifier.Information(T("The settings were saved successfully.")); + _services.Notifier.Success(T("The settings were saved successfully.")); return RedirectToAction("Index"); } @@ -156,7 +156,7 @@ namespace Orchard.Azure.MediaServices.Controllers { Logger.Debug("User requested to verify WAMS account credentials."); if (TestCredentialsInternal(viewModel.General.WamsAccountName, viewModel.General.WamsAccountKey, viewModel.General.StorageAccountKey)) { - _services.Notifier.Information(T("The account credentials were successfully verified.")); + _services.Notifier.Success(T("The account credentials were successfully verified.")); } else { _services.Notifier.Error(T("The account credentials verification failed.")); diff --git a/src/Orchard.Web/Modules/Orchard.Azure.MediaServices/Drivers/CloudVideoPartDriver.cs b/src/Orchard.Web/Modules/Orchard.Azure.MediaServices/Drivers/CloudVideoPartDriver.cs index b1b7dd83f..7176a4cc9 100644 --- a/src/Orchard.Web/Modules/Orchard.Azure.MediaServices/Drivers/CloudVideoPartDriver.cs +++ b/src/Orchard.Web/Modules/Orchard.Azure.MediaServices/Drivers/CloudVideoPartDriver.cs @@ -96,7 +96,7 @@ namespace Orchard.Azure.MediaServices.Drivers { var unpublish = httpContext.Request.Form["submit.Save"] == "submit.Unpublish"; if (unpublish) { _services.ContentManager.Unpublish(part.ContentItem); - _services.Notifier.Information(T("Your {0} has been unpublished.", part.ContentItem.TypeDefinition.DisplayName)); + _services.Notifier.Success(T("Your {0} has been unpublished.", part.ContentItem.TypeDefinition.DisplayName)); } if (part.IsPublished()) diff --git a/src/Orchard.Web/Modules/Orchard.Blogs/Controllers/BlogAdminController.cs b/src/Orchard.Web/Modules/Orchard.Blogs/Controllers/BlogAdminController.cs index 001ef9fbf..ea7fe53aa 100644 --- a/src/Orchard.Web/Modules/Orchard.Blogs/Controllers/BlogAdminController.cs +++ b/src/Orchard.Web/Modules/Orchard.Blogs/Controllers/BlogAdminController.cs @@ -101,7 +101,7 @@ namespace Orchard.Blogs.Controllers { return HttpNotFound(); _blogService.Delete(blog); - Services.Notifier.Information(T("Blog deleted")); + Services.Notifier.Success(T("Blog deleted")); return Redirect(Url.BlogsForAdmin()); } @@ -125,7 +125,7 @@ namespace Orchard.Blogs.Controllers { } _contentManager.Publish(blog); - Services.Notifier.Information(T("Blog information updated")); + Services.Notifier.Success(T("Blog information updated")); return Redirect(Url.BlogsForAdmin()); } @@ -142,7 +142,7 @@ namespace Orchard.Blogs.Controllers { _blogService.Delete(blog); - Services.Notifier.Information(T("Blog was successfully deleted")); + Services.Notifier.Success(T("Blog was successfully deleted")); return Redirect(Url.BlogsForAdmin()); } diff --git a/src/Orchard.Web/Modules/Orchard.Blogs/Controllers/BlogPostAdminController.cs b/src/Orchard.Web/Modules/Orchard.Blogs/Controllers/BlogPostAdminController.cs index bc389815a..9a3a46c3f 100644 --- a/src/Orchard.Web/Modules/Orchard.Blogs/Controllers/BlogPostAdminController.cs +++ b/src/Orchard.Web/Modules/Orchard.Blogs/Controllers/BlogPostAdminController.cs @@ -94,7 +94,7 @@ namespace Orchard.Blogs.Controllers { Services.ContentManager.Publish(blogPost.ContentItem); } - Services.Notifier.Information(T("Your {0} has been created.", blogPost.TypeDefinition.DisplayName)); + Services.Notifier.Success(T("Your {0} has been created.", blogPost.TypeDefinition.DisplayName)); return Redirect(Url.BlogPostEdit(blogPost)); } @@ -165,7 +165,7 @@ namespace Orchard.Blogs.Controllers { conditionallyPublish(blogPost.ContentItem); - Services.Notifier.Information(T("Your {0} has been saved.", blogPost.TypeDefinition.DisplayName)); + Services.Notifier.Success(T("Your {0} has been saved.", blogPost.TypeDefinition.DisplayName)); return this.RedirectLocal(returnUrl, Url.BlogPostEdit(blogPost)); } @@ -175,7 +175,7 @@ namespace Orchard.Blogs.Controllers { // get the current draft version var draft = Services.ContentManager.Get(id, VersionOptions.Draft); if (draft == null) { - Services.Notifier.Information(T("There is no draft to discard.")); + Services.Notifier.Warning(T("There is no draft to discard.")); return RedirectToEdit(id); } @@ -186,7 +186,7 @@ namespace Orchard.Blogs.Controllers { // locate the published revision to revert onto var published = Services.ContentManager.Get(id, VersionOptions.Published); if (published == null) { - Services.Notifier.Information(T("Can not discard draft on unpublished blog post.")); + Services.Notifier.Error(T("Can not discard draft on unpublished blog post.")); return RedirectToEdit(draft); } @@ -195,7 +195,7 @@ namespace Orchard.Blogs.Controllers { draft.VersionRecord.Latest = false; published.VersionRecord.Latest = true; - Services.Notifier.Information(T("Blog post draft version discarded")); + Services.Notifier.Success(T("Blog post draft version discarded")); return RedirectToEdit(published); } @@ -225,7 +225,7 @@ namespace Orchard.Blogs.Controllers { return new HttpUnauthorizedResult(); _blogPostService.Delete(post); - Services.Notifier.Information(T("Blog post was successfully deleted")); + Services.Notifier.Success(T("Blog post was successfully deleted")); return Redirect(Url.BlogForAdmin(blog.As())); } @@ -244,7 +244,7 @@ namespace Orchard.Blogs.Controllers { return new HttpUnauthorizedResult(); _blogPostService.Publish(post); - Services.Notifier.Information(T("Blog post successfully published.")); + Services.Notifier.Success(T("Blog post successfully published.")); return Redirect(Url.BlogForAdmin(blog.As())); } @@ -263,7 +263,7 @@ namespace Orchard.Blogs.Controllers { return new HttpUnauthorizedResult(); _blogPostService.Unpublish(post); - Services.Notifier.Information(T("Blog post successfully unpublished.")); + Services.Notifier.Success(T("Blog post successfully unpublished.")); return Redirect(Url.BlogForAdmin(blog.As())); } diff --git a/src/Orchard.Web/Modules/Orchard.Comments/Controllers/CommentController.cs b/src/Orchard.Web/Modules/Orchard.Comments/Controllers/CommentController.cs index 4e62661c4..a239e3c5c 100644 --- a/src/Orchard.Web/Modules/Orchard.Comments/Controllers/CommentController.cs +++ b/src/Orchard.Web/Modules/Orchard.Comments/Controllers/CommentController.cs @@ -105,14 +105,14 @@ namespace Orchard.Comments.Controllers { // if the user who submitted the comment has the right to moderate, don't make this comment moderated if (Services.Authorizer.Authorize(Permissions.ManageComments)) { commentPart.Status = CommentStatus.Approved; - Services.Notifier.Information(T("Your comment has been posted.")); + Services.Notifier.Success(T("Your comment has been posted.")); } else { Services.Notifier.Information(T("Your comment will appear after the site administrator approves it.")); } } else { - Services.Notifier.Information(T("Your comment has been posted.")); + Services.Notifier.Success(T("Your comment has been posted.")); } // send email notification @@ -141,7 +141,7 @@ namespace Orchard.Comments.Controllers { _commentService.ApproveComment(id); } - Services.Notifier.Information(T("Comment approved successfully")); + Services.Notifier.Success(T("Comment approved successfully")); return Redirect("~/"); } @@ -151,7 +151,7 @@ namespace Orchard.Comments.Controllers { _commentService.DeleteComment(id); } - Services.Notifier.Information(T("Comment deleted successfully")); + Services.Notifier.Success(T("Comment deleted successfully")); return Redirect("~/"); } @@ -161,7 +161,7 @@ namespace Orchard.Comments.Controllers { _commentService.UnapproveComment(id); } - Services.Notifier.Information(T("Comment moderated successfully")); + Services.Notifier.Success(T("Comment moderated successfully")); return Redirect("~/"); } diff --git a/src/Orchard.Web/Modules/Orchard.Comments/Drivers/CommentPartDriver.cs b/src/Orchard.Web/Modules/Orchard.Comments/Drivers/CommentPartDriver.cs index 6f967bd7b..cd79d4b4f 100644 --- a/src/Orchard.Web/Modules/Orchard.Comments/Drivers/CommentPartDriver.cs +++ b/src/Orchard.Web/Modules/Orchard.Comments/Drivers/CommentPartDriver.cs @@ -68,7 +68,7 @@ namespace Orchard.Comments.Drivers { if (!string.IsNullOrEmpty(name) && String.Equals(name, "moderate", StringComparison.OrdinalIgnoreCase)) { if (_orchardServices.Authorizer.Authorize(Permissions.ManageComments, T("Couldn't moderate comment"))) { _commentService.UnapproveComment(part.Id); - _orchardServices.Notifier.Information(T("Comment successfully moderated.")); + _orchardServices.Notifier.Success(T("Comment successfully moderated.")); return Editor(part, shapeHelper); } } @@ -76,7 +76,7 @@ namespace Orchard.Comments.Drivers { if (!string.IsNullOrEmpty(name) && String.Equals(name, "approve", StringComparison.OrdinalIgnoreCase)) { if (_orchardServices.Authorizer.Authorize(Permissions.ManageComments, T("Couldn't approve comment"))) { _commentService.ApproveComment(part.Id); - _orchardServices.Notifier.Information(T("Comment approved.")); + _orchardServices.Notifier.Success(T("Comment approved.")); return Editor(part, shapeHelper); } } @@ -84,14 +84,14 @@ namespace Orchard.Comments.Drivers { if (!string.IsNullOrEmpty(name) && String.Equals(name, "delete", StringComparison.OrdinalIgnoreCase)) { if (_orchardServices.Authorizer.Authorize(Permissions.ManageComments, T("Couldn't delete comment"))) { _commentService.DeleteComment(part.Id); - _orchardServices.Notifier.Information(T("Comment successfully deleted.")); + _orchardServices.Notifier.Success(T("Comment successfully deleted.")); return Editor(part, shapeHelper); } } // if editing from the admin, don't update the owner or the status if (!string.IsNullOrEmpty(name) && String.Equals(name, "save", StringComparison.OrdinalIgnoreCase)) { - _orchardServices.Notifier.Information(T("Comment saved.")); + _orchardServices.Notifier.Success(T("Comment saved.")); return Editor(part, shapeHelper); } diff --git a/src/Orchard.Web/Modules/Orchard.ContentTypes/Controllers/AdminController.cs b/src/Orchard.Web/Modules/Orchard.ContentTypes/Controllers/AdminController.cs index ee8d623c5..dbb560b02 100644 --- a/src/Orchard.Web/Modules/Orchard.ContentTypes/Controllers/AdminController.cs +++ b/src/Orchard.Web/Modules/Orchard.ContentTypes/Controllers/AdminController.cs @@ -108,7 +108,7 @@ namespace Orchard.ContentTypes.Controllers { var typeViewModel = new EditTypeViewModel(contentTypeDefinition); - Services.Notifier.Information(T("The \"{0}\" content type has been created.", typeViewModel.DisplayName)); + Services.Notifier.Success(T("The \"{0}\" content type has been created.", typeViewModel.DisplayName)); return RedirectToAction("AddPartsTo", new { id = typeViewModel.Name }); } @@ -252,7 +252,7 @@ namespace Orchard.ContentTypes.Controllers { return View(typeViewModel); } - Services.Notifier.Information(T("\"{0}\" settings have been saved.", typeViewModel.DisplayName)); + Services.Notifier.Success(T("\"{0}\" settings have been saved.", typeViewModel.DisplayName)); return RedirectToAction("Edit", new { id }); } @@ -270,7 +270,7 @@ namespace Orchard.ContentTypes.Controllers { _contentDefinitionService.RemoveType(id, true); - Services.Notifier.Information(T("\"{0}\" has been removed.", typeViewModel.DisplayName)); + Services.Notifier.Success(T("\"{0}\" has been removed.", typeViewModel.DisplayName)); return RedirectToAction("List"); } @@ -314,7 +314,7 @@ namespace Orchard.ContentTypes.Controllers { var partsToAdd = viewModel.PartSelections.Where(ps => ps.IsSelected).Select(ps => ps.PartName); foreach (var partToAdd in partsToAdd) { _contentDefinitionService.AddPartToType(partToAdd, typeViewModel.Name); - Services.Notifier.Information(T("The \"{0}\" part has been added.", partToAdd)); + Services.Notifier.Success(T("The \"{0}\" part has been added.", partToAdd)); } if (!ModelState.IsValid) { @@ -362,7 +362,7 @@ namespace Orchard.ContentTypes.Controllers { return View(viewModel); } - Services.Notifier.Information(T("The \"{0}\" part has been removed.", viewModel.Name)); + Services.Notifier.Success(T("The \"{0}\" part has been removed.", viewModel.Name)); return RedirectToAction("Edit", new {id}); } @@ -399,11 +399,11 @@ namespace Orchard.ContentTypes.Controllers { var partViewModel = _contentDefinitionService.AddPart(viewModel); if (partViewModel == null) { - Services.Notifier.Information(T("The content part could not be created.")); + Services.Notifier.Error(T("The content part could not be created.")); return View(viewModel); } - Services.Notifier.Information(T("The \"{0}\" content part has been created.", partViewModel.Name)); + Services.Notifier.Success(T("The \"{0}\" content part has been created.", partViewModel.Name)); return RedirectToAction("EditPart", new { id = partViewModel.Name }); } @@ -440,7 +440,7 @@ namespace Orchard.ContentTypes.Controllers { return View(partViewModel); } - Services.Notifier.Information(T("\"{0}\" settings have been saved.", partViewModel.Name)); + Services.Notifier.Success(T("\"{0}\" settings have been saved.", partViewModel.Name)); return RedirectToAction("ListParts"); } @@ -458,8 +458,8 @@ namespace Orchard.ContentTypes.Controllers { return HttpNotFound(); _contentDefinitionService.RemovePart(id); - - Services.Notifier.Information(T("\"{0}\" has been removed.", partViewModel.DisplayName)); + + Services.Notifier.Success(T("\"{0}\" has been removed.", partViewModel.DisplayName)); return RedirectToAction("ListParts"); } @@ -547,12 +547,12 @@ namespace Orchard.ContentTypes.Controllers { _contentDefinitionService.AddFieldToPart(viewModel.Name, viewModel.DisplayName, viewModel.FieldTypeName, partViewModel.Name); } catch (Exception ex) { - Services.Notifier.Information(T("The \"{0}\" field was not added. {1}", viewModel.DisplayName, ex.Message)); + Services.Notifier.Error(T("The \"{0}\" field was not added. {1}", viewModel.DisplayName, ex.Message)); Services.TransactionManager.Cancel(); return AddFieldTo(id); } - Services.Notifier.Information(T("The \"{0}\" field has been added.", viewModel.DisplayName)); + Services.Notifier.Success(T("The \"{0}\" field has been added.", viewModel.DisplayName)); if (typeViewModel != null) { return RedirectToAction("Edit", new {id}); @@ -626,7 +626,7 @@ namespace Orchard.ContentTypes.Controllers { _contentDefinitionService.AlterField(partViewModel, viewModel); - Services.Notifier.Information(T("Display name changed to {0}.", viewModel.DisplayName)); + Services.Notifier.Success(T("Display name changed to {0}.", viewModel.DisplayName)); // redirect to the type editor if a type exists with this name var typeViewModel = _contentDefinitionService.GetType(id); @@ -674,7 +674,7 @@ namespace Orchard.ContentTypes.Controllers { return View(viewModel); } - Services.Notifier.Information(T("The \"{0}\" field has been removed.", viewModel.Name)); + Services.Notifier.Success(T("The \"{0}\" field has been removed.", viewModel.Name)); if (_contentDefinitionService.GetType(id) != null) return RedirectToAction("Edit", new { id }); diff --git a/src/Orchard.Web/Modules/Orchard.CustomForms/Controllers/ItemController.cs b/src/Orchard.Web/Modules/Orchard.CustomForms/Controllers/ItemController.cs index ee278e0df..d4f62b1db 100644 --- a/src/Orchard.Web/Modules/Orchard.CustomForms/Controllers/ItemController.cs +++ b/src/Orchard.Web/Modules/Orchard.CustomForms/Controllers/ItemController.cs @@ -170,7 +170,7 @@ namespace Orchard.CustomForms.Controllers { // writes a confirmation message if (customForm.CustomMessage) { if (!String.IsNullOrWhiteSpace(customForm.Message)) { - Services.Notifier.Information(T(customForm.Message)); + Services.Notifier.Success(T(customForm.Message)); } } diff --git a/src/Orchard.Web/Modules/Orchard.Dashboards/Controllers/DashboardController.cs b/src/Orchard.Web/Modules/Orchard.Dashboards/Controllers/DashboardController.cs index e2bcb5343..5e1d3d91f 100644 --- a/src/Orchard.Web/Modules/Orchard.Dashboards/Controllers/DashboardController.cs +++ b/src/Orchard.Web/Modules/Orchard.Dashboards/Controllers/DashboardController.cs @@ -48,7 +48,7 @@ namespace Orchard.Dashboards.Controllers { return UpdateDashboard(dashboard => { if (!dashboard.Has() && !dashboard.TypeDefinition.Settings.GetModel().Draftable) _services.ContentManager.Publish(dashboard); - _services.Notifier.Information(T("Your dashboard has been saved.")); + _services.Notifier.Success(T("Your dashboard has been saved.")); }); } @@ -61,7 +61,7 @@ namespace Orchard.Dashboards.Controllers { return UpdateDashboard(dashboard => { _services.ContentManager.Publish(dashboard); - _services.Notifier.Information(T("Your dashboard has been published.")); + _services.Notifier.Success(T("Your dashboard has been published.")); }); } @@ -79,7 +79,7 @@ namespace Orchard.Dashboards.Controllers { if (contentItem != null) conditonallyPublish(contentItem); else - _services.Notifier.Information(T("Your dashboard has been saved.")); + _services.Notifier.Success(T("Your dashboard has been saved.")); return RedirectToAction("Edit"); } diff --git a/src/Orchard.Web/Modules/Orchard.DynamicForms/Controllers/SubmissionAdminController.cs b/src/Orchard.Web/Modules/Orchard.DynamicForms/Controllers/SubmissionAdminController.cs index 956d78c35..8fe29f0e7 100644 --- a/src/Orchard.Web/Modules/Orchard.DynamicForms/Controllers/SubmissionAdminController.cs +++ b/src/Orchard.Web/Modules/Orchard.DynamicForms/Controllers/SubmissionAdminController.cs @@ -56,7 +56,7 @@ namespace Orchard.DynamicForms.Controllers { return HttpNotFound(); _formService.DeleteSubmission(submission); - _services.Notifier.Information(T("That submission has been deleted.")); + _services.Notifier.Success(T("That submission has been deleted.")); return Redirect(Request.UrlReferrer.ToString()); } @@ -69,7 +69,7 @@ namespace Orchard.DynamicForms.Controllers { } else { var numDeletedSubmissions = _formService.DeleteSubmissions(submissionIds); - _services.Notifier.Information(T("{0} submissions have been deleted.", numDeletedSubmissions)); + _services.Notifier.Success(T("{0} submissions have been deleted.", numDeletedSubmissions)); } return Redirect(Request.UrlReferrer.ToString()); diff --git a/src/Orchard.Web/Modules/Orchard.DynamicForms/Handlers/FormSubmissionCoordinator.cs b/src/Orchard.Web/Modules/Orchard.DynamicForms/Handlers/FormSubmissionCoordinator.cs index 9bf6bc31d..87bf0ba6a 100644 --- a/src/Orchard.Web/Modules/Orchard.DynamicForms/Handlers/FormSubmissionCoordinator.cs +++ b/src/Orchard.Web/Modules/Orchard.DynamicForms/Handlers/FormSubmissionCoordinator.cs @@ -54,7 +54,7 @@ namespace Orchard.DynamicForms.Handlers { // Notifiy. if (!String.IsNullOrWhiteSpace(form.Notification)) - _notifier.Information(T(_tokenizer.Replace(T(form.Notification).Text, tokenData))); + _notifier.Success(T(_tokenizer.Replace(T(form.Notification).Text, tokenData))); // Trigger workflow event. _workflowManager.TriggerEvent(DynamicFormSubmittedActivity.EventName, contentItem, () => tokenData); diff --git a/src/Orchard.Web/Modules/Orchard.Indexing/Controllers/AdminController.cs b/src/Orchard.Web/Modules/Orchard.Indexing/Controllers/AdminController.cs index 47c095d0b..2f446f115 100644 --- a/src/Orchard.Web/Modules/Orchard.Indexing/Controllers/AdminController.cs +++ b/src/Orchard.Web/Modules/Orchard.Indexing/Controllers/AdminController.cs @@ -80,7 +80,7 @@ namespace Orchard.Indexing.Controllers { try { provider.CreateIndex(id); - Services.Notifier.Information(T("Index named {0} created successfully", id)); + Services.Notifier.Success(T("Index named {0} created successfully", id)); } catch(Exception e) { Services.Notifier.Error(T("An error occured while creating the index: {0}", id)); diff --git a/src/Orchard.Web/Modules/Orchard.Indexing/Services/IndexingService.cs b/src/Orchard.Web/Modules/Orchard.Indexing/Services/IndexingService.cs index c1289814a..0ac6d395d 100644 --- a/src/Orchard.Web/Modules/Orchard.Indexing/Services/IndexingService.cs +++ b/src/Orchard.Web/Modules/Orchard.Indexing/Services/IndexingService.cs @@ -36,7 +36,7 @@ namespace Orchard.Indexing.Services { } if(_indexingTaskExecutor.RebuildIndex(indexName)) { - Services.Notifier.Information(T("The index {0} has been rebuilt.", indexName)); + Services.Notifier.Success(T("The index {0} has been rebuilt.", indexName)); UpdateIndex(indexName); } else { @@ -53,7 +53,7 @@ namespace Orchard.Indexing.Services { } if (_indexingTaskExecutor.DeleteIndex(indexName)) { - Services.Notifier.Information(T("The index {0} has been deleted.", indexName)); + Services.Notifier.Success(T("The index {0} has been deleted.", indexName)); } else { Services.Notifier.Warning(T("The index {0} could not be deleted. It might already be in use, please try again later.", indexName)); @@ -67,7 +67,7 @@ namespace Orchard.Indexing.Services { handler.UpdateIndex(indexName); } - Services.Notifier.Information(T("The index {0} has been updated.", indexName)); + Services.Notifier.Success(T("The index {0} has been updated.", indexName)); } IndexEntry IIndexingService.GetIndexEntry(string indexName) { diff --git a/src/Orchard.Web/Modules/Orchard.Layouts/Controllers/BlueprintAdminController.cs b/src/Orchard.Web/Modules/Orchard.Layouts/Controllers/BlueprintAdminController.cs index 6c5b8ae36..b4425f933 100644 --- a/src/Orchard.Web/Modules/Orchard.Layouts/Controllers/BlueprintAdminController.cs +++ b/src/Orchard.Web/Modules/Orchard.Layouts/Controllers/BlueprintAdminController.cs @@ -177,7 +177,7 @@ namespace Orchard.Layouts.Controllers { blueprint.BaseElementState = data.Serialize(); _signals.Trigger(Signals.ElementDescriptors); - _notifier.Information(T("That blueprint has been saved.")); + _notifier.Success(T("That blueprint has been saved.")); return RedirectToAction("Index"); } @@ -223,7 +223,7 @@ namespace Orchard.Layouts.Controllers { blueprint.ElementDescription = model.ElementDescription.TrimSafe(); blueprint.ElementCategory = model.ElementCategory.TrimSafe(); - _notifier.Information(T("That blueprint's properties have been saved.")); + _notifier.Success(T("That blueprint's properties have been saved.")); return RedirectToAction("Index"); } @@ -239,7 +239,7 @@ namespace Orchard.Layouts.Controllers { return HttpNotFound(); _elementBlueprintService.DeleteBlueprint(blueprint); - _notifier.Information(T("That blueprint has been deleted.")); + _notifier.Success(T("That blueprint has been deleted.")); return Redirect(Request.UrlReferrer.ToString()); } @@ -256,7 +256,7 @@ namespace Orchard.Layouts.Controllers { } else { var numDeletedBlueprints = _elementBlueprintService.DeleteBlueprints(blueprintIds); - _notifier.Information(T("{0} blueprints have been deleted.", numDeletedBlueprints)); + _notifier.Success(T("{0} blueprints have been deleted.", numDeletedBlueprints)); } return Redirect(Request.UrlReferrer.ToString()); diff --git a/src/Orchard.Web/Modules/Orchard.Layouts/Styles/admin-dialog.css b/src/Orchard.Web/Modules/Orchard.Layouts/Styles/admin-dialog.css index fb974363f..e78f8be21 100644 --- a/src/Orchard.Web/Modules/Orchard.Layouts/Styles/admin-dialog.css +++ b/src/Orchard.Web/Modules/Orchard.Layouts/Styles/admin-dialog.css @@ -537,11 +537,16 @@ span.message { border:1px solid #e5cece; /* red */ padding-left:26px; } -.message-Information, .notifications { +.message-Success, .notifications { background:#e6f1c9; /* green */ border:1px solid #cfe493; color:#062232; } +.message-Information { + background:#d9edf7; /* blue */ + border:1px solid #bce8f1; + color:#31708f; +} .message-Warning { background:#fdf5bc; /* yellow */ border:1px solid #ffea9b; diff --git a/src/Orchard.Web/Modules/Orchard.Lists/Controllers/AdminController.cs b/src/Orchard.Web/Modules/Orchard.Lists/Controllers/AdminController.cs index 1adb0effe..b29ace4e5 100644 --- a/src/Orchard.Web/Modules/Orchard.Lists/Controllers/AdminController.cs +++ b/src/Orchard.Web/Modules/Orchard.Lists/Controllers/AdminController.cs @@ -135,7 +135,7 @@ namespace Orchard.Lists.Controllers { } _contentManager.Publish(item); } - _services.Notifier.Information(T("Lists successfully published.")); + _services.Notifier.Success(T("Lists successfully published.")); break; case ContentsBulkAction.Unpublish: foreach (var item in checkedContentItems) { @@ -145,7 +145,7 @@ namespace Orchard.Lists.Controllers { } _contentManager.Unpublish(item); } - _services.Notifier.Information(T("Lists successfully unpublished.")); + _services.Notifier.Success(T("Lists successfully unpublished.")); break; case ContentsBulkAction.Remove: foreach (var item in checkedContentItems) { @@ -155,7 +155,7 @@ namespace Orchard.Lists.Controllers { } _contentManager.Remove(item); } - _services.Notifier.Information(T("Lists successfully removed.")); + _services.Notifier.Success(T("Lists successfully removed.")); break; default: throw new ArgumentOutOfRangeException(); @@ -359,15 +359,15 @@ namespace Orchard.Lists.Controllers { switch (operation) { case ViewModels.ListOperation.Reverse: _containerService.Reverse(items); - _services.Notifier.Information(T("The list has been reversed.")); + _services.Notifier.Success(T("The list has been reversed.")); break; case ViewModels.ListOperation.Shuffle: _containerService.Shuffle(items); - _services.Notifier.Information(T("The list has been shuffled.")); + _services.Notifier.Success(T("The list has been shuffled.")); break; case ViewModels.ListOperation.Sort: _containerService.Sort(items, sortBy.GetValueOrDefault(), sortByDirection.GetValueOrDefault()); - _services.Notifier.Information(T("The list has been sorted.")); + _services.Notifier.Success(T("The list has been sorted.")); break; default: _services.Notifier.Error(T("Please select an operation to perform on the list.")); @@ -449,7 +449,7 @@ namespace Orchard.Lists.Controllers { _containerService.MoveItem(item, targetContainer); } - _services.Notifier.Information(T("Content successfully moved to {1}.", Url.Action("List", new { containerId = targetContainerId }), containerDisplayText)); + _services.Notifier.Success(T("Content successfully moved to {1}.", Url.Action("List", new { containerId = targetContainerId }), containerDisplayText)); return true; } @@ -463,7 +463,7 @@ namespace Orchard.Lists.Controllers { item.As().Record.Container = null; _containerService.UpdateItemPath(item.ContentItem); } - _services.Notifier.Information(T("Content successfully removed from the list.")); + _services.Notifier.Success(T("Content successfully removed from the list.")); return true; } @@ -476,7 +476,7 @@ namespace Orchard.Lists.Controllers { _contentManager.Remove(item); } - _services.Notifier.Information(T("Content successfully removed.")); + _services.Notifier.Success(T("Content successfully removed.")); return true; } @@ -489,7 +489,7 @@ namespace Orchard.Lists.Controllers { _contentManager.Unpublish(item); } - _services.Notifier.Information(T("Content successfully unpublished.")); + _services.Notifier.Success(T("Content successfully unpublished.")); return true; } @@ -502,7 +502,7 @@ namespace Orchard.Lists.Controllers { _contentManager.Publish(item); } - _services.Notifier.Information(T("Content successfully published.")); + _services.Notifier.Success(T("Content successfully published.")); return true; } } diff --git a/src/Orchard.Web/Modules/Orchard.Localization/Controllers/AdminController.cs b/src/Orchard.Web/Modules/Orchard.Localization/Controllers/AdminController.cs index 963c0f044..52aa00a3a 100644 --- a/src/Orchard.Web/Modules/Orchard.Localization/Controllers/AdminController.cs +++ b/src/Orchard.Web/Modules/Orchard.Localization/Controllers/AdminController.cs @@ -108,7 +108,7 @@ namespace Orchard.Localization.Controllers { conditionallyPublish(contentItemTranslation.ContentItem); - Services.Notifier.Information(T("Created content item translation.")); + Services.Notifier.Success(T("Created content item translation.")); var metadata = _contentManager.GetItemMetadata(contentItemTranslation); return RedirectToAction(Convert.ToString(metadata.EditorRouteValues["action"]), metadata.EditorRouteValues); diff --git a/src/Orchard.Web/Modules/Orchard.Media/Controllers/AdminController.cs b/src/Orchard.Web/Modules/Orchard.Media/Controllers/AdminController.cs index 8804f5472..3bcc11c1b 100644 --- a/src/Orchard.Web/Modules/Orchard.Media/Controllers/AdminController.cs +++ b/src/Orchard.Web/Modules/Orchard.Media/Controllers/AdminController.cs @@ -68,7 +68,7 @@ namespace Orchard.Media.Controllers { try { _mediaService.CreateFolder(viewModel.MediaPath, viewModel.Name); - Services.Notifier.Information(T("Media folder created")); + Services.Notifier.Success(T("Media folder created")); } catch(ArgumentException argumentException) { Services.Notifier.Error(T("Creating Folder failed: {0}", argumentException.Message)); @@ -102,7 +102,7 @@ namespace Orchard.Media.Controllers { try { _mediaService.DeleteFile(folderName, fileName); - Services.Notifier.Information(T("Media file deleted")); + Services.Notifier.Success(T("Media file deleted")); } catch (ArgumentException argumentException) { Services.Notifier.Error(T("Deleting failed: {0}", argumentException.Message)); @@ -116,7 +116,7 @@ namespace Orchard.Media.Controllers { try { _mediaService.DeleteFolder(folderPath); - Services.Notifier.Information(T("Media folder deleted")); + Services.Notifier.Success(T("Media folder deleted")); } catch(ArgumentException argumentException) { Services.Notifier.Error(T("Deleting failed: {0}", argumentException.Message)); @@ -142,7 +142,7 @@ namespace Orchard.Media.Controllers { UpdateModel(viewModel); try { _mediaService.DeleteFolder(viewModel.MediaPath); - Services.Notifier.Information(T("Media folder deleted")); + Services.Notifier.Success(T("Media folder deleted")); } catch(ArgumentException argumentException) { Services.Notifier.Error(T("Deleting media folder failed: {0}", argumentException.Message)); @@ -162,7 +162,7 @@ namespace Orchard.Media.Controllers { UpdateModel(viewModel); try { _mediaService.RenameFolder(viewModel.MediaPath, viewModel.Name); - Services.Notifier.Information(T("Media folder properties modified")); + Services.Notifier.Success(T("Media folder properties modified")); } catch(ArgumentException argumentException) { Services.Notifier.Error(T("Modifying media folder properties failed: {0}", argumentException.Message)); @@ -217,7 +217,7 @@ namespace Orchard.Media.Controllers { } } - Services.Notifier.Information(T("Media file(s) uploaded")); + Services.Notifier.Success(T("Media file(s) uploaded")); return RedirectToAction("Edit", new { name = viewModel.FolderName, mediaPath = viewModel.MediaPath }); } @@ -266,7 +266,7 @@ namespace Orchard.Media.Controllers { UpdateModel(viewModel); try { _mediaService.DeleteFile(viewModel.Name, viewModel.MediaPath); - Services.Notifier.Information(T("Media deleted")); + Services.Notifier.Success(T("Media deleted")); } catch (ArgumentException argumentException) { Services.Notifier.Error(T("Removing media file failed: {0}", argumentException.Message)); @@ -298,7 +298,7 @@ namespace Orchard.Media.Controllers { viewModelName = input["NewName"]; } - Services.Notifier.Information(T("Media information updated")); + Services.Notifier.Success(T("Media information updated")); return RedirectToAction("EditMedia", new { name = viewModelName, caption = viewModel.Caption, lastUpdated = viewModel.LastUpdated, diff --git a/src/Orchard.Web/Modules/Orchard.MediaLibrary/Controllers/FolderController.cs b/src/Orchard.Web/Modules/Orchard.MediaLibrary/Controllers/FolderController.cs index 33927b245..3fb0ed6e5 100644 --- a/src/Orchard.Web/Modules/Orchard.MediaLibrary/Controllers/FolderController.cs +++ b/src/Orchard.Web/Modules/Orchard.MediaLibrary/Controllers/FolderController.cs @@ -63,7 +63,7 @@ namespace Orchard.MediaLibrary.Controllers { try { _mediaLibraryService.CreateFolder(viewModel.FolderPath, viewModel.Name); - Services.Notifier.Information(T("Media folder created")); + Services.Notifier.Success(T("Media folder created")); } catch (ArgumentException argumentException) { Services.Notifier.Error(T("Creating Folder failed: {0}", argumentException.Message)); @@ -117,7 +117,7 @@ namespace Orchard.MediaLibrary.Controllers { try { _mediaLibraryService.RenameFolder(viewModel.FolderPath, viewModel.Name); - Services.Notifier.Information(T("Media folder renamed")); + Services.Notifier.Success(T("Media folder renamed")); } catch (Exception exception) { Services.Notifier.Error(T("Editing Folder failed: {0}", exception.Message)); @@ -142,7 +142,7 @@ namespace Orchard.MediaLibrary.Controllers { } try { _mediaLibraryService.DeleteFolder(viewModel.FolderPath); - Services.Notifier.Information(T("Media folder deleted")); + Services.Notifier.Success(T("Media folder deleted")); } catch (ArgumentException argumentException) { Services.Notifier.Error(T("Deleting Folder failed: {0}", argumentException.Message)); diff --git a/src/Orchard.Web/Modules/Orchard.MediaLibrary/MediaFileName/MediaFileNameDriver.cs b/src/Orchard.Web/Modules/Orchard.MediaLibrary/MediaFileName/MediaFileNameDriver.cs index ee345abbf..c42c18320 100644 --- a/src/Orchard.Web/Modules/Orchard.MediaLibrary/MediaFileName/MediaFileNameDriver.cs +++ b/src/Orchard.Web/Modules/Orchard.MediaLibrary/MediaFileName/MediaFileNameDriver.cs @@ -62,7 +62,7 @@ namespace Orchard.MediaLibrary.MediaFileName _mediaLibraryService.RenameFile(part.FolderPath, priorFileName, model.FileName); part.FileName = model.FileName; - _notifier.Add(NotifyType.Information, T("File '{0}' was renamed to '{1}'", priorFileName, model.FileName)); + _notifier.Add(NotifyType.Success, T("File '{0}' was renamed to '{1}'", priorFileName, model.FileName)); } catch (Exception) { updater.AddModelError("MediaFileNameEditorSettings.FileName", T("Unable to rename file")); @@ -70,6 +70,7 @@ namespace Orchard.MediaLibrary.MediaFileName } } } + return model; }); } diff --git a/src/Orchard.Web/Modules/Orchard.MediaProcessing/Controllers/AdminController.cs b/src/Orchard.Web/Modules/Orchard.MediaProcessing/Controllers/AdminController.cs index ec1dd6bc0..9c92d7894 100644 --- a/src/Orchard.Web/Modules/Orchard.MediaProcessing/Controllers/AdminController.cs +++ b/src/Orchard.Web/Modules/Orchard.MediaProcessing/Controllers/AdminController.cs @@ -155,7 +155,7 @@ namespace Orchard.MediaProcessing.Controllers { } Services.ContentManager.Remove(profile.ContentItem); - Services.Notifier.Information(T("Image Profile {0} deleted", profile.Name)); + Services.Notifier.Success(T("Image Profile {0} deleted", profile.Name)); return RedirectToAction("Index"); } diff --git a/src/Orchard.Web/Modules/Orchard.MediaProcessing/Controllers/FilterController.cs b/src/Orchard.Web/Modules/Orchard.MediaProcessing/Controllers/FilterController.cs index d40382985..08cf05e9b 100644 --- a/src/Orchard.Web/Modules/Orchard.MediaProcessing/Controllers/FilterController.cs +++ b/src/Orchard.Web/Modules/Orchard.MediaProcessing/Controllers/FilterController.cs @@ -67,7 +67,7 @@ namespace Orchard.MediaProcessing.Controllers { _signals.Trigger("MediaProcessing_Saved_" + filter.ImageProfilePartRecord.Name); - Services.Notifier.Information(T("Filter deleted")); + Services.Notifier.Success(T("Filter deleted")); return RedirectToAction("Edit", "Admin", new {id}); } diff --git a/src/Orchard.Web/Modules/Orchard.Modules/Controllers/AdminController.cs b/src/Orchard.Web/Modules/Orchard.Modules/Controllers/AdminController.cs index a2309e64f..3ebd12623 100644 --- a/src/Orchard.Web/Modules/Orchard.Modules/Controllers/AdminController.cs +++ b/src/Orchard.Web/Modules/Orchard.Modules/Controllers/AdminController.cs @@ -163,7 +163,7 @@ namespace Orchard.Modules.Controllers { Services.Notifier.Error(T("Recipes {0} contains unsupported module installation steps.", recipe.Name)); } - Services.Notifier.Information(T("The recipe {0} was executed successfully.", recipe.Name)); + Services.Notifier.Success(T("The recipe {0} was executed successfully.", recipe.Name)); return RedirectToAction("Recipes"); @@ -229,7 +229,7 @@ namespace Orchard.Modules.Controllers { var id = feature.Descriptor.Id; try { _dataMigrationManager.Update(id); - Services.Notifier.Information(T("The feature {0} was updated successfully", id)); + Services.Notifier.Success(T("The feature {0} was updated successfully", id)); } catch (Exception exception) { Services.Notifier.Error(T("An error occured while updating the feature {0}: {1}", id, exception.Message)); diff --git a/src/Orchard.Web/Modules/Orchard.Modules/Services/ModuleService.cs b/src/Orchard.Web/Modules/Orchard.Modules/Services/ModuleService.cs index dad8e4c01..cbcdbee00 100644 --- a/src/Orchard.Web/Modules/Orchard.Modules/Services/ModuleService.cs +++ b/src/Orchard.Web/Modules/Orchard.Modules/Services/ModuleService.cs @@ -73,7 +73,7 @@ namespace Orchard.Modules.Services { public void EnableFeatures(IEnumerable featureIds, bool force) { foreach (string featureId in _featureManager.EnableFeatures(featureIds, force)) { var featureName = _featureManager.GetAvailableFeatures().First(f => f.Id.Equals(featureId, StringComparison.OrdinalIgnoreCase)).Name; - Services.Notifier.Information(T("{0} was enabled", featureName)); + Services.Notifier.Success(T("{0} was enabled", featureName)); } } @@ -93,7 +93,7 @@ namespace Orchard.Modules.Services { public void DisableFeatures(IEnumerable featureIds, bool force) { foreach (string featureId in _featureManager.DisableFeatures(featureIds, force)) { var featureName = _featureManager.GetAvailableFeatures().Single(f => f.Id.Equals(featureId, StringComparison.OrdinalIgnoreCase)).Name; - Services.Notifier.Information(T("{0} was disabled", featureName)); + Services.Notifier.Success(T("{0} was disabled", featureName)); } } diff --git a/src/Orchard.Web/Modules/Orchard.MultiTenancy/Controllers/AdminController.cs b/src/Orchard.Web/Modules/Orchard.MultiTenancy/Controllers/AdminController.cs index 6cf12eb82..8c5737553 100644 --- a/src/Orchard.Web/Modules/Orchard.MultiTenancy/Controllers/AdminController.cs +++ b/src/Orchard.Web/Modules/Orchard.MultiTenancy/Controllers/AdminController.cs @@ -88,7 +88,7 @@ namespace Orchard.MultiTenancy.Controllers { Modules = viewModel.Modules.Where(x => x.Checked).Select(x => x.ModuleId).ToArray() }); - Services.Notifier.Information(T("Tenant '{0}' was created successfully.", viewModel.Name)); + Services.Notifier.Success(T("Tenant '{0}' was created successfully.", viewModel.Name)); return RedirectToAction("Index"); } catch (ArgumentException ex) { diff --git a/src/Orchard.Web/Modules/Orchard.OutputCache/Controllers/AdminController.cs b/src/Orchard.Web/Modules/Orchard.OutputCache/Controllers/AdminController.cs index f8a042706..ef78b6522 100644 --- a/src/Orchard.Web/Modules/Orchard.OutputCache/Controllers/AdminController.cs +++ b/src/Orchard.Web/Modules/Orchard.OutputCache/Controllers/AdminController.cs @@ -127,7 +127,7 @@ namespace Orchard.OutputCache.Controllers { _signals.Trigger(CacheSettings.CacheKey); _cacheService.SaveRouteConfigs(model.RouteConfigs); - Services.Notifier.Information(T("Output cache settings saved successfully.")); + Services.Notifier.Success(T("Output cache settings saved successfully.")); } else { Services.Notifier.Error(T("Could not save output cache settings.")); diff --git a/src/Orchard.Web/Modules/Orchard.Packaging/Controllers/GalleryController.cs b/src/Orchard.Web/Modules/Orchard.Packaging/Controllers/GalleryController.cs index 87f941d0e..bc108b020 100644 --- a/src/Orchard.Web/Modules/Orchard.Packaging/Controllers/GalleryController.cs +++ b/src/Orchard.Web/Modules/Orchard.Packaging/Controllers/GalleryController.cs @@ -69,7 +69,7 @@ namespace Orchard.Packaging.Controllers { return new HttpUnauthorizedResult(); _packagingSourceManager.RemoveSource(id); - Services.Notifier.Information(T("The feed has been removed successfully.")); + Services.Notifier.Success(T("The feed has been removed successfully.")); return RedirectToAction("Sources"); } @@ -115,7 +115,7 @@ namespace Orchard.Packaging.Controllers { return View(new PackagingAddSourceViewModel { Url = url }); _packagingSourceManager.AddSource(title, url); - Services.Notifier.Information(T("The feed has been added successfully.")); + Services.Notifier.Success(T("The feed has been added successfully.")); return RedirectToAction("Sources"); } diff --git a/src/Orchard.Web/Modules/Orchard.Packaging/Controllers/PackagingServicesController.cs b/src/Orchard.Web/Modules/Orchard.Packaging/Controllers/PackagingServicesController.cs index 718235916..7c9c0dd4d 100644 --- a/src/Orchard.Web/Modules/Orchard.Packaging/Controllers/PackagingServicesController.cs +++ b/src/Orchard.Web/Modules/Orchard.Packaging/Controllers/PackagingServicesController.cs @@ -131,10 +131,10 @@ namespace Orchard.Packaging.Controllers { PackageInfo packageInfo = _packageManager.Install(packageId, version, source.FeedUrl, MapAppRoot()); if (DefaultExtensionTypes.IsTheme(packageInfo.ExtensionType)) { - Services.Notifier.Information(T("The theme has been successfully installed. It can be enabled in the \"Themes\" page accessible from the menu.")); + Services.Notifier.Success(T("The theme has been successfully installed. It can be enabled in the \"Themes\" page accessible from the menu.")); } else if (DefaultExtensionTypes.IsModule(packageInfo.ExtensionType)) { - Services.Notifier.Information(T("The module has been successfully installed.")); + Services.Notifier.Success(T("The module has been successfully installed.")); IPackageRepository packageRepository = PackageRepositoryFactory.Default.CreateRepository(new PackageSource(source.FeedUrl, "Default")); IPackage package = packageRepository.FindPackage(packageId); @@ -175,10 +175,10 @@ namespace Orchard.Packaging.Controllers { System.IO.File.Delete(fullFileName); if (DefaultExtensionTypes.IsTheme(extensionDescriptor.ExtensionType)) { - Services.Notifier.Information(T("The theme has been successfully installed. It can be enabled in the \"Themes\" page accessible from the menu.")); + Services.Notifier.Success(T("The theme has been successfully installed. It can be enabled in the \"Themes\" page accessible from the menu.")); } else if (DefaultExtensionTypes.IsModule(extensionDescriptor.ExtensionType)) { - Services.Notifier.Information(T("The module has been successfully installed.")); + Services.Notifier.Success(T("The module has been successfully installed.")); return InstallPackageDetails(extensionDescriptor, redirectUrl); } @@ -281,7 +281,7 @@ namespace Orchard.Packaging.Controllers { return Redirect(!String.IsNullOrEmpty(retryUrl) ? retryUrl : returnUrl); } - Services.Notifier.Information(T("Uninstalled package \"{0}\"", id)); + Services.Notifier.Success(T("Uninstalled package \"{0}\"", id)); return this.RedirectLocal(returnUrl, "~/"); } diff --git a/src/Orchard.Web/Modules/Orchard.Packaging/Services/PackageInstaller.cs b/src/Orchard.Web/Modules/Orchard.Packaging/Services/PackageInstaller.cs index 9e7ccd689..55d8d4309 100644 --- a/src/Orchard.Web/Modules/Orchard.Packaging/Services/PackageInstaller.cs +++ b/src/Orchard.Web/Modules/Orchard.Packaging/Services/PackageInstaller.cs @@ -270,7 +270,7 @@ namespace Orchard.Packaging.Services { var backupFolder = new DirectoryInfo(localTempPath); _folderUpdater.Restore(backupFolder, source); - _notifier.Information(T("Successfully restored local package to local folder \"{0}\"", source)); + _notifier.Success(T("Successfully restored local package to local folder \"{0}\"", source)); return true; } @@ -299,7 +299,7 @@ namespace Orchard.Packaging.Services { var backupFolder = new DirectoryInfo(localTempPath); _folderUpdater.Backup(source, backupFolder); - _notifier.Information(T("Successfully backed up local package to local folder \"{0}\"", backupFolder)); + _notifier.Success(T("Successfully backed up local package to local folder \"{0}\"", backupFolder)); return true; } @@ -312,7 +312,7 @@ namespace Orchard.Packaging.Services { // package is the same version or an older version try { Uninstall(package.Id, _virtualPathProvider.MapPath("~\\")); - _notifier.Information(T("Successfully un-installed local package {0}", package.ExtensionId())); + _notifier.Success(T("Successfully un-installed local package {0}", package.ExtensionId())); } catch {} } diff --git a/src/Orchard.Web/Modules/Orchard.Projections/Controllers/AdminController.cs b/src/Orchard.Web/Modules/Orchard.Projections/Controllers/AdminController.cs index 01b79f29d..e5dfb543e 100644 --- a/src/Orchard.Web/Modules/Orchard.Projections/Controllers/AdminController.cs +++ b/src/Orchard.Web/Modules/Orchard.Projections/Controllers/AdminController.cs @@ -233,7 +233,7 @@ namespace Orchard.Projections.Controllers { } Services.ContentManager.Remove(query.ContentItem); - Services.Notifier.Information(T("Query {0} deleted", query.Name)); + Services.Notifier.Success(T("Query {0} deleted", query.Name)); return RedirectToAction("Index"); } diff --git a/src/Orchard.Web/Modules/Orchard.Projections/Controllers/BindingController.cs b/src/Orchard.Web/Modules/Orchard.Projections/Controllers/BindingController.cs index 07dce1e19..3d77c6ec8 100644 --- a/src/Orchard.Web/Modules/Orchard.Projections/Controllers/BindingController.cs +++ b/src/Orchard.Web/Modules/Orchard.Projections/Controllers/BindingController.cs @@ -151,7 +151,7 @@ namespace Orchard.Projections.Controllers { Description = model.Description }); - Services.Notifier.Information(T("Binding created successfully")); + Services.Notifier.Success(T("Binding created successfully")); return RedirectToAction("Index"); } @@ -174,14 +174,14 @@ namespace Orchard.Projections.Controllers { var record = recordBluePrints.FirstOrDefault(r => String.Equals(r.Type.FullName, binding.Type, StringComparison.OrdinalIgnoreCase)); if (record == null) { - Services.Notifier.Information(T("The record for this binding is no longer available, please remove it.")); + Services.Notifier.Warning(T("The record for this binding is no longer available, please remove it.")); return RedirectToAction("Index"); } var property = record.Type.GetProperty(binding.Member, BindingFlags.Instance | BindingFlags.Public); if (property == null) { - Services.Notifier.Information(T("The member for this binding is no longer available, please remove it.")); + Services.Notifier.Warning(T("The member for this binding is no longer available, please remove it.")); return RedirectToAction("Index"); } @@ -212,7 +212,7 @@ namespace Orchard.Projections.Controllers { binding.DisplayName = model.Display; binding.Description = model.Description; - Services.Notifier.Information(T("Binding updated successfully")); + Services.Notifier.Success(T("Binding updated successfully")); return RedirectToAction("Index"); } @@ -232,7 +232,7 @@ namespace Orchard.Projections.Controllers { } _repository.Delete(binding); - Services.Notifier.Information(T("Binding deleted")); + Services.Notifier.Success(T("Binding deleted")); return RedirectToAction("Index"); } diff --git a/src/Orchard.Web/Modules/Orchard.Projections/Controllers/FilterController.cs b/src/Orchard.Web/Modules/Orchard.Projections/Controllers/FilterController.cs index 9fa08122d..c0d599b6c 100644 --- a/src/Orchard.Web/Modules/Orchard.Projections/Controllers/FilterController.cs +++ b/src/Orchard.Web/Modules/Orchard.Projections/Controllers/FilterController.cs @@ -96,7 +96,7 @@ namespace Orchard.Projections.Controllers { filter.FilterGroupRecord.Filters.Remove(filter); _repository.Delete(filter); - Services.Notifier.Information(T("Filter deleted")); + Services.Notifier.Success(T("Filter deleted")); return RedirectToAction("Edit", "Admin", new { id }); } diff --git a/src/Orchard.Web/Modules/Orchard.Projections/Controllers/LayoutController.cs b/src/Orchard.Web/Modules/Orchard.Projections/Controllers/LayoutController.cs index fd0f46477..059dc404e 100644 --- a/src/Orchard.Web/Modules/Orchard.Projections/Controllers/LayoutController.cs +++ b/src/Orchard.Web/Modules/Orchard.Projections/Controllers/LayoutController.cs @@ -63,7 +63,7 @@ namespace Orchard.Projections.Controllers { layout.QueryPartRecord.Layouts.Remove(layout); _repository.Delete(layout); - Services.Notifier.Information(T("Layout deleted")); + Services.Notifier.Success(T("Layout deleted")); return RedirectToAction("Edit", "Admin", new { id = queryId }); } @@ -117,7 +117,7 @@ namespace Orchard.Projections.Controllers { layoutRecord.Display = model.Display; layoutRecord.DisplayType = model.DisplayType; - Services.Notifier.Information(T("Layout Created")); + Services.Notifier.Success(T("Layout Created")); _repository.Create(layoutRecord); return RedirectToAction("Edit", new { id = layoutRecord.Id }); @@ -212,7 +212,7 @@ namespace Orchard.Projections.Controllers { layoutRecord.DisplayType = model.DisplayType; layoutRecord.GroupProperty = layoutRecord.Properties.FirstOrDefault(x => x.Id == model.GroupPropertyId); - Services.Notifier.Information(T("Layout Saved")); + Services.Notifier.Success(T("Layout Saved")); return RedirectToAction("Edit", new { id = layoutRecord.Id }); } diff --git a/src/Orchard.Web/Modules/Orchard.Projections/Controllers/PropertyController.cs b/src/Orchard.Web/Modules/Orchard.Projections/Controllers/PropertyController.cs index 85997620c..b6115861f 100644 --- a/src/Orchard.Web/Modules/Orchard.Projections/Controllers/PropertyController.cs +++ b/src/Orchard.Web/Modules/Orchard.Projections/Controllers/PropertyController.cs @@ -66,7 +66,7 @@ namespace Orchard.Projections.Controllers { property.LayoutRecord.Properties.Remove(property); _repository.Delete(property); - Services.Notifier.Information(T("Property deleted")); + Services.Notifier.Success(T("Property deleted")); return RedirectToAction("Edit", "Layout", new { id }); } diff --git a/src/Orchard.Web/Modules/Orchard.Projections/Controllers/SortCriteriaController.cs b/src/Orchard.Web/Modules/Orchard.Projections/Controllers/SortCriteriaController.cs index 1eff06705..b62bb8d32 100644 --- a/src/Orchard.Web/Modules/Orchard.Projections/Controllers/SortCriteriaController.cs +++ b/src/Orchard.Web/Modules/Orchard.Projections/Controllers/SortCriteriaController.cs @@ -64,7 +64,7 @@ namespace Orchard.Projections.Controllers { sortCriterion.QueryPartRecord.SortCriteria.Remove(sortCriterion); _repository.Delete(sortCriterion); - Services.Notifier.Information(T("Sort criteria deleted")); + Services.Notifier.Success(T("Sort criteria deleted")); return RedirectToAction("Edit", "Admin", new { id }); } diff --git a/src/Orchard.Web/Modules/Orchard.Roles/Controllers/AdminController.cs b/src/Orchard.Web/Modules/Orchard.Roles/Controllers/AdminController.cs index fc8cea06f..2fd047fb0 100644 --- a/src/Orchard.Web/Modules/Orchard.Roles/Controllers/AdminController.cs +++ b/src/Orchard.Web/Modules/Orchard.Roles/Controllers/AdminController.cs @@ -155,7 +155,7 @@ namespace Orchard.Roles.Controllers { } _roleService.UpdateRole(viewModel.Id, viewModel.Name, rolePermissions); - Services.Notifier.Information(T("Your Role has been saved.")); + Services.Notifier.Success(T("Your Role has been saved.")); return RedirectToAction("Edit", new { id }); } @@ -171,7 +171,7 @@ namespace Orchard.Roles.Controllers { return new HttpUnauthorizedResult(); _roleService.DeleteRole(id); - Services.Notifier.Information(T("Role was successfully deleted.")); + Services.Notifier.Success(T("Role was successfully deleted.")); return this.RedirectLocal(returnUrl, () => RedirectToAction("Index")); } diff --git a/src/Orchard.Web/Modules/Orchard.Rules/Controllers/ActionController.cs b/src/Orchard.Web/Modules/Orchard.Rules/Controllers/ActionController.cs index 3c6ecdf7b..17565a21b 100644 --- a/src/Orchard.Web/Modules/Orchard.Rules/Controllers/ActionController.cs +++ b/src/Orchard.Web/Modules/Orchard.Rules/Controllers/ActionController.cs @@ -49,7 +49,7 @@ namespace Orchard.Rules.Controllers { return new HttpUnauthorizedResult(); _rulesServices.DeleteAction(actionId); - Services.Notifier.Information(T("Action Deleted")); + Services.Notifier.Success(T("Action Deleted")); return RedirectToAction("Edit", "Admin", new { id }); } diff --git a/src/Orchard.Web/Modules/Orchard.Rules/Controllers/AdminController.cs b/src/Orchard.Web/Modules/Orchard.Rules/Controllers/AdminController.cs index ce585cef6..6fa4172ae 100644 --- a/src/Orchard.Web/Modules/Orchard.Rules/Controllers/AdminController.cs +++ b/src/Orchard.Web/Modules/Orchard.Rules/Controllers/AdminController.cs @@ -252,7 +252,7 @@ namespace Orchard.Rules.Controllers { rule.Name = viewModel.Name; rule.Enabled = viewModel.Enabled; - Services.Notifier.Information(T("Rule Saved")); + Services.Notifier.Success(T("Rule Saved")); return RedirectToAction("Edit", new { id = rule.Id }); } @@ -275,7 +275,7 @@ namespace Orchard.Rules.Controllers { if (rule != null) { _rulesServices.DeleteRule(id); - Services.Notifier.Information(T("Rule {0} deleted", rule.Name)); + Services.Notifier.Success(T("Rule {0} deleted", rule.Name)); } return RedirectToAction("Index"); @@ -289,7 +289,7 @@ namespace Orchard.Rules.Controllers { if (rule != null) { rule.Enabled = true; - Services.Notifier.Information(T("Rule enabled")); + Services.Notifier.Success(T("Rule enabled")); } return RedirectToAction("Index"); @@ -303,7 +303,7 @@ namespace Orchard.Rules.Controllers { if (rule != null) { rule.Enabled = false; - Services.Notifier.Information(T("Rule disabled")); + Services.Notifier.Success(T("Rule disabled")); } return RedirectToAction("Index"); diff --git a/src/Orchard.Web/Modules/Orchard.Rules/Controllers/EventController.cs b/src/Orchard.Web/Modules/Orchard.Rules/Controllers/EventController.cs index 8de3b5975..0bf35c8d2 100644 --- a/src/Orchard.Web/Modules/Orchard.Rules/Controllers/EventController.cs +++ b/src/Orchard.Web/Modules/Orchard.Rules/Controllers/EventController.cs @@ -48,7 +48,7 @@ namespace Orchard.Rules.Controllers { return new HttpUnauthorizedResult(); _rulesServices.DeleteEvent(eventId); - Services.Notifier.Information(T("Event Deleted")); + Services.Notifier.Success(T("Event Deleted")); return RedirectToAction("Edit", "Admin", new { id }); } diff --git a/src/Orchard.Web/Modules/Orchard.Taxonomies/Controllers/AdminController.cs b/src/Orchard.Web/Modules/Orchard.Taxonomies/Controllers/AdminController.cs index 962ffa310..7572c5a14 100644 --- a/src/Orchard.Web/Modules/Orchard.Taxonomies/Controllers/AdminController.cs +++ b/src/Orchard.Web/Modules/Orchard.Taxonomies/Controllers/AdminController.cs @@ -201,7 +201,7 @@ namespace Orchard.Taxonomies.Controllers { } } - Services.Notifier.Information(T("The terms have been imported successfully.")); + Services.Notifier.Success(T("The terms have been imported successfully.")); return RedirectToAction("Index", "TermAdmin", new { taxonomyId = id }); } diff --git a/src/Orchard.Web/Modules/Orchard.Taxonomies/Controllers/TermAdminController.cs b/src/Orchard.Web/Modules/Orchard.Taxonomies/Controllers/TermAdminController.cs index 2b9c1cc94..7b3791d13 100644 --- a/src/Orchard.Web/Modules/Orchard.Taxonomies/Controllers/TermAdminController.cs +++ b/src/Orchard.Web/Modules/Orchard.Taxonomies/Controllers/TermAdminController.cs @@ -100,7 +100,7 @@ namespace Orchard.Taxonomies.Controllers { throw new ArgumentOutOfRangeException(); } - Services.Notifier.Information(T("{0} term have been removed.", checkedEntries.Count)); + Services.Notifier.Success(T("{0} term have been removed.", checkedEntries.Count)); return RedirectToAction("Index", new { taxonomyId = viewModel.TaxonomyId }); } @@ -200,7 +200,7 @@ namespace Orchard.Taxonomies.Controllers { } Services.ContentManager.Publish(term.ContentItem); - Services.Notifier.Information(T("The {0} term has been created.", term.Name)); + Services.Notifier.Success(T("The {0} term has been created.", term.Name)); return RedirectToAction("Index", "TermAdmin", new { taxonomyId }); } @@ -238,7 +238,7 @@ namespace Orchard.Taxonomies.Controllers { Services.ContentManager.Publish(contentItem); _taxonomyService.ProcessPath(term); - Services.Notifier.Information(T("Term information updated")); + Services.Notifier.Success(T("Term information updated")); return RedirectToAction("Index", "TermAdmin", new { taxonomyId = term.TaxonomyId }); } diff --git a/src/Orchard.Web/Modules/Orchard.Taxonomies/Drivers/TaxonomyFieldDriver.cs b/src/Orchard.Web/Modules/Orchard.Taxonomies/Drivers/TaxonomyFieldDriver.cs index b498d6431..00021c084 100644 --- a/src/Orchard.Web/Modules/Orchard.Taxonomies/Drivers/TaxonomyFieldDriver.cs +++ b/src/Orchard.Web/Modules/Orchard.Taxonomies/Drivers/TaxonomyFieldDriver.cs @@ -165,7 +165,7 @@ namespace Orchard.Taxonomies.Drivers { term.Selectable = true; Services.ContentManager.Create(term, VersionOptions.Published); - Services.Notifier.Information(T("The {0} term has been created.", term.Name)); + Services.Notifier.Success(T("The {0} term has been created.", term.Name)); } return term; diff --git a/src/Orchard.Web/Modules/Orchard.Templates/Controllers/AdminController.cs b/src/Orchard.Web/Modules/Orchard.Templates/Controllers/AdminController.cs index 426e7ae02..552433e55 100644 --- a/src/Orchard.Web/Modules/Orchard.Templates/Controllers/AdminController.cs +++ b/src/Orchard.Web/Modules/Orchard.Templates/Controllers/AdminController.cs @@ -136,7 +136,7 @@ namespace Orchard.Templates.Controllers { _contentManager.Publish(item); } - Services.Notifier.Information(T("Content successfully published.")); + Services.Notifier.Success(T("Content successfully published.")); break; case ContentsBulkAction.Unpublish: foreach (var item in checkedContentItems) { @@ -147,7 +147,7 @@ namespace Orchard.Templates.Controllers { _contentManager.Unpublish(item); } - Services.Notifier.Information(T("Content successfully unpublished.")); + Services.Notifier.Success(T("Content successfully unpublished.")); break; case ContentsBulkAction.Remove: foreach (var item in checkedContentItems) { @@ -158,7 +158,7 @@ namespace Orchard.Templates.Controllers { _contentManager.Remove(item); } - Services.Notifier.Information(T("Content successfully removed.")); + Services.Notifier.Success(T("Content successfully removed.")); break; default: throw new ArgumentOutOfRangeException(); diff --git a/src/Orchard.Web/Modules/Orchard.Themes/Controllers/AdminController.cs b/src/Orchard.Web/Modules/Orchard.Themes/Controllers/AdminController.cs index 4290f3701..991d357b6 100644 --- a/src/Orchard.Web/Modules/Orchard.Themes/Controllers/AdminController.cs +++ b/src/Orchard.Web/Modules/Orchard.Themes/Controllers/AdminController.cs @@ -246,7 +246,7 @@ namespace Orchard.Themes.Controllers { try { _dataMigrationManager.Update(themeId); - Services.Notifier.Information(T("The theme {0} was updated successfully.", themeId)); + Services.Notifier.Success(T("The theme {0} was updated successfully", themeId)); Logger.Information("The theme {0} was updated successfully.", themeId); } catch (Exception exception) { Logger.Error(T("An error occured while updating the theme {0}: {1}", themeId, exception.Message).Text); diff --git a/src/Orchard.Web/Modules/Orchard.Themes/Services/ThemeService.cs b/src/Orchard.Web/Modules/Orchard.Themes/Services/ThemeService.cs index 46a4454b4..eaeb536b5 100644 --- a/src/Orchard.Web/Modules/Orchard.Themes/Services/ThemeService.cs +++ b/src/Orchard.Web/Modules/Orchard.Themes/Services/ThemeService.cs @@ -95,7 +95,7 @@ namespace Orchard.Themes.Services { foreach (var featureId in _featureManager.EnableFeatures(new[] { themeId }, true)) { if (themeId != featureId) { var featureName = _featureManager.GetAvailableFeatures().First(f => f.Id.Equals(featureId, StringComparison.OrdinalIgnoreCase)).Name; - Services.Notifier.Information(T("{0} was enabled", featureName)); + Services.Notifier.Success(T("{0} was enabled", featureName)); } } } @@ -194,7 +194,7 @@ namespace Orchard.Themes.Services { public void DisablePreviewFeatures(IEnumerable features) { foreach (var featureId in _featureManager.DisableFeatures(features,true)) { var featureName = _featureManager.GetAvailableFeatures().First(f => f.Id.Equals(featureId, StringComparison.OrdinalIgnoreCase)).Name; - Services.Notifier.Information(T("{0} was disabled", featureName)); + Services.Notifier.Success(T("{0} was disabled", featureName)); } } } diff --git a/src/Orchard.Web/Modules/Orchard.Users/Controllers/AdminController.cs b/src/Orchard.Web/Modules/Orchard.Users/Controllers/AdminController.cs index 1e29bedfa..e3caa411a 100644 --- a/src/Orchard.Web/Modules/Orchard.Users/Controllers/AdminController.cs +++ b/src/Orchard.Web/Modules/Orchard.Users/Controllers/AdminController.cs @@ -210,7 +210,7 @@ namespace Orchard.Users.Controllers { return View(model); } - Services.Notifier.Information(T("User created")); + Services.Notifier.Success(T("User created")); return RedirectToAction("Index"); } @@ -268,7 +268,7 @@ namespace Orchard.Users.Controllers { Services.ContentManager.Publish(user.ContentItem); - Services.Notifier.Information(T("User information updated")); + Services.Notifier.Success(T("User information updated")); return RedirectToAction("Index"); } @@ -288,7 +288,7 @@ namespace Orchard.Users.Controllers { } else{ Services.ContentManager.Remove(user.ContentItem); - Services.Notifier.Information(T("User {0} deleted", user.UserName)); + Services.Notifier.Success(T("User {0} deleted", user.UserName)); } } @@ -309,10 +309,9 @@ namespace Orchard.Users.Controllers { } _userService.SendChallengeEmail(user.As(), nonce => Url.MakeAbsolute(Url.Action("ChallengeEmail", "Account", new { Area = "Orchard.Users", nonce = nonce }), siteUrl)); - Services.Notifier.Information(T("Challenge email sent to {0}", user.UserName)); + Services.Notifier.Success(T("Challenge email sent to {0}", user.UserName)); } - return RedirectToAction("Index"); } @@ -325,7 +324,7 @@ namespace Orchard.Users.Controllers { if ( user != null ) { user.As().RegistrationStatus = UserStatus.Approved; - Services.Notifier.Information(T("User {0} approved", user.UserName)); + Services.Notifier.Success(T("User {0} approved", user.UserName)); _userEventHandlers.Approved(user); } @@ -345,7 +344,7 @@ namespace Orchard.Users.Controllers { } else { user.As().RegistrationStatus = UserStatus.Pending; - Services.Notifier.Information(T("User {0} disabled", user.UserName)); + Services.Notifier.Success(T("User {0} disabled", user.UserName)); } } diff --git a/src/Orchard.Web/Modules/Orchard.Warmup/Controllers/AdminController.cs b/src/Orchard.Web/Modules/Orchard.Warmup/Controllers/AdminController.cs index 11fac783b..95f0e7742 100644 --- a/src/Orchard.Web/Modules/Orchard.Warmup/Controllers/AdminController.cs +++ b/src/Orchard.Web/Modules/Orchard.Warmup/Controllers/AdminController.cs @@ -80,7 +80,7 @@ namespace Orchard.Warmup.Controllers { if (ModelState.IsValid) { _warmupUpdater.Generate(); - Services.Notifier.Information(T("Warmup updated successfully.")); + Services.Notifier.Success(T("Warmup updated successfully.")); } else { Services.TransactionManager.Cancel(); diff --git a/src/Orchard.Web/Modules/Orchard.Widgets/Controllers/AdminController.cs b/src/Orchard.Web/Modules/Orchard.Widgets/Controllers/AdminController.cs index 3d7f6f89c..39e60e5ad 100644 --- a/src/Orchard.Web/Modules/Orchard.Widgets/Controllers/AdminController.cs +++ b/src/Orchard.Web/Modules/Orchard.Widgets/Controllers/AdminController.cs @@ -227,7 +227,7 @@ namespace Orchard.Widgets.Controllers { return View(model); } - Services.Notifier.Information(T("Your {0} has been added.", widgetPart.TypeDefinition.DisplayName)); + Services.Notifier.Success(T("Your {0} has been added.", widgetPart.TypeDefinition.DisplayName)); return this.RedirectLocal(returnUrl, () => RedirectToAction("Index")); } @@ -269,7 +269,7 @@ namespace Orchard.Widgets.Controllers { return View(model); } - Services.Notifier.Information(T("Your {0} has been created.", layerPart.TypeDefinition.DisplayName)); + Services.Notifier.Success(T("Your {0} has been created.", layerPart.TypeDefinition.DisplayName)); return RedirectToAction("Index", "Admin", new { layerId = layerPart.Id }); } @@ -302,7 +302,7 @@ namespace Orchard.Widgets.Controllers { return View(model); } - Services.Notifier.Information(T("Your {0} has been saved.", layerPart.TypeDefinition.DisplayName)); + Services.Notifier.Success(T("Your {0} has been saved.", layerPart.TypeDefinition.DisplayName)); return this.RedirectLocal(returnUrl, () => RedirectToAction("Index")); } @@ -315,7 +315,7 @@ namespace Orchard.Widgets.Controllers { try { _widgetsService.DeleteLayer(id); - Services.Notifier.Information(T("Layer was successfully deleted")); + Services.Notifier.Success(T("Layer was successfully deleted")); } catch (Exception exception) { Logger.Error(T("Removing Layer failed: {0}", exception.Message).Text); @@ -387,7 +387,7 @@ namespace Orchard.Widgets.Controllers { conditionallyPublish(widgetPart.ContentItem); - Services.Notifier.Information(T("Your {0} has been saved.", widgetPart.TypeDefinition.DisplayName)); + Services.Notifier.Success(T("Your {0} has been saved.", widgetPart.TypeDefinition.DisplayName)); } catch (Exception exception) { Logger.Error(T("Editing widget failed: {0}", exception.Message).Text); @@ -412,7 +412,7 @@ namespace Orchard.Widgets.Controllers { return HttpNotFound(); try { _widgetsService.DeleteWidget(widgetPart.Id); - Services.Notifier.Information(T("Widget was successfully deleted")); + Services.Notifier.Success(T("Widget was successfully deleted")); } catch (Exception exception) { Logger.Error(T("Removing Widget failed: {0}", exception.Message).Text); diff --git a/src/Orchard.Web/Modules/Orchard.Workflows/Controllers/AdminController.cs b/src/Orchard.Web/Modules/Orchard.Workflows/Controllers/AdminController.cs index 15959ed04..577d37edc 100644 --- a/src/Orchard.Web/Modules/Orchard.Workflows/Controllers/AdminController.cs +++ b/src/Orchard.Web/Modules/Orchard.Workflows/Controllers/AdminController.cs @@ -145,7 +145,7 @@ namespace Orchard.Workflows.Controllers { if (workflowDefinition != null) { _workflowDefinitionRecords.Delete(workflowDefinition); - Services.Notifier.Information(T("Workflow {0} deleted", workflowDefinition.Name)); + Services.Notifier.Success(T("Workflow {0} deleted", workflowDefinition.Name)); } } break; @@ -263,7 +263,7 @@ namespace Orchard.Workflows.Controllers { if (workflowDefinition != null) { _workflowDefinitionRecords.Delete(workflowDefinition); - Services.Notifier.Information(T("Workflow {0} deleted", workflowDefinition.Name)); + Services.Notifier.Success(T("Workflow {0} deleted", workflowDefinition.Name)); } return RedirectToAction("Index"); @@ -278,7 +278,7 @@ namespace Orchard.Workflows.Controllers { if (workflow != null) { _workflowRecords.Delete(workflow); - Services.Notifier.Information(T("Workflow deleted")); + Services.Notifier.Success(T("Workflow deleted")); } return this.RedirectLocal(returnUrl, () => RedirectToAction("Index")); @@ -389,7 +389,7 @@ namespace Orchard.Workflows.Controllers { } } - Services.Notifier.Information(T("Workflow saved successfully")); + Services.Notifier.Success(T("Workflow saved successfully")); // Don't pass the localId to force the activites to refresh and use the deterministic clientId. return RedirectToAction("Edit", new { id }); diff --git a/src/Orchard.Web/Modules/Upgrade/Controllers/ContentPickerController.cs b/src/Orchard.Web/Modules/Upgrade/Controllers/ContentPickerController.cs index 097056d3d..df7a21699 100644 --- a/src/Orchard.Web/Modules/Upgrade/Controllers/ContentPickerController.cs +++ b/src/Orchard.Web/Modules/Upgrade/Controllers/ContentPickerController.cs @@ -45,8 +45,8 @@ namespace Upgrade.Controllers { try { _upgradeService.ExecuteReader("DELETE FROM " + _upgradeService.GetPrefixedTableName("Orchard_ContentPicker_ContentMenuItemPartRecord"), null); _upgradeService.CopyTable("Navigation_ContentMenuItemPartRecord", "Orchard_ContentPicker_ContentMenuItemPartRecord", new string[0]); - - _orchardServices.Notifier.Information(T("Content Picker menu items were migrated successfully.")); + + _orchardServices.Notifier.Success(T("Content Picker menu items were migrated successfully.")); } catch(Exception e) { Logger.Error(e, "Unexpected error while migrating to Orchard.ContentPicker. Please check the log."); diff --git a/src/Orchard.Web/Modules/Upgrade/Controllers/FieldController.cs b/src/Orchard.Web/Modules/Upgrade/Controllers/FieldController.cs index baa8c49a9..7ece89ab1 100644 --- a/src/Orchard.Web/Modules/Upgrade/Controllers/FieldController.cs +++ b/src/Orchard.Web/Modules/Upgrade/Controllers/FieldController.cs @@ -89,8 +89,8 @@ namespace Upgrade.Controllers { _orchardServices.ContentManager.Clear(); } while (contents.Any()); - - _orchardServices.Notifier.Information(T("{0} fields were migrated successfully", contentType)); + + _orchardServices.Notifier.Success(T("{0} fields were migrated successfully", contentType)); } } diff --git a/src/Orchard.Web/Modules/Upgrade/Controllers/InfosetController.cs b/src/Orchard.Web/Modules/Upgrade/Controllers/InfosetController.cs index d538cd63a..b652b0aec 100644 --- a/src/Orchard.Web/Modules/Upgrade/Controllers/InfosetController.cs +++ b/src/Orchard.Web/Modules/Upgrade/Controllers/InfosetController.cs @@ -278,8 +278,8 @@ namespace Upgrade.Controllers { _upgradeService.ExecuteReader("DROP TABLE " + blogTable, null); } #endregion - - _orchardServices.Notifier.Information(T("Site Settings migrated successfully")); + + _orchardServices.Notifier.Success(T("Site Settings migrated successfully")); return View(); } diff --git a/src/Orchard.Web/Modules/Upgrade/Controllers/MenuController.cs b/src/Orchard.Web/Modules/Upgrade/Controllers/MenuController.cs index 1dfe6e315..e311e0808 100644 --- a/src/Orchard.Web/Modules/Upgrade/Controllers/MenuController.cs +++ b/src/Orchard.Web/Modules/Upgrade/Controllers/MenuController.cs @@ -52,7 +52,7 @@ namespace Upgrade.Controllers { // create a Main Menu var mainMenu = _menuService.Create("Main Menu"); - _orchardServices.Notifier.Information(T("Main menu created")); + _orchardServices.Notifier.Success(T("Main menu created")); // assign the Main Menu to all current menu items foreach (var menuItem in _menuService.Get()) { @@ -62,7 +62,7 @@ namespace Upgrade.Controllers { } menuItem.Menu = mainMenu.ContentItem; } - _orchardServices.Notifier.Information(T("Menu items moved to Main menu")); + _orchardServices.Notifier.Success(T("Menu items moved to Main menu")); // a widget should is created to display the navigation var layer = _widgetsService.GetLayers().FirstOrDefault(x => x.Name == "Default"); diff --git a/src/Orchard.Web/Modules/Upgrade/Controllers/MessagingController.cs b/src/Orchard.Web/Modules/Upgrade/Controllers/MessagingController.cs index 210d5fc32..a2c7d7d4b 100644 --- a/src/Orchard.Web/Modules/Upgrade/Controllers/MessagingController.cs +++ b/src/Orchard.Web/Modules/Upgrade/Controllers/MessagingController.cs @@ -97,7 +97,7 @@ namespace Upgrade.Controllers { record.State = JsonConvert.SerializeObject(newState); }); - _orchardServices.Notifier.Information(T("Email activities updated successfully")); + _orchardServices.Notifier.Success(T("Email activities updated successfully")); } else { _orchardServices.Notifier.Warning(T("No email activities were updated.")); diff --git a/src/Orchard.Web/Modules/Upgrade/Controllers/RouteController.cs b/src/Orchard.Web/Modules/Upgrade/Controllers/RouteController.cs index 57db71bbb..1043d18a6 100644 --- a/src/Orchard.Web/Modules/Upgrade/Controllers/RouteController.cs +++ b/src/Orchard.Web/Modules/Upgrade/Controllers/RouteController.cs @@ -160,7 +160,7 @@ namespace Upgrade.Controllers { _orchardServices.Notifier.Warning(T("Some content items could not be imported. Please refer to the corresponding Report.")); } else { - _orchardServices.Notifier.Information(T("{0} was migrated successfully", contentType)); + _orchardServices.Notifier.Success(T("{0} was migrated successfully", contentType)); } } } diff --git a/src/Orchard.Web/Modules/Upgrade/Controllers/TaxonomyController.cs b/src/Orchard.Web/Modules/Upgrade/Controllers/TaxonomyController.cs index db6a67135..228c462cc 100644 --- a/src/Orchard.Web/Modules/Upgrade/Controllers/TaxonomyController.cs +++ b/src/Orchard.Web/Modules/Upgrade/Controllers/TaxonomyController.cs @@ -61,7 +61,7 @@ namespace Upgrade.Controllers { _upgradeService.CopyTable("Contrib_Taxonomies_TermPartRecord", "Orchard_Taxonomies_TermPartRecord", new string[0]); _upgradeService.CopyTable("Contrib_Taxonomies_TermsPartRecord", "Orchard_Taxonomies_TermsPartRecord", new string[0]); - _orchardServices.Notifier.Information(T("Taxonomies were migrated successfully.")); + _orchardServices.Notifier.Success(T("Taxonomies were migrated successfully.")); } catch(Exception e) { Logger.Error(e, "Unexpected error while migrating to Orchard.Taxonomies. Please check the log."); diff --git a/src/Orchard.Web/Themes/SafeMode/Styles/site.css b/src/Orchard.Web/Themes/SafeMode/Styles/site.css index 404673e7c..0219a7c6e 100644 --- a/src/Orchard.Web/Themes/SafeMode/Styles/site.css +++ b/src/Orchard.Web/Themes/SafeMode/Styles/site.css @@ -315,11 +315,16 @@ span.message { background:#e68585; /* red */ color:#fff; } -.message-Information { +.message-Success { background:#e6f1c9; /* green */ border:1px solid #cfe493; color:#062232; } +.message-Information { + background:#d9edf7; /* blue */ + border:1px solid #bce8f1; + color:#31708f; +} .message-Warning { background:#fdf5bc; /* yellow */ border:1px solid #ffea9b; diff --git a/src/Orchard.Web/Themes/TheAdmin/Styles/site.css b/src/Orchard.Web/Themes/TheAdmin/Styles/site.css index 1429a941e..8bfe3d17e 100644 --- a/src/Orchard.Web/Themes/TheAdmin/Styles/site.css +++ b/src/Orchard.Web/Themes/TheAdmin/Styles/site.css @@ -559,11 +559,16 @@ span.message { border:1px solid #e5cece; /* red */ padding-left:4px 4px 4px 26px; } -.message-Information, .notifications { +.message-Success, .notifications { background:#e6f1c9; /* green */ border:1px solid #cfe493; color:#062232; } +.message-Information { + background:#d9edf7; /* blue */ + border:1px solid #bce8f1; + color:#31708f; +} .message-Warning { background:#fdf5bc; /* yellow */ border:1px solid #ffea9b; diff --git a/src/Orchard.Web/Themes/TheThemeMachine/Styles/Site.css b/src/Orchard.Web/Themes/TheThemeMachine/Styles/Site.css index 2eca2b4c6..184a0e70d 100644 --- a/src/Orchard.Web/Themes/TheThemeMachine/Styles/Site.css +++ b/src/Orchard.Web/Themes/TheThemeMachine/Styles/Site.css @@ -494,7 +494,8 @@ nav ul.breadcrumb /* Confirmations */ .message, .validation-summary-errors { margin:10px 0 4px 0; padding:4px; } .messages a { font-weight:bold; } -.message-Information { background:#e6f1c9; /* green */ border:1px solid #cfe493; color:#062232; } +.message-Success { background:#e6f1c9; /* green */ border:1px solid #cfe493; color:#062232; } +.message-Information { background:#d9edf7; /* blue */ border:1px solid #bce8f1; color:#31708f; } .message-Warning { background:#fdf5bc; /* yellow */ border:1px solid #ffea9b; } .critical.message, .validation-summary-errors, .message-Error { background:#e68585; /* red */ border:1px solid #990808; color:#fff; } diff --git a/src/Orchard/UI/Notify/NotifierExtensions.cs b/src/Orchard/UI/Notify/NotifierExtensions.cs index 1b1796029..77af8a447 100644 --- a/src/Orchard/UI/Notify/NotifierExtensions.cs +++ b/src/Orchard/UI/Notify/NotifierExtensions.cs @@ -28,5 +28,14 @@ namespace Orchard.UI.Notify { public static void Error(this INotifier notifier, LocalizedString message) { notifier.Add(NotifyType.Error, message); } + + /// + /// Adds a new UI notification of type Success + /// + /// + /// A localized message to display + public static void Success(this INotifier notifier, LocalizedString message) { + notifier.Add(NotifyType.Success, message); + } } } \ No newline at end of file diff --git a/src/Orchard/UI/Notify/NotifyEntry.cs b/src/Orchard/UI/Notify/NotifyEntry.cs index 6bec260aa..1baf0bbc3 100644 --- a/src/Orchard/UI/Notify/NotifyEntry.cs +++ b/src/Orchard/UI/Notify/NotifyEntry.cs @@ -4,7 +4,8 @@ namespace Orchard.UI.Notify { public enum NotifyType { Information, Warning, - Error + Error, + Success } public class NotifyEntry { From 4cda6672f9da7eff0daa8b88ccb88d14f9c73b43 Mon Sep 17 00:00:00 2001 From: Szymon Seliga Date: Tue, 22 Mar 2016 21:19:09 +0100 Subject: [PATCH 2/3] Revert "#6140 Added NotifyType.Success and replaced most usages of NotifyType.Information with it. Added appropriate styles in css files." This reverts commit dd37d8693cbc78852abd7f39bdf339e6859536ea. --- src/Orchard.Tests/UI/Notify/NotifierTests.cs | 4 +-- .../Contents/Controllers/AdminController.cs | 18 ++++++------ .../Navigation/Controllers/AdminController.cs | 2 +- .../Settings/Controllers/AdminController.cs | 2 +- .../Controllers/AdminController.cs | 6 ++-- .../Controllers/ContentController.cs | 2 +- .../Controllers/RecycleBinController.cs | 6 ++-- .../Controllers/AssetController.cs | 4 +-- .../Controllers/JobController.cs | 6 ++-- .../Controllers/MediaController.cs | 2 +- .../Controllers/SettingsController.cs | 8 +++--- .../Drivers/CloudVideoPartDriver.cs | 2 +- .../Controllers/BlogAdminController.cs | 6 ++-- .../Controllers/BlogPostAdminController.cs | 16 +++++------ .../Controllers/CommentController.cs | 10 +++---- .../Drivers/CommentPartDriver.cs | 8 +++--- .../Controllers/AdminController.cs | 28 +++++++++---------- .../Controllers/ItemController.cs | 2 +- .../Controllers/DashboardController.cs | 6 ++-- .../Controllers/SubmissionAdminController.cs | 4 +-- .../Handlers/FormSubmissionCoordinator.cs | 2 +- .../Controllers/AdminController.cs | 2 +- .../Services/IndexingService.cs | 6 ++-- .../Controllers/BlueprintAdminController.cs | 8 +++--- .../Orchard.Layouts/Styles/admin-dialog.css | 7 +---- .../Controllers/AdminController.cs | 22 +++++++-------- .../Controllers/AdminController.cs | 2 +- .../Controllers/AdminController.cs | 16 +++++------ .../Controllers/FolderController.cs | 6 ++-- .../MediaFileName/MediaFileNameDriver.cs | 3 +- .../Controllers/AdminController.cs | 2 +- .../Controllers/FilterController.cs | 2 +- .../Controllers/AdminController.cs | 4 +-- .../Orchard.Modules/Services/ModuleService.cs | 4 +-- .../Controllers/AdminController.cs | 2 +- .../Controllers/AdminController.cs | 2 +- .../Controllers/GalleryController.cs | 4 +-- .../PackagingServicesController.cs | 10 +++---- .../Services/PackageInstaller.cs | 6 ++-- .../Controllers/AdminController.cs | 2 +- .../Controllers/BindingController.cs | 10 +++---- .../Controllers/FilterController.cs | 2 +- .../Controllers/LayoutController.cs | 6 ++-- .../Controllers/PropertyController.cs | 2 +- .../Controllers/SortCriteriaController.cs | 2 +- .../Controllers/AdminController.cs | 4 +-- .../Controllers/ActionController.cs | 2 +- .../Controllers/AdminController.cs | 8 +++--- .../Controllers/EventController.cs | 2 +- .../Controllers/AdminController.cs | 2 +- .../Controllers/TermAdminController.cs | 6 ++-- .../Drivers/TaxonomyFieldDriver.cs | 2 +- .../Controllers/AdminController.cs | 6 ++-- .../Controllers/AdminController.cs | 2 +- .../Orchard.Themes/Services/ThemeService.cs | 4 +-- .../Controllers/AdminController.cs | 13 +++++---- .../Controllers/AdminController.cs | 2 +- .../Controllers/AdminController.cs | 12 ++++---- .../Controllers/AdminController.cs | 8 +++--- .../Controllers/ContentPickerController.cs | 4 +-- .../Upgrade/Controllers/FieldController.cs | 4 +-- .../Upgrade/Controllers/InfosetController.cs | 4 +-- .../Upgrade/Controllers/MenuController.cs | 4 +-- .../Controllers/MessagingController.cs | 2 +- .../Upgrade/Controllers/RouteController.cs | 2 +- .../Upgrade/Controllers/TaxonomyController.cs | 2 +- .../Themes/SafeMode/Styles/site.css | 7 +---- .../Themes/TheAdmin/Styles/site.css | 7 +---- .../Themes/TheThemeMachine/Styles/Site.css | 3 +- src/Orchard/UI/Notify/NotifierExtensions.cs | 9 ------ src/Orchard/UI/Notify/NotifyEntry.cs | 3 +- 71 files changed, 186 insertions(+), 214 deletions(-) diff --git a/src/Orchard.Tests/UI/Notify/NotifierTests.cs b/src/Orchard.Tests/UI/Notify/NotifierTests.cs index 916c58d33..a439b0653 100644 --- a/src/Orchard.Tests/UI/Notify/NotifierTests.cs +++ b/src/Orchard.Tests/UI/Notify/NotifierTests.cs @@ -14,13 +14,11 @@ namespace Orchard.Tests.UI.Notify { notifier.Warning(T("Hello world")); notifier.Information(T("More Info")); notifier.Error(T("Boom")); - notifier.Success(T("Success")); - Assert.That(notifier.List(), Has.Count.EqualTo(4)); + Assert.That(notifier.List(), Has.Count.EqualTo(3)); Assert.That(notifier.List(), Has.Some.Property("Message").EqualTo(T("Hello world"))); Assert.That(notifier.List(), Has.Some.Property("Message").EqualTo(T("More Info"))); Assert.That(notifier.List(), Has.Some.Property("Message").EqualTo(T("Boom"))); - Assert.That(notifier.List(), Has.Some.Property("Message").EqualTo(T("Success"))); } } } \ No newline at end of file diff --git a/src/Orchard.Web/Core/Contents/Controllers/AdminController.cs b/src/Orchard.Web/Core/Contents/Controllers/AdminController.cs index 39d44e50c..4437ab0e1 100644 --- a/src/Orchard.Web/Core/Contents/Controllers/AdminController.cs +++ b/src/Orchard.Web/Core/Contents/Controllers/AdminController.cs @@ -193,7 +193,7 @@ namespace Orchard.Core.Contents.Controllers { _contentManager.Publish(item); } - Services.Notifier.Success(T("Content successfully published.")); + Services.Notifier.Information(T("Content successfully published.")); break; case ContentsBulkAction.Unpublish: foreach (var item in checkedContentItems) { @@ -204,7 +204,7 @@ namespace Orchard.Core.Contents.Controllers { _contentManager.Unpublish(item); } - Services.Notifier.Success(T("Content successfully unpublished.")); + Services.Notifier.Information(T("Content successfully unpublished.")); break; case ContentsBulkAction.Remove: foreach (var item in checkedContentItems) { @@ -215,7 +215,7 @@ namespace Orchard.Core.Contents.Controllers { _contentManager.Remove(item); } - Services.Notifier.Success(T("Content successfully removed.")); + Services.Notifier.Information(T("Content successfully removed.")); break; default: throw new ArgumentOutOfRangeException(); @@ -296,7 +296,7 @@ namespace Orchard.Core.Contents.Controllers { conditionallyPublish(contentItem); - Services.Notifier.Success(string.IsNullOrWhiteSpace(contentItem.TypeDefinition.DisplayName) + Services.Notifier.Information(string.IsNullOrWhiteSpace(contentItem.TypeDefinition.DisplayName) ? T("Your content has been created.") : T("Your {0} has been created.", contentItem.TypeDefinition.DisplayName)); if (!string.IsNullOrEmpty(returnUrl)) { @@ -375,7 +375,7 @@ namespace Orchard.Core.Contents.Controllers { returnUrl = Url.ItemDisplayUrl(contentItem); } - Services.Notifier.Success(string.IsNullOrWhiteSpace(contentItem.TypeDefinition.DisplayName) + Services.Notifier.Information(string.IsNullOrWhiteSpace(contentItem.TypeDefinition.DisplayName) ? T("Your content has been saved.") : T("Your {0} has been saved.", contentItem.TypeDefinition.DisplayName)); @@ -400,7 +400,7 @@ namespace Orchard.Core.Contents.Controllers { return this.RedirectLocal(returnUrl, () => RedirectToAction("List")); } - Services.Notifier.Success(T("Successfully cloned. The clone was saved as a draft.")); + Services.Notifier.Information(T("Successfully cloned. The clone was saved as a draft.")); return this.RedirectLocal(returnUrl, () => RedirectToAction("List")); } @@ -414,7 +414,7 @@ namespace Orchard.Core.Contents.Controllers { if (contentItem != null) { _contentManager.Remove(contentItem); - Services.Notifier.Success(string.IsNullOrWhiteSpace(contentItem.TypeDefinition.DisplayName) + Services.Notifier.Information(string.IsNullOrWhiteSpace(contentItem.TypeDefinition.DisplayName) ? T("That content has been removed.") : T("That {0} has been removed.", contentItem.TypeDefinition.DisplayName)); } @@ -433,7 +433,7 @@ namespace Orchard.Core.Contents.Controllers { _contentManager.Publish(contentItem); - Services.Notifier.Success(string.IsNullOrWhiteSpace(contentItem.TypeDefinition.DisplayName) ? T("That content has been published.") : T("That {0} has been published.", contentItem.TypeDefinition.DisplayName)); + Services.Notifier.Information(string.IsNullOrWhiteSpace(contentItem.TypeDefinition.DisplayName) ? T("That content has been published.") : T("That {0} has been published.", contentItem.TypeDefinition.DisplayName)); return this.RedirectLocal(returnUrl, () => RedirectToAction("List")); } @@ -449,7 +449,7 @@ namespace Orchard.Core.Contents.Controllers { _contentManager.Unpublish(contentItem); - Services.Notifier.Success(string.IsNullOrWhiteSpace(contentItem.TypeDefinition.DisplayName) ? T("That content has been unpublished.") : T("That {0} has been unpublished.", contentItem.TypeDefinition.DisplayName)); + Services.Notifier.Information(string.IsNullOrWhiteSpace(contentItem.TypeDefinition.DisplayName) ? T("That content has been unpublished.") : T("That {0} has been unpublished.", contentItem.TypeDefinition.DisplayName)); return this.RedirectLocal(returnUrl, () => RedirectToAction("List")); } diff --git a/src/Orchard.Web/Core/Navigation/Controllers/AdminController.cs b/src/Orchard.Web/Core/Navigation/Controllers/AdminController.cs index b173fab71..d807b1eac 100644 --- a/src/Orchard.Web/Core/Navigation/Controllers/AdminController.cs +++ b/src/Orchard.Web/Core/Navigation/Controllers/AdminController.cs @@ -227,7 +227,7 @@ namespace Orchard.Core.Navigation.Controllers { return View(model); } - Services.Notifier.Success(T("Your {0} has been added.", menuPart.TypeDefinition.DisplayName)); + Services.Notifier.Information(T("Your {0} has been added.", menuPart.TypeDefinition.DisplayName)); return this.RedirectLocal(returnUrl, () => RedirectToAction("Index")); } diff --git a/src/Orchard.Web/Core/Settings/Controllers/AdminController.cs b/src/Orchard.Web/Core/Settings/Controllers/AdminController.cs index c7e9dcd68..2fc607a04 100644 --- a/src/Orchard.Web/Core/Settings/Controllers/AdminController.cs +++ b/src/Orchard.Web/Core/Settings/Controllers/AdminController.cs @@ -82,7 +82,7 @@ namespace Orchard.Core.Settings.Controllers { return View(model); } - Services.Notifier.Success(T("Settings updated")); + Services.Notifier.Information(T("Settings updated")); return RedirectToAction("Index"); } diff --git a/src/Orchard.Web/Modules/Orchard.Alias/Controllers/AdminController.cs b/src/Orchard.Web/Modules/Orchard.Alias/Controllers/AdminController.cs index 41d7b76b6..0d2759b81 100644 --- a/src/Orchard.Web/Modules/Orchard.Alias/Controllers/AdminController.cs +++ b/src/Orchard.Web/Modules/Orchard.Alias/Controllers/AdminController.cs @@ -181,7 +181,7 @@ namespace Orchard.Alias.Controllers { return View(); } - Services.Notifier.Success(T("Alias {0} created", aliasPath)); + Services.Notifier.Information(T("Alias {0} created", aliasPath)); return RedirectToAction("IndexUnmanaged"); } @@ -251,7 +251,7 @@ namespace Orchard.Alias.Controllers { _aliasService.Delete(path == "/" ? String.Empty : path); } - Services.Notifier.Success(T("Alias {0} updated", path)); + Services.Notifier.Information(T("Alias {0} updated", path)); return RedirectToAction("IndexUnmanaged"); } @@ -267,7 +267,7 @@ namespace Orchard.Alias.Controllers { _aliasService.Delete(path); - Services.Notifier.Success(T("Alias {0} deleted", path)); + Services.Notifier.Information(T("Alias {0} deleted", path)); return this.RedirectLocal(returnUrl, Url.Action("IndexUnmanaged")); } diff --git a/src/Orchard.Web/Modules/Orchard.AuditTrail/Controllers/ContentController.cs b/src/Orchard.Web/Modules/Orchard.AuditTrail/Controllers/ContentController.cs index 960b6fe24..43a67cade 100644 --- a/src/Orchard.Web/Modules/Orchard.AuditTrail/Controllers/ContentController.cs +++ b/src/Orchard.Web/Modules/Orchard.AuditTrail/Controllers/ContentController.cs @@ -54,7 +54,7 @@ namespace Orchard.AuditTrail.Controllers { var restoredContentItem = _contentManager.Restore(contentItem, VersionOptions.Restore(version, publish: !draftable)); var restoredContentItemTitle = _contentManager.GetItemMetadata(restoredContentItem).DisplayText; - _notifier.Success(T(""{0}" has been restored.", restoredContentItemTitle)); + _notifier.Information(T(""{0}" has been restored.", restoredContentItemTitle)); return this.RedirectReturn(returnUrl, () => Url.Action("Index", "Admin")); } diff --git a/src/Orchard.Web/Modules/Orchard.AuditTrail/Controllers/RecycleBinController.cs b/src/Orchard.Web/Modules/Orchard.AuditTrail/Controllers/RecycleBinController.cs index 79dfe114e..967b6f96a 100644 --- a/src/Orchard.Web/Modules/Orchard.AuditTrail/Controllers/RecycleBinController.cs +++ b/src/Orchard.Web/Modules/Orchard.AuditTrail/Controllers/RecycleBinController.cs @@ -56,7 +56,7 @@ namespace Orchard.AuditTrail.Controllers { var restoredContentItem = _recycleBin.Restore(contentItem); var restoredContentItemTitle = _contentManager.GetItemMetadata(restoredContentItem).DisplayText; - _notifier.Success(T(""{0}" has been restored.", restoredContentItemTitle)); + _notifier.Information(T(""{0}" has been restored.", restoredContentItemTitle)); return this.RedirectReturn(returnUrl, () => Url.Action("Index", "RecycleBin")); } @@ -115,7 +115,7 @@ namespace Orchard.AuditTrail.Controllers { } _recycleBin.Restore(contentItem); - _notifier.Success(T(""{0}" has been restored.", contentItemTitle)); + _notifier.Information(T(""{0}" has been restored.", contentItemTitle)); } } @@ -131,7 +131,7 @@ namespace Orchard.AuditTrail.Controllers { try { _contentManager.Destroy(contentItem); - _notifier.Success(T(""{0}" has been permanently deleted.", contentItemTitle)); + _notifier.Information(T(""{0}" has been permanently deleted.", contentItemTitle)); } catch (Exception ex) { Logger.Error(ex, "An exception occurred while trying to permanently delete content with ID {0}.", contentItem.Id); diff --git a/src/Orchard.Web/Modules/Orchard.Azure.MediaServices/Controllers/AssetController.cs b/src/Orchard.Web/Modules/Orchard.Azure.MediaServices/Controllers/AssetController.cs index 3354a121c..57892711d 100644 --- a/src/Orchard.Web/Modules/Orchard.Azure.MediaServices/Controllers/AssetController.cs +++ b/src/Orchard.Web/Modules/Orchard.Azure.MediaServices/Controllers/AssetController.cs @@ -108,7 +108,7 @@ namespace Orchard.Azure.MediaServices.Controllers { return View(viewModel); } - _notifier.Success(T("The Asset has been saved.")); + _notifier.Information(T("The Asset has been saved.")); return RedirectToAction("Edit", new { id = id }); }); } @@ -141,7 +141,7 @@ namespace Orchard.Azure.MediaServices.Controllers { _assetManager.DeleteAsset(asset); Logger.Information("Asset with ID {0} was deleted.", id); - _notifier.Success(T("The asset '{0}' was successfully deleted.", asset.Name)); + _notifier.Information(T("The asset '{0}' was successfully deleted.", asset.Name)); } catch (Exception ex) { _transactionManager.Cancel(); diff --git a/src/Orchard.Web/Modules/Orchard.Azure.MediaServices/Controllers/JobController.cs b/src/Orchard.Web/Modules/Orchard.Azure.MediaServices/Controllers/JobController.cs index a4448cb1a..bf50b9438 100644 --- a/src/Orchard.Web/Modules/Orchard.Azure.MediaServices/Controllers/JobController.cs +++ b/src/Orchard.Web/Modules/Orchard.Azure.MediaServices/Controllers/JobController.cs @@ -156,7 +156,7 @@ namespace Orchard.Azure.MediaServices.Controllers { }); Logger.Information("Job was created with task of type {0} on cloud video item with ID {1}.", task, id); - _notifier.Success(T("The job '{0}' was successfully created.", job.Name)); + _notifier.Information(T("The job '{0}' was successfully created.", job.Name)); return Redirect(Url.ItemEditUrl(cloudVideoPart)); } @@ -187,7 +187,7 @@ namespace Orchard.Azure.MediaServices.Controllers { job.Status = JobStatus.Archived; Logger.Information("Job with ID {0} was archived.", id); - _notifier.Success(T("The job '{0}' was successfully archived.", job.Name)); + _notifier.Information(T("The job '{0}' was successfully archived.", job.Name)); return RedirectToReturnUrl(returnUrl, Url.ItemEditUrl(job.CloudVideoPart)); } @@ -212,7 +212,7 @@ namespace Orchard.Azure.MediaServices.Controllers { wamsJob.Cancel(); Logger.Information("Job with ID {0} was canceled.", id); - _notifier.Success(T("The job '{0}' was successfully canceled.", job.Name)); + _notifier.Information(T("The job '{0}' was successfully canceled.", job.Name)); } catch (Exception ex) { _transactionManager.Cancel(); diff --git a/src/Orchard.Web/Modules/Orchard.Azure.MediaServices/Controllers/MediaController.cs b/src/Orchard.Web/Modules/Orchard.Azure.MediaServices/Controllers/MediaController.cs index e77fc4a11..caf05adda 100644 --- a/src/Orchard.Web/Modules/Orchard.Azure.MediaServices/Controllers/MediaController.cs +++ b/src/Orchard.Web/Modules/Orchard.Azure.MediaServices/Controllers/MediaController.cs @@ -148,7 +148,7 @@ namespace Orchard.Azure.MediaServices.Controllers { _contentManager.Publish(mediaPart.ContentItem); Logger.Information("Cloud video item with ID {0} was saved.", part.Id); - _notifier.Success(notification); + _notifier.Information(notification); } catch (Exception ex) { _transactionManager.Cancel(); diff --git a/src/Orchard.Web/Modules/Orchard.Azure.MediaServices/Controllers/SettingsController.cs b/src/Orchard.Web/Modules/Orchard.Azure.MediaServices/Controllers/SettingsController.cs index e942e7686..97a086052 100644 --- a/src/Orchard.Web/Modules/Orchard.Azure.MediaServices/Controllers/SettingsController.cs +++ b/src/Orchard.Web/Modules/Orchard.Azure.MediaServices/Controllers/SettingsController.cs @@ -94,7 +94,7 @@ namespace Orchard.Azure.MediaServices.Controllers { return View("Index", viewModel); } else { - _services.Notifier.Success(T("The new account credentials were successfully verified.")); + _services.Notifier.Information(T("The new account credentials were successfully verified.")); } } } @@ -132,7 +132,7 @@ namespace Orchard.Azure.MediaServices.Controllers { if (addedOrigins.Any()) { Logger.Information("CORS rules were added to the configured storage account for the following URLs: {0}.", String.Join("; ", addedOrigins)); - _services.Notifier.Success(T("CORS rules have been configured on your storage account for the following URLs: {0}.", String.Join("; ", addedOrigins))); + _services.Notifier.Information(T("CORS rules have been configured on your storage account for the following URLs: {0}.", String.Join("; ", addedOrigins))); } } catch (Exception ex) { @@ -143,7 +143,7 @@ namespace Orchard.Azure.MediaServices.Controllers { } Logger.Information("Module settings were saved."); - _services.Notifier.Success(T("The settings were saved successfully.")); + _services.Notifier.Information(T("The settings were saved successfully.")); return RedirectToAction("Index"); } @@ -156,7 +156,7 @@ namespace Orchard.Azure.MediaServices.Controllers { Logger.Debug("User requested to verify WAMS account credentials."); if (TestCredentialsInternal(viewModel.General.WamsAccountName, viewModel.General.WamsAccountKey, viewModel.General.StorageAccountKey)) { - _services.Notifier.Success(T("The account credentials were successfully verified.")); + _services.Notifier.Information(T("The account credentials were successfully verified.")); } else { _services.Notifier.Error(T("The account credentials verification failed.")); diff --git a/src/Orchard.Web/Modules/Orchard.Azure.MediaServices/Drivers/CloudVideoPartDriver.cs b/src/Orchard.Web/Modules/Orchard.Azure.MediaServices/Drivers/CloudVideoPartDriver.cs index 7176a4cc9..b1b7dd83f 100644 --- a/src/Orchard.Web/Modules/Orchard.Azure.MediaServices/Drivers/CloudVideoPartDriver.cs +++ b/src/Orchard.Web/Modules/Orchard.Azure.MediaServices/Drivers/CloudVideoPartDriver.cs @@ -96,7 +96,7 @@ namespace Orchard.Azure.MediaServices.Drivers { var unpublish = httpContext.Request.Form["submit.Save"] == "submit.Unpublish"; if (unpublish) { _services.ContentManager.Unpublish(part.ContentItem); - _services.Notifier.Success(T("Your {0} has been unpublished.", part.ContentItem.TypeDefinition.DisplayName)); + _services.Notifier.Information(T("Your {0} has been unpublished.", part.ContentItem.TypeDefinition.DisplayName)); } if (part.IsPublished()) diff --git a/src/Orchard.Web/Modules/Orchard.Blogs/Controllers/BlogAdminController.cs b/src/Orchard.Web/Modules/Orchard.Blogs/Controllers/BlogAdminController.cs index ea7fe53aa..001ef9fbf 100644 --- a/src/Orchard.Web/Modules/Orchard.Blogs/Controllers/BlogAdminController.cs +++ b/src/Orchard.Web/Modules/Orchard.Blogs/Controllers/BlogAdminController.cs @@ -101,7 +101,7 @@ namespace Orchard.Blogs.Controllers { return HttpNotFound(); _blogService.Delete(blog); - Services.Notifier.Success(T("Blog deleted")); + Services.Notifier.Information(T("Blog deleted")); return Redirect(Url.BlogsForAdmin()); } @@ -125,7 +125,7 @@ namespace Orchard.Blogs.Controllers { } _contentManager.Publish(blog); - Services.Notifier.Success(T("Blog information updated")); + Services.Notifier.Information(T("Blog information updated")); return Redirect(Url.BlogsForAdmin()); } @@ -142,7 +142,7 @@ namespace Orchard.Blogs.Controllers { _blogService.Delete(blog); - Services.Notifier.Success(T("Blog was successfully deleted")); + Services.Notifier.Information(T("Blog was successfully deleted")); return Redirect(Url.BlogsForAdmin()); } diff --git a/src/Orchard.Web/Modules/Orchard.Blogs/Controllers/BlogPostAdminController.cs b/src/Orchard.Web/Modules/Orchard.Blogs/Controllers/BlogPostAdminController.cs index 9a3a46c3f..bc389815a 100644 --- a/src/Orchard.Web/Modules/Orchard.Blogs/Controllers/BlogPostAdminController.cs +++ b/src/Orchard.Web/Modules/Orchard.Blogs/Controllers/BlogPostAdminController.cs @@ -94,7 +94,7 @@ namespace Orchard.Blogs.Controllers { Services.ContentManager.Publish(blogPost.ContentItem); } - Services.Notifier.Success(T("Your {0} has been created.", blogPost.TypeDefinition.DisplayName)); + Services.Notifier.Information(T("Your {0} has been created.", blogPost.TypeDefinition.DisplayName)); return Redirect(Url.BlogPostEdit(blogPost)); } @@ -165,7 +165,7 @@ namespace Orchard.Blogs.Controllers { conditionallyPublish(blogPost.ContentItem); - Services.Notifier.Success(T("Your {0} has been saved.", blogPost.TypeDefinition.DisplayName)); + Services.Notifier.Information(T("Your {0} has been saved.", blogPost.TypeDefinition.DisplayName)); return this.RedirectLocal(returnUrl, Url.BlogPostEdit(blogPost)); } @@ -175,7 +175,7 @@ namespace Orchard.Blogs.Controllers { // get the current draft version var draft = Services.ContentManager.Get(id, VersionOptions.Draft); if (draft == null) { - Services.Notifier.Warning(T("There is no draft to discard.")); + Services.Notifier.Information(T("There is no draft to discard.")); return RedirectToEdit(id); } @@ -186,7 +186,7 @@ namespace Orchard.Blogs.Controllers { // locate the published revision to revert onto var published = Services.ContentManager.Get(id, VersionOptions.Published); if (published == null) { - Services.Notifier.Error(T("Can not discard draft on unpublished blog post.")); + Services.Notifier.Information(T("Can not discard draft on unpublished blog post.")); return RedirectToEdit(draft); } @@ -195,7 +195,7 @@ namespace Orchard.Blogs.Controllers { draft.VersionRecord.Latest = false; published.VersionRecord.Latest = true; - Services.Notifier.Success(T("Blog post draft version discarded")); + Services.Notifier.Information(T("Blog post draft version discarded")); return RedirectToEdit(published); } @@ -225,7 +225,7 @@ namespace Orchard.Blogs.Controllers { return new HttpUnauthorizedResult(); _blogPostService.Delete(post); - Services.Notifier.Success(T("Blog post was successfully deleted")); + Services.Notifier.Information(T("Blog post was successfully deleted")); return Redirect(Url.BlogForAdmin(blog.As())); } @@ -244,7 +244,7 @@ namespace Orchard.Blogs.Controllers { return new HttpUnauthorizedResult(); _blogPostService.Publish(post); - Services.Notifier.Success(T("Blog post successfully published.")); + Services.Notifier.Information(T("Blog post successfully published.")); return Redirect(Url.BlogForAdmin(blog.As())); } @@ -263,7 +263,7 @@ namespace Orchard.Blogs.Controllers { return new HttpUnauthorizedResult(); _blogPostService.Unpublish(post); - Services.Notifier.Success(T("Blog post successfully unpublished.")); + Services.Notifier.Information(T("Blog post successfully unpublished.")); return Redirect(Url.BlogForAdmin(blog.As())); } diff --git a/src/Orchard.Web/Modules/Orchard.Comments/Controllers/CommentController.cs b/src/Orchard.Web/Modules/Orchard.Comments/Controllers/CommentController.cs index a239e3c5c..4e62661c4 100644 --- a/src/Orchard.Web/Modules/Orchard.Comments/Controllers/CommentController.cs +++ b/src/Orchard.Web/Modules/Orchard.Comments/Controllers/CommentController.cs @@ -105,14 +105,14 @@ namespace Orchard.Comments.Controllers { // if the user who submitted the comment has the right to moderate, don't make this comment moderated if (Services.Authorizer.Authorize(Permissions.ManageComments)) { commentPart.Status = CommentStatus.Approved; - Services.Notifier.Success(T("Your comment has been posted.")); + Services.Notifier.Information(T("Your comment has been posted.")); } else { Services.Notifier.Information(T("Your comment will appear after the site administrator approves it.")); } } else { - Services.Notifier.Success(T("Your comment has been posted.")); + Services.Notifier.Information(T("Your comment has been posted.")); } // send email notification @@ -141,7 +141,7 @@ namespace Orchard.Comments.Controllers { _commentService.ApproveComment(id); } - Services.Notifier.Success(T("Comment approved successfully")); + Services.Notifier.Information(T("Comment approved successfully")); return Redirect("~/"); } @@ -151,7 +151,7 @@ namespace Orchard.Comments.Controllers { _commentService.DeleteComment(id); } - Services.Notifier.Success(T("Comment deleted successfully")); + Services.Notifier.Information(T("Comment deleted successfully")); return Redirect("~/"); } @@ -161,7 +161,7 @@ namespace Orchard.Comments.Controllers { _commentService.UnapproveComment(id); } - Services.Notifier.Success(T("Comment moderated successfully")); + Services.Notifier.Information(T("Comment moderated successfully")); return Redirect("~/"); } diff --git a/src/Orchard.Web/Modules/Orchard.Comments/Drivers/CommentPartDriver.cs b/src/Orchard.Web/Modules/Orchard.Comments/Drivers/CommentPartDriver.cs index cd79d4b4f..6f967bd7b 100644 --- a/src/Orchard.Web/Modules/Orchard.Comments/Drivers/CommentPartDriver.cs +++ b/src/Orchard.Web/Modules/Orchard.Comments/Drivers/CommentPartDriver.cs @@ -68,7 +68,7 @@ namespace Orchard.Comments.Drivers { if (!string.IsNullOrEmpty(name) && String.Equals(name, "moderate", StringComparison.OrdinalIgnoreCase)) { if (_orchardServices.Authorizer.Authorize(Permissions.ManageComments, T("Couldn't moderate comment"))) { _commentService.UnapproveComment(part.Id); - _orchardServices.Notifier.Success(T("Comment successfully moderated.")); + _orchardServices.Notifier.Information(T("Comment successfully moderated.")); return Editor(part, shapeHelper); } } @@ -76,7 +76,7 @@ namespace Orchard.Comments.Drivers { if (!string.IsNullOrEmpty(name) && String.Equals(name, "approve", StringComparison.OrdinalIgnoreCase)) { if (_orchardServices.Authorizer.Authorize(Permissions.ManageComments, T("Couldn't approve comment"))) { _commentService.ApproveComment(part.Id); - _orchardServices.Notifier.Success(T("Comment approved.")); + _orchardServices.Notifier.Information(T("Comment approved.")); return Editor(part, shapeHelper); } } @@ -84,14 +84,14 @@ namespace Orchard.Comments.Drivers { if (!string.IsNullOrEmpty(name) && String.Equals(name, "delete", StringComparison.OrdinalIgnoreCase)) { if (_orchardServices.Authorizer.Authorize(Permissions.ManageComments, T("Couldn't delete comment"))) { _commentService.DeleteComment(part.Id); - _orchardServices.Notifier.Success(T("Comment successfully deleted.")); + _orchardServices.Notifier.Information(T("Comment successfully deleted.")); return Editor(part, shapeHelper); } } // if editing from the admin, don't update the owner or the status if (!string.IsNullOrEmpty(name) && String.Equals(name, "save", StringComparison.OrdinalIgnoreCase)) { - _orchardServices.Notifier.Success(T("Comment saved.")); + _orchardServices.Notifier.Information(T("Comment saved.")); return Editor(part, shapeHelper); } diff --git a/src/Orchard.Web/Modules/Orchard.ContentTypes/Controllers/AdminController.cs b/src/Orchard.Web/Modules/Orchard.ContentTypes/Controllers/AdminController.cs index dbb560b02..ee8d623c5 100644 --- a/src/Orchard.Web/Modules/Orchard.ContentTypes/Controllers/AdminController.cs +++ b/src/Orchard.Web/Modules/Orchard.ContentTypes/Controllers/AdminController.cs @@ -108,7 +108,7 @@ namespace Orchard.ContentTypes.Controllers { var typeViewModel = new EditTypeViewModel(contentTypeDefinition); - Services.Notifier.Success(T("The \"{0}\" content type has been created.", typeViewModel.DisplayName)); + Services.Notifier.Information(T("The \"{0}\" content type has been created.", typeViewModel.DisplayName)); return RedirectToAction("AddPartsTo", new { id = typeViewModel.Name }); } @@ -252,7 +252,7 @@ namespace Orchard.ContentTypes.Controllers { return View(typeViewModel); } - Services.Notifier.Success(T("\"{0}\" settings have been saved.", typeViewModel.DisplayName)); + Services.Notifier.Information(T("\"{0}\" settings have been saved.", typeViewModel.DisplayName)); return RedirectToAction("Edit", new { id }); } @@ -270,7 +270,7 @@ namespace Orchard.ContentTypes.Controllers { _contentDefinitionService.RemoveType(id, true); - Services.Notifier.Success(T("\"{0}\" has been removed.", typeViewModel.DisplayName)); + Services.Notifier.Information(T("\"{0}\" has been removed.", typeViewModel.DisplayName)); return RedirectToAction("List"); } @@ -314,7 +314,7 @@ namespace Orchard.ContentTypes.Controllers { var partsToAdd = viewModel.PartSelections.Where(ps => ps.IsSelected).Select(ps => ps.PartName); foreach (var partToAdd in partsToAdd) { _contentDefinitionService.AddPartToType(partToAdd, typeViewModel.Name); - Services.Notifier.Success(T("The \"{0}\" part has been added.", partToAdd)); + Services.Notifier.Information(T("The \"{0}\" part has been added.", partToAdd)); } if (!ModelState.IsValid) { @@ -362,7 +362,7 @@ namespace Orchard.ContentTypes.Controllers { return View(viewModel); } - Services.Notifier.Success(T("The \"{0}\" part has been removed.", viewModel.Name)); + Services.Notifier.Information(T("The \"{0}\" part has been removed.", viewModel.Name)); return RedirectToAction("Edit", new {id}); } @@ -399,11 +399,11 @@ namespace Orchard.ContentTypes.Controllers { var partViewModel = _contentDefinitionService.AddPart(viewModel); if (partViewModel == null) { - Services.Notifier.Error(T("The content part could not be created.")); + Services.Notifier.Information(T("The content part could not be created.")); return View(viewModel); } - Services.Notifier.Success(T("The \"{0}\" content part has been created.", partViewModel.Name)); + Services.Notifier.Information(T("The \"{0}\" content part has been created.", partViewModel.Name)); return RedirectToAction("EditPart", new { id = partViewModel.Name }); } @@ -440,7 +440,7 @@ namespace Orchard.ContentTypes.Controllers { return View(partViewModel); } - Services.Notifier.Success(T("\"{0}\" settings have been saved.", partViewModel.Name)); + Services.Notifier.Information(T("\"{0}\" settings have been saved.", partViewModel.Name)); return RedirectToAction("ListParts"); } @@ -458,8 +458,8 @@ namespace Orchard.ContentTypes.Controllers { return HttpNotFound(); _contentDefinitionService.RemovePart(id); - - Services.Notifier.Success(T("\"{0}\" has been removed.", partViewModel.DisplayName)); + + Services.Notifier.Information(T("\"{0}\" has been removed.", partViewModel.DisplayName)); return RedirectToAction("ListParts"); } @@ -547,12 +547,12 @@ namespace Orchard.ContentTypes.Controllers { _contentDefinitionService.AddFieldToPart(viewModel.Name, viewModel.DisplayName, viewModel.FieldTypeName, partViewModel.Name); } catch (Exception ex) { - Services.Notifier.Error(T("The \"{0}\" field was not added. {1}", viewModel.DisplayName, ex.Message)); + Services.Notifier.Information(T("The \"{0}\" field was not added. {1}", viewModel.DisplayName, ex.Message)); Services.TransactionManager.Cancel(); return AddFieldTo(id); } - Services.Notifier.Success(T("The \"{0}\" field has been added.", viewModel.DisplayName)); + Services.Notifier.Information(T("The \"{0}\" field has been added.", viewModel.DisplayName)); if (typeViewModel != null) { return RedirectToAction("Edit", new {id}); @@ -626,7 +626,7 @@ namespace Orchard.ContentTypes.Controllers { _contentDefinitionService.AlterField(partViewModel, viewModel); - Services.Notifier.Success(T("Display name changed to {0}.", viewModel.DisplayName)); + Services.Notifier.Information(T("Display name changed to {0}.", viewModel.DisplayName)); // redirect to the type editor if a type exists with this name var typeViewModel = _contentDefinitionService.GetType(id); @@ -674,7 +674,7 @@ namespace Orchard.ContentTypes.Controllers { return View(viewModel); } - Services.Notifier.Success(T("The \"{0}\" field has been removed.", viewModel.Name)); + Services.Notifier.Information(T("The \"{0}\" field has been removed.", viewModel.Name)); if (_contentDefinitionService.GetType(id) != null) return RedirectToAction("Edit", new { id }); diff --git a/src/Orchard.Web/Modules/Orchard.CustomForms/Controllers/ItemController.cs b/src/Orchard.Web/Modules/Orchard.CustomForms/Controllers/ItemController.cs index d4f62b1db..ee278e0df 100644 --- a/src/Orchard.Web/Modules/Orchard.CustomForms/Controllers/ItemController.cs +++ b/src/Orchard.Web/Modules/Orchard.CustomForms/Controllers/ItemController.cs @@ -170,7 +170,7 @@ namespace Orchard.CustomForms.Controllers { // writes a confirmation message if (customForm.CustomMessage) { if (!String.IsNullOrWhiteSpace(customForm.Message)) { - Services.Notifier.Success(T(customForm.Message)); + Services.Notifier.Information(T(customForm.Message)); } } diff --git a/src/Orchard.Web/Modules/Orchard.Dashboards/Controllers/DashboardController.cs b/src/Orchard.Web/Modules/Orchard.Dashboards/Controllers/DashboardController.cs index 5e1d3d91f..e2bcb5343 100644 --- a/src/Orchard.Web/Modules/Orchard.Dashboards/Controllers/DashboardController.cs +++ b/src/Orchard.Web/Modules/Orchard.Dashboards/Controllers/DashboardController.cs @@ -48,7 +48,7 @@ namespace Orchard.Dashboards.Controllers { return UpdateDashboard(dashboard => { if (!dashboard.Has() && !dashboard.TypeDefinition.Settings.GetModel().Draftable) _services.ContentManager.Publish(dashboard); - _services.Notifier.Success(T("Your dashboard has been saved.")); + _services.Notifier.Information(T("Your dashboard has been saved.")); }); } @@ -61,7 +61,7 @@ namespace Orchard.Dashboards.Controllers { return UpdateDashboard(dashboard => { _services.ContentManager.Publish(dashboard); - _services.Notifier.Success(T("Your dashboard has been published.")); + _services.Notifier.Information(T("Your dashboard has been published.")); }); } @@ -79,7 +79,7 @@ namespace Orchard.Dashboards.Controllers { if (contentItem != null) conditonallyPublish(contentItem); else - _services.Notifier.Success(T("Your dashboard has been saved.")); + _services.Notifier.Information(T("Your dashboard has been saved.")); return RedirectToAction("Edit"); } diff --git a/src/Orchard.Web/Modules/Orchard.DynamicForms/Controllers/SubmissionAdminController.cs b/src/Orchard.Web/Modules/Orchard.DynamicForms/Controllers/SubmissionAdminController.cs index 8fe29f0e7..956d78c35 100644 --- a/src/Orchard.Web/Modules/Orchard.DynamicForms/Controllers/SubmissionAdminController.cs +++ b/src/Orchard.Web/Modules/Orchard.DynamicForms/Controllers/SubmissionAdminController.cs @@ -56,7 +56,7 @@ namespace Orchard.DynamicForms.Controllers { return HttpNotFound(); _formService.DeleteSubmission(submission); - _services.Notifier.Success(T("That submission has been deleted.")); + _services.Notifier.Information(T("That submission has been deleted.")); return Redirect(Request.UrlReferrer.ToString()); } @@ -69,7 +69,7 @@ namespace Orchard.DynamicForms.Controllers { } else { var numDeletedSubmissions = _formService.DeleteSubmissions(submissionIds); - _services.Notifier.Success(T("{0} submissions have been deleted.", numDeletedSubmissions)); + _services.Notifier.Information(T("{0} submissions have been deleted.", numDeletedSubmissions)); } return Redirect(Request.UrlReferrer.ToString()); diff --git a/src/Orchard.Web/Modules/Orchard.DynamicForms/Handlers/FormSubmissionCoordinator.cs b/src/Orchard.Web/Modules/Orchard.DynamicForms/Handlers/FormSubmissionCoordinator.cs index 87bf0ba6a..9bf6bc31d 100644 --- a/src/Orchard.Web/Modules/Orchard.DynamicForms/Handlers/FormSubmissionCoordinator.cs +++ b/src/Orchard.Web/Modules/Orchard.DynamicForms/Handlers/FormSubmissionCoordinator.cs @@ -54,7 +54,7 @@ namespace Orchard.DynamicForms.Handlers { // Notifiy. if (!String.IsNullOrWhiteSpace(form.Notification)) - _notifier.Success(T(_tokenizer.Replace(T(form.Notification).Text, tokenData))); + _notifier.Information(T(_tokenizer.Replace(T(form.Notification).Text, tokenData))); // Trigger workflow event. _workflowManager.TriggerEvent(DynamicFormSubmittedActivity.EventName, contentItem, () => tokenData); diff --git a/src/Orchard.Web/Modules/Orchard.Indexing/Controllers/AdminController.cs b/src/Orchard.Web/Modules/Orchard.Indexing/Controllers/AdminController.cs index 2f446f115..47c095d0b 100644 --- a/src/Orchard.Web/Modules/Orchard.Indexing/Controllers/AdminController.cs +++ b/src/Orchard.Web/Modules/Orchard.Indexing/Controllers/AdminController.cs @@ -80,7 +80,7 @@ namespace Orchard.Indexing.Controllers { try { provider.CreateIndex(id); - Services.Notifier.Success(T("Index named {0} created successfully", id)); + Services.Notifier.Information(T("Index named {0} created successfully", id)); } catch(Exception e) { Services.Notifier.Error(T("An error occured while creating the index: {0}", id)); diff --git a/src/Orchard.Web/Modules/Orchard.Indexing/Services/IndexingService.cs b/src/Orchard.Web/Modules/Orchard.Indexing/Services/IndexingService.cs index 0ac6d395d..c1289814a 100644 --- a/src/Orchard.Web/Modules/Orchard.Indexing/Services/IndexingService.cs +++ b/src/Orchard.Web/Modules/Orchard.Indexing/Services/IndexingService.cs @@ -36,7 +36,7 @@ namespace Orchard.Indexing.Services { } if(_indexingTaskExecutor.RebuildIndex(indexName)) { - Services.Notifier.Success(T("The index {0} has been rebuilt.", indexName)); + Services.Notifier.Information(T("The index {0} has been rebuilt.", indexName)); UpdateIndex(indexName); } else { @@ -53,7 +53,7 @@ namespace Orchard.Indexing.Services { } if (_indexingTaskExecutor.DeleteIndex(indexName)) { - Services.Notifier.Success(T("The index {0} has been deleted.", indexName)); + Services.Notifier.Information(T("The index {0} has been deleted.", indexName)); } else { Services.Notifier.Warning(T("The index {0} could not be deleted. It might already be in use, please try again later.", indexName)); @@ -67,7 +67,7 @@ namespace Orchard.Indexing.Services { handler.UpdateIndex(indexName); } - Services.Notifier.Success(T("The index {0} has been updated.", indexName)); + Services.Notifier.Information(T("The index {0} has been updated.", indexName)); } IndexEntry IIndexingService.GetIndexEntry(string indexName) { diff --git a/src/Orchard.Web/Modules/Orchard.Layouts/Controllers/BlueprintAdminController.cs b/src/Orchard.Web/Modules/Orchard.Layouts/Controllers/BlueprintAdminController.cs index b4425f933..6c5b8ae36 100644 --- a/src/Orchard.Web/Modules/Orchard.Layouts/Controllers/BlueprintAdminController.cs +++ b/src/Orchard.Web/Modules/Orchard.Layouts/Controllers/BlueprintAdminController.cs @@ -177,7 +177,7 @@ namespace Orchard.Layouts.Controllers { blueprint.BaseElementState = data.Serialize(); _signals.Trigger(Signals.ElementDescriptors); - _notifier.Success(T("That blueprint has been saved.")); + _notifier.Information(T("That blueprint has been saved.")); return RedirectToAction("Index"); } @@ -223,7 +223,7 @@ namespace Orchard.Layouts.Controllers { blueprint.ElementDescription = model.ElementDescription.TrimSafe(); blueprint.ElementCategory = model.ElementCategory.TrimSafe(); - _notifier.Success(T("That blueprint's properties have been saved.")); + _notifier.Information(T("That blueprint's properties have been saved.")); return RedirectToAction("Index"); } @@ -239,7 +239,7 @@ namespace Orchard.Layouts.Controllers { return HttpNotFound(); _elementBlueprintService.DeleteBlueprint(blueprint); - _notifier.Success(T("That blueprint has been deleted.")); + _notifier.Information(T("That blueprint has been deleted.")); return Redirect(Request.UrlReferrer.ToString()); } @@ -256,7 +256,7 @@ namespace Orchard.Layouts.Controllers { } else { var numDeletedBlueprints = _elementBlueprintService.DeleteBlueprints(blueprintIds); - _notifier.Success(T("{0} blueprints have been deleted.", numDeletedBlueprints)); + _notifier.Information(T("{0} blueprints have been deleted.", numDeletedBlueprints)); } return Redirect(Request.UrlReferrer.ToString()); diff --git a/src/Orchard.Web/Modules/Orchard.Layouts/Styles/admin-dialog.css b/src/Orchard.Web/Modules/Orchard.Layouts/Styles/admin-dialog.css index e78f8be21..fb974363f 100644 --- a/src/Orchard.Web/Modules/Orchard.Layouts/Styles/admin-dialog.css +++ b/src/Orchard.Web/Modules/Orchard.Layouts/Styles/admin-dialog.css @@ -537,16 +537,11 @@ span.message { border:1px solid #e5cece; /* red */ padding-left:26px; } -.message-Success, .notifications { +.message-Information, .notifications { background:#e6f1c9; /* green */ border:1px solid #cfe493; color:#062232; } -.message-Information { - background:#d9edf7; /* blue */ - border:1px solid #bce8f1; - color:#31708f; -} .message-Warning { background:#fdf5bc; /* yellow */ border:1px solid #ffea9b; diff --git a/src/Orchard.Web/Modules/Orchard.Lists/Controllers/AdminController.cs b/src/Orchard.Web/Modules/Orchard.Lists/Controllers/AdminController.cs index b29ace4e5..1adb0effe 100644 --- a/src/Orchard.Web/Modules/Orchard.Lists/Controllers/AdminController.cs +++ b/src/Orchard.Web/Modules/Orchard.Lists/Controllers/AdminController.cs @@ -135,7 +135,7 @@ namespace Orchard.Lists.Controllers { } _contentManager.Publish(item); } - _services.Notifier.Success(T("Lists successfully published.")); + _services.Notifier.Information(T("Lists successfully published.")); break; case ContentsBulkAction.Unpublish: foreach (var item in checkedContentItems) { @@ -145,7 +145,7 @@ namespace Orchard.Lists.Controllers { } _contentManager.Unpublish(item); } - _services.Notifier.Success(T("Lists successfully unpublished.")); + _services.Notifier.Information(T("Lists successfully unpublished.")); break; case ContentsBulkAction.Remove: foreach (var item in checkedContentItems) { @@ -155,7 +155,7 @@ namespace Orchard.Lists.Controllers { } _contentManager.Remove(item); } - _services.Notifier.Success(T("Lists successfully removed.")); + _services.Notifier.Information(T("Lists successfully removed.")); break; default: throw new ArgumentOutOfRangeException(); @@ -359,15 +359,15 @@ namespace Orchard.Lists.Controllers { switch (operation) { case ViewModels.ListOperation.Reverse: _containerService.Reverse(items); - _services.Notifier.Success(T("The list has been reversed.")); + _services.Notifier.Information(T("The list has been reversed.")); break; case ViewModels.ListOperation.Shuffle: _containerService.Shuffle(items); - _services.Notifier.Success(T("The list has been shuffled.")); + _services.Notifier.Information(T("The list has been shuffled.")); break; case ViewModels.ListOperation.Sort: _containerService.Sort(items, sortBy.GetValueOrDefault(), sortByDirection.GetValueOrDefault()); - _services.Notifier.Success(T("The list has been sorted.")); + _services.Notifier.Information(T("The list has been sorted.")); break; default: _services.Notifier.Error(T("Please select an operation to perform on the list.")); @@ -449,7 +449,7 @@ namespace Orchard.Lists.Controllers { _containerService.MoveItem(item, targetContainer); } - _services.Notifier.Success(T("Content successfully moved to {1}.", Url.Action("List", new { containerId = targetContainerId }), containerDisplayText)); + _services.Notifier.Information(T("Content successfully moved to {1}.", Url.Action("List", new { containerId = targetContainerId }), containerDisplayText)); return true; } @@ -463,7 +463,7 @@ namespace Orchard.Lists.Controllers { item.As().Record.Container = null; _containerService.UpdateItemPath(item.ContentItem); } - _services.Notifier.Success(T("Content successfully removed from the list.")); + _services.Notifier.Information(T("Content successfully removed from the list.")); return true; } @@ -476,7 +476,7 @@ namespace Orchard.Lists.Controllers { _contentManager.Remove(item); } - _services.Notifier.Success(T("Content successfully removed.")); + _services.Notifier.Information(T("Content successfully removed.")); return true; } @@ -489,7 +489,7 @@ namespace Orchard.Lists.Controllers { _contentManager.Unpublish(item); } - _services.Notifier.Success(T("Content successfully unpublished.")); + _services.Notifier.Information(T("Content successfully unpublished.")); return true; } @@ -502,7 +502,7 @@ namespace Orchard.Lists.Controllers { _contentManager.Publish(item); } - _services.Notifier.Success(T("Content successfully published.")); + _services.Notifier.Information(T("Content successfully published.")); return true; } } diff --git a/src/Orchard.Web/Modules/Orchard.Localization/Controllers/AdminController.cs b/src/Orchard.Web/Modules/Orchard.Localization/Controllers/AdminController.cs index 52aa00a3a..963c0f044 100644 --- a/src/Orchard.Web/Modules/Orchard.Localization/Controllers/AdminController.cs +++ b/src/Orchard.Web/Modules/Orchard.Localization/Controllers/AdminController.cs @@ -108,7 +108,7 @@ namespace Orchard.Localization.Controllers { conditionallyPublish(contentItemTranslation.ContentItem); - Services.Notifier.Success(T("Created content item translation.")); + Services.Notifier.Information(T("Created content item translation.")); var metadata = _contentManager.GetItemMetadata(contentItemTranslation); return RedirectToAction(Convert.ToString(metadata.EditorRouteValues["action"]), metadata.EditorRouteValues); diff --git a/src/Orchard.Web/Modules/Orchard.Media/Controllers/AdminController.cs b/src/Orchard.Web/Modules/Orchard.Media/Controllers/AdminController.cs index 3bcc11c1b..8804f5472 100644 --- a/src/Orchard.Web/Modules/Orchard.Media/Controllers/AdminController.cs +++ b/src/Orchard.Web/Modules/Orchard.Media/Controllers/AdminController.cs @@ -68,7 +68,7 @@ namespace Orchard.Media.Controllers { try { _mediaService.CreateFolder(viewModel.MediaPath, viewModel.Name); - Services.Notifier.Success(T("Media folder created")); + Services.Notifier.Information(T("Media folder created")); } catch(ArgumentException argumentException) { Services.Notifier.Error(T("Creating Folder failed: {0}", argumentException.Message)); @@ -102,7 +102,7 @@ namespace Orchard.Media.Controllers { try { _mediaService.DeleteFile(folderName, fileName); - Services.Notifier.Success(T("Media file deleted")); + Services.Notifier.Information(T("Media file deleted")); } catch (ArgumentException argumentException) { Services.Notifier.Error(T("Deleting failed: {0}", argumentException.Message)); @@ -116,7 +116,7 @@ namespace Orchard.Media.Controllers { try { _mediaService.DeleteFolder(folderPath); - Services.Notifier.Success(T("Media folder deleted")); + Services.Notifier.Information(T("Media folder deleted")); } catch(ArgumentException argumentException) { Services.Notifier.Error(T("Deleting failed: {0}", argumentException.Message)); @@ -142,7 +142,7 @@ namespace Orchard.Media.Controllers { UpdateModel(viewModel); try { _mediaService.DeleteFolder(viewModel.MediaPath); - Services.Notifier.Success(T("Media folder deleted")); + Services.Notifier.Information(T("Media folder deleted")); } catch(ArgumentException argumentException) { Services.Notifier.Error(T("Deleting media folder failed: {0}", argumentException.Message)); @@ -162,7 +162,7 @@ namespace Orchard.Media.Controllers { UpdateModel(viewModel); try { _mediaService.RenameFolder(viewModel.MediaPath, viewModel.Name); - Services.Notifier.Success(T("Media folder properties modified")); + Services.Notifier.Information(T("Media folder properties modified")); } catch(ArgumentException argumentException) { Services.Notifier.Error(T("Modifying media folder properties failed: {0}", argumentException.Message)); @@ -217,7 +217,7 @@ namespace Orchard.Media.Controllers { } } - Services.Notifier.Success(T("Media file(s) uploaded")); + Services.Notifier.Information(T("Media file(s) uploaded")); return RedirectToAction("Edit", new { name = viewModel.FolderName, mediaPath = viewModel.MediaPath }); } @@ -266,7 +266,7 @@ namespace Orchard.Media.Controllers { UpdateModel(viewModel); try { _mediaService.DeleteFile(viewModel.Name, viewModel.MediaPath); - Services.Notifier.Success(T("Media deleted")); + Services.Notifier.Information(T("Media deleted")); } catch (ArgumentException argumentException) { Services.Notifier.Error(T("Removing media file failed: {0}", argumentException.Message)); @@ -298,7 +298,7 @@ namespace Orchard.Media.Controllers { viewModelName = input["NewName"]; } - Services.Notifier.Success(T("Media information updated")); + Services.Notifier.Information(T("Media information updated")); return RedirectToAction("EditMedia", new { name = viewModelName, caption = viewModel.Caption, lastUpdated = viewModel.LastUpdated, diff --git a/src/Orchard.Web/Modules/Orchard.MediaLibrary/Controllers/FolderController.cs b/src/Orchard.Web/Modules/Orchard.MediaLibrary/Controllers/FolderController.cs index 3fb0ed6e5..33927b245 100644 --- a/src/Orchard.Web/Modules/Orchard.MediaLibrary/Controllers/FolderController.cs +++ b/src/Orchard.Web/Modules/Orchard.MediaLibrary/Controllers/FolderController.cs @@ -63,7 +63,7 @@ namespace Orchard.MediaLibrary.Controllers { try { _mediaLibraryService.CreateFolder(viewModel.FolderPath, viewModel.Name); - Services.Notifier.Success(T("Media folder created")); + Services.Notifier.Information(T("Media folder created")); } catch (ArgumentException argumentException) { Services.Notifier.Error(T("Creating Folder failed: {0}", argumentException.Message)); @@ -117,7 +117,7 @@ namespace Orchard.MediaLibrary.Controllers { try { _mediaLibraryService.RenameFolder(viewModel.FolderPath, viewModel.Name); - Services.Notifier.Success(T("Media folder renamed")); + Services.Notifier.Information(T("Media folder renamed")); } catch (Exception exception) { Services.Notifier.Error(T("Editing Folder failed: {0}", exception.Message)); @@ -142,7 +142,7 @@ namespace Orchard.MediaLibrary.Controllers { } try { _mediaLibraryService.DeleteFolder(viewModel.FolderPath); - Services.Notifier.Success(T("Media folder deleted")); + Services.Notifier.Information(T("Media folder deleted")); } catch (ArgumentException argumentException) { Services.Notifier.Error(T("Deleting Folder failed: {0}", argumentException.Message)); diff --git a/src/Orchard.Web/Modules/Orchard.MediaLibrary/MediaFileName/MediaFileNameDriver.cs b/src/Orchard.Web/Modules/Orchard.MediaLibrary/MediaFileName/MediaFileNameDriver.cs index c42c18320..ee345abbf 100644 --- a/src/Orchard.Web/Modules/Orchard.MediaLibrary/MediaFileName/MediaFileNameDriver.cs +++ b/src/Orchard.Web/Modules/Orchard.MediaLibrary/MediaFileName/MediaFileNameDriver.cs @@ -62,7 +62,7 @@ namespace Orchard.MediaLibrary.MediaFileName _mediaLibraryService.RenameFile(part.FolderPath, priorFileName, model.FileName); part.FileName = model.FileName; - _notifier.Add(NotifyType.Success, T("File '{0}' was renamed to '{1}'", priorFileName, model.FileName)); + _notifier.Add(NotifyType.Information, T("File '{0}' was renamed to '{1}'", priorFileName, model.FileName)); } catch (Exception) { updater.AddModelError("MediaFileNameEditorSettings.FileName", T("Unable to rename file")); @@ -70,7 +70,6 @@ namespace Orchard.MediaLibrary.MediaFileName } } } - return model; }); } diff --git a/src/Orchard.Web/Modules/Orchard.MediaProcessing/Controllers/AdminController.cs b/src/Orchard.Web/Modules/Orchard.MediaProcessing/Controllers/AdminController.cs index 9c92d7894..ec1dd6bc0 100644 --- a/src/Orchard.Web/Modules/Orchard.MediaProcessing/Controllers/AdminController.cs +++ b/src/Orchard.Web/Modules/Orchard.MediaProcessing/Controllers/AdminController.cs @@ -155,7 +155,7 @@ namespace Orchard.MediaProcessing.Controllers { } Services.ContentManager.Remove(profile.ContentItem); - Services.Notifier.Success(T("Image Profile {0} deleted", profile.Name)); + Services.Notifier.Information(T("Image Profile {0} deleted", profile.Name)); return RedirectToAction("Index"); } diff --git a/src/Orchard.Web/Modules/Orchard.MediaProcessing/Controllers/FilterController.cs b/src/Orchard.Web/Modules/Orchard.MediaProcessing/Controllers/FilterController.cs index 08cf05e9b..d40382985 100644 --- a/src/Orchard.Web/Modules/Orchard.MediaProcessing/Controllers/FilterController.cs +++ b/src/Orchard.Web/Modules/Orchard.MediaProcessing/Controllers/FilterController.cs @@ -67,7 +67,7 @@ namespace Orchard.MediaProcessing.Controllers { _signals.Trigger("MediaProcessing_Saved_" + filter.ImageProfilePartRecord.Name); - Services.Notifier.Success(T("Filter deleted")); + Services.Notifier.Information(T("Filter deleted")); return RedirectToAction("Edit", "Admin", new {id}); } diff --git a/src/Orchard.Web/Modules/Orchard.Modules/Controllers/AdminController.cs b/src/Orchard.Web/Modules/Orchard.Modules/Controllers/AdminController.cs index 3ebd12623..a2309e64f 100644 --- a/src/Orchard.Web/Modules/Orchard.Modules/Controllers/AdminController.cs +++ b/src/Orchard.Web/Modules/Orchard.Modules/Controllers/AdminController.cs @@ -163,7 +163,7 @@ namespace Orchard.Modules.Controllers { Services.Notifier.Error(T("Recipes {0} contains unsupported module installation steps.", recipe.Name)); } - Services.Notifier.Success(T("The recipe {0} was executed successfully.", recipe.Name)); + Services.Notifier.Information(T("The recipe {0} was executed successfully.", recipe.Name)); return RedirectToAction("Recipes"); @@ -229,7 +229,7 @@ namespace Orchard.Modules.Controllers { var id = feature.Descriptor.Id; try { _dataMigrationManager.Update(id); - Services.Notifier.Success(T("The feature {0} was updated successfully", id)); + Services.Notifier.Information(T("The feature {0} was updated successfully", id)); } catch (Exception exception) { Services.Notifier.Error(T("An error occured while updating the feature {0}: {1}", id, exception.Message)); diff --git a/src/Orchard.Web/Modules/Orchard.Modules/Services/ModuleService.cs b/src/Orchard.Web/Modules/Orchard.Modules/Services/ModuleService.cs index cbcdbee00..dad8e4c01 100644 --- a/src/Orchard.Web/Modules/Orchard.Modules/Services/ModuleService.cs +++ b/src/Orchard.Web/Modules/Orchard.Modules/Services/ModuleService.cs @@ -73,7 +73,7 @@ namespace Orchard.Modules.Services { public void EnableFeatures(IEnumerable featureIds, bool force) { foreach (string featureId in _featureManager.EnableFeatures(featureIds, force)) { var featureName = _featureManager.GetAvailableFeatures().First(f => f.Id.Equals(featureId, StringComparison.OrdinalIgnoreCase)).Name; - Services.Notifier.Success(T("{0} was enabled", featureName)); + Services.Notifier.Information(T("{0} was enabled", featureName)); } } @@ -93,7 +93,7 @@ namespace Orchard.Modules.Services { public void DisableFeatures(IEnumerable featureIds, bool force) { foreach (string featureId in _featureManager.DisableFeatures(featureIds, force)) { var featureName = _featureManager.GetAvailableFeatures().Single(f => f.Id.Equals(featureId, StringComparison.OrdinalIgnoreCase)).Name; - Services.Notifier.Success(T("{0} was disabled", featureName)); + Services.Notifier.Information(T("{0} was disabled", featureName)); } } diff --git a/src/Orchard.Web/Modules/Orchard.MultiTenancy/Controllers/AdminController.cs b/src/Orchard.Web/Modules/Orchard.MultiTenancy/Controllers/AdminController.cs index 8c5737553..6cf12eb82 100644 --- a/src/Orchard.Web/Modules/Orchard.MultiTenancy/Controllers/AdminController.cs +++ b/src/Orchard.Web/Modules/Orchard.MultiTenancy/Controllers/AdminController.cs @@ -88,7 +88,7 @@ namespace Orchard.MultiTenancy.Controllers { Modules = viewModel.Modules.Where(x => x.Checked).Select(x => x.ModuleId).ToArray() }); - Services.Notifier.Success(T("Tenant '{0}' was created successfully.", viewModel.Name)); + Services.Notifier.Information(T("Tenant '{0}' was created successfully.", viewModel.Name)); return RedirectToAction("Index"); } catch (ArgumentException ex) { diff --git a/src/Orchard.Web/Modules/Orchard.OutputCache/Controllers/AdminController.cs b/src/Orchard.Web/Modules/Orchard.OutputCache/Controllers/AdminController.cs index ef78b6522..f8a042706 100644 --- a/src/Orchard.Web/Modules/Orchard.OutputCache/Controllers/AdminController.cs +++ b/src/Orchard.Web/Modules/Orchard.OutputCache/Controllers/AdminController.cs @@ -127,7 +127,7 @@ namespace Orchard.OutputCache.Controllers { _signals.Trigger(CacheSettings.CacheKey); _cacheService.SaveRouteConfigs(model.RouteConfigs); - Services.Notifier.Success(T("Output cache settings saved successfully.")); + Services.Notifier.Information(T("Output cache settings saved successfully.")); } else { Services.Notifier.Error(T("Could not save output cache settings.")); diff --git a/src/Orchard.Web/Modules/Orchard.Packaging/Controllers/GalleryController.cs b/src/Orchard.Web/Modules/Orchard.Packaging/Controllers/GalleryController.cs index bc108b020..87f941d0e 100644 --- a/src/Orchard.Web/Modules/Orchard.Packaging/Controllers/GalleryController.cs +++ b/src/Orchard.Web/Modules/Orchard.Packaging/Controllers/GalleryController.cs @@ -69,7 +69,7 @@ namespace Orchard.Packaging.Controllers { return new HttpUnauthorizedResult(); _packagingSourceManager.RemoveSource(id); - Services.Notifier.Success(T("The feed has been removed successfully.")); + Services.Notifier.Information(T("The feed has been removed successfully.")); return RedirectToAction("Sources"); } @@ -115,7 +115,7 @@ namespace Orchard.Packaging.Controllers { return View(new PackagingAddSourceViewModel { Url = url }); _packagingSourceManager.AddSource(title, url); - Services.Notifier.Success(T("The feed has been added successfully.")); + Services.Notifier.Information(T("The feed has been added successfully.")); return RedirectToAction("Sources"); } diff --git a/src/Orchard.Web/Modules/Orchard.Packaging/Controllers/PackagingServicesController.cs b/src/Orchard.Web/Modules/Orchard.Packaging/Controllers/PackagingServicesController.cs index 7c9c0dd4d..718235916 100644 --- a/src/Orchard.Web/Modules/Orchard.Packaging/Controllers/PackagingServicesController.cs +++ b/src/Orchard.Web/Modules/Orchard.Packaging/Controllers/PackagingServicesController.cs @@ -131,10 +131,10 @@ namespace Orchard.Packaging.Controllers { PackageInfo packageInfo = _packageManager.Install(packageId, version, source.FeedUrl, MapAppRoot()); if (DefaultExtensionTypes.IsTheme(packageInfo.ExtensionType)) { - Services.Notifier.Success(T("The theme has been successfully installed. It can be enabled in the \"Themes\" page accessible from the menu.")); + Services.Notifier.Information(T("The theme has been successfully installed. It can be enabled in the \"Themes\" page accessible from the menu.")); } else if (DefaultExtensionTypes.IsModule(packageInfo.ExtensionType)) { - Services.Notifier.Success(T("The module has been successfully installed.")); + Services.Notifier.Information(T("The module has been successfully installed.")); IPackageRepository packageRepository = PackageRepositoryFactory.Default.CreateRepository(new PackageSource(source.FeedUrl, "Default")); IPackage package = packageRepository.FindPackage(packageId); @@ -175,10 +175,10 @@ namespace Orchard.Packaging.Controllers { System.IO.File.Delete(fullFileName); if (DefaultExtensionTypes.IsTheme(extensionDescriptor.ExtensionType)) { - Services.Notifier.Success(T("The theme has been successfully installed. It can be enabled in the \"Themes\" page accessible from the menu.")); + Services.Notifier.Information(T("The theme has been successfully installed. It can be enabled in the \"Themes\" page accessible from the menu.")); } else if (DefaultExtensionTypes.IsModule(extensionDescriptor.ExtensionType)) { - Services.Notifier.Success(T("The module has been successfully installed.")); + Services.Notifier.Information(T("The module has been successfully installed.")); return InstallPackageDetails(extensionDescriptor, redirectUrl); } @@ -281,7 +281,7 @@ namespace Orchard.Packaging.Controllers { return Redirect(!String.IsNullOrEmpty(retryUrl) ? retryUrl : returnUrl); } - Services.Notifier.Success(T("Uninstalled package \"{0}\"", id)); + Services.Notifier.Information(T("Uninstalled package \"{0}\"", id)); return this.RedirectLocal(returnUrl, "~/"); } diff --git a/src/Orchard.Web/Modules/Orchard.Packaging/Services/PackageInstaller.cs b/src/Orchard.Web/Modules/Orchard.Packaging/Services/PackageInstaller.cs index 55d8d4309..9e7ccd689 100644 --- a/src/Orchard.Web/Modules/Orchard.Packaging/Services/PackageInstaller.cs +++ b/src/Orchard.Web/Modules/Orchard.Packaging/Services/PackageInstaller.cs @@ -270,7 +270,7 @@ namespace Orchard.Packaging.Services { var backupFolder = new DirectoryInfo(localTempPath); _folderUpdater.Restore(backupFolder, source); - _notifier.Success(T("Successfully restored local package to local folder \"{0}\"", source)); + _notifier.Information(T("Successfully restored local package to local folder \"{0}\"", source)); return true; } @@ -299,7 +299,7 @@ namespace Orchard.Packaging.Services { var backupFolder = new DirectoryInfo(localTempPath); _folderUpdater.Backup(source, backupFolder); - _notifier.Success(T("Successfully backed up local package to local folder \"{0}\"", backupFolder)); + _notifier.Information(T("Successfully backed up local package to local folder \"{0}\"", backupFolder)); return true; } @@ -312,7 +312,7 @@ namespace Orchard.Packaging.Services { // package is the same version or an older version try { Uninstall(package.Id, _virtualPathProvider.MapPath("~\\")); - _notifier.Success(T("Successfully un-installed local package {0}", package.ExtensionId())); + _notifier.Information(T("Successfully un-installed local package {0}", package.ExtensionId())); } catch {} } diff --git a/src/Orchard.Web/Modules/Orchard.Projections/Controllers/AdminController.cs b/src/Orchard.Web/Modules/Orchard.Projections/Controllers/AdminController.cs index e5dfb543e..01b79f29d 100644 --- a/src/Orchard.Web/Modules/Orchard.Projections/Controllers/AdminController.cs +++ b/src/Orchard.Web/Modules/Orchard.Projections/Controllers/AdminController.cs @@ -233,7 +233,7 @@ namespace Orchard.Projections.Controllers { } Services.ContentManager.Remove(query.ContentItem); - Services.Notifier.Success(T("Query {0} deleted", query.Name)); + Services.Notifier.Information(T("Query {0} deleted", query.Name)); return RedirectToAction("Index"); } diff --git a/src/Orchard.Web/Modules/Orchard.Projections/Controllers/BindingController.cs b/src/Orchard.Web/Modules/Orchard.Projections/Controllers/BindingController.cs index 3d77c6ec8..07dce1e19 100644 --- a/src/Orchard.Web/Modules/Orchard.Projections/Controllers/BindingController.cs +++ b/src/Orchard.Web/Modules/Orchard.Projections/Controllers/BindingController.cs @@ -151,7 +151,7 @@ namespace Orchard.Projections.Controllers { Description = model.Description }); - Services.Notifier.Success(T("Binding created successfully")); + Services.Notifier.Information(T("Binding created successfully")); return RedirectToAction("Index"); } @@ -174,14 +174,14 @@ namespace Orchard.Projections.Controllers { var record = recordBluePrints.FirstOrDefault(r => String.Equals(r.Type.FullName, binding.Type, StringComparison.OrdinalIgnoreCase)); if (record == null) { - Services.Notifier.Warning(T("The record for this binding is no longer available, please remove it.")); + Services.Notifier.Information(T("The record for this binding is no longer available, please remove it.")); return RedirectToAction("Index"); } var property = record.Type.GetProperty(binding.Member, BindingFlags.Instance | BindingFlags.Public); if (property == null) { - Services.Notifier.Warning(T("The member for this binding is no longer available, please remove it.")); + Services.Notifier.Information(T("The member for this binding is no longer available, please remove it.")); return RedirectToAction("Index"); } @@ -212,7 +212,7 @@ namespace Orchard.Projections.Controllers { binding.DisplayName = model.Display; binding.Description = model.Description; - Services.Notifier.Success(T("Binding updated successfully")); + Services.Notifier.Information(T("Binding updated successfully")); return RedirectToAction("Index"); } @@ -232,7 +232,7 @@ namespace Orchard.Projections.Controllers { } _repository.Delete(binding); - Services.Notifier.Success(T("Binding deleted")); + Services.Notifier.Information(T("Binding deleted")); return RedirectToAction("Index"); } diff --git a/src/Orchard.Web/Modules/Orchard.Projections/Controllers/FilterController.cs b/src/Orchard.Web/Modules/Orchard.Projections/Controllers/FilterController.cs index c0d599b6c..9fa08122d 100644 --- a/src/Orchard.Web/Modules/Orchard.Projections/Controllers/FilterController.cs +++ b/src/Orchard.Web/Modules/Orchard.Projections/Controllers/FilterController.cs @@ -96,7 +96,7 @@ namespace Orchard.Projections.Controllers { filter.FilterGroupRecord.Filters.Remove(filter); _repository.Delete(filter); - Services.Notifier.Success(T("Filter deleted")); + Services.Notifier.Information(T("Filter deleted")); return RedirectToAction("Edit", "Admin", new { id }); } diff --git a/src/Orchard.Web/Modules/Orchard.Projections/Controllers/LayoutController.cs b/src/Orchard.Web/Modules/Orchard.Projections/Controllers/LayoutController.cs index 059dc404e..fd0f46477 100644 --- a/src/Orchard.Web/Modules/Orchard.Projections/Controllers/LayoutController.cs +++ b/src/Orchard.Web/Modules/Orchard.Projections/Controllers/LayoutController.cs @@ -63,7 +63,7 @@ namespace Orchard.Projections.Controllers { layout.QueryPartRecord.Layouts.Remove(layout); _repository.Delete(layout); - Services.Notifier.Success(T("Layout deleted")); + Services.Notifier.Information(T("Layout deleted")); return RedirectToAction("Edit", "Admin", new { id = queryId }); } @@ -117,7 +117,7 @@ namespace Orchard.Projections.Controllers { layoutRecord.Display = model.Display; layoutRecord.DisplayType = model.DisplayType; - Services.Notifier.Success(T("Layout Created")); + Services.Notifier.Information(T("Layout Created")); _repository.Create(layoutRecord); return RedirectToAction("Edit", new { id = layoutRecord.Id }); @@ -212,7 +212,7 @@ namespace Orchard.Projections.Controllers { layoutRecord.DisplayType = model.DisplayType; layoutRecord.GroupProperty = layoutRecord.Properties.FirstOrDefault(x => x.Id == model.GroupPropertyId); - Services.Notifier.Success(T("Layout Saved")); + Services.Notifier.Information(T("Layout Saved")); return RedirectToAction("Edit", new { id = layoutRecord.Id }); } diff --git a/src/Orchard.Web/Modules/Orchard.Projections/Controllers/PropertyController.cs b/src/Orchard.Web/Modules/Orchard.Projections/Controllers/PropertyController.cs index b6115861f..85997620c 100644 --- a/src/Orchard.Web/Modules/Orchard.Projections/Controllers/PropertyController.cs +++ b/src/Orchard.Web/Modules/Orchard.Projections/Controllers/PropertyController.cs @@ -66,7 +66,7 @@ namespace Orchard.Projections.Controllers { property.LayoutRecord.Properties.Remove(property); _repository.Delete(property); - Services.Notifier.Success(T("Property deleted")); + Services.Notifier.Information(T("Property deleted")); return RedirectToAction("Edit", "Layout", new { id }); } diff --git a/src/Orchard.Web/Modules/Orchard.Projections/Controllers/SortCriteriaController.cs b/src/Orchard.Web/Modules/Orchard.Projections/Controllers/SortCriteriaController.cs index b62bb8d32..1eff06705 100644 --- a/src/Orchard.Web/Modules/Orchard.Projections/Controllers/SortCriteriaController.cs +++ b/src/Orchard.Web/Modules/Orchard.Projections/Controllers/SortCriteriaController.cs @@ -64,7 +64,7 @@ namespace Orchard.Projections.Controllers { sortCriterion.QueryPartRecord.SortCriteria.Remove(sortCriterion); _repository.Delete(sortCriterion); - Services.Notifier.Success(T("Sort criteria deleted")); + Services.Notifier.Information(T("Sort criteria deleted")); return RedirectToAction("Edit", "Admin", new { id }); } diff --git a/src/Orchard.Web/Modules/Orchard.Roles/Controllers/AdminController.cs b/src/Orchard.Web/Modules/Orchard.Roles/Controllers/AdminController.cs index 2fd047fb0..fc8cea06f 100644 --- a/src/Orchard.Web/Modules/Orchard.Roles/Controllers/AdminController.cs +++ b/src/Orchard.Web/Modules/Orchard.Roles/Controllers/AdminController.cs @@ -155,7 +155,7 @@ namespace Orchard.Roles.Controllers { } _roleService.UpdateRole(viewModel.Id, viewModel.Name, rolePermissions); - Services.Notifier.Success(T("Your Role has been saved.")); + Services.Notifier.Information(T("Your Role has been saved.")); return RedirectToAction("Edit", new { id }); } @@ -171,7 +171,7 @@ namespace Orchard.Roles.Controllers { return new HttpUnauthorizedResult(); _roleService.DeleteRole(id); - Services.Notifier.Success(T("Role was successfully deleted.")); + Services.Notifier.Information(T("Role was successfully deleted.")); return this.RedirectLocal(returnUrl, () => RedirectToAction("Index")); } diff --git a/src/Orchard.Web/Modules/Orchard.Rules/Controllers/ActionController.cs b/src/Orchard.Web/Modules/Orchard.Rules/Controllers/ActionController.cs index 17565a21b..3c6ecdf7b 100644 --- a/src/Orchard.Web/Modules/Orchard.Rules/Controllers/ActionController.cs +++ b/src/Orchard.Web/Modules/Orchard.Rules/Controllers/ActionController.cs @@ -49,7 +49,7 @@ namespace Orchard.Rules.Controllers { return new HttpUnauthorizedResult(); _rulesServices.DeleteAction(actionId); - Services.Notifier.Success(T("Action Deleted")); + Services.Notifier.Information(T("Action Deleted")); return RedirectToAction("Edit", "Admin", new { id }); } diff --git a/src/Orchard.Web/Modules/Orchard.Rules/Controllers/AdminController.cs b/src/Orchard.Web/Modules/Orchard.Rules/Controllers/AdminController.cs index 6fa4172ae..ce585cef6 100644 --- a/src/Orchard.Web/Modules/Orchard.Rules/Controllers/AdminController.cs +++ b/src/Orchard.Web/Modules/Orchard.Rules/Controllers/AdminController.cs @@ -252,7 +252,7 @@ namespace Orchard.Rules.Controllers { rule.Name = viewModel.Name; rule.Enabled = viewModel.Enabled; - Services.Notifier.Success(T("Rule Saved")); + Services.Notifier.Information(T("Rule Saved")); return RedirectToAction("Edit", new { id = rule.Id }); } @@ -275,7 +275,7 @@ namespace Orchard.Rules.Controllers { if (rule != null) { _rulesServices.DeleteRule(id); - Services.Notifier.Success(T("Rule {0} deleted", rule.Name)); + Services.Notifier.Information(T("Rule {0} deleted", rule.Name)); } return RedirectToAction("Index"); @@ -289,7 +289,7 @@ namespace Orchard.Rules.Controllers { if (rule != null) { rule.Enabled = true; - Services.Notifier.Success(T("Rule enabled")); + Services.Notifier.Information(T("Rule enabled")); } return RedirectToAction("Index"); @@ -303,7 +303,7 @@ namespace Orchard.Rules.Controllers { if (rule != null) { rule.Enabled = false; - Services.Notifier.Success(T("Rule disabled")); + Services.Notifier.Information(T("Rule disabled")); } return RedirectToAction("Index"); diff --git a/src/Orchard.Web/Modules/Orchard.Rules/Controllers/EventController.cs b/src/Orchard.Web/Modules/Orchard.Rules/Controllers/EventController.cs index 0bf35c8d2..8de3b5975 100644 --- a/src/Orchard.Web/Modules/Orchard.Rules/Controllers/EventController.cs +++ b/src/Orchard.Web/Modules/Orchard.Rules/Controllers/EventController.cs @@ -48,7 +48,7 @@ namespace Orchard.Rules.Controllers { return new HttpUnauthorizedResult(); _rulesServices.DeleteEvent(eventId); - Services.Notifier.Success(T("Event Deleted")); + Services.Notifier.Information(T("Event Deleted")); return RedirectToAction("Edit", "Admin", new { id }); } diff --git a/src/Orchard.Web/Modules/Orchard.Taxonomies/Controllers/AdminController.cs b/src/Orchard.Web/Modules/Orchard.Taxonomies/Controllers/AdminController.cs index 7572c5a14..962ffa310 100644 --- a/src/Orchard.Web/Modules/Orchard.Taxonomies/Controllers/AdminController.cs +++ b/src/Orchard.Web/Modules/Orchard.Taxonomies/Controllers/AdminController.cs @@ -201,7 +201,7 @@ namespace Orchard.Taxonomies.Controllers { } } - Services.Notifier.Success(T("The terms have been imported successfully.")); + Services.Notifier.Information(T("The terms have been imported successfully.")); return RedirectToAction("Index", "TermAdmin", new { taxonomyId = id }); } diff --git a/src/Orchard.Web/Modules/Orchard.Taxonomies/Controllers/TermAdminController.cs b/src/Orchard.Web/Modules/Orchard.Taxonomies/Controllers/TermAdminController.cs index 7b3791d13..2b9c1cc94 100644 --- a/src/Orchard.Web/Modules/Orchard.Taxonomies/Controllers/TermAdminController.cs +++ b/src/Orchard.Web/Modules/Orchard.Taxonomies/Controllers/TermAdminController.cs @@ -100,7 +100,7 @@ namespace Orchard.Taxonomies.Controllers { throw new ArgumentOutOfRangeException(); } - Services.Notifier.Success(T("{0} term have been removed.", checkedEntries.Count)); + Services.Notifier.Information(T("{0} term have been removed.", checkedEntries.Count)); return RedirectToAction("Index", new { taxonomyId = viewModel.TaxonomyId }); } @@ -200,7 +200,7 @@ namespace Orchard.Taxonomies.Controllers { } Services.ContentManager.Publish(term.ContentItem); - Services.Notifier.Success(T("The {0} term has been created.", term.Name)); + Services.Notifier.Information(T("The {0} term has been created.", term.Name)); return RedirectToAction("Index", "TermAdmin", new { taxonomyId }); } @@ -238,7 +238,7 @@ namespace Orchard.Taxonomies.Controllers { Services.ContentManager.Publish(contentItem); _taxonomyService.ProcessPath(term); - Services.Notifier.Success(T("Term information updated")); + Services.Notifier.Information(T("Term information updated")); return RedirectToAction("Index", "TermAdmin", new { taxonomyId = term.TaxonomyId }); } diff --git a/src/Orchard.Web/Modules/Orchard.Taxonomies/Drivers/TaxonomyFieldDriver.cs b/src/Orchard.Web/Modules/Orchard.Taxonomies/Drivers/TaxonomyFieldDriver.cs index 00021c084..b498d6431 100644 --- a/src/Orchard.Web/Modules/Orchard.Taxonomies/Drivers/TaxonomyFieldDriver.cs +++ b/src/Orchard.Web/Modules/Orchard.Taxonomies/Drivers/TaxonomyFieldDriver.cs @@ -165,7 +165,7 @@ namespace Orchard.Taxonomies.Drivers { term.Selectable = true; Services.ContentManager.Create(term, VersionOptions.Published); - Services.Notifier.Success(T("The {0} term has been created.", term.Name)); + Services.Notifier.Information(T("The {0} term has been created.", term.Name)); } return term; diff --git a/src/Orchard.Web/Modules/Orchard.Templates/Controllers/AdminController.cs b/src/Orchard.Web/Modules/Orchard.Templates/Controllers/AdminController.cs index 552433e55..426e7ae02 100644 --- a/src/Orchard.Web/Modules/Orchard.Templates/Controllers/AdminController.cs +++ b/src/Orchard.Web/Modules/Orchard.Templates/Controllers/AdminController.cs @@ -136,7 +136,7 @@ namespace Orchard.Templates.Controllers { _contentManager.Publish(item); } - Services.Notifier.Success(T("Content successfully published.")); + Services.Notifier.Information(T("Content successfully published.")); break; case ContentsBulkAction.Unpublish: foreach (var item in checkedContentItems) { @@ -147,7 +147,7 @@ namespace Orchard.Templates.Controllers { _contentManager.Unpublish(item); } - Services.Notifier.Success(T("Content successfully unpublished.")); + Services.Notifier.Information(T("Content successfully unpublished.")); break; case ContentsBulkAction.Remove: foreach (var item in checkedContentItems) { @@ -158,7 +158,7 @@ namespace Orchard.Templates.Controllers { _contentManager.Remove(item); } - Services.Notifier.Success(T("Content successfully removed.")); + Services.Notifier.Information(T("Content successfully removed.")); break; default: throw new ArgumentOutOfRangeException(); diff --git a/src/Orchard.Web/Modules/Orchard.Themes/Controllers/AdminController.cs b/src/Orchard.Web/Modules/Orchard.Themes/Controllers/AdminController.cs index 991d357b6..4290f3701 100644 --- a/src/Orchard.Web/Modules/Orchard.Themes/Controllers/AdminController.cs +++ b/src/Orchard.Web/Modules/Orchard.Themes/Controllers/AdminController.cs @@ -246,7 +246,7 @@ namespace Orchard.Themes.Controllers { try { _dataMigrationManager.Update(themeId); - Services.Notifier.Success(T("The theme {0} was updated successfully", themeId)); + Services.Notifier.Information(T("The theme {0} was updated successfully.", themeId)); Logger.Information("The theme {0} was updated successfully.", themeId); } catch (Exception exception) { Logger.Error(T("An error occured while updating the theme {0}: {1}", themeId, exception.Message).Text); diff --git a/src/Orchard.Web/Modules/Orchard.Themes/Services/ThemeService.cs b/src/Orchard.Web/Modules/Orchard.Themes/Services/ThemeService.cs index eaeb536b5..46a4454b4 100644 --- a/src/Orchard.Web/Modules/Orchard.Themes/Services/ThemeService.cs +++ b/src/Orchard.Web/Modules/Orchard.Themes/Services/ThemeService.cs @@ -95,7 +95,7 @@ namespace Orchard.Themes.Services { foreach (var featureId in _featureManager.EnableFeatures(new[] { themeId }, true)) { if (themeId != featureId) { var featureName = _featureManager.GetAvailableFeatures().First(f => f.Id.Equals(featureId, StringComparison.OrdinalIgnoreCase)).Name; - Services.Notifier.Success(T("{0} was enabled", featureName)); + Services.Notifier.Information(T("{0} was enabled", featureName)); } } } @@ -194,7 +194,7 @@ namespace Orchard.Themes.Services { public void DisablePreviewFeatures(IEnumerable features) { foreach (var featureId in _featureManager.DisableFeatures(features,true)) { var featureName = _featureManager.GetAvailableFeatures().First(f => f.Id.Equals(featureId, StringComparison.OrdinalIgnoreCase)).Name; - Services.Notifier.Success(T("{0} was disabled", featureName)); + Services.Notifier.Information(T("{0} was disabled", featureName)); } } } diff --git a/src/Orchard.Web/Modules/Orchard.Users/Controllers/AdminController.cs b/src/Orchard.Web/Modules/Orchard.Users/Controllers/AdminController.cs index e3caa411a..1e29bedfa 100644 --- a/src/Orchard.Web/Modules/Orchard.Users/Controllers/AdminController.cs +++ b/src/Orchard.Web/Modules/Orchard.Users/Controllers/AdminController.cs @@ -210,7 +210,7 @@ namespace Orchard.Users.Controllers { return View(model); } - Services.Notifier.Success(T("User created")); + Services.Notifier.Information(T("User created")); return RedirectToAction("Index"); } @@ -268,7 +268,7 @@ namespace Orchard.Users.Controllers { Services.ContentManager.Publish(user.ContentItem); - Services.Notifier.Success(T("User information updated")); + Services.Notifier.Information(T("User information updated")); return RedirectToAction("Index"); } @@ -288,7 +288,7 @@ namespace Orchard.Users.Controllers { } else{ Services.ContentManager.Remove(user.ContentItem); - Services.Notifier.Success(T("User {0} deleted", user.UserName)); + Services.Notifier.Information(T("User {0} deleted", user.UserName)); } } @@ -309,9 +309,10 @@ namespace Orchard.Users.Controllers { } _userService.SendChallengeEmail(user.As(), nonce => Url.MakeAbsolute(Url.Action("ChallengeEmail", "Account", new { Area = "Orchard.Users", nonce = nonce }), siteUrl)); - Services.Notifier.Success(T("Challenge email sent to {0}", user.UserName)); + Services.Notifier.Information(T("Challenge email sent to {0}", user.UserName)); } + return RedirectToAction("Index"); } @@ -324,7 +325,7 @@ namespace Orchard.Users.Controllers { if ( user != null ) { user.As().RegistrationStatus = UserStatus.Approved; - Services.Notifier.Success(T("User {0} approved", user.UserName)); + Services.Notifier.Information(T("User {0} approved", user.UserName)); _userEventHandlers.Approved(user); } @@ -344,7 +345,7 @@ namespace Orchard.Users.Controllers { } else { user.As().RegistrationStatus = UserStatus.Pending; - Services.Notifier.Success(T("User {0} disabled", user.UserName)); + Services.Notifier.Information(T("User {0} disabled", user.UserName)); } } diff --git a/src/Orchard.Web/Modules/Orchard.Warmup/Controllers/AdminController.cs b/src/Orchard.Web/Modules/Orchard.Warmup/Controllers/AdminController.cs index 95f0e7742..11fac783b 100644 --- a/src/Orchard.Web/Modules/Orchard.Warmup/Controllers/AdminController.cs +++ b/src/Orchard.Web/Modules/Orchard.Warmup/Controllers/AdminController.cs @@ -80,7 +80,7 @@ namespace Orchard.Warmup.Controllers { if (ModelState.IsValid) { _warmupUpdater.Generate(); - Services.Notifier.Success(T("Warmup updated successfully.")); + Services.Notifier.Information(T("Warmup updated successfully.")); } else { Services.TransactionManager.Cancel(); diff --git a/src/Orchard.Web/Modules/Orchard.Widgets/Controllers/AdminController.cs b/src/Orchard.Web/Modules/Orchard.Widgets/Controllers/AdminController.cs index 39e60e5ad..3d7f6f89c 100644 --- a/src/Orchard.Web/Modules/Orchard.Widgets/Controllers/AdminController.cs +++ b/src/Orchard.Web/Modules/Orchard.Widgets/Controllers/AdminController.cs @@ -227,7 +227,7 @@ namespace Orchard.Widgets.Controllers { return View(model); } - Services.Notifier.Success(T("Your {0} has been added.", widgetPart.TypeDefinition.DisplayName)); + Services.Notifier.Information(T("Your {0} has been added.", widgetPart.TypeDefinition.DisplayName)); return this.RedirectLocal(returnUrl, () => RedirectToAction("Index")); } @@ -269,7 +269,7 @@ namespace Orchard.Widgets.Controllers { return View(model); } - Services.Notifier.Success(T("Your {0} has been created.", layerPart.TypeDefinition.DisplayName)); + Services.Notifier.Information(T("Your {0} has been created.", layerPart.TypeDefinition.DisplayName)); return RedirectToAction("Index", "Admin", new { layerId = layerPart.Id }); } @@ -302,7 +302,7 @@ namespace Orchard.Widgets.Controllers { return View(model); } - Services.Notifier.Success(T("Your {0} has been saved.", layerPart.TypeDefinition.DisplayName)); + Services.Notifier.Information(T("Your {0} has been saved.", layerPart.TypeDefinition.DisplayName)); return this.RedirectLocal(returnUrl, () => RedirectToAction("Index")); } @@ -315,7 +315,7 @@ namespace Orchard.Widgets.Controllers { try { _widgetsService.DeleteLayer(id); - Services.Notifier.Success(T("Layer was successfully deleted")); + Services.Notifier.Information(T("Layer was successfully deleted")); } catch (Exception exception) { Logger.Error(T("Removing Layer failed: {0}", exception.Message).Text); @@ -387,7 +387,7 @@ namespace Orchard.Widgets.Controllers { conditionallyPublish(widgetPart.ContentItem); - Services.Notifier.Success(T("Your {0} has been saved.", widgetPart.TypeDefinition.DisplayName)); + Services.Notifier.Information(T("Your {0} has been saved.", widgetPart.TypeDefinition.DisplayName)); } catch (Exception exception) { Logger.Error(T("Editing widget failed: {0}", exception.Message).Text); @@ -412,7 +412,7 @@ namespace Orchard.Widgets.Controllers { return HttpNotFound(); try { _widgetsService.DeleteWidget(widgetPart.Id); - Services.Notifier.Success(T("Widget was successfully deleted")); + Services.Notifier.Information(T("Widget was successfully deleted")); } catch (Exception exception) { Logger.Error(T("Removing Widget failed: {0}", exception.Message).Text); diff --git a/src/Orchard.Web/Modules/Orchard.Workflows/Controllers/AdminController.cs b/src/Orchard.Web/Modules/Orchard.Workflows/Controllers/AdminController.cs index 577d37edc..15959ed04 100644 --- a/src/Orchard.Web/Modules/Orchard.Workflows/Controllers/AdminController.cs +++ b/src/Orchard.Web/Modules/Orchard.Workflows/Controllers/AdminController.cs @@ -145,7 +145,7 @@ namespace Orchard.Workflows.Controllers { if (workflowDefinition != null) { _workflowDefinitionRecords.Delete(workflowDefinition); - Services.Notifier.Success(T("Workflow {0} deleted", workflowDefinition.Name)); + Services.Notifier.Information(T("Workflow {0} deleted", workflowDefinition.Name)); } } break; @@ -263,7 +263,7 @@ namespace Orchard.Workflows.Controllers { if (workflowDefinition != null) { _workflowDefinitionRecords.Delete(workflowDefinition); - Services.Notifier.Success(T("Workflow {0} deleted", workflowDefinition.Name)); + Services.Notifier.Information(T("Workflow {0} deleted", workflowDefinition.Name)); } return RedirectToAction("Index"); @@ -278,7 +278,7 @@ namespace Orchard.Workflows.Controllers { if (workflow != null) { _workflowRecords.Delete(workflow); - Services.Notifier.Success(T("Workflow deleted")); + Services.Notifier.Information(T("Workflow deleted")); } return this.RedirectLocal(returnUrl, () => RedirectToAction("Index")); @@ -389,7 +389,7 @@ namespace Orchard.Workflows.Controllers { } } - Services.Notifier.Success(T("Workflow saved successfully")); + Services.Notifier.Information(T("Workflow saved successfully")); // Don't pass the localId to force the activites to refresh and use the deterministic clientId. return RedirectToAction("Edit", new { id }); diff --git a/src/Orchard.Web/Modules/Upgrade/Controllers/ContentPickerController.cs b/src/Orchard.Web/Modules/Upgrade/Controllers/ContentPickerController.cs index df7a21699..097056d3d 100644 --- a/src/Orchard.Web/Modules/Upgrade/Controllers/ContentPickerController.cs +++ b/src/Orchard.Web/Modules/Upgrade/Controllers/ContentPickerController.cs @@ -45,8 +45,8 @@ namespace Upgrade.Controllers { try { _upgradeService.ExecuteReader("DELETE FROM " + _upgradeService.GetPrefixedTableName("Orchard_ContentPicker_ContentMenuItemPartRecord"), null); _upgradeService.CopyTable("Navigation_ContentMenuItemPartRecord", "Orchard_ContentPicker_ContentMenuItemPartRecord", new string[0]); - - _orchardServices.Notifier.Success(T("Content Picker menu items were migrated successfully.")); + + _orchardServices.Notifier.Information(T("Content Picker menu items were migrated successfully.")); } catch(Exception e) { Logger.Error(e, "Unexpected error while migrating to Orchard.ContentPicker. Please check the log."); diff --git a/src/Orchard.Web/Modules/Upgrade/Controllers/FieldController.cs b/src/Orchard.Web/Modules/Upgrade/Controllers/FieldController.cs index 7ece89ab1..baa8c49a9 100644 --- a/src/Orchard.Web/Modules/Upgrade/Controllers/FieldController.cs +++ b/src/Orchard.Web/Modules/Upgrade/Controllers/FieldController.cs @@ -89,8 +89,8 @@ namespace Upgrade.Controllers { _orchardServices.ContentManager.Clear(); } while (contents.Any()); - - _orchardServices.Notifier.Success(T("{0} fields were migrated successfully", contentType)); + + _orchardServices.Notifier.Information(T("{0} fields were migrated successfully", contentType)); } } diff --git a/src/Orchard.Web/Modules/Upgrade/Controllers/InfosetController.cs b/src/Orchard.Web/Modules/Upgrade/Controllers/InfosetController.cs index b652b0aec..d538cd63a 100644 --- a/src/Orchard.Web/Modules/Upgrade/Controllers/InfosetController.cs +++ b/src/Orchard.Web/Modules/Upgrade/Controllers/InfosetController.cs @@ -278,8 +278,8 @@ namespace Upgrade.Controllers { _upgradeService.ExecuteReader("DROP TABLE " + blogTable, null); } #endregion - - _orchardServices.Notifier.Success(T("Site Settings migrated successfully")); + + _orchardServices.Notifier.Information(T("Site Settings migrated successfully")); return View(); } diff --git a/src/Orchard.Web/Modules/Upgrade/Controllers/MenuController.cs b/src/Orchard.Web/Modules/Upgrade/Controllers/MenuController.cs index e311e0808..1dfe6e315 100644 --- a/src/Orchard.Web/Modules/Upgrade/Controllers/MenuController.cs +++ b/src/Orchard.Web/Modules/Upgrade/Controllers/MenuController.cs @@ -52,7 +52,7 @@ namespace Upgrade.Controllers { // create a Main Menu var mainMenu = _menuService.Create("Main Menu"); - _orchardServices.Notifier.Success(T("Main menu created")); + _orchardServices.Notifier.Information(T("Main menu created")); // assign the Main Menu to all current menu items foreach (var menuItem in _menuService.Get()) { @@ -62,7 +62,7 @@ namespace Upgrade.Controllers { } menuItem.Menu = mainMenu.ContentItem; } - _orchardServices.Notifier.Success(T("Menu items moved to Main menu")); + _orchardServices.Notifier.Information(T("Menu items moved to Main menu")); // a widget should is created to display the navigation var layer = _widgetsService.GetLayers().FirstOrDefault(x => x.Name == "Default"); diff --git a/src/Orchard.Web/Modules/Upgrade/Controllers/MessagingController.cs b/src/Orchard.Web/Modules/Upgrade/Controllers/MessagingController.cs index a2c7d7d4b..210d5fc32 100644 --- a/src/Orchard.Web/Modules/Upgrade/Controllers/MessagingController.cs +++ b/src/Orchard.Web/Modules/Upgrade/Controllers/MessagingController.cs @@ -97,7 +97,7 @@ namespace Upgrade.Controllers { record.State = JsonConvert.SerializeObject(newState); }); - _orchardServices.Notifier.Success(T("Email activities updated successfully")); + _orchardServices.Notifier.Information(T("Email activities updated successfully")); } else { _orchardServices.Notifier.Warning(T("No email activities were updated.")); diff --git a/src/Orchard.Web/Modules/Upgrade/Controllers/RouteController.cs b/src/Orchard.Web/Modules/Upgrade/Controllers/RouteController.cs index 1043d18a6..57db71bbb 100644 --- a/src/Orchard.Web/Modules/Upgrade/Controllers/RouteController.cs +++ b/src/Orchard.Web/Modules/Upgrade/Controllers/RouteController.cs @@ -160,7 +160,7 @@ namespace Upgrade.Controllers { _orchardServices.Notifier.Warning(T("Some content items could not be imported. Please refer to the corresponding Report.")); } else { - _orchardServices.Notifier.Success(T("{0} was migrated successfully", contentType)); + _orchardServices.Notifier.Information(T("{0} was migrated successfully", contentType)); } } } diff --git a/src/Orchard.Web/Modules/Upgrade/Controllers/TaxonomyController.cs b/src/Orchard.Web/Modules/Upgrade/Controllers/TaxonomyController.cs index 228c462cc..db6a67135 100644 --- a/src/Orchard.Web/Modules/Upgrade/Controllers/TaxonomyController.cs +++ b/src/Orchard.Web/Modules/Upgrade/Controllers/TaxonomyController.cs @@ -61,7 +61,7 @@ namespace Upgrade.Controllers { _upgradeService.CopyTable("Contrib_Taxonomies_TermPartRecord", "Orchard_Taxonomies_TermPartRecord", new string[0]); _upgradeService.CopyTable("Contrib_Taxonomies_TermsPartRecord", "Orchard_Taxonomies_TermsPartRecord", new string[0]); - _orchardServices.Notifier.Success(T("Taxonomies were migrated successfully.")); + _orchardServices.Notifier.Information(T("Taxonomies were migrated successfully.")); } catch(Exception e) { Logger.Error(e, "Unexpected error while migrating to Orchard.Taxonomies. Please check the log."); diff --git a/src/Orchard.Web/Themes/SafeMode/Styles/site.css b/src/Orchard.Web/Themes/SafeMode/Styles/site.css index 0219a7c6e..404673e7c 100644 --- a/src/Orchard.Web/Themes/SafeMode/Styles/site.css +++ b/src/Orchard.Web/Themes/SafeMode/Styles/site.css @@ -315,16 +315,11 @@ span.message { background:#e68585; /* red */ color:#fff; } -.message-Success { +.message-Information { background:#e6f1c9; /* green */ border:1px solid #cfe493; color:#062232; } -.message-Information { - background:#d9edf7; /* blue */ - border:1px solid #bce8f1; - color:#31708f; -} .message-Warning { background:#fdf5bc; /* yellow */ border:1px solid #ffea9b; diff --git a/src/Orchard.Web/Themes/TheAdmin/Styles/site.css b/src/Orchard.Web/Themes/TheAdmin/Styles/site.css index 8bfe3d17e..1429a941e 100644 --- a/src/Orchard.Web/Themes/TheAdmin/Styles/site.css +++ b/src/Orchard.Web/Themes/TheAdmin/Styles/site.css @@ -559,16 +559,11 @@ span.message { border:1px solid #e5cece; /* red */ padding-left:4px 4px 4px 26px; } -.message-Success, .notifications { +.message-Information, .notifications { background:#e6f1c9; /* green */ border:1px solid #cfe493; color:#062232; } -.message-Information { - background:#d9edf7; /* blue */ - border:1px solid #bce8f1; - color:#31708f; -} .message-Warning { background:#fdf5bc; /* yellow */ border:1px solid #ffea9b; diff --git a/src/Orchard.Web/Themes/TheThemeMachine/Styles/Site.css b/src/Orchard.Web/Themes/TheThemeMachine/Styles/Site.css index 184a0e70d..2eca2b4c6 100644 --- a/src/Orchard.Web/Themes/TheThemeMachine/Styles/Site.css +++ b/src/Orchard.Web/Themes/TheThemeMachine/Styles/Site.css @@ -494,8 +494,7 @@ nav ul.breadcrumb /* Confirmations */ .message, .validation-summary-errors { margin:10px 0 4px 0; padding:4px; } .messages a { font-weight:bold; } -.message-Success { background:#e6f1c9; /* green */ border:1px solid #cfe493; color:#062232; } -.message-Information { background:#d9edf7; /* blue */ border:1px solid #bce8f1; color:#31708f; } +.message-Information { background:#e6f1c9; /* green */ border:1px solid #cfe493; color:#062232; } .message-Warning { background:#fdf5bc; /* yellow */ border:1px solid #ffea9b; } .critical.message, .validation-summary-errors, .message-Error { background:#e68585; /* red */ border:1px solid #990808; color:#fff; } diff --git a/src/Orchard/UI/Notify/NotifierExtensions.cs b/src/Orchard/UI/Notify/NotifierExtensions.cs index 77af8a447..1b1796029 100644 --- a/src/Orchard/UI/Notify/NotifierExtensions.cs +++ b/src/Orchard/UI/Notify/NotifierExtensions.cs @@ -28,14 +28,5 @@ namespace Orchard.UI.Notify { public static void Error(this INotifier notifier, LocalizedString message) { notifier.Add(NotifyType.Error, message); } - - /// - /// Adds a new UI notification of type Success - /// - /// - /// A localized message to display - public static void Success(this INotifier notifier, LocalizedString message) { - notifier.Add(NotifyType.Success, message); - } } } \ No newline at end of file diff --git a/src/Orchard/UI/Notify/NotifyEntry.cs b/src/Orchard/UI/Notify/NotifyEntry.cs index 1baf0bbc3..6bec260aa 100644 --- a/src/Orchard/UI/Notify/NotifyEntry.cs +++ b/src/Orchard/UI/Notify/NotifyEntry.cs @@ -4,8 +4,7 @@ namespace Orchard.UI.Notify { public enum NotifyType { Information, Warning, - Error, - Success + Error } public class NotifyEntry { From 694aeb50627da51065e8648c33f7412595fedf45 Mon Sep 17 00:00:00 2001 From: Szymon Seliga Date: Tue, 22 Mar 2016 21:19:50 +0100 Subject: [PATCH 3/3] #6410 Added NotifyType.Success and replaced most usages of NotifyType.Information with it. Added appropriate styles in css files. Some minor fixes - wrong notification types. Conflicts: src/Orchard.Web/Modules/Orchard.ImportExport/Controllers/AdminController.cs src/Orchard.Web/Modules/Orchard.Taxonomies/Controllers/TermAdminController.cs src/Orchard.Web/Modules/Orchard.Themes/Controllers/AdminController.cs Contained in branches: dev#gitext://gotobranch/dev Contained in no tag --- src/Orchard.Tests/UI/Notify/NotifierTests.cs | 4 ++- .../Contents/Controllers/AdminController.cs | 18 ++++++------ .../Navigation/Controllers/AdminController.cs | 2 +- .../Settings/Controllers/AdminController.cs | 2 +- .../Controllers/AdminController.cs | 6 ++-- .../Controllers/ContentController.cs | 2 +- .../Controllers/RecycleBinController.cs | 6 ++-- .../Controllers/AssetController.cs | 4 +-- .../Controllers/JobController.cs | 6 ++-- .../Controllers/MediaController.cs | 2 +- .../Controllers/SettingsController.cs | 8 +++--- .../Drivers/CloudVideoPartDriver.cs | 2 +- .../Controllers/BlogAdminController.cs | 6 ++-- .../Controllers/BlogPostAdminController.cs | 16 +++++------ .../Controllers/CommentController.cs | 10 +++---- .../Drivers/CommentPartDriver.cs | 8 +++--- .../Controllers/AdminController.cs | 28 +++++++++---------- .../Controllers/ItemController.cs | 2 +- .../Controllers/DashboardController.cs | 6 ++-- .../Controllers/SubmissionAdminController.cs | 4 +-- .../Handlers/FormSubmissionCoordinator.cs | 2 +- .../Controllers/AdminController.cs | 2 +- .../Services/IndexingService.cs | 6 ++-- .../Controllers/BlueprintAdminController.cs | 8 +++--- .../Orchard.Layouts/Styles/admin-dialog.css | 7 ++++- .../Controllers/AdminController.cs | 22 +++++++-------- .../Controllers/AdminController.cs | 2 +- .../Controllers/AdminController.cs | 16 +++++------ .../Controllers/FolderController.cs | 6 ++-- .../MediaFileName/MediaFileNameDriver.cs | 3 +- .../Controllers/AdminController.cs | 2 +- .../Controllers/FilterController.cs | 2 +- .../Controllers/AdminController.cs | 4 +-- .../Orchard.Modules/Services/ModuleService.cs | 4 +-- .../Controllers/AdminController.cs | 2 +- .../Controllers/AdminController.cs | 2 +- .../Controllers/GalleryController.cs | 4 +-- .../PackagingServicesController.cs | 10 +++---- .../Services/PackageInstaller.cs | 6 ++-- .../Controllers/AdminController.cs | 2 +- .../Controllers/BindingController.cs | 10 +++---- .../Controllers/FilterController.cs | 2 +- .../Controllers/LayoutController.cs | 6 ++-- .../Controllers/PropertyController.cs | 2 +- .../Controllers/SortCriteriaController.cs | 2 +- .../Controllers/AdminController.cs | 4 +-- .../Controllers/ActionController.cs | 2 +- .../Controllers/AdminController.cs | 8 +++--- .../Controllers/EventController.cs | 2 +- .../Controllers/AdminController.cs | 2 +- .../Controllers/TermAdminController.cs | 6 ++-- .../Drivers/TaxonomyFieldDriver.cs | 2 +- .../Controllers/AdminController.cs | 6 ++-- .../Controllers/AdminController.cs | 2 +- .../Orchard.Themes/Services/ThemeService.cs | 4 +-- .../Controllers/AdminController.cs | 13 ++++----- .../Controllers/AdminController.cs | 2 +- .../Controllers/AdminController.cs | 12 ++++---- .../Controllers/AdminController.cs | 8 +++--- .../Controllers/ContentPickerController.cs | 4 +-- .../Upgrade/Controllers/FieldController.cs | 4 +-- .../Upgrade/Controllers/InfosetController.cs | 4 +-- .../Upgrade/Controllers/MenuController.cs | 4 +-- .../Controllers/MessagingController.cs | 2 +- .../Upgrade/Controllers/RouteController.cs | 2 +- .../Upgrade/Controllers/TaxonomyController.cs | 2 +- .../Themes/SafeMode/Styles/site.css | 7 ++++- .../Themes/TheAdmin/Styles/site.css | 7 ++++- .../Themes/TheThemeMachine/Styles/Site.css | 3 +- src/Orchard/UI/Notify/NotifierExtensions.cs | 9 ++++++ src/Orchard/UI/Notify/NotifyEntry.cs | 3 +- 71 files changed, 214 insertions(+), 186 deletions(-) diff --git a/src/Orchard.Tests/UI/Notify/NotifierTests.cs b/src/Orchard.Tests/UI/Notify/NotifierTests.cs index a439b0653..916c58d33 100644 --- a/src/Orchard.Tests/UI/Notify/NotifierTests.cs +++ b/src/Orchard.Tests/UI/Notify/NotifierTests.cs @@ -14,11 +14,13 @@ namespace Orchard.Tests.UI.Notify { notifier.Warning(T("Hello world")); notifier.Information(T("More Info")); notifier.Error(T("Boom")); + notifier.Success(T("Success")); - Assert.That(notifier.List(), Has.Count.EqualTo(3)); + Assert.That(notifier.List(), Has.Count.EqualTo(4)); Assert.That(notifier.List(), Has.Some.Property("Message").EqualTo(T("Hello world"))); Assert.That(notifier.List(), Has.Some.Property("Message").EqualTo(T("More Info"))); Assert.That(notifier.List(), Has.Some.Property("Message").EqualTo(T("Boom"))); + Assert.That(notifier.List(), Has.Some.Property("Message").EqualTo(T("Success"))); } } } \ No newline at end of file diff --git a/src/Orchard.Web/Core/Contents/Controllers/AdminController.cs b/src/Orchard.Web/Core/Contents/Controllers/AdminController.cs index 4437ab0e1..39d44e50c 100644 --- a/src/Orchard.Web/Core/Contents/Controllers/AdminController.cs +++ b/src/Orchard.Web/Core/Contents/Controllers/AdminController.cs @@ -193,7 +193,7 @@ namespace Orchard.Core.Contents.Controllers { _contentManager.Publish(item); } - Services.Notifier.Information(T("Content successfully published.")); + Services.Notifier.Success(T("Content successfully published.")); break; case ContentsBulkAction.Unpublish: foreach (var item in checkedContentItems) { @@ -204,7 +204,7 @@ namespace Orchard.Core.Contents.Controllers { _contentManager.Unpublish(item); } - Services.Notifier.Information(T("Content successfully unpublished.")); + Services.Notifier.Success(T("Content successfully unpublished.")); break; case ContentsBulkAction.Remove: foreach (var item in checkedContentItems) { @@ -215,7 +215,7 @@ namespace Orchard.Core.Contents.Controllers { _contentManager.Remove(item); } - Services.Notifier.Information(T("Content successfully removed.")); + Services.Notifier.Success(T("Content successfully removed.")); break; default: throw new ArgumentOutOfRangeException(); @@ -296,7 +296,7 @@ namespace Orchard.Core.Contents.Controllers { conditionallyPublish(contentItem); - Services.Notifier.Information(string.IsNullOrWhiteSpace(contentItem.TypeDefinition.DisplayName) + Services.Notifier.Success(string.IsNullOrWhiteSpace(contentItem.TypeDefinition.DisplayName) ? T("Your content has been created.") : T("Your {0} has been created.", contentItem.TypeDefinition.DisplayName)); if (!string.IsNullOrEmpty(returnUrl)) { @@ -375,7 +375,7 @@ namespace Orchard.Core.Contents.Controllers { returnUrl = Url.ItemDisplayUrl(contentItem); } - Services.Notifier.Information(string.IsNullOrWhiteSpace(contentItem.TypeDefinition.DisplayName) + Services.Notifier.Success(string.IsNullOrWhiteSpace(contentItem.TypeDefinition.DisplayName) ? T("Your content has been saved.") : T("Your {0} has been saved.", contentItem.TypeDefinition.DisplayName)); @@ -400,7 +400,7 @@ namespace Orchard.Core.Contents.Controllers { return this.RedirectLocal(returnUrl, () => RedirectToAction("List")); } - Services.Notifier.Information(T("Successfully cloned. The clone was saved as a draft.")); + Services.Notifier.Success(T("Successfully cloned. The clone was saved as a draft.")); return this.RedirectLocal(returnUrl, () => RedirectToAction("List")); } @@ -414,7 +414,7 @@ namespace Orchard.Core.Contents.Controllers { if (contentItem != null) { _contentManager.Remove(contentItem); - Services.Notifier.Information(string.IsNullOrWhiteSpace(contentItem.TypeDefinition.DisplayName) + Services.Notifier.Success(string.IsNullOrWhiteSpace(contentItem.TypeDefinition.DisplayName) ? T("That content has been removed.") : T("That {0} has been removed.", contentItem.TypeDefinition.DisplayName)); } @@ -433,7 +433,7 @@ namespace Orchard.Core.Contents.Controllers { _contentManager.Publish(contentItem); - Services.Notifier.Information(string.IsNullOrWhiteSpace(contentItem.TypeDefinition.DisplayName) ? T("That content has been published.") : T("That {0} has been published.", contentItem.TypeDefinition.DisplayName)); + Services.Notifier.Success(string.IsNullOrWhiteSpace(contentItem.TypeDefinition.DisplayName) ? T("That content has been published.") : T("That {0} has been published.", contentItem.TypeDefinition.DisplayName)); return this.RedirectLocal(returnUrl, () => RedirectToAction("List")); } @@ -449,7 +449,7 @@ namespace Orchard.Core.Contents.Controllers { _contentManager.Unpublish(contentItem); - Services.Notifier.Information(string.IsNullOrWhiteSpace(contentItem.TypeDefinition.DisplayName) ? T("That content has been unpublished.") : T("That {0} has been unpublished.", contentItem.TypeDefinition.DisplayName)); + Services.Notifier.Success(string.IsNullOrWhiteSpace(contentItem.TypeDefinition.DisplayName) ? T("That content has been unpublished.") : T("That {0} has been unpublished.", contentItem.TypeDefinition.DisplayName)); return this.RedirectLocal(returnUrl, () => RedirectToAction("List")); } diff --git a/src/Orchard.Web/Core/Navigation/Controllers/AdminController.cs b/src/Orchard.Web/Core/Navigation/Controllers/AdminController.cs index d807b1eac..b173fab71 100644 --- a/src/Orchard.Web/Core/Navigation/Controllers/AdminController.cs +++ b/src/Orchard.Web/Core/Navigation/Controllers/AdminController.cs @@ -227,7 +227,7 @@ namespace Orchard.Core.Navigation.Controllers { return View(model); } - Services.Notifier.Information(T("Your {0} has been added.", menuPart.TypeDefinition.DisplayName)); + Services.Notifier.Success(T("Your {0} has been added.", menuPart.TypeDefinition.DisplayName)); return this.RedirectLocal(returnUrl, () => RedirectToAction("Index")); } diff --git a/src/Orchard.Web/Core/Settings/Controllers/AdminController.cs b/src/Orchard.Web/Core/Settings/Controllers/AdminController.cs index 2fc607a04..c7e9dcd68 100644 --- a/src/Orchard.Web/Core/Settings/Controllers/AdminController.cs +++ b/src/Orchard.Web/Core/Settings/Controllers/AdminController.cs @@ -82,7 +82,7 @@ namespace Orchard.Core.Settings.Controllers { return View(model); } - Services.Notifier.Information(T("Settings updated")); + Services.Notifier.Success(T("Settings updated")); return RedirectToAction("Index"); } diff --git a/src/Orchard.Web/Modules/Orchard.Alias/Controllers/AdminController.cs b/src/Orchard.Web/Modules/Orchard.Alias/Controllers/AdminController.cs index 0d2759b81..41d7b76b6 100644 --- a/src/Orchard.Web/Modules/Orchard.Alias/Controllers/AdminController.cs +++ b/src/Orchard.Web/Modules/Orchard.Alias/Controllers/AdminController.cs @@ -181,7 +181,7 @@ namespace Orchard.Alias.Controllers { return View(); } - Services.Notifier.Information(T("Alias {0} created", aliasPath)); + Services.Notifier.Success(T("Alias {0} created", aliasPath)); return RedirectToAction("IndexUnmanaged"); } @@ -251,7 +251,7 @@ namespace Orchard.Alias.Controllers { _aliasService.Delete(path == "/" ? String.Empty : path); } - Services.Notifier.Information(T("Alias {0} updated", path)); + Services.Notifier.Success(T("Alias {0} updated", path)); return RedirectToAction("IndexUnmanaged"); } @@ -267,7 +267,7 @@ namespace Orchard.Alias.Controllers { _aliasService.Delete(path); - Services.Notifier.Information(T("Alias {0} deleted", path)); + Services.Notifier.Success(T("Alias {0} deleted", path)); return this.RedirectLocal(returnUrl, Url.Action("IndexUnmanaged")); } diff --git a/src/Orchard.Web/Modules/Orchard.AuditTrail/Controllers/ContentController.cs b/src/Orchard.Web/Modules/Orchard.AuditTrail/Controllers/ContentController.cs index 43a67cade..960b6fe24 100644 --- a/src/Orchard.Web/Modules/Orchard.AuditTrail/Controllers/ContentController.cs +++ b/src/Orchard.Web/Modules/Orchard.AuditTrail/Controllers/ContentController.cs @@ -54,7 +54,7 @@ namespace Orchard.AuditTrail.Controllers { var restoredContentItem = _contentManager.Restore(contentItem, VersionOptions.Restore(version, publish: !draftable)); var restoredContentItemTitle = _contentManager.GetItemMetadata(restoredContentItem).DisplayText; - _notifier.Information(T(""{0}" has been restored.", restoredContentItemTitle)); + _notifier.Success(T(""{0}" has been restored.", restoredContentItemTitle)); return this.RedirectReturn(returnUrl, () => Url.Action("Index", "Admin")); } diff --git a/src/Orchard.Web/Modules/Orchard.AuditTrail/Controllers/RecycleBinController.cs b/src/Orchard.Web/Modules/Orchard.AuditTrail/Controllers/RecycleBinController.cs index 967b6f96a..79dfe114e 100644 --- a/src/Orchard.Web/Modules/Orchard.AuditTrail/Controllers/RecycleBinController.cs +++ b/src/Orchard.Web/Modules/Orchard.AuditTrail/Controllers/RecycleBinController.cs @@ -56,7 +56,7 @@ namespace Orchard.AuditTrail.Controllers { var restoredContentItem = _recycleBin.Restore(contentItem); var restoredContentItemTitle = _contentManager.GetItemMetadata(restoredContentItem).DisplayText; - _notifier.Information(T(""{0}" has been restored.", restoredContentItemTitle)); + _notifier.Success(T(""{0}" has been restored.", restoredContentItemTitle)); return this.RedirectReturn(returnUrl, () => Url.Action("Index", "RecycleBin")); } @@ -115,7 +115,7 @@ namespace Orchard.AuditTrail.Controllers { } _recycleBin.Restore(contentItem); - _notifier.Information(T(""{0}" has been restored.", contentItemTitle)); + _notifier.Success(T(""{0}" has been restored.", contentItemTitle)); } } @@ -131,7 +131,7 @@ namespace Orchard.AuditTrail.Controllers { try { _contentManager.Destroy(contentItem); - _notifier.Information(T(""{0}" has been permanently deleted.", contentItemTitle)); + _notifier.Success(T(""{0}" has been permanently deleted.", contentItemTitle)); } catch (Exception ex) { Logger.Error(ex, "An exception occurred while trying to permanently delete content with ID {0}.", contentItem.Id); diff --git a/src/Orchard.Web/Modules/Orchard.Azure.MediaServices/Controllers/AssetController.cs b/src/Orchard.Web/Modules/Orchard.Azure.MediaServices/Controllers/AssetController.cs index 57892711d..3354a121c 100644 --- a/src/Orchard.Web/Modules/Orchard.Azure.MediaServices/Controllers/AssetController.cs +++ b/src/Orchard.Web/Modules/Orchard.Azure.MediaServices/Controllers/AssetController.cs @@ -108,7 +108,7 @@ namespace Orchard.Azure.MediaServices.Controllers { return View(viewModel); } - _notifier.Information(T("The Asset has been saved.")); + _notifier.Success(T("The Asset has been saved.")); return RedirectToAction("Edit", new { id = id }); }); } @@ -141,7 +141,7 @@ namespace Orchard.Azure.MediaServices.Controllers { _assetManager.DeleteAsset(asset); Logger.Information("Asset with ID {0} was deleted.", id); - _notifier.Information(T("The asset '{0}' was successfully deleted.", asset.Name)); + _notifier.Success(T("The asset '{0}' was successfully deleted.", asset.Name)); } catch (Exception ex) { _transactionManager.Cancel(); diff --git a/src/Orchard.Web/Modules/Orchard.Azure.MediaServices/Controllers/JobController.cs b/src/Orchard.Web/Modules/Orchard.Azure.MediaServices/Controllers/JobController.cs index bf50b9438..a4448cb1a 100644 --- a/src/Orchard.Web/Modules/Orchard.Azure.MediaServices/Controllers/JobController.cs +++ b/src/Orchard.Web/Modules/Orchard.Azure.MediaServices/Controllers/JobController.cs @@ -156,7 +156,7 @@ namespace Orchard.Azure.MediaServices.Controllers { }); Logger.Information("Job was created with task of type {0} on cloud video item with ID {1}.", task, id); - _notifier.Information(T("The job '{0}' was successfully created.", job.Name)); + _notifier.Success(T("The job '{0}' was successfully created.", job.Name)); return Redirect(Url.ItemEditUrl(cloudVideoPart)); } @@ -187,7 +187,7 @@ namespace Orchard.Azure.MediaServices.Controllers { job.Status = JobStatus.Archived; Logger.Information("Job with ID {0} was archived.", id); - _notifier.Information(T("The job '{0}' was successfully archived.", job.Name)); + _notifier.Success(T("The job '{0}' was successfully archived.", job.Name)); return RedirectToReturnUrl(returnUrl, Url.ItemEditUrl(job.CloudVideoPart)); } @@ -212,7 +212,7 @@ namespace Orchard.Azure.MediaServices.Controllers { wamsJob.Cancel(); Logger.Information("Job with ID {0} was canceled.", id); - _notifier.Information(T("The job '{0}' was successfully canceled.", job.Name)); + _notifier.Success(T("The job '{0}' was successfully canceled.", job.Name)); } catch (Exception ex) { _transactionManager.Cancel(); diff --git a/src/Orchard.Web/Modules/Orchard.Azure.MediaServices/Controllers/MediaController.cs b/src/Orchard.Web/Modules/Orchard.Azure.MediaServices/Controllers/MediaController.cs index caf05adda..e77fc4a11 100644 --- a/src/Orchard.Web/Modules/Orchard.Azure.MediaServices/Controllers/MediaController.cs +++ b/src/Orchard.Web/Modules/Orchard.Azure.MediaServices/Controllers/MediaController.cs @@ -148,7 +148,7 @@ namespace Orchard.Azure.MediaServices.Controllers { _contentManager.Publish(mediaPart.ContentItem); Logger.Information("Cloud video item with ID {0} was saved.", part.Id); - _notifier.Information(notification); + _notifier.Success(notification); } catch (Exception ex) { _transactionManager.Cancel(); diff --git a/src/Orchard.Web/Modules/Orchard.Azure.MediaServices/Controllers/SettingsController.cs b/src/Orchard.Web/Modules/Orchard.Azure.MediaServices/Controllers/SettingsController.cs index 97a086052..e942e7686 100644 --- a/src/Orchard.Web/Modules/Orchard.Azure.MediaServices/Controllers/SettingsController.cs +++ b/src/Orchard.Web/Modules/Orchard.Azure.MediaServices/Controllers/SettingsController.cs @@ -94,7 +94,7 @@ namespace Orchard.Azure.MediaServices.Controllers { return View("Index", viewModel); } else { - _services.Notifier.Information(T("The new account credentials were successfully verified.")); + _services.Notifier.Success(T("The new account credentials were successfully verified.")); } } } @@ -132,7 +132,7 @@ namespace Orchard.Azure.MediaServices.Controllers { if (addedOrigins.Any()) { Logger.Information("CORS rules were added to the configured storage account for the following URLs: {0}.", String.Join("; ", addedOrigins)); - _services.Notifier.Information(T("CORS rules have been configured on your storage account for the following URLs: {0}.", String.Join("; ", addedOrigins))); + _services.Notifier.Success(T("CORS rules have been configured on your storage account for the following URLs: {0}.", String.Join("; ", addedOrigins))); } } catch (Exception ex) { @@ -143,7 +143,7 @@ namespace Orchard.Azure.MediaServices.Controllers { } Logger.Information("Module settings were saved."); - _services.Notifier.Information(T("The settings were saved successfully.")); + _services.Notifier.Success(T("The settings were saved successfully.")); return RedirectToAction("Index"); } @@ -156,7 +156,7 @@ namespace Orchard.Azure.MediaServices.Controllers { Logger.Debug("User requested to verify WAMS account credentials."); if (TestCredentialsInternal(viewModel.General.WamsAccountName, viewModel.General.WamsAccountKey, viewModel.General.StorageAccountKey)) { - _services.Notifier.Information(T("The account credentials were successfully verified.")); + _services.Notifier.Success(T("The account credentials were successfully verified.")); } else { _services.Notifier.Error(T("The account credentials verification failed.")); diff --git a/src/Orchard.Web/Modules/Orchard.Azure.MediaServices/Drivers/CloudVideoPartDriver.cs b/src/Orchard.Web/Modules/Orchard.Azure.MediaServices/Drivers/CloudVideoPartDriver.cs index b1b7dd83f..7176a4cc9 100644 --- a/src/Orchard.Web/Modules/Orchard.Azure.MediaServices/Drivers/CloudVideoPartDriver.cs +++ b/src/Orchard.Web/Modules/Orchard.Azure.MediaServices/Drivers/CloudVideoPartDriver.cs @@ -96,7 +96,7 @@ namespace Orchard.Azure.MediaServices.Drivers { var unpublish = httpContext.Request.Form["submit.Save"] == "submit.Unpublish"; if (unpublish) { _services.ContentManager.Unpublish(part.ContentItem); - _services.Notifier.Information(T("Your {0} has been unpublished.", part.ContentItem.TypeDefinition.DisplayName)); + _services.Notifier.Success(T("Your {0} has been unpublished.", part.ContentItem.TypeDefinition.DisplayName)); } if (part.IsPublished()) diff --git a/src/Orchard.Web/Modules/Orchard.Blogs/Controllers/BlogAdminController.cs b/src/Orchard.Web/Modules/Orchard.Blogs/Controllers/BlogAdminController.cs index 001ef9fbf..ea7fe53aa 100644 --- a/src/Orchard.Web/Modules/Orchard.Blogs/Controllers/BlogAdminController.cs +++ b/src/Orchard.Web/Modules/Orchard.Blogs/Controllers/BlogAdminController.cs @@ -101,7 +101,7 @@ namespace Orchard.Blogs.Controllers { return HttpNotFound(); _blogService.Delete(blog); - Services.Notifier.Information(T("Blog deleted")); + Services.Notifier.Success(T("Blog deleted")); return Redirect(Url.BlogsForAdmin()); } @@ -125,7 +125,7 @@ namespace Orchard.Blogs.Controllers { } _contentManager.Publish(blog); - Services.Notifier.Information(T("Blog information updated")); + Services.Notifier.Success(T("Blog information updated")); return Redirect(Url.BlogsForAdmin()); } @@ -142,7 +142,7 @@ namespace Orchard.Blogs.Controllers { _blogService.Delete(blog); - Services.Notifier.Information(T("Blog was successfully deleted")); + Services.Notifier.Success(T("Blog was successfully deleted")); return Redirect(Url.BlogsForAdmin()); } diff --git a/src/Orchard.Web/Modules/Orchard.Blogs/Controllers/BlogPostAdminController.cs b/src/Orchard.Web/Modules/Orchard.Blogs/Controllers/BlogPostAdminController.cs index bc389815a..9a3a46c3f 100644 --- a/src/Orchard.Web/Modules/Orchard.Blogs/Controllers/BlogPostAdminController.cs +++ b/src/Orchard.Web/Modules/Orchard.Blogs/Controllers/BlogPostAdminController.cs @@ -94,7 +94,7 @@ namespace Orchard.Blogs.Controllers { Services.ContentManager.Publish(blogPost.ContentItem); } - Services.Notifier.Information(T("Your {0} has been created.", blogPost.TypeDefinition.DisplayName)); + Services.Notifier.Success(T("Your {0} has been created.", blogPost.TypeDefinition.DisplayName)); return Redirect(Url.BlogPostEdit(blogPost)); } @@ -165,7 +165,7 @@ namespace Orchard.Blogs.Controllers { conditionallyPublish(blogPost.ContentItem); - Services.Notifier.Information(T("Your {0} has been saved.", blogPost.TypeDefinition.DisplayName)); + Services.Notifier.Success(T("Your {0} has been saved.", blogPost.TypeDefinition.DisplayName)); return this.RedirectLocal(returnUrl, Url.BlogPostEdit(blogPost)); } @@ -175,7 +175,7 @@ namespace Orchard.Blogs.Controllers { // get the current draft version var draft = Services.ContentManager.Get(id, VersionOptions.Draft); if (draft == null) { - Services.Notifier.Information(T("There is no draft to discard.")); + Services.Notifier.Warning(T("There is no draft to discard.")); return RedirectToEdit(id); } @@ -186,7 +186,7 @@ namespace Orchard.Blogs.Controllers { // locate the published revision to revert onto var published = Services.ContentManager.Get(id, VersionOptions.Published); if (published == null) { - Services.Notifier.Information(T("Can not discard draft on unpublished blog post.")); + Services.Notifier.Error(T("Can not discard draft on unpublished blog post.")); return RedirectToEdit(draft); } @@ -195,7 +195,7 @@ namespace Orchard.Blogs.Controllers { draft.VersionRecord.Latest = false; published.VersionRecord.Latest = true; - Services.Notifier.Information(T("Blog post draft version discarded")); + Services.Notifier.Success(T("Blog post draft version discarded")); return RedirectToEdit(published); } @@ -225,7 +225,7 @@ namespace Orchard.Blogs.Controllers { return new HttpUnauthorizedResult(); _blogPostService.Delete(post); - Services.Notifier.Information(T("Blog post was successfully deleted")); + Services.Notifier.Success(T("Blog post was successfully deleted")); return Redirect(Url.BlogForAdmin(blog.As())); } @@ -244,7 +244,7 @@ namespace Orchard.Blogs.Controllers { return new HttpUnauthorizedResult(); _blogPostService.Publish(post); - Services.Notifier.Information(T("Blog post successfully published.")); + Services.Notifier.Success(T("Blog post successfully published.")); return Redirect(Url.BlogForAdmin(blog.As())); } @@ -263,7 +263,7 @@ namespace Orchard.Blogs.Controllers { return new HttpUnauthorizedResult(); _blogPostService.Unpublish(post); - Services.Notifier.Information(T("Blog post successfully unpublished.")); + Services.Notifier.Success(T("Blog post successfully unpublished.")); return Redirect(Url.BlogForAdmin(blog.As())); } diff --git a/src/Orchard.Web/Modules/Orchard.Comments/Controllers/CommentController.cs b/src/Orchard.Web/Modules/Orchard.Comments/Controllers/CommentController.cs index 4e62661c4..a239e3c5c 100644 --- a/src/Orchard.Web/Modules/Orchard.Comments/Controllers/CommentController.cs +++ b/src/Orchard.Web/Modules/Orchard.Comments/Controllers/CommentController.cs @@ -105,14 +105,14 @@ namespace Orchard.Comments.Controllers { // if the user who submitted the comment has the right to moderate, don't make this comment moderated if (Services.Authorizer.Authorize(Permissions.ManageComments)) { commentPart.Status = CommentStatus.Approved; - Services.Notifier.Information(T("Your comment has been posted.")); + Services.Notifier.Success(T("Your comment has been posted.")); } else { Services.Notifier.Information(T("Your comment will appear after the site administrator approves it.")); } } else { - Services.Notifier.Information(T("Your comment has been posted.")); + Services.Notifier.Success(T("Your comment has been posted.")); } // send email notification @@ -141,7 +141,7 @@ namespace Orchard.Comments.Controllers { _commentService.ApproveComment(id); } - Services.Notifier.Information(T("Comment approved successfully")); + Services.Notifier.Success(T("Comment approved successfully")); return Redirect("~/"); } @@ -151,7 +151,7 @@ namespace Orchard.Comments.Controllers { _commentService.DeleteComment(id); } - Services.Notifier.Information(T("Comment deleted successfully")); + Services.Notifier.Success(T("Comment deleted successfully")); return Redirect("~/"); } @@ -161,7 +161,7 @@ namespace Orchard.Comments.Controllers { _commentService.UnapproveComment(id); } - Services.Notifier.Information(T("Comment moderated successfully")); + Services.Notifier.Success(T("Comment moderated successfully")); return Redirect("~/"); } diff --git a/src/Orchard.Web/Modules/Orchard.Comments/Drivers/CommentPartDriver.cs b/src/Orchard.Web/Modules/Orchard.Comments/Drivers/CommentPartDriver.cs index 6f967bd7b..cd79d4b4f 100644 --- a/src/Orchard.Web/Modules/Orchard.Comments/Drivers/CommentPartDriver.cs +++ b/src/Orchard.Web/Modules/Orchard.Comments/Drivers/CommentPartDriver.cs @@ -68,7 +68,7 @@ namespace Orchard.Comments.Drivers { if (!string.IsNullOrEmpty(name) && String.Equals(name, "moderate", StringComparison.OrdinalIgnoreCase)) { if (_orchardServices.Authorizer.Authorize(Permissions.ManageComments, T("Couldn't moderate comment"))) { _commentService.UnapproveComment(part.Id); - _orchardServices.Notifier.Information(T("Comment successfully moderated.")); + _orchardServices.Notifier.Success(T("Comment successfully moderated.")); return Editor(part, shapeHelper); } } @@ -76,7 +76,7 @@ namespace Orchard.Comments.Drivers { if (!string.IsNullOrEmpty(name) && String.Equals(name, "approve", StringComparison.OrdinalIgnoreCase)) { if (_orchardServices.Authorizer.Authorize(Permissions.ManageComments, T("Couldn't approve comment"))) { _commentService.ApproveComment(part.Id); - _orchardServices.Notifier.Information(T("Comment approved.")); + _orchardServices.Notifier.Success(T("Comment approved.")); return Editor(part, shapeHelper); } } @@ -84,14 +84,14 @@ namespace Orchard.Comments.Drivers { if (!string.IsNullOrEmpty(name) && String.Equals(name, "delete", StringComparison.OrdinalIgnoreCase)) { if (_orchardServices.Authorizer.Authorize(Permissions.ManageComments, T("Couldn't delete comment"))) { _commentService.DeleteComment(part.Id); - _orchardServices.Notifier.Information(T("Comment successfully deleted.")); + _orchardServices.Notifier.Success(T("Comment successfully deleted.")); return Editor(part, shapeHelper); } } // if editing from the admin, don't update the owner or the status if (!string.IsNullOrEmpty(name) && String.Equals(name, "save", StringComparison.OrdinalIgnoreCase)) { - _orchardServices.Notifier.Information(T("Comment saved.")); + _orchardServices.Notifier.Success(T("Comment saved.")); return Editor(part, shapeHelper); } diff --git a/src/Orchard.Web/Modules/Orchard.ContentTypes/Controllers/AdminController.cs b/src/Orchard.Web/Modules/Orchard.ContentTypes/Controllers/AdminController.cs index ee8d623c5..dbb560b02 100644 --- a/src/Orchard.Web/Modules/Orchard.ContentTypes/Controllers/AdminController.cs +++ b/src/Orchard.Web/Modules/Orchard.ContentTypes/Controllers/AdminController.cs @@ -108,7 +108,7 @@ namespace Orchard.ContentTypes.Controllers { var typeViewModel = new EditTypeViewModel(contentTypeDefinition); - Services.Notifier.Information(T("The \"{0}\" content type has been created.", typeViewModel.DisplayName)); + Services.Notifier.Success(T("The \"{0}\" content type has been created.", typeViewModel.DisplayName)); return RedirectToAction("AddPartsTo", new { id = typeViewModel.Name }); } @@ -252,7 +252,7 @@ namespace Orchard.ContentTypes.Controllers { return View(typeViewModel); } - Services.Notifier.Information(T("\"{0}\" settings have been saved.", typeViewModel.DisplayName)); + Services.Notifier.Success(T("\"{0}\" settings have been saved.", typeViewModel.DisplayName)); return RedirectToAction("Edit", new { id }); } @@ -270,7 +270,7 @@ namespace Orchard.ContentTypes.Controllers { _contentDefinitionService.RemoveType(id, true); - Services.Notifier.Information(T("\"{0}\" has been removed.", typeViewModel.DisplayName)); + Services.Notifier.Success(T("\"{0}\" has been removed.", typeViewModel.DisplayName)); return RedirectToAction("List"); } @@ -314,7 +314,7 @@ namespace Orchard.ContentTypes.Controllers { var partsToAdd = viewModel.PartSelections.Where(ps => ps.IsSelected).Select(ps => ps.PartName); foreach (var partToAdd in partsToAdd) { _contentDefinitionService.AddPartToType(partToAdd, typeViewModel.Name); - Services.Notifier.Information(T("The \"{0}\" part has been added.", partToAdd)); + Services.Notifier.Success(T("The \"{0}\" part has been added.", partToAdd)); } if (!ModelState.IsValid) { @@ -362,7 +362,7 @@ namespace Orchard.ContentTypes.Controllers { return View(viewModel); } - Services.Notifier.Information(T("The \"{0}\" part has been removed.", viewModel.Name)); + Services.Notifier.Success(T("The \"{0}\" part has been removed.", viewModel.Name)); return RedirectToAction("Edit", new {id}); } @@ -399,11 +399,11 @@ namespace Orchard.ContentTypes.Controllers { var partViewModel = _contentDefinitionService.AddPart(viewModel); if (partViewModel == null) { - Services.Notifier.Information(T("The content part could not be created.")); + Services.Notifier.Error(T("The content part could not be created.")); return View(viewModel); } - Services.Notifier.Information(T("The \"{0}\" content part has been created.", partViewModel.Name)); + Services.Notifier.Success(T("The \"{0}\" content part has been created.", partViewModel.Name)); return RedirectToAction("EditPart", new { id = partViewModel.Name }); } @@ -440,7 +440,7 @@ namespace Orchard.ContentTypes.Controllers { return View(partViewModel); } - Services.Notifier.Information(T("\"{0}\" settings have been saved.", partViewModel.Name)); + Services.Notifier.Success(T("\"{0}\" settings have been saved.", partViewModel.Name)); return RedirectToAction("ListParts"); } @@ -458,8 +458,8 @@ namespace Orchard.ContentTypes.Controllers { return HttpNotFound(); _contentDefinitionService.RemovePart(id); - - Services.Notifier.Information(T("\"{0}\" has been removed.", partViewModel.DisplayName)); + + Services.Notifier.Success(T("\"{0}\" has been removed.", partViewModel.DisplayName)); return RedirectToAction("ListParts"); } @@ -547,12 +547,12 @@ namespace Orchard.ContentTypes.Controllers { _contentDefinitionService.AddFieldToPart(viewModel.Name, viewModel.DisplayName, viewModel.FieldTypeName, partViewModel.Name); } catch (Exception ex) { - Services.Notifier.Information(T("The \"{0}\" field was not added. {1}", viewModel.DisplayName, ex.Message)); + Services.Notifier.Error(T("The \"{0}\" field was not added. {1}", viewModel.DisplayName, ex.Message)); Services.TransactionManager.Cancel(); return AddFieldTo(id); } - Services.Notifier.Information(T("The \"{0}\" field has been added.", viewModel.DisplayName)); + Services.Notifier.Success(T("The \"{0}\" field has been added.", viewModel.DisplayName)); if (typeViewModel != null) { return RedirectToAction("Edit", new {id}); @@ -626,7 +626,7 @@ namespace Orchard.ContentTypes.Controllers { _contentDefinitionService.AlterField(partViewModel, viewModel); - Services.Notifier.Information(T("Display name changed to {0}.", viewModel.DisplayName)); + Services.Notifier.Success(T("Display name changed to {0}.", viewModel.DisplayName)); // redirect to the type editor if a type exists with this name var typeViewModel = _contentDefinitionService.GetType(id); @@ -674,7 +674,7 @@ namespace Orchard.ContentTypes.Controllers { return View(viewModel); } - Services.Notifier.Information(T("The \"{0}\" field has been removed.", viewModel.Name)); + Services.Notifier.Success(T("The \"{0}\" field has been removed.", viewModel.Name)); if (_contentDefinitionService.GetType(id) != null) return RedirectToAction("Edit", new { id }); diff --git a/src/Orchard.Web/Modules/Orchard.CustomForms/Controllers/ItemController.cs b/src/Orchard.Web/Modules/Orchard.CustomForms/Controllers/ItemController.cs index ee278e0df..d4f62b1db 100644 --- a/src/Orchard.Web/Modules/Orchard.CustomForms/Controllers/ItemController.cs +++ b/src/Orchard.Web/Modules/Orchard.CustomForms/Controllers/ItemController.cs @@ -170,7 +170,7 @@ namespace Orchard.CustomForms.Controllers { // writes a confirmation message if (customForm.CustomMessage) { if (!String.IsNullOrWhiteSpace(customForm.Message)) { - Services.Notifier.Information(T(customForm.Message)); + Services.Notifier.Success(T(customForm.Message)); } } diff --git a/src/Orchard.Web/Modules/Orchard.Dashboards/Controllers/DashboardController.cs b/src/Orchard.Web/Modules/Orchard.Dashboards/Controllers/DashboardController.cs index e2bcb5343..5e1d3d91f 100644 --- a/src/Orchard.Web/Modules/Orchard.Dashboards/Controllers/DashboardController.cs +++ b/src/Orchard.Web/Modules/Orchard.Dashboards/Controllers/DashboardController.cs @@ -48,7 +48,7 @@ namespace Orchard.Dashboards.Controllers { return UpdateDashboard(dashboard => { if (!dashboard.Has() && !dashboard.TypeDefinition.Settings.GetModel().Draftable) _services.ContentManager.Publish(dashboard); - _services.Notifier.Information(T("Your dashboard has been saved.")); + _services.Notifier.Success(T("Your dashboard has been saved.")); }); } @@ -61,7 +61,7 @@ namespace Orchard.Dashboards.Controllers { return UpdateDashboard(dashboard => { _services.ContentManager.Publish(dashboard); - _services.Notifier.Information(T("Your dashboard has been published.")); + _services.Notifier.Success(T("Your dashboard has been published.")); }); } @@ -79,7 +79,7 @@ namespace Orchard.Dashboards.Controllers { if (contentItem != null) conditonallyPublish(contentItem); else - _services.Notifier.Information(T("Your dashboard has been saved.")); + _services.Notifier.Success(T("Your dashboard has been saved.")); return RedirectToAction("Edit"); } diff --git a/src/Orchard.Web/Modules/Orchard.DynamicForms/Controllers/SubmissionAdminController.cs b/src/Orchard.Web/Modules/Orchard.DynamicForms/Controllers/SubmissionAdminController.cs index 956d78c35..8fe29f0e7 100644 --- a/src/Orchard.Web/Modules/Orchard.DynamicForms/Controllers/SubmissionAdminController.cs +++ b/src/Orchard.Web/Modules/Orchard.DynamicForms/Controllers/SubmissionAdminController.cs @@ -56,7 +56,7 @@ namespace Orchard.DynamicForms.Controllers { return HttpNotFound(); _formService.DeleteSubmission(submission); - _services.Notifier.Information(T("That submission has been deleted.")); + _services.Notifier.Success(T("That submission has been deleted.")); return Redirect(Request.UrlReferrer.ToString()); } @@ -69,7 +69,7 @@ namespace Orchard.DynamicForms.Controllers { } else { var numDeletedSubmissions = _formService.DeleteSubmissions(submissionIds); - _services.Notifier.Information(T("{0} submissions have been deleted.", numDeletedSubmissions)); + _services.Notifier.Success(T("{0} submissions have been deleted.", numDeletedSubmissions)); } return Redirect(Request.UrlReferrer.ToString()); diff --git a/src/Orchard.Web/Modules/Orchard.DynamicForms/Handlers/FormSubmissionCoordinator.cs b/src/Orchard.Web/Modules/Orchard.DynamicForms/Handlers/FormSubmissionCoordinator.cs index 9bf6bc31d..87bf0ba6a 100644 --- a/src/Orchard.Web/Modules/Orchard.DynamicForms/Handlers/FormSubmissionCoordinator.cs +++ b/src/Orchard.Web/Modules/Orchard.DynamicForms/Handlers/FormSubmissionCoordinator.cs @@ -54,7 +54,7 @@ namespace Orchard.DynamicForms.Handlers { // Notifiy. if (!String.IsNullOrWhiteSpace(form.Notification)) - _notifier.Information(T(_tokenizer.Replace(T(form.Notification).Text, tokenData))); + _notifier.Success(T(_tokenizer.Replace(T(form.Notification).Text, tokenData))); // Trigger workflow event. _workflowManager.TriggerEvent(DynamicFormSubmittedActivity.EventName, contentItem, () => tokenData); diff --git a/src/Orchard.Web/Modules/Orchard.Indexing/Controllers/AdminController.cs b/src/Orchard.Web/Modules/Orchard.Indexing/Controllers/AdminController.cs index 47c095d0b..2f446f115 100644 --- a/src/Orchard.Web/Modules/Orchard.Indexing/Controllers/AdminController.cs +++ b/src/Orchard.Web/Modules/Orchard.Indexing/Controllers/AdminController.cs @@ -80,7 +80,7 @@ namespace Orchard.Indexing.Controllers { try { provider.CreateIndex(id); - Services.Notifier.Information(T("Index named {0} created successfully", id)); + Services.Notifier.Success(T("Index named {0} created successfully", id)); } catch(Exception e) { Services.Notifier.Error(T("An error occured while creating the index: {0}", id)); diff --git a/src/Orchard.Web/Modules/Orchard.Indexing/Services/IndexingService.cs b/src/Orchard.Web/Modules/Orchard.Indexing/Services/IndexingService.cs index c1289814a..0ac6d395d 100644 --- a/src/Orchard.Web/Modules/Orchard.Indexing/Services/IndexingService.cs +++ b/src/Orchard.Web/Modules/Orchard.Indexing/Services/IndexingService.cs @@ -36,7 +36,7 @@ namespace Orchard.Indexing.Services { } if(_indexingTaskExecutor.RebuildIndex(indexName)) { - Services.Notifier.Information(T("The index {0} has been rebuilt.", indexName)); + Services.Notifier.Success(T("The index {0} has been rebuilt.", indexName)); UpdateIndex(indexName); } else { @@ -53,7 +53,7 @@ namespace Orchard.Indexing.Services { } if (_indexingTaskExecutor.DeleteIndex(indexName)) { - Services.Notifier.Information(T("The index {0} has been deleted.", indexName)); + Services.Notifier.Success(T("The index {0} has been deleted.", indexName)); } else { Services.Notifier.Warning(T("The index {0} could not be deleted. It might already be in use, please try again later.", indexName)); @@ -67,7 +67,7 @@ namespace Orchard.Indexing.Services { handler.UpdateIndex(indexName); } - Services.Notifier.Information(T("The index {0} has been updated.", indexName)); + Services.Notifier.Success(T("The index {0} has been updated.", indexName)); } IndexEntry IIndexingService.GetIndexEntry(string indexName) { diff --git a/src/Orchard.Web/Modules/Orchard.Layouts/Controllers/BlueprintAdminController.cs b/src/Orchard.Web/Modules/Orchard.Layouts/Controllers/BlueprintAdminController.cs index 6c5b8ae36..b4425f933 100644 --- a/src/Orchard.Web/Modules/Orchard.Layouts/Controllers/BlueprintAdminController.cs +++ b/src/Orchard.Web/Modules/Orchard.Layouts/Controllers/BlueprintAdminController.cs @@ -177,7 +177,7 @@ namespace Orchard.Layouts.Controllers { blueprint.BaseElementState = data.Serialize(); _signals.Trigger(Signals.ElementDescriptors); - _notifier.Information(T("That blueprint has been saved.")); + _notifier.Success(T("That blueprint has been saved.")); return RedirectToAction("Index"); } @@ -223,7 +223,7 @@ namespace Orchard.Layouts.Controllers { blueprint.ElementDescription = model.ElementDescription.TrimSafe(); blueprint.ElementCategory = model.ElementCategory.TrimSafe(); - _notifier.Information(T("That blueprint's properties have been saved.")); + _notifier.Success(T("That blueprint's properties have been saved.")); return RedirectToAction("Index"); } @@ -239,7 +239,7 @@ namespace Orchard.Layouts.Controllers { return HttpNotFound(); _elementBlueprintService.DeleteBlueprint(blueprint); - _notifier.Information(T("That blueprint has been deleted.")); + _notifier.Success(T("That blueprint has been deleted.")); return Redirect(Request.UrlReferrer.ToString()); } @@ -256,7 +256,7 @@ namespace Orchard.Layouts.Controllers { } else { var numDeletedBlueprints = _elementBlueprintService.DeleteBlueprints(blueprintIds); - _notifier.Information(T("{0} blueprints have been deleted.", numDeletedBlueprints)); + _notifier.Success(T("{0} blueprints have been deleted.", numDeletedBlueprints)); } return Redirect(Request.UrlReferrer.ToString()); diff --git a/src/Orchard.Web/Modules/Orchard.Layouts/Styles/admin-dialog.css b/src/Orchard.Web/Modules/Orchard.Layouts/Styles/admin-dialog.css index fb974363f..e78f8be21 100644 --- a/src/Orchard.Web/Modules/Orchard.Layouts/Styles/admin-dialog.css +++ b/src/Orchard.Web/Modules/Orchard.Layouts/Styles/admin-dialog.css @@ -537,11 +537,16 @@ span.message { border:1px solid #e5cece; /* red */ padding-left:26px; } -.message-Information, .notifications { +.message-Success, .notifications { background:#e6f1c9; /* green */ border:1px solid #cfe493; color:#062232; } +.message-Information { + background:#d9edf7; /* blue */ + border:1px solid #bce8f1; + color:#31708f; +} .message-Warning { background:#fdf5bc; /* yellow */ border:1px solid #ffea9b; diff --git a/src/Orchard.Web/Modules/Orchard.Lists/Controllers/AdminController.cs b/src/Orchard.Web/Modules/Orchard.Lists/Controllers/AdminController.cs index 1adb0effe..b29ace4e5 100644 --- a/src/Orchard.Web/Modules/Orchard.Lists/Controllers/AdminController.cs +++ b/src/Orchard.Web/Modules/Orchard.Lists/Controllers/AdminController.cs @@ -135,7 +135,7 @@ namespace Orchard.Lists.Controllers { } _contentManager.Publish(item); } - _services.Notifier.Information(T("Lists successfully published.")); + _services.Notifier.Success(T("Lists successfully published.")); break; case ContentsBulkAction.Unpublish: foreach (var item in checkedContentItems) { @@ -145,7 +145,7 @@ namespace Orchard.Lists.Controllers { } _contentManager.Unpublish(item); } - _services.Notifier.Information(T("Lists successfully unpublished.")); + _services.Notifier.Success(T("Lists successfully unpublished.")); break; case ContentsBulkAction.Remove: foreach (var item in checkedContentItems) { @@ -155,7 +155,7 @@ namespace Orchard.Lists.Controllers { } _contentManager.Remove(item); } - _services.Notifier.Information(T("Lists successfully removed.")); + _services.Notifier.Success(T("Lists successfully removed.")); break; default: throw new ArgumentOutOfRangeException(); @@ -359,15 +359,15 @@ namespace Orchard.Lists.Controllers { switch (operation) { case ViewModels.ListOperation.Reverse: _containerService.Reverse(items); - _services.Notifier.Information(T("The list has been reversed.")); + _services.Notifier.Success(T("The list has been reversed.")); break; case ViewModels.ListOperation.Shuffle: _containerService.Shuffle(items); - _services.Notifier.Information(T("The list has been shuffled.")); + _services.Notifier.Success(T("The list has been shuffled.")); break; case ViewModels.ListOperation.Sort: _containerService.Sort(items, sortBy.GetValueOrDefault(), sortByDirection.GetValueOrDefault()); - _services.Notifier.Information(T("The list has been sorted.")); + _services.Notifier.Success(T("The list has been sorted.")); break; default: _services.Notifier.Error(T("Please select an operation to perform on the list.")); @@ -449,7 +449,7 @@ namespace Orchard.Lists.Controllers { _containerService.MoveItem(item, targetContainer); } - _services.Notifier.Information(T("Content successfully moved to {1}.", Url.Action("List", new { containerId = targetContainerId }), containerDisplayText)); + _services.Notifier.Success(T("Content successfully moved to {1}.", Url.Action("List", new { containerId = targetContainerId }), containerDisplayText)); return true; } @@ -463,7 +463,7 @@ namespace Orchard.Lists.Controllers { item.As().Record.Container = null; _containerService.UpdateItemPath(item.ContentItem); } - _services.Notifier.Information(T("Content successfully removed from the list.")); + _services.Notifier.Success(T("Content successfully removed from the list.")); return true; } @@ -476,7 +476,7 @@ namespace Orchard.Lists.Controllers { _contentManager.Remove(item); } - _services.Notifier.Information(T("Content successfully removed.")); + _services.Notifier.Success(T("Content successfully removed.")); return true; } @@ -489,7 +489,7 @@ namespace Orchard.Lists.Controllers { _contentManager.Unpublish(item); } - _services.Notifier.Information(T("Content successfully unpublished.")); + _services.Notifier.Success(T("Content successfully unpublished.")); return true; } @@ -502,7 +502,7 @@ namespace Orchard.Lists.Controllers { _contentManager.Publish(item); } - _services.Notifier.Information(T("Content successfully published.")); + _services.Notifier.Success(T("Content successfully published.")); return true; } } diff --git a/src/Orchard.Web/Modules/Orchard.Localization/Controllers/AdminController.cs b/src/Orchard.Web/Modules/Orchard.Localization/Controllers/AdminController.cs index 963c0f044..52aa00a3a 100644 --- a/src/Orchard.Web/Modules/Orchard.Localization/Controllers/AdminController.cs +++ b/src/Orchard.Web/Modules/Orchard.Localization/Controllers/AdminController.cs @@ -108,7 +108,7 @@ namespace Orchard.Localization.Controllers { conditionallyPublish(contentItemTranslation.ContentItem); - Services.Notifier.Information(T("Created content item translation.")); + Services.Notifier.Success(T("Created content item translation.")); var metadata = _contentManager.GetItemMetadata(contentItemTranslation); return RedirectToAction(Convert.ToString(metadata.EditorRouteValues["action"]), metadata.EditorRouteValues); diff --git a/src/Orchard.Web/Modules/Orchard.Media/Controllers/AdminController.cs b/src/Orchard.Web/Modules/Orchard.Media/Controllers/AdminController.cs index 8804f5472..3bcc11c1b 100644 --- a/src/Orchard.Web/Modules/Orchard.Media/Controllers/AdminController.cs +++ b/src/Orchard.Web/Modules/Orchard.Media/Controllers/AdminController.cs @@ -68,7 +68,7 @@ namespace Orchard.Media.Controllers { try { _mediaService.CreateFolder(viewModel.MediaPath, viewModel.Name); - Services.Notifier.Information(T("Media folder created")); + Services.Notifier.Success(T("Media folder created")); } catch(ArgumentException argumentException) { Services.Notifier.Error(T("Creating Folder failed: {0}", argumentException.Message)); @@ -102,7 +102,7 @@ namespace Orchard.Media.Controllers { try { _mediaService.DeleteFile(folderName, fileName); - Services.Notifier.Information(T("Media file deleted")); + Services.Notifier.Success(T("Media file deleted")); } catch (ArgumentException argumentException) { Services.Notifier.Error(T("Deleting failed: {0}", argumentException.Message)); @@ -116,7 +116,7 @@ namespace Orchard.Media.Controllers { try { _mediaService.DeleteFolder(folderPath); - Services.Notifier.Information(T("Media folder deleted")); + Services.Notifier.Success(T("Media folder deleted")); } catch(ArgumentException argumentException) { Services.Notifier.Error(T("Deleting failed: {0}", argumentException.Message)); @@ -142,7 +142,7 @@ namespace Orchard.Media.Controllers { UpdateModel(viewModel); try { _mediaService.DeleteFolder(viewModel.MediaPath); - Services.Notifier.Information(T("Media folder deleted")); + Services.Notifier.Success(T("Media folder deleted")); } catch(ArgumentException argumentException) { Services.Notifier.Error(T("Deleting media folder failed: {0}", argumentException.Message)); @@ -162,7 +162,7 @@ namespace Orchard.Media.Controllers { UpdateModel(viewModel); try { _mediaService.RenameFolder(viewModel.MediaPath, viewModel.Name); - Services.Notifier.Information(T("Media folder properties modified")); + Services.Notifier.Success(T("Media folder properties modified")); } catch(ArgumentException argumentException) { Services.Notifier.Error(T("Modifying media folder properties failed: {0}", argumentException.Message)); @@ -217,7 +217,7 @@ namespace Orchard.Media.Controllers { } } - Services.Notifier.Information(T("Media file(s) uploaded")); + Services.Notifier.Success(T("Media file(s) uploaded")); return RedirectToAction("Edit", new { name = viewModel.FolderName, mediaPath = viewModel.MediaPath }); } @@ -266,7 +266,7 @@ namespace Orchard.Media.Controllers { UpdateModel(viewModel); try { _mediaService.DeleteFile(viewModel.Name, viewModel.MediaPath); - Services.Notifier.Information(T("Media deleted")); + Services.Notifier.Success(T("Media deleted")); } catch (ArgumentException argumentException) { Services.Notifier.Error(T("Removing media file failed: {0}", argumentException.Message)); @@ -298,7 +298,7 @@ namespace Orchard.Media.Controllers { viewModelName = input["NewName"]; } - Services.Notifier.Information(T("Media information updated")); + Services.Notifier.Success(T("Media information updated")); return RedirectToAction("EditMedia", new { name = viewModelName, caption = viewModel.Caption, lastUpdated = viewModel.LastUpdated, diff --git a/src/Orchard.Web/Modules/Orchard.MediaLibrary/Controllers/FolderController.cs b/src/Orchard.Web/Modules/Orchard.MediaLibrary/Controllers/FolderController.cs index 33927b245..3fb0ed6e5 100644 --- a/src/Orchard.Web/Modules/Orchard.MediaLibrary/Controllers/FolderController.cs +++ b/src/Orchard.Web/Modules/Orchard.MediaLibrary/Controllers/FolderController.cs @@ -63,7 +63,7 @@ namespace Orchard.MediaLibrary.Controllers { try { _mediaLibraryService.CreateFolder(viewModel.FolderPath, viewModel.Name); - Services.Notifier.Information(T("Media folder created")); + Services.Notifier.Success(T("Media folder created")); } catch (ArgumentException argumentException) { Services.Notifier.Error(T("Creating Folder failed: {0}", argumentException.Message)); @@ -117,7 +117,7 @@ namespace Orchard.MediaLibrary.Controllers { try { _mediaLibraryService.RenameFolder(viewModel.FolderPath, viewModel.Name); - Services.Notifier.Information(T("Media folder renamed")); + Services.Notifier.Success(T("Media folder renamed")); } catch (Exception exception) { Services.Notifier.Error(T("Editing Folder failed: {0}", exception.Message)); @@ -142,7 +142,7 @@ namespace Orchard.MediaLibrary.Controllers { } try { _mediaLibraryService.DeleteFolder(viewModel.FolderPath); - Services.Notifier.Information(T("Media folder deleted")); + Services.Notifier.Success(T("Media folder deleted")); } catch (ArgumentException argumentException) { Services.Notifier.Error(T("Deleting Folder failed: {0}", argumentException.Message)); diff --git a/src/Orchard.Web/Modules/Orchard.MediaLibrary/MediaFileName/MediaFileNameDriver.cs b/src/Orchard.Web/Modules/Orchard.MediaLibrary/MediaFileName/MediaFileNameDriver.cs index ee345abbf..c42c18320 100644 --- a/src/Orchard.Web/Modules/Orchard.MediaLibrary/MediaFileName/MediaFileNameDriver.cs +++ b/src/Orchard.Web/Modules/Orchard.MediaLibrary/MediaFileName/MediaFileNameDriver.cs @@ -62,7 +62,7 @@ namespace Orchard.MediaLibrary.MediaFileName _mediaLibraryService.RenameFile(part.FolderPath, priorFileName, model.FileName); part.FileName = model.FileName; - _notifier.Add(NotifyType.Information, T("File '{0}' was renamed to '{1}'", priorFileName, model.FileName)); + _notifier.Add(NotifyType.Success, T("File '{0}' was renamed to '{1}'", priorFileName, model.FileName)); } catch (Exception) { updater.AddModelError("MediaFileNameEditorSettings.FileName", T("Unable to rename file")); @@ -70,6 +70,7 @@ namespace Orchard.MediaLibrary.MediaFileName } } } + return model; }); } diff --git a/src/Orchard.Web/Modules/Orchard.MediaProcessing/Controllers/AdminController.cs b/src/Orchard.Web/Modules/Orchard.MediaProcessing/Controllers/AdminController.cs index ec1dd6bc0..9c92d7894 100644 --- a/src/Orchard.Web/Modules/Orchard.MediaProcessing/Controllers/AdminController.cs +++ b/src/Orchard.Web/Modules/Orchard.MediaProcessing/Controllers/AdminController.cs @@ -155,7 +155,7 @@ namespace Orchard.MediaProcessing.Controllers { } Services.ContentManager.Remove(profile.ContentItem); - Services.Notifier.Information(T("Image Profile {0} deleted", profile.Name)); + Services.Notifier.Success(T("Image Profile {0} deleted", profile.Name)); return RedirectToAction("Index"); } diff --git a/src/Orchard.Web/Modules/Orchard.MediaProcessing/Controllers/FilterController.cs b/src/Orchard.Web/Modules/Orchard.MediaProcessing/Controllers/FilterController.cs index d40382985..08cf05e9b 100644 --- a/src/Orchard.Web/Modules/Orchard.MediaProcessing/Controllers/FilterController.cs +++ b/src/Orchard.Web/Modules/Orchard.MediaProcessing/Controllers/FilterController.cs @@ -67,7 +67,7 @@ namespace Orchard.MediaProcessing.Controllers { _signals.Trigger("MediaProcessing_Saved_" + filter.ImageProfilePartRecord.Name); - Services.Notifier.Information(T("Filter deleted")); + Services.Notifier.Success(T("Filter deleted")); return RedirectToAction("Edit", "Admin", new {id}); } diff --git a/src/Orchard.Web/Modules/Orchard.Modules/Controllers/AdminController.cs b/src/Orchard.Web/Modules/Orchard.Modules/Controllers/AdminController.cs index a2309e64f..3ebd12623 100644 --- a/src/Orchard.Web/Modules/Orchard.Modules/Controllers/AdminController.cs +++ b/src/Orchard.Web/Modules/Orchard.Modules/Controllers/AdminController.cs @@ -163,7 +163,7 @@ namespace Orchard.Modules.Controllers { Services.Notifier.Error(T("Recipes {0} contains unsupported module installation steps.", recipe.Name)); } - Services.Notifier.Information(T("The recipe {0} was executed successfully.", recipe.Name)); + Services.Notifier.Success(T("The recipe {0} was executed successfully.", recipe.Name)); return RedirectToAction("Recipes"); @@ -229,7 +229,7 @@ namespace Orchard.Modules.Controllers { var id = feature.Descriptor.Id; try { _dataMigrationManager.Update(id); - Services.Notifier.Information(T("The feature {0} was updated successfully", id)); + Services.Notifier.Success(T("The feature {0} was updated successfully", id)); } catch (Exception exception) { Services.Notifier.Error(T("An error occured while updating the feature {0}: {1}", id, exception.Message)); diff --git a/src/Orchard.Web/Modules/Orchard.Modules/Services/ModuleService.cs b/src/Orchard.Web/Modules/Orchard.Modules/Services/ModuleService.cs index dad8e4c01..cbcdbee00 100644 --- a/src/Orchard.Web/Modules/Orchard.Modules/Services/ModuleService.cs +++ b/src/Orchard.Web/Modules/Orchard.Modules/Services/ModuleService.cs @@ -73,7 +73,7 @@ namespace Orchard.Modules.Services { public void EnableFeatures(IEnumerable featureIds, bool force) { foreach (string featureId in _featureManager.EnableFeatures(featureIds, force)) { var featureName = _featureManager.GetAvailableFeatures().First(f => f.Id.Equals(featureId, StringComparison.OrdinalIgnoreCase)).Name; - Services.Notifier.Information(T("{0} was enabled", featureName)); + Services.Notifier.Success(T("{0} was enabled", featureName)); } } @@ -93,7 +93,7 @@ namespace Orchard.Modules.Services { public void DisableFeatures(IEnumerable featureIds, bool force) { foreach (string featureId in _featureManager.DisableFeatures(featureIds, force)) { var featureName = _featureManager.GetAvailableFeatures().Single(f => f.Id.Equals(featureId, StringComparison.OrdinalIgnoreCase)).Name; - Services.Notifier.Information(T("{0} was disabled", featureName)); + Services.Notifier.Success(T("{0} was disabled", featureName)); } } diff --git a/src/Orchard.Web/Modules/Orchard.MultiTenancy/Controllers/AdminController.cs b/src/Orchard.Web/Modules/Orchard.MultiTenancy/Controllers/AdminController.cs index 6cf12eb82..8c5737553 100644 --- a/src/Orchard.Web/Modules/Orchard.MultiTenancy/Controllers/AdminController.cs +++ b/src/Orchard.Web/Modules/Orchard.MultiTenancy/Controllers/AdminController.cs @@ -88,7 +88,7 @@ namespace Orchard.MultiTenancy.Controllers { Modules = viewModel.Modules.Where(x => x.Checked).Select(x => x.ModuleId).ToArray() }); - Services.Notifier.Information(T("Tenant '{0}' was created successfully.", viewModel.Name)); + Services.Notifier.Success(T("Tenant '{0}' was created successfully.", viewModel.Name)); return RedirectToAction("Index"); } catch (ArgumentException ex) { diff --git a/src/Orchard.Web/Modules/Orchard.OutputCache/Controllers/AdminController.cs b/src/Orchard.Web/Modules/Orchard.OutputCache/Controllers/AdminController.cs index f8a042706..ef78b6522 100644 --- a/src/Orchard.Web/Modules/Orchard.OutputCache/Controllers/AdminController.cs +++ b/src/Orchard.Web/Modules/Orchard.OutputCache/Controllers/AdminController.cs @@ -127,7 +127,7 @@ namespace Orchard.OutputCache.Controllers { _signals.Trigger(CacheSettings.CacheKey); _cacheService.SaveRouteConfigs(model.RouteConfigs); - Services.Notifier.Information(T("Output cache settings saved successfully.")); + Services.Notifier.Success(T("Output cache settings saved successfully.")); } else { Services.Notifier.Error(T("Could not save output cache settings.")); diff --git a/src/Orchard.Web/Modules/Orchard.Packaging/Controllers/GalleryController.cs b/src/Orchard.Web/Modules/Orchard.Packaging/Controllers/GalleryController.cs index 87f941d0e..bc108b020 100644 --- a/src/Orchard.Web/Modules/Orchard.Packaging/Controllers/GalleryController.cs +++ b/src/Orchard.Web/Modules/Orchard.Packaging/Controllers/GalleryController.cs @@ -69,7 +69,7 @@ namespace Orchard.Packaging.Controllers { return new HttpUnauthorizedResult(); _packagingSourceManager.RemoveSource(id); - Services.Notifier.Information(T("The feed has been removed successfully.")); + Services.Notifier.Success(T("The feed has been removed successfully.")); return RedirectToAction("Sources"); } @@ -115,7 +115,7 @@ namespace Orchard.Packaging.Controllers { return View(new PackagingAddSourceViewModel { Url = url }); _packagingSourceManager.AddSource(title, url); - Services.Notifier.Information(T("The feed has been added successfully.")); + Services.Notifier.Success(T("The feed has been added successfully.")); return RedirectToAction("Sources"); } diff --git a/src/Orchard.Web/Modules/Orchard.Packaging/Controllers/PackagingServicesController.cs b/src/Orchard.Web/Modules/Orchard.Packaging/Controllers/PackagingServicesController.cs index 718235916..7c9c0dd4d 100644 --- a/src/Orchard.Web/Modules/Orchard.Packaging/Controllers/PackagingServicesController.cs +++ b/src/Orchard.Web/Modules/Orchard.Packaging/Controllers/PackagingServicesController.cs @@ -131,10 +131,10 @@ namespace Orchard.Packaging.Controllers { PackageInfo packageInfo = _packageManager.Install(packageId, version, source.FeedUrl, MapAppRoot()); if (DefaultExtensionTypes.IsTheme(packageInfo.ExtensionType)) { - Services.Notifier.Information(T("The theme has been successfully installed. It can be enabled in the \"Themes\" page accessible from the menu.")); + Services.Notifier.Success(T("The theme has been successfully installed. It can be enabled in the \"Themes\" page accessible from the menu.")); } else if (DefaultExtensionTypes.IsModule(packageInfo.ExtensionType)) { - Services.Notifier.Information(T("The module has been successfully installed.")); + Services.Notifier.Success(T("The module has been successfully installed.")); IPackageRepository packageRepository = PackageRepositoryFactory.Default.CreateRepository(new PackageSource(source.FeedUrl, "Default")); IPackage package = packageRepository.FindPackage(packageId); @@ -175,10 +175,10 @@ namespace Orchard.Packaging.Controllers { System.IO.File.Delete(fullFileName); if (DefaultExtensionTypes.IsTheme(extensionDescriptor.ExtensionType)) { - Services.Notifier.Information(T("The theme has been successfully installed. It can be enabled in the \"Themes\" page accessible from the menu.")); + Services.Notifier.Success(T("The theme has been successfully installed. It can be enabled in the \"Themes\" page accessible from the menu.")); } else if (DefaultExtensionTypes.IsModule(extensionDescriptor.ExtensionType)) { - Services.Notifier.Information(T("The module has been successfully installed.")); + Services.Notifier.Success(T("The module has been successfully installed.")); return InstallPackageDetails(extensionDescriptor, redirectUrl); } @@ -281,7 +281,7 @@ namespace Orchard.Packaging.Controllers { return Redirect(!String.IsNullOrEmpty(retryUrl) ? retryUrl : returnUrl); } - Services.Notifier.Information(T("Uninstalled package \"{0}\"", id)); + Services.Notifier.Success(T("Uninstalled package \"{0}\"", id)); return this.RedirectLocal(returnUrl, "~/"); } diff --git a/src/Orchard.Web/Modules/Orchard.Packaging/Services/PackageInstaller.cs b/src/Orchard.Web/Modules/Orchard.Packaging/Services/PackageInstaller.cs index 9e7ccd689..55d8d4309 100644 --- a/src/Orchard.Web/Modules/Orchard.Packaging/Services/PackageInstaller.cs +++ b/src/Orchard.Web/Modules/Orchard.Packaging/Services/PackageInstaller.cs @@ -270,7 +270,7 @@ namespace Orchard.Packaging.Services { var backupFolder = new DirectoryInfo(localTempPath); _folderUpdater.Restore(backupFolder, source); - _notifier.Information(T("Successfully restored local package to local folder \"{0}\"", source)); + _notifier.Success(T("Successfully restored local package to local folder \"{0}\"", source)); return true; } @@ -299,7 +299,7 @@ namespace Orchard.Packaging.Services { var backupFolder = new DirectoryInfo(localTempPath); _folderUpdater.Backup(source, backupFolder); - _notifier.Information(T("Successfully backed up local package to local folder \"{0}\"", backupFolder)); + _notifier.Success(T("Successfully backed up local package to local folder \"{0}\"", backupFolder)); return true; } @@ -312,7 +312,7 @@ namespace Orchard.Packaging.Services { // package is the same version or an older version try { Uninstall(package.Id, _virtualPathProvider.MapPath("~\\")); - _notifier.Information(T("Successfully un-installed local package {0}", package.ExtensionId())); + _notifier.Success(T("Successfully un-installed local package {0}", package.ExtensionId())); } catch {} } diff --git a/src/Orchard.Web/Modules/Orchard.Projections/Controllers/AdminController.cs b/src/Orchard.Web/Modules/Orchard.Projections/Controllers/AdminController.cs index 01b79f29d..e5dfb543e 100644 --- a/src/Orchard.Web/Modules/Orchard.Projections/Controllers/AdminController.cs +++ b/src/Orchard.Web/Modules/Orchard.Projections/Controllers/AdminController.cs @@ -233,7 +233,7 @@ namespace Orchard.Projections.Controllers { } Services.ContentManager.Remove(query.ContentItem); - Services.Notifier.Information(T("Query {0} deleted", query.Name)); + Services.Notifier.Success(T("Query {0} deleted", query.Name)); return RedirectToAction("Index"); } diff --git a/src/Orchard.Web/Modules/Orchard.Projections/Controllers/BindingController.cs b/src/Orchard.Web/Modules/Orchard.Projections/Controllers/BindingController.cs index 07dce1e19..3d77c6ec8 100644 --- a/src/Orchard.Web/Modules/Orchard.Projections/Controllers/BindingController.cs +++ b/src/Orchard.Web/Modules/Orchard.Projections/Controllers/BindingController.cs @@ -151,7 +151,7 @@ namespace Orchard.Projections.Controllers { Description = model.Description }); - Services.Notifier.Information(T("Binding created successfully")); + Services.Notifier.Success(T("Binding created successfully")); return RedirectToAction("Index"); } @@ -174,14 +174,14 @@ namespace Orchard.Projections.Controllers { var record = recordBluePrints.FirstOrDefault(r => String.Equals(r.Type.FullName, binding.Type, StringComparison.OrdinalIgnoreCase)); if (record == null) { - Services.Notifier.Information(T("The record for this binding is no longer available, please remove it.")); + Services.Notifier.Warning(T("The record for this binding is no longer available, please remove it.")); return RedirectToAction("Index"); } var property = record.Type.GetProperty(binding.Member, BindingFlags.Instance | BindingFlags.Public); if (property == null) { - Services.Notifier.Information(T("The member for this binding is no longer available, please remove it.")); + Services.Notifier.Warning(T("The member for this binding is no longer available, please remove it.")); return RedirectToAction("Index"); } @@ -212,7 +212,7 @@ namespace Orchard.Projections.Controllers { binding.DisplayName = model.Display; binding.Description = model.Description; - Services.Notifier.Information(T("Binding updated successfully")); + Services.Notifier.Success(T("Binding updated successfully")); return RedirectToAction("Index"); } @@ -232,7 +232,7 @@ namespace Orchard.Projections.Controllers { } _repository.Delete(binding); - Services.Notifier.Information(T("Binding deleted")); + Services.Notifier.Success(T("Binding deleted")); return RedirectToAction("Index"); } diff --git a/src/Orchard.Web/Modules/Orchard.Projections/Controllers/FilterController.cs b/src/Orchard.Web/Modules/Orchard.Projections/Controllers/FilterController.cs index 9fa08122d..c0d599b6c 100644 --- a/src/Orchard.Web/Modules/Orchard.Projections/Controllers/FilterController.cs +++ b/src/Orchard.Web/Modules/Orchard.Projections/Controllers/FilterController.cs @@ -96,7 +96,7 @@ namespace Orchard.Projections.Controllers { filter.FilterGroupRecord.Filters.Remove(filter); _repository.Delete(filter); - Services.Notifier.Information(T("Filter deleted")); + Services.Notifier.Success(T("Filter deleted")); return RedirectToAction("Edit", "Admin", new { id }); } diff --git a/src/Orchard.Web/Modules/Orchard.Projections/Controllers/LayoutController.cs b/src/Orchard.Web/Modules/Orchard.Projections/Controllers/LayoutController.cs index fd0f46477..059dc404e 100644 --- a/src/Orchard.Web/Modules/Orchard.Projections/Controllers/LayoutController.cs +++ b/src/Orchard.Web/Modules/Orchard.Projections/Controllers/LayoutController.cs @@ -63,7 +63,7 @@ namespace Orchard.Projections.Controllers { layout.QueryPartRecord.Layouts.Remove(layout); _repository.Delete(layout); - Services.Notifier.Information(T("Layout deleted")); + Services.Notifier.Success(T("Layout deleted")); return RedirectToAction("Edit", "Admin", new { id = queryId }); } @@ -117,7 +117,7 @@ namespace Orchard.Projections.Controllers { layoutRecord.Display = model.Display; layoutRecord.DisplayType = model.DisplayType; - Services.Notifier.Information(T("Layout Created")); + Services.Notifier.Success(T("Layout Created")); _repository.Create(layoutRecord); return RedirectToAction("Edit", new { id = layoutRecord.Id }); @@ -212,7 +212,7 @@ namespace Orchard.Projections.Controllers { layoutRecord.DisplayType = model.DisplayType; layoutRecord.GroupProperty = layoutRecord.Properties.FirstOrDefault(x => x.Id == model.GroupPropertyId); - Services.Notifier.Information(T("Layout Saved")); + Services.Notifier.Success(T("Layout Saved")); return RedirectToAction("Edit", new { id = layoutRecord.Id }); } diff --git a/src/Orchard.Web/Modules/Orchard.Projections/Controllers/PropertyController.cs b/src/Orchard.Web/Modules/Orchard.Projections/Controllers/PropertyController.cs index 85997620c..b6115861f 100644 --- a/src/Orchard.Web/Modules/Orchard.Projections/Controllers/PropertyController.cs +++ b/src/Orchard.Web/Modules/Orchard.Projections/Controllers/PropertyController.cs @@ -66,7 +66,7 @@ namespace Orchard.Projections.Controllers { property.LayoutRecord.Properties.Remove(property); _repository.Delete(property); - Services.Notifier.Information(T("Property deleted")); + Services.Notifier.Success(T("Property deleted")); return RedirectToAction("Edit", "Layout", new { id }); } diff --git a/src/Orchard.Web/Modules/Orchard.Projections/Controllers/SortCriteriaController.cs b/src/Orchard.Web/Modules/Orchard.Projections/Controllers/SortCriteriaController.cs index 1eff06705..b62bb8d32 100644 --- a/src/Orchard.Web/Modules/Orchard.Projections/Controllers/SortCriteriaController.cs +++ b/src/Orchard.Web/Modules/Orchard.Projections/Controllers/SortCriteriaController.cs @@ -64,7 +64,7 @@ namespace Orchard.Projections.Controllers { sortCriterion.QueryPartRecord.SortCriteria.Remove(sortCriterion); _repository.Delete(sortCriterion); - Services.Notifier.Information(T("Sort criteria deleted")); + Services.Notifier.Success(T("Sort criteria deleted")); return RedirectToAction("Edit", "Admin", new { id }); } diff --git a/src/Orchard.Web/Modules/Orchard.Roles/Controllers/AdminController.cs b/src/Orchard.Web/Modules/Orchard.Roles/Controllers/AdminController.cs index fc8cea06f..2fd047fb0 100644 --- a/src/Orchard.Web/Modules/Orchard.Roles/Controllers/AdminController.cs +++ b/src/Orchard.Web/Modules/Orchard.Roles/Controllers/AdminController.cs @@ -155,7 +155,7 @@ namespace Orchard.Roles.Controllers { } _roleService.UpdateRole(viewModel.Id, viewModel.Name, rolePermissions); - Services.Notifier.Information(T("Your Role has been saved.")); + Services.Notifier.Success(T("Your Role has been saved.")); return RedirectToAction("Edit", new { id }); } @@ -171,7 +171,7 @@ namespace Orchard.Roles.Controllers { return new HttpUnauthorizedResult(); _roleService.DeleteRole(id); - Services.Notifier.Information(T("Role was successfully deleted.")); + Services.Notifier.Success(T("Role was successfully deleted.")); return this.RedirectLocal(returnUrl, () => RedirectToAction("Index")); } diff --git a/src/Orchard.Web/Modules/Orchard.Rules/Controllers/ActionController.cs b/src/Orchard.Web/Modules/Orchard.Rules/Controllers/ActionController.cs index 3c6ecdf7b..17565a21b 100644 --- a/src/Orchard.Web/Modules/Orchard.Rules/Controllers/ActionController.cs +++ b/src/Orchard.Web/Modules/Orchard.Rules/Controllers/ActionController.cs @@ -49,7 +49,7 @@ namespace Orchard.Rules.Controllers { return new HttpUnauthorizedResult(); _rulesServices.DeleteAction(actionId); - Services.Notifier.Information(T("Action Deleted")); + Services.Notifier.Success(T("Action Deleted")); return RedirectToAction("Edit", "Admin", new { id }); } diff --git a/src/Orchard.Web/Modules/Orchard.Rules/Controllers/AdminController.cs b/src/Orchard.Web/Modules/Orchard.Rules/Controllers/AdminController.cs index ce585cef6..6fa4172ae 100644 --- a/src/Orchard.Web/Modules/Orchard.Rules/Controllers/AdminController.cs +++ b/src/Orchard.Web/Modules/Orchard.Rules/Controllers/AdminController.cs @@ -252,7 +252,7 @@ namespace Orchard.Rules.Controllers { rule.Name = viewModel.Name; rule.Enabled = viewModel.Enabled; - Services.Notifier.Information(T("Rule Saved")); + Services.Notifier.Success(T("Rule Saved")); return RedirectToAction("Edit", new { id = rule.Id }); } @@ -275,7 +275,7 @@ namespace Orchard.Rules.Controllers { if (rule != null) { _rulesServices.DeleteRule(id); - Services.Notifier.Information(T("Rule {0} deleted", rule.Name)); + Services.Notifier.Success(T("Rule {0} deleted", rule.Name)); } return RedirectToAction("Index"); @@ -289,7 +289,7 @@ namespace Orchard.Rules.Controllers { if (rule != null) { rule.Enabled = true; - Services.Notifier.Information(T("Rule enabled")); + Services.Notifier.Success(T("Rule enabled")); } return RedirectToAction("Index"); @@ -303,7 +303,7 @@ namespace Orchard.Rules.Controllers { if (rule != null) { rule.Enabled = false; - Services.Notifier.Information(T("Rule disabled")); + Services.Notifier.Success(T("Rule disabled")); } return RedirectToAction("Index"); diff --git a/src/Orchard.Web/Modules/Orchard.Rules/Controllers/EventController.cs b/src/Orchard.Web/Modules/Orchard.Rules/Controllers/EventController.cs index 8de3b5975..0bf35c8d2 100644 --- a/src/Orchard.Web/Modules/Orchard.Rules/Controllers/EventController.cs +++ b/src/Orchard.Web/Modules/Orchard.Rules/Controllers/EventController.cs @@ -48,7 +48,7 @@ namespace Orchard.Rules.Controllers { return new HttpUnauthorizedResult(); _rulesServices.DeleteEvent(eventId); - Services.Notifier.Information(T("Event Deleted")); + Services.Notifier.Success(T("Event Deleted")); return RedirectToAction("Edit", "Admin", new { id }); } diff --git a/src/Orchard.Web/Modules/Orchard.Taxonomies/Controllers/AdminController.cs b/src/Orchard.Web/Modules/Orchard.Taxonomies/Controllers/AdminController.cs index 962ffa310..7572c5a14 100644 --- a/src/Orchard.Web/Modules/Orchard.Taxonomies/Controllers/AdminController.cs +++ b/src/Orchard.Web/Modules/Orchard.Taxonomies/Controllers/AdminController.cs @@ -201,7 +201,7 @@ namespace Orchard.Taxonomies.Controllers { } } - Services.Notifier.Information(T("The terms have been imported successfully.")); + Services.Notifier.Success(T("The terms have been imported successfully.")); return RedirectToAction("Index", "TermAdmin", new { taxonomyId = id }); } diff --git a/src/Orchard.Web/Modules/Orchard.Taxonomies/Controllers/TermAdminController.cs b/src/Orchard.Web/Modules/Orchard.Taxonomies/Controllers/TermAdminController.cs index 2b9c1cc94..7b3791d13 100644 --- a/src/Orchard.Web/Modules/Orchard.Taxonomies/Controllers/TermAdminController.cs +++ b/src/Orchard.Web/Modules/Orchard.Taxonomies/Controllers/TermAdminController.cs @@ -100,7 +100,7 @@ namespace Orchard.Taxonomies.Controllers { throw new ArgumentOutOfRangeException(); } - Services.Notifier.Information(T("{0} term have been removed.", checkedEntries.Count)); + Services.Notifier.Success(T("{0} term have been removed.", checkedEntries.Count)); return RedirectToAction("Index", new { taxonomyId = viewModel.TaxonomyId }); } @@ -200,7 +200,7 @@ namespace Orchard.Taxonomies.Controllers { } Services.ContentManager.Publish(term.ContentItem); - Services.Notifier.Information(T("The {0} term has been created.", term.Name)); + Services.Notifier.Success(T("The {0} term has been created.", term.Name)); return RedirectToAction("Index", "TermAdmin", new { taxonomyId }); } @@ -238,7 +238,7 @@ namespace Orchard.Taxonomies.Controllers { Services.ContentManager.Publish(contentItem); _taxonomyService.ProcessPath(term); - Services.Notifier.Information(T("Term information updated")); + Services.Notifier.Success(T("Term information updated")); return RedirectToAction("Index", "TermAdmin", new { taxonomyId = term.TaxonomyId }); } diff --git a/src/Orchard.Web/Modules/Orchard.Taxonomies/Drivers/TaxonomyFieldDriver.cs b/src/Orchard.Web/Modules/Orchard.Taxonomies/Drivers/TaxonomyFieldDriver.cs index b498d6431..00021c084 100644 --- a/src/Orchard.Web/Modules/Orchard.Taxonomies/Drivers/TaxonomyFieldDriver.cs +++ b/src/Orchard.Web/Modules/Orchard.Taxonomies/Drivers/TaxonomyFieldDriver.cs @@ -165,7 +165,7 @@ namespace Orchard.Taxonomies.Drivers { term.Selectable = true; Services.ContentManager.Create(term, VersionOptions.Published); - Services.Notifier.Information(T("The {0} term has been created.", term.Name)); + Services.Notifier.Success(T("The {0} term has been created.", term.Name)); } return term; diff --git a/src/Orchard.Web/Modules/Orchard.Templates/Controllers/AdminController.cs b/src/Orchard.Web/Modules/Orchard.Templates/Controllers/AdminController.cs index 426e7ae02..552433e55 100644 --- a/src/Orchard.Web/Modules/Orchard.Templates/Controllers/AdminController.cs +++ b/src/Orchard.Web/Modules/Orchard.Templates/Controllers/AdminController.cs @@ -136,7 +136,7 @@ namespace Orchard.Templates.Controllers { _contentManager.Publish(item); } - Services.Notifier.Information(T("Content successfully published.")); + Services.Notifier.Success(T("Content successfully published.")); break; case ContentsBulkAction.Unpublish: foreach (var item in checkedContentItems) { @@ -147,7 +147,7 @@ namespace Orchard.Templates.Controllers { _contentManager.Unpublish(item); } - Services.Notifier.Information(T("Content successfully unpublished.")); + Services.Notifier.Success(T("Content successfully unpublished.")); break; case ContentsBulkAction.Remove: foreach (var item in checkedContentItems) { @@ -158,7 +158,7 @@ namespace Orchard.Templates.Controllers { _contentManager.Remove(item); } - Services.Notifier.Information(T("Content successfully removed.")); + Services.Notifier.Success(T("Content successfully removed.")); break; default: throw new ArgumentOutOfRangeException(); diff --git a/src/Orchard.Web/Modules/Orchard.Themes/Controllers/AdminController.cs b/src/Orchard.Web/Modules/Orchard.Themes/Controllers/AdminController.cs index 4290f3701..991d357b6 100644 --- a/src/Orchard.Web/Modules/Orchard.Themes/Controllers/AdminController.cs +++ b/src/Orchard.Web/Modules/Orchard.Themes/Controllers/AdminController.cs @@ -246,7 +246,7 @@ namespace Orchard.Themes.Controllers { try { _dataMigrationManager.Update(themeId); - Services.Notifier.Information(T("The theme {0} was updated successfully.", themeId)); + Services.Notifier.Success(T("The theme {0} was updated successfully", themeId)); Logger.Information("The theme {0} was updated successfully.", themeId); } catch (Exception exception) { Logger.Error(T("An error occured while updating the theme {0}: {1}", themeId, exception.Message).Text); diff --git a/src/Orchard.Web/Modules/Orchard.Themes/Services/ThemeService.cs b/src/Orchard.Web/Modules/Orchard.Themes/Services/ThemeService.cs index 46a4454b4..eaeb536b5 100644 --- a/src/Orchard.Web/Modules/Orchard.Themes/Services/ThemeService.cs +++ b/src/Orchard.Web/Modules/Orchard.Themes/Services/ThemeService.cs @@ -95,7 +95,7 @@ namespace Orchard.Themes.Services { foreach (var featureId in _featureManager.EnableFeatures(new[] { themeId }, true)) { if (themeId != featureId) { var featureName = _featureManager.GetAvailableFeatures().First(f => f.Id.Equals(featureId, StringComparison.OrdinalIgnoreCase)).Name; - Services.Notifier.Information(T("{0} was enabled", featureName)); + Services.Notifier.Success(T("{0} was enabled", featureName)); } } } @@ -194,7 +194,7 @@ namespace Orchard.Themes.Services { public void DisablePreviewFeatures(IEnumerable features) { foreach (var featureId in _featureManager.DisableFeatures(features,true)) { var featureName = _featureManager.GetAvailableFeatures().First(f => f.Id.Equals(featureId, StringComparison.OrdinalIgnoreCase)).Name; - Services.Notifier.Information(T("{0} was disabled", featureName)); + Services.Notifier.Success(T("{0} was disabled", featureName)); } } } diff --git a/src/Orchard.Web/Modules/Orchard.Users/Controllers/AdminController.cs b/src/Orchard.Web/Modules/Orchard.Users/Controllers/AdminController.cs index 1e29bedfa..e3caa411a 100644 --- a/src/Orchard.Web/Modules/Orchard.Users/Controllers/AdminController.cs +++ b/src/Orchard.Web/Modules/Orchard.Users/Controllers/AdminController.cs @@ -210,7 +210,7 @@ namespace Orchard.Users.Controllers { return View(model); } - Services.Notifier.Information(T("User created")); + Services.Notifier.Success(T("User created")); return RedirectToAction("Index"); } @@ -268,7 +268,7 @@ namespace Orchard.Users.Controllers { Services.ContentManager.Publish(user.ContentItem); - Services.Notifier.Information(T("User information updated")); + Services.Notifier.Success(T("User information updated")); return RedirectToAction("Index"); } @@ -288,7 +288,7 @@ namespace Orchard.Users.Controllers { } else{ Services.ContentManager.Remove(user.ContentItem); - Services.Notifier.Information(T("User {0} deleted", user.UserName)); + Services.Notifier.Success(T("User {0} deleted", user.UserName)); } } @@ -309,10 +309,9 @@ namespace Orchard.Users.Controllers { } _userService.SendChallengeEmail(user.As(), nonce => Url.MakeAbsolute(Url.Action("ChallengeEmail", "Account", new { Area = "Orchard.Users", nonce = nonce }), siteUrl)); - Services.Notifier.Information(T("Challenge email sent to {0}", user.UserName)); + Services.Notifier.Success(T("Challenge email sent to {0}", user.UserName)); } - return RedirectToAction("Index"); } @@ -325,7 +324,7 @@ namespace Orchard.Users.Controllers { if ( user != null ) { user.As().RegistrationStatus = UserStatus.Approved; - Services.Notifier.Information(T("User {0} approved", user.UserName)); + Services.Notifier.Success(T("User {0} approved", user.UserName)); _userEventHandlers.Approved(user); } @@ -345,7 +344,7 @@ namespace Orchard.Users.Controllers { } else { user.As().RegistrationStatus = UserStatus.Pending; - Services.Notifier.Information(T("User {0} disabled", user.UserName)); + Services.Notifier.Success(T("User {0} disabled", user.UserName)); } } diff --git a/src/Orchard.Web/Modules/Orchard.Warmup/Controllers/AdminController.cs b/src/Orchard.Web/Modules/Orchard.Warmup/Controllers/AdminController.cs index 11fac783b..95f0e7742 100644 --- a/src/Orchard.Web/Modules/Orchard.Warmup/Controllers/AdminController.cs +++ b/src/Orchard.Web/Modules/Orchard.Warmup/Controllers/AdminController.cs @@ -80,7 +80,7 @@ namespace Orchard.Warmup.Controllers { if (ModelState.IsValid) { _warmupUpdater.Generate(); - Services.Notifier.Information(T("Warmup updated successfully.")); + Services.Notifier.Success(T("Warmup updated successfully.")); } else { Services.TransactionManager.Cancel(); diff --git a/src/Orchard.Web/Modules/Orchard.Widgets/Controllers/AdminController.cs b/src/Orchard.Web/Modules/Orchard.Widgets/Controllers/AdminController.cs index 3d7f6f89c..39e60e5ad 100644 --- a/src/Orchard.Web/Modules/Orchard.Widgets/Controllers/AdminController.cs +++ b/src/Orchard.Web/Modules/Orchard.Widgets/Controllers/AdminController.cs @@ -227,7 +227,7 @@ namespace Orchard.Widgets.Controllers { return View(model); } - Services.Notifier.Information(T("Your {0} has been added.", widgetPart.TypeDefinition.DisplayName)); + Services.Notifier.Success(T("Your {0} has been added.", widgetPart.TypeDefinition.DisplayName)); return this.RedirectLocal(returnUrl, () => RedirectToAction("Index")); } @@ -269,7 +269,7 @@ namespace Orchard.Widgets.Controllers { return View(model); } - Services.Notifier.Information(T("Your {0} has been created.", layerPart.TypeDefinition.DisplayName)); + Services.Notifier.Success(T("Your {0} has been created.", layerPart.TypeDefinition.DisplayName)); return RedirectToAction("Index", "Admin", new { layerId = layerPart.Id }); } @@ -302,7 +302,7 @@ namespace Orchard.Widgets.Controllers { return View(model); } - Services.Notifier.Information(T("Your {0} has been saved.", layerPart.TypeDefinition.DisplayName)); + Services.Notifier.Success(T("Your {0} has been saved.", layerPart.TypeDefinition.DisplayName)); return this.RedirectLocal(returnUrl, () => RedirectToAction("Index")); } @@ -315,7 +315,7 @@ namespace Orchard.Widgets.Controllers { try { _widgetsService.DeleteLayer(id); - Services.Notifier.Information(T("Layer was successfully deleted")); + Services.Notifier.Success(T("Layer was successfully deleted")); } catch (Exception exception) { Logger.Error(T("Removing Layer failed: {0}", exception.Message).Text); @@ -387,7 +387,7 @@ namespace Orchard.Widgets.Controllers { conditionallyPublish(widgetPart.ContentItem); - Services.Notifier.Information(T("Your {0} has been saved.", widgetPart.TypeDefinition.DisplayName)); + Services.Notifier.Success(T("Your {0} has been saved.", widgetPart.TypeDefinition.DisplayName)); } catch (Exception exception) { Logger.Error(T("Editing widget failed: {0}", exception.Message).Text); @@ -412,7 +412,7 @@ namespace Orchard.Widgets.Controllers { return HttpNotFound(); try { _widgetsService.DeleteWidget(widgetPart.Id); - Services.Notifier.Information(T("Widget was successfully deleted")); + Services.Notifier.Success(T("Widget was successfully deleted")); } catch (Exception exception) { Logger.Error(T("Removing Widget failed: {0}", exception.Message).Text); diff --git a/src/Orchard.Web/Modules/Orchard.Workflows/Controllers/AdminController.cs b/src/Orchard.Web/Modules/Orchard.Workflows/Controllers/AdminController.cs index 15959ed04..577d37edc 100644 --- a/src/Orchard.Web/Modules/Orchard.Workflows/Controllers/AdminController.cs +++ b/src/Orchard.Web/Modules/Orchard.Workflows/Controllers/AdminController.cs @@ -145,7 +145,7 @@ namespace Orchard.Workflows.Controllers { if (workflowDefinition != null) { _workflowDefinitionRecords.Delete(workflowDefinition); - Services.Notifier.Information(T("Workflow {0} deleted", workflowDefinition.Name)); + Services.Notifier.Success(T("Workflow {0} deleted", workflowDefinition.Name)); } } break; @@ -263,7 +263,7 @@ namespace Orchard.Workflows.Controllers { if (workflowDefinition != null) { _workflowDefinitionRecords.Delete(workflowDefinition); - Services.Notifier.Information(T("Workflow {0} deleted", workflowDefinition.Name)); + Services.Notifier.Success(T("Workflow {0} deleted", workflowDefinition.Name)); } return RedirectToAction("Index"); @@ -278,7 +278,7 @@ namespace Orchard.Workflows.Controllers { if (workflow != null) { _workflowRecords.Delete(workflow); - Services.Notifier.Information(T("Workflow deleted")); + Services.Notifier.Success(T("Workflow deleted")); } return this.RedirectLocal(returnUrl, () => RedirectToAction("Index")); @@ -389,7 +389,7 @@ namespace Orchard.Workflows.Controllers { } } - Services.Notifier.Information(T("Workflow saved successfully")); + Services.Notifier.Success(T("Workflow saved successfully")); // Don't pass the localId to force the activites to refresh and use the deterministic clientId. return RedirectToAction("Edit", new { id }); diff --git a/src/Orchard.Web/Modules/Upgrade/Controllers/ContentPickerController.cs b/src/Orchard.Web/Modules/Upgrade/Controllers/ContentPickerController.cs index 097056d3d..df7a21699 100644 --- a/src/Orchard.Web/Modules/Upgrade/Controllers/ContentPickerController.cs +++ b/src/Orchard.Web/Modules/Upgrade/Controllers/ContentPickerController.cs @@ -45,8 +45,8 @@ namespace Upgrade.Controllers { try { _upgradeService.ExecuteReader("DELETE FROM " + _upgradeService.GetPrefixedTableName("Orchard_ContentPicker_ContentMenuItemPartRecord"), null); _upgradeService.CopyTable("Navigation_ContentMenuItemPartRecord", "Orchard_ContentPicker_ContentMenuItemPartRecord", new string[0]); - - _orchardServices.Notifier.Information(T("Content Picker menu items were migrated successfully.")); + + _orchardServices.Notifier.Success(T("Content Picker menu items were migrated successfully.")); } catch(Exception e) { Logger.Error(e, "Unexpected error while migrating to Orchard.ContentPicker. Please check the log."); diff --git a/src/Orchard.Web/Modules/Upgrade/Controllers/FieldController.cs b/src/Orchard.Web/Modules/Upgrade/Controllers/FieldController.cs index baa8c49a9..7ece89ab1 100644 --- a/src/Orchard.Web/Modules/Upgrade/Controllers/FieldController.cs +++ b/src/Orchard.Web/Modules/Upgrade/Controllers/FieldController.cs @@ -89,8 +89,8 @@ namespace Upgrade.Controllers { _orchardServices.ContentManager.Clear(); } while (contents.Any()); - - _orchardServices.Notifier.Information(T("{0} fields were migrated successfully", contentType)); + + _orchardServices.Notifier.Success(T("{0} fields were migrated successfully", contentType)); } } diff --git a/src/Orchard.Web/Modules/Upgrade/Controllers/InfosetController.cs b/src/Orchard.Web/Modules/Upgrade/Controllers/InfosetController.cs index d538cd63a..b652b0aec 100644 --- a/src/Orchard.Web/Modules/Upgrade/Controllers/InfosetController.cs +++ b/src/Orchard.Web/Modules/Upgrade/Controllers/InfosetController.cs @@ -278,8 +278,8 @@ namespace Upgrade.Controllers { _upgradeService.ExecuteReader("DROP TABLE " + blogTable, null); } #endregion - - _orchardServices.Notifier.Information(T("Site Settings migrated successfully")); + + _orchardServices.Notifier.Success(T("Site Settings migrated successfully")); return View(); } diff --git a/src/Orchard.Web/Modules/Upgrade/Controllers/MenuController.cs b/src/Orchard.Web/Modules/Upgrade/Controllers/MenuController.cs index 1dfe6e315..e311e0808 100644 --- a/src/Orchard.Web/Modules/Upgrade/Controllers/MenuController.cs +++ b/src/Orchard.Web/Modules/Upgrade/Controllers/MenuController.cs @@ -52,7 +52,7 @@ namespace Upgrade.Controllers { // create a Main Menu var mainMenu = _menuService.Create("Main Menu"); - _orchardServices.Notifier.Information(T("Main menu created")); + _orchardServices.Notifier.Success(T("Main menu created")); // assign the Main Menu to all current menu items foreach (var menuItem in _menuService.Get()) { @@ -62,7 +62,7 @@ namespace Upgrade.Controllers { } menuItem.Menu = mainMenu.ContentItem; } - _orchardServices.Notifier.Information(T("Menu items moved to Main menu")); + _orchardServices.Notifier.Success(T("Menu items moved to Main menu")); // a widget should is created to display the navigation var layer = _widgetsService.GetLayers().FirstOrDefault(x => x.Name == "Default"); diff --git a/src/Orchard.Web/Modules/Upgrade/Controllers/MessagingController.cs b/src/Orchard.Web/Modules/Upgrade/Controllers/MessagingController.cs index 210d5fc32..a2c7d7d4b 100644 --- a/src/Orchard.Web/Modules/Upgrade/Controllers/MessagingController.cs +++ b/src/Orchard.Web/Modules/Upgrade/Controllers/MessagingController.cs @@ -97,7 +97,7 @@ namespace Upgrade.Controllers { record.State = JsonConvert.SerializeObject(newState); }); - _orchardServices.Notifier.Information(T("Email activities updated successfully")); + _orchardServices.Notifier.Success(T("Email activities updated successfully")); } else { _orchardServices.Notifier.Warning(T("No email activities were updated.")); diff --git a/src/Orchard.Web/Modules/Upgrade/Controllers/RouteController.cs b/src/Orchard.Web/Modules/Upgrade/Controllers/RouteController.cs index 57db71bbb..1043d18a6 100644 --- a/src/Orchard.Web/Modules/Upgrade/Controllers/RouteController.cs +++ b/src/Orchard.Web/Modules/Upgrade/Controllers/RouteController.cs @@ -160,7 +160,7 @@ namespace Upgrade.Controllers { _orchardServices.Notifier.Warning(T("Some content items could not be imported. Please refer to the corresponding Report.")); } else { - _orchardServices.Notifier.Information(T("{0} was migrated successfully", contentType)); + _orchardServices.Notifier.Success(T("{0} was migrated successfully", contentType)); } } } diff --git a/src/Orchard.Web/Modules/Upgrade/Controllers/TaxonomyController.cs b/src/Orchard.Web/Modules/Upgrade/Controllers/TaxonomyController.cs index db6a67135..228c462cc 100644 --- a/src/Orchard.Web/Modules/Upgrade/Controllers/TaxonomyController.cs +++ b/src/Orchard.Web/Modules/Upgrade/Controllers/TaxonomyController.cs @@ -61,7 +61,7 @@ namespace Upgrade.Controllers { _upgradeService.CopyTable("Contrib_Taxonomies_TermPartRecord", "Orchard_Taxonomies_TermPartRecord", new string[0]); _upgradeService.CopyTable("Contrib_Taxonomies_TermsPartRecord", "Orchard_Taxonomies_TermsPartRecord", new string[0]); - _orchardServices.Notifier.Information(T("Taxonomies were migrated successfully.")); + _orchardServices.Notifier.Success(T("Taxonomies were migrated successfully.")); } catch(Exception e) { Logger.Error(e, "Unexpected error while migrating to Orchard.Taxonomies. Please check the log."); diff --git a/src/Orchard.Web/Themes/SafeMode/Styles/site.css b/src/Orchard.Web/Themes/SafeMode/Styles/site.css index 404673e7c..0219a7c6e 100644 --- a/src/Orchard.Web/Themes/SafeMode/Styles/site.css +++ b/src/Orchard.Web/Themes/SafeMode/Styles/site.css @@ -315,11 +315,16 @@ span.message { background:#e68585; /* red */ color:#fff; } -.message-Information { +.message-Success { background:#e6f1c9; /* green */ border:1px solid #cfe493; color:#062232; } +.message-Information { + background:#d9edf7; /* blue */ + border:1px solid #bce8f1; + color:#31708f; +} .message-Warning { background:#fdf5bc; /* yellow */ border:1px solid #ffea9b; diff --git a/src/Orchard.Web/Themes/TheAdmin/Styles/site.css b/src/Orchard.Web/Themes/TheAdmin/Styles/site.css index 1429a941e..8bfe3d17e 100644 --- a/src/Orchard.Web/Themes/TheAdmin/Styles/site.css +++ b/src/Orchard.Web/Themes/TheAdmin/Styles/site.css @@ -559,11 +559,16 @@ span.message { border:1px solid #e5cece; /* red */ padding-left:4px 4px 4px 26px; } -.message-Information, .notifications { +.message-Success, .notifications { background:#e6f1c9; /* green */ border:1px solid #cfe493; color:#062232; } +.message-Information { + background:#d9edf7; /* blue */ + border:1px solid #bce8f1; + color:#31708f; +} .message-Warning { background:#fdf5bc; /* yellow */ border:1px solid #ffea9b; diff --git a/src/Orchard.Web/Themes/TheThemeMachine/Styles/Site.css b/src/Orchard.Web/Themes/TheThemeMachine/Styles/Site.css index 2eca2b4c6..184a0e70d 100644 --- a/src/Orchard.Web/Themes/TheThemeMachine/Styles/Site.css +++ b/src/Orchard.Web/Themes/TheThemeMachine/Styles/Site.css @@ -494,7 +494,8 @@ nav ul.breadcrumb /* Confirmations */ .message, .validation-summary-errors { margin:10px 0 4px 0; padding:4px; } .messages a { font-weight:bold; } -.message-Information { background:#e6f1c9; /* green */ border:1px solid #cfe493; color:#062232; } +.message-Success { background:#e6f1c9; /* green */ border:1px solid #cfe493; color:#062232; } +.message-Information { background:#d9edf7; /* blue */ border:1px solid #bce8f1; color:#31708f; } .message-Warning { background:#fdf5bc; /* yellow */ border:1px solid #ffea9b; } .critical.message, .validation-summary-errors, .message-Error { background:#e68585; /* red */ border:1px solid #990808; color:#fff; } diff --git a/src/Orchard/UI/Notify/NotifierExtensions.cs b/src/Orchard/UI/Notify/NotifierExtensions.cs index 1b1796029..77af8a447 100644 --- a/src/Orchard/UI/Notify/NotifierExtensions.cs +++ b/src/Orchard/UI/Notify/NotifierExtensions.cs @@ -28,5 +28,14 @@ namespace Orchard.UI.Notify { public static void Error(this INotifier notifier, LocalizedString message) { notifier.Add(NotifyType.Error, message); } + + /// + /// Adds a new UI notification of type Success + /// + /// + /// A localized message to display + public static void Success(this INotifier notifier, LocalizedString message) { + notifier.Add(NotifyType.Success, message); + } } } \ No newline at end of file diff --git a/src/Orchard/UI/Notify/NotifyEntry.cs b/src/Orchard/UI/Notify/NotifyEntry.cs index 6bec260aa..1baf0bbc3 100644 --- a/src/Orchard/UI/Notify/NotifyEntry.cs +++ b/src/Orchard/UI/Notify/NotifyEntry.cs @@ -4,7 +4,8 @@ namespace Orchard.UI.Notify { public enum NotifyType { Information, Warning, - Error + Error, + Success } public class NotifyEntry {