示例#1
0
        public override IEnumerable <TemplateViewModel> TypePartEditorUpdate(global::Orchard.ContentManagement.MetaData.Builders.ContentTypePartDefinitionBuilder builder, global::Orchard.ContentManagement.IUpdateModel updateModel)
        {
            if (builder.Name != "CreateNotificationPart")
            {
                yield break;
            }
            var model = new CreateNotificationTypePartSettings();

            updateModel.TryUpdateModel(model, "CreateNotificationTypePartSettings", null, null);
            builder.WithSetting("CreateNotificationTypePartSettings.NotifyOwner",
                                (model.NotifyOwner).ToString());
            builder.WithSetting("CreateNotificationTypePartSettings.NotifyContainerOwner",
                                (model.NotifyContainerOwner).ToString());

            builder.WithSetting("CreateNotificationTypePartSettings.UsersToNotify",
                                (model.UsersToNotify));

            yield return(DefinitionTemplate(model));
        }
 protected override DriverResult Editor(HighlightsItemPart part, global::Orchard.ContentManagement.IUpdateModel updater, dynamic shapeHelper)
 {
     updater.TryUpdateModel(part, Prefix, null, null);
     return(Editor(part, shapeHelper));
 }