mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-08-20 08:36:05 +08:00
Using the menu item text in the notification when publishing and unpublishing too
This commit is contained in:
parent
3ec2daa9d6
commit
f66516c87f
@ -262,9 +262,12 @@ namespace Orchard.Core.Navigation.Controllers {
|
|||||||
|
|
||||||
_contentManager.Publish(menuPart.ContentItem);
|
_contentManager.Publish(menuPart.ContentItem);
|
||||||
|
|
||||||
_notifier.Information(string.IsNullOrWhiteSpace(menuPart.TypeDefinition.DisplayName)
|
_notifier.Information(
|
||||||
? T("Your content has been published.")
|
string.IsNullOrWhiteSpace(menuPart.MenuText)
|
||||||
: T("Your {0} has been published.", menuPart.TypeDefinition.DisplayName));
|
? string.IsNullOrWhiteSpace(menuPart.TypeDefinition.DisplayName)
|
||||||
|
? T("Your content has been published.")
|
||||||
|
: T("Your {0} has been published.", menuPart.TypeDefinition.DisplayName)
|
||||||
|
: T("'{0}' has been published.", menuPart.MenuText));
|
||||||
|
|
||||||
return RedirectToAction("Index", new { menuId = menuPart.Menu.Id });
|
return RedirectToAction("Index", new { menuId = menuPart.Menu.Id });
|
||||||
}
|
}
|
||||||
@ -281,9 +284,12 @@ namespace Orchard.Core.Navigation.Controllers {
|
|||||||
|
|
||||||
_contentManager.Unpublish(menuPart.ContentItem);
|
_contentManager.Unpublish(menuPart.ContentItem);
|
||||||
|
|
||||||
_notifier.Information(string.IsNullOrWhiteSpace(menuPart.TypeDefinition.DisplayName)
|
_notifier.Information(
|
||||||
? T("Your content has been unpublished.")
|
string.IsNullOrWhiteSpace(menuPart.MenuText)
|
||||||
: T("Your {0} has been unpublished.", menuPart.TypeDefinition.DisplayName));
|
? string.IsNullOrWhiteSpace(menuPart.TypeDefinition.DisplayName)
|
||||||
|
? T("Your content has been unpublished.")
|
||||||
|
: T("Your {0} has been unpublished.", menuPart.TypeDefinition.DisplayName)
|
||||||
|
: T("'{0}' has been unpublished.", menuPart.MenuText));
|
||||||
|
|
||||||
return RedirectToAction("Index", new { menuId = menuPart.Menu.Id });
|
return RedirectToAction("Index", new { menuId = menuPart.Menu.Id });
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user