();
ServiceContext.ContentTypeService.Save(contentType1);
IContent lastParent = MockedContent.CreateSimpleContent(contentType1);
- lastParent.PublishCulture();
+ lastParent.PublishCulture(CultureType.Invariant);
ServiceContext.ContentService.SaveAndPublish(lastParent);
result.Add(lastParent);
//create 20 deep
@@ -230,7 +230,7 @@ namespace Umbraco.Tests.Services
//only publish evens
if (j % 2 == 0)
{
- content.PublishCulture();
+ content.PublishCulture(CultureType.Invariant);
ServiceContext.ContentService.SaveAndPublish(content);
}
else
diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/content/umbnotificationlist.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/content/umbnotificationlist.directive.js
new file mode 100644
index 0000000000..9b6682cb35
--- /dev/null
+++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/content/umbnotificationlist.directive.js
@@ -0,0 +1,22 @@
+(function () {
+ 'use strict';
+
+ function umbNotificationList() {
+
+ var vm = this;
+
+ }
+
+ var umbNotificationListComponent = {
+ templateUrl: 'views/components/content/umb-notification-list.html',
+ bindings: {
+ notifications: "<"
+ },
+ controllerAs: 'vm',
+ controller: umbNotificationList
+ };
+
+ angular.module("umbraco.directives")
+ .component('umbNotificationList', umbNotificationListComponent);
+
+})();
diff --git a/src/Umbraco.Web.UI.Client/src/views/components/content/umb-notification-list.html b/src/Umbraco.Web.UI.Client/src/views/components/content/umb-notification-list.html
new file mode 100644
index 0000000000..739aab0730
--- /dev/null
+++ b/src/Umbraco.Web.UI.Client/src/views/components/content/umb-notification-list.html
@@ -0,0 +1,8 @@
+
+
+
+
+ {{notification.message}}
+
+
diff --git a/src/Umbraco.Web.UI.Client/src/views/content/overlays/publish.html b/src/Umbraco.Web.UI.Client/src/views/content/overlays/publish.html
index 1bb58c3cd2..3a8fd2b200 100644
--- a/src/Umbraco.Web.UI.Client/src/views/content/overlays/publish.html
+++ b/src/Umbraco.Web.UI.Client/src/views/content/overlays/publish.html
@@ -36,10 +36,8 @@
{{publishVariantSelectorForm.publishVariantSelector.errorMsg}}
-
-
- {{notification.message}}
-
+
+
diff --git a/src/Umbraco.Web.UI.Client/src/views/content/overlays/publishdescendants.html b/src/Umbraco.Web.UI.Client/src/views/content/overlays/publishdescendants.html
index e851029024..0045198134 100644
--- a/src/Umbraco.Web.UI.Client/src/views/content/overlays/publishdescendants.html
+++ b/src/Umbraco.Web.UI.Client/src/views/content/overlays/publishdescendants.html
@@ -64,10 +64,8 @@
{{publishVariantSelectorForm.publishVariantSelector.errorMsg}}
-
-
- {{notification.message}}
-
+
+
diff --git a/src/Umbraco.Web.UI.Client/src/views/content/overlays/save.html b/src/Umbraco.Web.UI.Client/src/views/content/overlays/save.html
index 1656e1761f..7df5b044db 100644
--- a/src/Umbraco.Web.UI.Client/src/views/content/overlays/save.html
+++ b/src/Umbraco.Web.UI.Client/src/views/content/overlays/save.html
@@ -41,10 +41,8 @@
{{saveVariantSelectorForm.saveVariantSelector.errorMsg}}
-
-
- {{notification.message}}
-
+
+
diff --git a/src/Umbraco.Web.UI.Client/src/views/content/overlays/schedule.html b/src/Umbraco.Web.UI.Client/src/views/content/overlays/schedule.html
index 930e001842..88ef5a206a 100644
--- a/src/Umbraco.Web.UI.Client/src/views/content/overlays/schedule.html
+++ b/src/Umbraco.Web.UI.Client/src/views/content/overlays/schedule.html
@@ -170,10 +170,7 @@
{{scheduleSelectorForm.saveVariantReleaseDate.errorMsg}}
-
-
-
{{notification.message}}
-
+
diff --git a/src/Umbraco.Web.UI.Client/src/views/content/overlays/sendtopublish.html b/src/Umbraco.Web.UI.Client/src/views/content/overlays/sendtopublish.html
index c0bbb7fc0e..d10b8fab20 100644
--- a/src/Umbraco.Web.UI.Client/src/views/content/overlays/sendtopublish.html
+++ b/src/Umbraco.Web.UI.Client/src/views/content/overlays/sendtopublish.html
@@ -34,9 +34,8 @@
{{publishVariantSelectorForm.publishVariantSelector.errorMsg}}
-
- {{notification.message}}
-
+
+
diff --git a/src/Umbraco.Web/Editors/ContentController.cs b/src/Umbraco.Web/Editors/ContentController.cs
index b6d0e2a9ff..bf6c39cf9e 100644
--- a/src/Umbraco.Web/Editors/ContentController.cs
+++ b/src/Umbraco.Web/Editors/ContentController.cs
@@ -728,7 +728,7 @@ namespace Umbraco.Web.Editors
break;
}
- var publishStatus = PublishBranchInternal(contentItem, false, out wasCancelled, out var successfulCultures);
+ var publishStatus = PublishBranchInternal(contentItem, false, out wasCancelled, out var successfulCultures).ToList();
//global notifications
AddMessageForPublishStatus(publishStatus, globalNotifications, successfulCultures);
@@ -749,7 +749,7 @@ namespace Umbraco.Web.Editors
break;
}
- var publishStatus = PublishBranchInternal(contentItem, true, out wasCancelled, out var successfulCultures);
+ var publishStatus = PublishBranchInternal(contentItem, true, out wasCancelled, out var successfulCultures).ToList();
//global notifications
AddMessageForPublishStatus(publishStatus, globalNotifications, successfulCultures);
@@ -1341,7 +1341,7 @@ namespace Umbraco.Web.Editors
foreach (var variant in cultureVariants.Where(x => x.Publish))
{
// publishing any culture, implies the invariant culture
- var valid = persistentContent.PublishCulture(variant.Culture);
+ var valid = persistentContent.PublishCulture(CultureType.Single(variant.Culture, IsDefaultCulture(variant.Culture)));
if (!valid)
{
AddCultureValidationError(variant.Culture, "speechBubbles/contentCultureValidationError");
@@ -1942,12 +1942,12 @@ namespace Umbraco.Web.Editors
///
/// Adds notification messages to the outbound display model for a given published status
///
- ///
+ ///
///
///
/// This is null when dealing with invariant content, else it's the cultures that were successfully published
///
- private void AddMessageForPublishStatus(IEnumerable statuses, INotificationModel display, string[] successfulCultures = null)
+ private void AddMessageForPublishStatus(IReadOnlyCollection statuses, INotificationModel display, string[] successfulCultures = null)
{
var totalStatusCount = statuses.Count();
@@ -2046,7 +2046,7 @@ namespace Umbraco.Web.Editors
break;
case PublishResultType.FailedPublishPathNotPublished:
{
- var names = string.Join(", ", status.Select(x => $"{x.Content.Name} ({x.Content.Id})"));
+ var names = string.Join(", ", status.Select(x => x.Content.Name));
display.AddWarningNotification(
Services.TextService.Localize("publish"),
Services.TextService.Localize("publish/contentPublishedFailedByParent",
@@ -2055,13 +2055,13 @@ namespace Umbraco.Web.Editors
break;
case PublishResultType.FailedPublishCancelledByEvent:
{
- var names = string.Join(", ", status.Select(x => $"{x.Content.Name} ({x.Content.Id})"));
+ var names = string.Join(", ", status.Select(x => x.Content.Name));
AddCancelMessage(display, message: "publish/contentPublishedFailedByEvent", messageParams: new[] { names });
}
break;
case PublishResultType.FailedPublishAwaitingRelease:
{
- var names = string.Join(", ", status.Select(x => $"{x.Content.Name} ({x.Content.Id})"));
+ var names = string.Join(", ", status.Select(x => x.Content.Name));
display.AddWarningNotification(
Services.TextService.Localize("publish"),
Services.TextService.Localize("publish/contentPublishedFailedAwaitingRelease",
@@ -2070,7 +2070,7 @@ namespace Umbraco.Web.Editors
break;
case PublishResultType.FailedPublishHasExpired:
{
- var names = string.Join(", ", status.Select(x => $"{x.Content.Name} ({x.Content.Id})"));
+ var names = string.Join(", ", status.Select(x => x.Content.Name));
display.AddWarningNotification(
Services.TextService.Localize("publish"),
Services.TextService.Localize("publish/contentPublishedFailedExpired",
@@ -2079,7 +2079,7 @@ namespace Umbraco.Web.Editors
break;
case PublishResultType.FailedPublishIsTrashed:
{
- var names = string.Join(", ", status.Select(x => $"{x.Content.Name} ({x.Content.Id})"));
+ var names = string.Join(", ", status.Select(x => x.Content.Name));
display.AddWarningNotification(
Services.TextService.Localize("publish"),
Services.TextService.Localize("publish/contentPublishedFailedIsTrashed",
@@ -2088,7 +2088,7 @@ namespace Umbraco.Web.Editors
break;
case PublishResultType.FailedPublishContentInvalid:
{
- var names = string.Join(", ", status.Select(x => $"{x.Content.Name} ({x.Content.Id})"));
+ var names = string.Join(", ", status.Select(x => x.Content.Name));
display.AddWarningNotification(
Services.TextService.Localize("publish"),
Services.TextService.Localize("publish/contentPublishedFailedInvalid",
@@ -2106,6 +2106,16 @@ namespace Umbraco.Web.Editors
}
}
+ ///
+ /// Returns true if the culture specified is the default culture
+ ///
+ ///
+ ///
+ private bool IsDefaultCulture(string culture)
+ {
+ return _allLangs.Value.Any(x => x.Value.IsDefault && x.Key.InvariantEquals(culture));
+ }
+
///
/// Used to map an instance to a and ensuring a language is present if required
///