Fixes error message on publishing when it fails due to any of these statuses: FailedHasExpired, FailedAwaitingRelease, FailedIsTrashed

This commit is contained in:
Shannon
2014-05-15 13:35:52 +10:00
parent 78613823ae
commit 836297df58
3 changed files with 7 additions and 1 deletions

View File

@@ -87,7 +87,7 @@ namespace Umbraco.Web.WebServices
case PublishStatusType.FailedHasExpired:
case PublishStatusType.FailedAwaitingRelease:
case PublishStatusType.FailedIsTrashed:
return ""; //we will not notify about this type of failure... or should we ?
return "Cannot publish document with a status of " + status.StatusType;
case PublishStatusType.FailedCancelledByEvent:
return ui.Text("publish", "contentPublishedFailedByEvent",
string.Format("{0} ({1})", status.ContentItem.Name, status.ContentItem.Id), UmbracoUser);

View File

@@ -70,6 +70,7 @@ namespace umbraco.presentation.actions
case PublishStatusType.FailedHasExpired:
case PublishStatusType.FailedAwaitingRelease:
case PublishStatusType.FailedIsTrashed:
return "Cannot publish document with a status of " + status.StatusType;
case PublishStatusType.FailedContentInvalid:
return ui.Text("publish", "contentPublishedFailedInvalid",
new[]

View File

@@ -341,6 +341,11 @@ namespace umbraco.cms.presentation
case PublishStatusType.FailedHasExpired:
case PublishStatusType.FailedAwaitingRelease:
case PublishStatusType.FailedIsTrashed:
ClientTools.ShowSpeechBubble(
speechBubbleIcon.warning,
ui.Text("publish"),
"Cannot publish document with a status of " + status.StatusType);
break;
case PublishStatusType.FailedContentInvalid:
ClientTools.ShowSpeechBubble(
speechBubbleIcon.warning,