mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 03:25:23 +08:00
Merge
--HG-- branch : dev
This commit is contained in:
@@ -9,6 +9,7 @@ using Orchard.Messaging.Services;
|
||||
namespace Orchard.Core.Messaging.Drivers {
|
||||
[UsedImplicitly]
|
||||
public class MessageSettingsPartDriver : ContentPartDriver<MessageSettingsPart> {
|
||||
private const string TemplateName = "Parts/MessageSettings";
|
||||
private readonly IMessageManager _messageQueueManager;
|
||||
public IOrchardServices Services { get; set; }
|
||||
|
||||
@@ -29,7 +30,7 @@ namespace Orchard.Core.Messaging.Drivers {
|
||||
MessageSettings = part
|
||||
};
|
||||
|
||||
return ContentPartTemplate(model, "Parts/Messaging.MessageSettings");
|
||||
return ContentShape("Parts_MessageSettings_Edit", () => shapeHelper.EditorTemplate(TemplateName: TemplateName, Model: model, Prefix: Prefix));
|
||||
}
|
||||
|
||||
protected override DriverResult Editor(MessageSettingsPart part, IUpdateModel updater, dynamic shapeHelper) {
|
||||
@@ -37,10 +38,9 @@ namespace Orchard.Core.Messaging.Drivers {
|
||||
MessageSettings = part
|
||||
};
|
||||
|
||||
if (updater.TryUpdateModel(model, Prefix, null, null)) {
|
||||
}
|
||||
updater.TryUpdateModel(model, Prefix, null, null);
|
||||
|
||||
return ContentPartTemplate(model, "Parts/Messaging.MessageSettings");
|
||||
return ContentShape("Parts_MessageSettings_Edit", () => shapeHelper.EditorTemplate(TemplateName: TemplateName, Model: model, Prefix: Prefix));
|
||||
}
|
||||
}
|
||||
}
|
@@ -6,8 +6,9 @@ namespace Orchard.Core.Messaging {
|
||||
public int Create() {
|
||||
SchemaBuilder.CreateTable("MessageSettingsPartRecord", table => table
|
||||
.ContentPartRecord()
|
||||
.Column<string>("DefaultChannelService")
|
||||
.Column<string>("DefaultChannelService", c => c.WithLength(64))
|
||||
);
|
||||
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
@@ -1,7 +1,10 @@
|
||||
using Orchard.ContentManagement;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Orchard.ContentManagement;
|
||||
|
||||
namespace Orchard.Core.Messaging.Models {
|
||||
public class MessageSettingsPart : ContentPart<MessageSettingsPartRecord> {
|
||||
|
||||
[StringLength(MessageSettingsPartRecord.DefaultChannelServiceLength)]
|
||||
public string DefaultChannelService {
|
||||
get { return Record.DefaultChannelService; }
|
||||
set { Record.DefaultChannelService = value; }
|
||||
|
@@ -1,10 +1,14 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Orchard.ContentManagement.Records;
|
||||
|
||||
namespace Orchard.Core.Messaging.Models {
|
||||
public class MessageSettingsPartRecord : ContentPartRecord {
|
||||
public const ushort DefaultChannelServiceLength = 64;
|
||||
|
||||
/// <summary>
|
||||
/// Default service used for messages
|
||||
/// </summary>
|
||||
[StringLength(DefaultChannelServiceLength)]
|
||||
public virtual string DefaultChannelService { get; set; }
|
||||
|
||||
}
|
||||
|
3
src/Orchard.Web/Core/Messaging/Placement.info
Normal file
3
src/Orchard.Web/Core/Messaging/Placement.info
Normal file
@@ -0,0 +1,3 @@
|
||||
<Placement>
|
||||
<Place Parts_MessageSettings_Edit="Primary:10"/>
|
||||
</Placement>
|
@@ -268,7 +268,7 @@
|
||||
<Content Include="Contents\Views\Parts\Contents.Publish.cshtml" />
|
||||
<Content Include="Contents\Views\Parts\Contents.Publish.SummaryAdmin.cshtml" />
|
||||
<Content Include="Messaging\Module.txt" />
|
||||
<Content Include="Messaging\Views\EditorTemplates\Parts\Messaging.MessageSettings.cshtml" />
|
||||
<Content Include="Messaging\Views\EditorTemplates\Parts\MessageSettings.cshtml" />
|
||||
<Content Include="PublishLater\Content\Admin\images\draft.gif" />
|
||||
<Content Include="PublishLater\Content\Admin\images\offline.gif" />
|
||||
<Content Include="PublishLater\Content\Admin\images\online.gif" />
|
||||
@@ -382,8 +382,14 @@
|
||||
<None Include="Contents\Placement.info" />
|
||||
<Content Include="Contents\Views\Content.ControlWrapper.cshtml" />
|
||||
<Content Include="Contents\Views\Item\Display.cshtml" />
|
||||
<None Include="Contents\Views\Items\Content.Edit.cshtml" />
|
||||
<None Include="Localization\Placement.info" />
|
||||
<None Include="PublishLater\Placement.info" />
|
||||
<Content Include="Messaging\Placement.info">
|
||||
<SubType>Designer</SubType>
|
||||
</Content>
|
||||
<None Include="PublishLater\Placement.info">
|
||||
<SubType>Designer</SubType>
|
||||
</None>
|
||||
<Content Include="Routable\Views\Parts\RoutableTitle.cshtml" />
|
||||
<None Include="PublishLater\Views\Parts\PublishLater.Metadata.Summary.cshtml" />
|
||||
<Content Include="Routable\Views\Item\Display.cshtml" />
|
||||
|
@@ -1,3 +1,3 @@
|
||||
<Placement>
|
||||
<Place Parts_SmtpSettings_Editor="Primary:10"/>
|
||||
<Place Parts_SmtpSettings_Edit="Primary:10"/>
|
||||
</Placement>
|
||||
|
@@ -103,7 +103,7 @@
|
||||
<ItemGroup>
|
||||
<Content Include="Content\Admin\images\disabled.gif" />
|
||||
<Content Include="Content\Admin\images\enabled.gif" />
|
||||
<Content Include="styles\admin.css" />
|
||||
<Content Include="Styles\admin.css" />
|
||||
<Content Include="Views\Admin\Features.cshtml" />
|
||||
<Content Include="Views\Web.config" />
|
||||
</ItemGroup>
|
||||
|
@@ -119,7 +119,7 @@
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Views\Items\User.Editor.cshtml">
|
||||
<Content Include="Views\Items\User.Edit.cshtml">
|
||||
<SubType>Designer</SubType>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
|
@@ -4,4 +4,4 @@ Description: It's a *really* good theme, yo.
|
||||
Version: 0.1
|
||||
Tags: Awesome
|
||||
Website: http://orchardproject.net
|
||||
Zones: Header, Navigation, Featured, BeforeMain, Messages, BeforeContent, Content, AfterContent, AfterMain, TripelFirst, TripelSecond, TripelThird, FooterQuadFirst, FooterQuadSecond, FooterQuadThird, FooterQuadFourth, Footer, AsideFirst, AsideSecond
|
||||
Zones: Header, Navigation, Featured, BeforeMain, AsideFirst, Messages, BeforeContent, Content, AfterContent, AsideSecond, AfterMain, TripelFirst, TripelSecond, TripelThird, FooterQuadFirst, FooterQuadSecond, FooterQuadThird, FooterQuadFourth, Footer
|
Reference in New Issue
Block a user