Some work towards moving the content publish editor over to the common part

--HG--
branch : dev
This commit is contained in:
Nathan Heskew
2010-07-13 10:14:46 -07:00
parent 501d72afab
commit 7c11b79b7d
67 changed files with 208 additions and 6247 deletions

View File

@@ -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