mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-09-24 13:33:34 +08:00
Some work towards moving the content publish editor over to the common part
--HG-- branch : dev
This commit is contained in:
@@ -50,7 +50,7 @@ namespace Orchard.Core.Localization.Controllers {
|
||||
}
|
||||
|
||||
[HttpPost, ActionName("Translate")]
|
||||
public ActionResult TranslatePOST(int id, string command, DateTime? scheduledPublishUtc) {
|
||||
public ActionResult TranslatePOST(int id) {
|
||||
var contentItem = _contentManager.Get(id, VersionOptions.Latest);
|
||||
|
||||
if (contentItem == null)
|
||||
@@ -82,20 +82,6 @@ namespace Orchard.Core.Localization.Controllers {
|
||||
return View(viewModel);
|
||||
}
|
||||
|
||||
switch (command) {
|
||||
case "PublishNow":
|
||||
_localizationService.Publish(contentItemTranslation);
|
||||
Services.Notifier.Information(T("{0} has been published", contentItem.TypeDefinition.DisplayName));
|
||||
break;
|
||||
case "PublishLater":
|
||||
_localizationService.Publish(contentItemTranslation, scheduledPublishUtc.HasValue ? scheduledPublishUtc.Value : DateTime.MaxValue);
|
||||
Services.Notifier.Information(T("{0} has been scheduled for publishing", contentItem.TypeDefinition.DisplayName));
|
||||
break;
|
||||
default:
|
||||
Services.Notifier.Information(T("{0} draft has been saved", contentItem.TypeDefinition.DisplayName));
|
||||
break;
|
||||
}
|
||||
|
||||
var metadata = _contentManager.GetItemMetadata(viewModel.Content.Item);
|
||||
if (metadata.EditorRouteValues == null)
|
||||
return null; //todo: (heskew) redirect to somewhere better than nowhere
|
||||
|
Reference in New Issue
Block a user