Renamed Messaging class

--HG--
branch : dev
This commit is contained in:
Sébastien Ros
2010-09-14 17:59:45 -07:00
parent 5bdd4db6db
commit 4308b063b4
3 changed files with 8 additions and 7 deletions

View File

@@ -26,7 +26,7 @@ namespace Orchard.Core.Messaging.Drivers {
protected override DriverResult Editor(MessageSettingsPart part) {
var model = new ContentSubscriptionPartViewModel {
var model = new MessageSettingsPartViewModel {
ChannelServices = _messageQueueManager.GetAvailableChannelServices(),
MessageSettings = part
};
@@ -35,7 +35,7 @@ namespace Orchard.Core.Messaging.Drivers {
}
protected override DriverResult Editor(MessageSettingsPart part, IUpdateModel updater) {
var model = new ContentSubscriptionPartViewModel {
var model = new MessageSettingsPartViewModel {
MessageSettings = part
};

View File

@@ -2,7 +2,7 @@
using System.Collections.Generic;
namespace Orchard.Core.Messaging.ViewModels {
public class ContentSubscriptionPartViewModel {
public class MessageSettingsPartViewModel {
public MessageSettingsPart MessageSettings { get; set; }
public IEnumerable<string> ChannelServices { get; set; }
}

View File

@@ -1,4 +1,4 @@
@model ContentSubscriptionPartViewModel
@model MessageSettingsPartViewModel
@using Orchard.Core.Messaging.Models
@using Orchard.Core.Messaging.ViewModels
<fieldset>
@@ -8,10 +8,11 @@
@if ( Model.ChannelServices.Any() ) {
<select id="@Html.FieldIdFor(m => m.MessageSettings.DefaultChannelService)" name="@Html.FieldNameFor(m => m.MessageSettings.DefaultChannelService)">
@foreach ( var service in Model.ChannelServices ) {
<option @{ if(Model.MessageSettings.DefaultChannelService == service) { <text>selected="selected"</text> } } value="@service">@service</option>
<option @if(Model.MessageSettings.DefaultChannelService == service) { <text>selected="selected"</text> } value="@service">@service</option>
}
}
else {
</select>
}
else {
<span class="hint">@T("You must enable a messaging channel (e.g., Orchard.Email) before being able to send messages.")</span>
}