mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-25 19:17:13 +08:00
Merge branch '1.8.x' into 1.x
Conflicts: src/Orchard.Web/Modules/Orchard.MediaLibrary/Services/MediaLibraryService.cs src/Orchard.Web/Modules/Orchard.Modules/styles/orchard-modules-admin.css src/Orchard.Web/Modules/Orchard.Taxonomies/Services/TaxonomyService.cs src/Orchard.Web/Modules/Orchard.Widgets/Filters/WidgetFilter.cs src/Orchard/Mvc/Routes/RoutePublisher.cs
This commit is contained in:
@@ -60,22 +60,26 @@ namespace Orchard.PublishLater.Drivers {
|
||||
);
|
||||
}
|
||||
|
||||
protected override DriverResult Editor(PublishLaterPart part, dynamic shapeHelper) {
|
||||
var model = new PublishLaterViewModel(part) {
|
||||
Editor = new DateTimeEditor() {
|
||||
private PublishLaterViewModel BuildViewModelFromPart(PublishLaterPart part) {
|
||||
return new PublishLaterViewModel(part) {
|
||||
Editor = new DateTimeEditor() {
|
||||
ShowDate = true,
|
||||
ShowTime = true,
|
||||
Date = !part.IsPublished() ? _dateLocalizationServices.ConvertToLocalizedDateString(part.ScheduledPublishUtc.Value) : "",
|
||||
Time = !part.IsPublished() ? _dateLocalizationServices.ConvertToLocalizedTimeString(part.ScheduledPublishUtc.Value) : "",
|
||||
}
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
protected override DriverResult Editor(PublishLaterPart part, dynamic shapeHelper) {
|
||||
var model = BuildViewModelFromPart(part);
|
||||
|
||||
return ContentShape("Parts_PublishLater_Edit",
|
||||
() => shapeHelper.EditorTemplate(TemplateName: TemplateName, Model: model, Prefix: Prefix));
|
||||
}
|
||||
|
||||
protected override DriverResult Editor(PublishLaterPart part, IUpdateModel updater, dynamic shapeHelper) {
|
||||
var model = new PublishLaterViewModel(part);
|
||||
var model = BuildViewModelFromPart(part);
|
||||
|
||||
updater.TryUpdateModel(model, Prefix, null, null);
|
||||
var httpContext = _httpContextAccessor.Current();
|
||||
|
||||
Reference in New Issue
Block a user