mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-09-24 21:43:37 +08:00
Reorganizing modules for new build process
--HG-- branch : dev
This commit is contained in:
@@ -168,6 +168,10 @@
|
||||
<Project>{D9A7B330-CD22-4DA1-A95A-8DE1982AD8EB}</Project>
|
||||
<Name>Orchard.Media</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Orchard.Web\Modules\Orchard.Messaging\Orchard.Messaging.csproj">
|
||||
<Project>{085948FF-0E9B-4A9A-B564-F8B8B4BDDDBC}</Project>
|
||||
<Name>Orchard.Messaging</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Orchard.Web\Modules\Orchard.Modules\Orchard.Modules.csproj">
|
||||
<Project>{17F86780-9A1F-4AA1-86F1-875EEC2730C7}</Project>
|
||||
<Name>Orchard.Modules</Name>
|
||||
|
@@ -10,7 +10,6 @@ using NUnit.Framework;
|
||||
using Orchard.ContentManagement.MetaData;
|
||||
using Orchard.ContentManagement.MetaData.Models;
|
||||
using Orchard.ContentManagement.MetaData.Services;
|
||||
using Orchard.Core.Messaging.Services;
|
||||
using Orchard.Core.Settings.Metadata;
|
||||
using Orchard.Data;
|
||||
using Orchard.DisplayManagement;
|
||||
|
@@ -8,7 +8,6 @@ using NUnit.Framework;
|
||||
using Orchard.ContentManagement.MetaData;
|
||||
using Orchard.ContentManagement.MetaData.Models;
|
||||
using Orchard.ContentManagement.MetaData.Services;
|
||||
using Orchard.Core.Messaging.Services;
|
||||
using Orchard.Core.Settings.Metadata;
|
||||
using Orchard.Data;
|
||||
using Orchard.ContentManagement;
|
||||
|
@@ -113,30 +113,14 @@
|
||||
<Compile Include="Contents\Settings\ContentPartSettings.cs" />
|
||||
<Compile Include="Contents\Shapes.cs" />
|
||||
<Compile Include="Contents\ViewModels\PublishContentViewModel.cs" />
|
||||
<Compile Include="Localization\ResourceManifest.cs" />
|
||||
<Compile Include="Localization\ViewModels\EditLocalizationViewModel.cs" />
|
||||
<Compile Include="Messaging\Migrations.cs" />
|
||||
<Compile Include="Messaging\Drivers\MessageSettingsPartDriver.cs" />
|
||||
<Compile Include="Messaging\Handlers\MessageSettingsPartHandler.cs" />
|
||||
<Compile Include="Messaging\Models\MessageSettingsPart.cs" />
|
||||
<Compile Include="Messaging\Models\MessageSettingsPartRecord.cs" />
|
||||
<Compile Include="Messaging\Services\DefaultMessageManager.cs" />
|
||||
<Compile Include="Messaging\ViewModels\MessageSettingsPartViewModel.cs" />
|
||||
<Compile Include="Navigation\Services\MainMenuNavigationProvider.cs" />
|
||||
<Compile Include="Routable\ResourceManifest.cs" />
|
||||
<Compile Include="Routable\Services\RoutableHomePageProvider.cs" />
|
||||
<Compile Include="Contents\ViewModels\ListContentsViewModel.cs" />
|
||||
<Compile Include="Contents\ViewModels\ListContentTypesViewModel.cs" />
|
||||
<Compile Include="Localization\Services\ILocalizationService.cs" />
|
||||
<Compile Include="Localization\Services\LocalizationService.cs" />
|
||||
<Compile Include="Localization\ViewModels\ContentLocalizationsViewModel.cs" />
|
||||
<Compile Include="Reports\AdminMenu.cs" />
|
||||
<Compile Include="Reports\Controllers\AdminController.cs" />
|
||||
<Compile Include="Reports\Routes.cs" />
|
||||
<Compile Include="Localization\Controllers\AdminController.cs" />
|
||||
<Compile Include="Localization\Migrations.cs" />
|
||||
<Compile Include="Localization\ViewModels\AddLocalizationViewModel.cs" />
|
||||
<Compile Include="Localization\Drivers\LocalizationPartDriver.cs" />
|
||||
<Compile Include="Navigation\Migrations.cs" />
|
||||
<Compile Include="Reports\ViewModels\DisplayReportViewModel.cs" />
|
||||
<Compile Include="Reports\ViewModels\ReportsAdminIndexViewModel.cs" />
|
||||
@@ -182,9 +166,6 @@
|
||||
<Compile Include="Feeds\Rss\RssResult.cs" />
|
||||
<Compile Include="HomePage\Controllers\HomeController.cs" />
|
||||
<Compile Include="HomePage\Routes.cs" />
|
||||
<Compile Include="Localization\Handlers\LocalizationPartHandler.cs" />
|
||||
<Compile Include="Localization\Models\LocalizationPart.cs" />
|
||||
<Compile Include="Localization\Models\LocalizationPartRecord.cs" />
|
||||
<Compile Include="Navigation\AdminMenu.cs" />
|
||||
<Compile Include="Navigation\Controllers\AdminController.cs" />
|
||||
<Compile Include="Navigation\Models\MenuItemPart.cs" />
|
||||
@@ -269,26 +250,16 @@
|
||||
<Content Include="Contents\Views\Admin\Edit.cshtml" />
|
||||
<Content Include="Contents\Views\Admin\List.cshtml" />
|
||||
<Content Include="Feeds\Views\Feed.cshtml" />
|
||||
<Content Include="Localization\Views\EditorTemplates\Parts\Localization.ContentTranslations.Edit.cshtml" />
|
||||
<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\MessageSettings.cshtml" />
|
||||
<Content Include="Common\Views\EditorTemplates\Fields\Common.Text.Edit.cshtml" />
|
||||
<Content Include="Common\Views\EditorTemplates\Parts\Common.Container.cshtml" />
|
||||
<Content Include="Common\Views\EditorTemplates\PlainTextEditor.cshtml" />
|
||||
<Content Include="Contents\Module.txt" />
|
||||
<Content Include="Contents\Views\Admin\CreatableTypeList.cshtml" />
|
||||
<Content Include="Localization\Styles\admin.css" />
|
||||
<Content Include="Localization\Styles\base.css" />
|
||||
<Content Include="Localization\Views\Parts\Localization.ContentTranslations.Summary.cshtml" />
|
||||
<Content Include="Localization\Views\Parts\Localization.ContentTranslations.cshtml" />
|
||||
<Content Include="Reports\Module.txt" />
|
||||
<Content Include="Reports\Views\Admin\Display.cshtml" />
|
||||
<Content Include="Reports\Views\Admin\Index.cshtml" />
|
||||
<Content Include="Localization\Module.txt" />
|
||||
<Content Include="Localization\Views\Admin\Translate.cshtml" />
|
||||
<Content Include="Localization\Views\CultureSelection.cshtml" />
|
||||
<Content Include="Routable\Module.txt" />
|
||||
<Content Include="Routable\Scripts\jquery.slugify.js" />
|
||||
<Content Include="Routable\Views\EditorTemplates\Parts\Routable.RoutePart.cshtml" />
|
||||
@@ -358,9 +329,7 @@
|
||||
<None Include="App_Data\Localization\fr-FR\orchard.core.po" />
|
||||
<Content Include="Contents\Views\Web.config" />
|
||||
<Content Include="Routable\Views\Web.config" />
|
||||
<Content Include="Localization\Views\Web.config" />
|
||||
<Content Include="Reports\Views\Web.config" />
|
||||
<Content Include="Messaging\Views\Web.config" />
|
||||
<Content Include="Contents\Views\Items\Content.cshtml" />
|
||||
<Content Include="Contents\Views\Items\Content.SummaryAdmin.cshtml" />
|
||||
<Content Include="Shapes\Views\Document.cshtml" />
|
||||
@@ -377,13 +346,10 @@
|
||||
</Content>
|
||||
<Content Include="Contents\Views\Content.ControlWrapper.cshtml" />
|
||||
<Content Include="Contents\Views\Item\Display.cshtml" />
|
||||
<Content Include="Localization\Placement.info" />
|
||||
<Content Include="Messaging\Placement.info" />
|
||||
<Content Include="Navigation\Placement.info" />
|
||||
<Content Include="Routable\Views\Parts\RoutableTitle.cshtml" />
|
||||
<Content Include="Routable\Views\Item\Display.cshtml" />
|
||||
<Content Include="Routable\Views\Routable.HomePage.cshtml" />
|
||||
<Content Include="Localization\Views\Parts\Localization.ContentTranslations.SummaryAdmin.cshtml" />
|
||||
<Content Include="Contents\Views\Items\Content.Summary.cshtml" />
|
||||
<Content Include="Shapes\Views\Pager.cshtml" />
|
||||
<Content Include="Contents\Views\Content.SaveButton.cshtml" />
|
||||
@@ -397,9 +363,6 @@
|
||||
<Content Include="Routable\Scripts\Web.config">
|
||||
<SubType>Designer</SubType>
|
||||
</Content>
|
||||
<Content Include="Localization\Styles\Web.config">
|
||||
<SubType>Designer</SubType>
|
||||
</Content>
|
||||
<Content Include="Settings\Styles\Web.config">
|
||||
<SubType>Designer</SubType>
|
||||
</Content>
|
||||
|
@@ -9,4 +9,4 @@ Features:
|
||||
Orchard.ArchiveLater:
|
||||
Description: Scheduled archiving.
|
||||
Category: Content
|
||||
Dependencies: Common, Settings, Orchard.jQuery
|
||||
Dependencies: Common, Scheduling, Orchard.jQuery
|
||||
|
@@ -9,4 +9,4 @@ Features:
|
||||
Orchard.Email:
|
||||
Description: Email Messaging services.
|
||||
Category: Messaging
|
||||
Dependencies: Messaging
|
||||
Dependencies: Orchard.Messaging
|
||||
|
@@ -13,7 +13,7 @@ namespace Orchard.Email.Services {
|
||||
public class EmailMessagingChannel : IMessagingChannel {
|
||||
private readonly IOrchardServices _orchardServices;
|
||||
|
||||
public const string EmailService = "Email";
|
||||
public const string EmailService = "email";
|
||||
|
||||
public EmailMessagingChannel(IOrchardServices orchardServices) {
|
||||
_orchardServices = orchardServices;
|
||||
|
@@ -1,7 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
using Orchard.ContentManagement;
|
||||
using Orchard.Core.Messaging.Models;
|
||||
using Orchard.Localization;
|
||||
using Orchard.Email.Models;
|
||||
using Orchard.UI.Admin.Notification;
|
||||
@@ -25,12 +23,6 @@ namespace Orchard.Email.Services {
|
||||
if ( smtpSettings == null || !smtpSettings.IsValid() ) {
|
||||
yield return new NotifyEntry { Message = T("The SMTP settings needs to be configured." ), Type = NotifyType.Warning};
|
||||
}
|
||||
|
||||
var messageSettings = _orchardServices.WorkContext.CurrentSite.As<MessageSettingsPart>().Record;
|
||||
|
||||
if ( messageSettings == null || String.IsNullOrWhiteSpace(messageSettings.DefaultChannelService) ) {
|
||||
yield return new NotifyEntry { Message = T("The default channel service needs to be configured."), Type = NotifyType.Warning };
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -3,16 +3,14 @@ using System.Linq;
|
||||
using System.Web.Mvc;
|
||||
using Orchard.ContentManagement;
|
||||
using Orchard.ContentManagement.Aspects;
|
||||
using Orchard.Core.Localization.Models;
|
||||
using Orchard.Core.Localization.Services;
|
||||
using Orchard.Core.Localization.ViewModels;
|
||||
using Orchard.Core.Routable.Models;
|
||||
using Orchard.DisplayManagement;
|
||||
using Orchard.Localization;
|
||||
using Orchard.Localization.Models;
|
||||
using Orchard.Localization.Services;
|
||||
using Orchard.Localization.ViewModels;
|
||||
using Orchard.UI.Notify;
|
||||
|
||||
namespace Orchard.Core.Localization.Controllers {
|
||||
namespace Orchard.Localization.Controllers {
|
||||
[ValidateInput(false)]
|
||||
public class AdminController : Controller, IUpdateModel {
|
||||
private readonly IContentManager _contentManager;
|
@@ -3,12 +3,11 @@ using System.Linq;
|
||||
using JetBrains.Annotations;
|
||||
using Orchard.ContentManagement;
|
||||
using Orchard.ContentManagement.Drivers;
|
||||
using Orchard.Core.Localization.Models;
|
||||
using Orchard.Core.Localization.Services;
|
||||
using Orchard.Core.Localization.ViewModels;
|
||||
using Orchard.Localization.Models;
|
||||
using Orchard.Localization.Services;
|
||||
using Orchard.Localization.ViewModels;
|
||||
|
||||
namespace Orchard.Core.Localization.Drivers {
|
||||
namespace Orchard.Localization.Drivers {
|
||||
[UsedImplicitly]
|
||||
public class LocalizationPartDriver : ContentPartDriver<LocalizationPart> {
|
||||
private const string TemplatePrefix = "Localization";
|
@@ -1,13 +1,12 @@
|
||||
using System.Globalization;
|
||||
using JetBrains.Annotations;
|
||||
using Orchard.Core.Localization.Models;
|
||||
using Orchard.Data;
|
||||
using Orchard.Localization;
|
||||
using Orchard.ContentManagement;
|
||||
using Orchard.ContentManagement.Handlers;
|
||||
using Orchard.Localization.Models;
|
||||
using Orchard.Localization.Services;
|
||||
|
||||
namespace Orchard.Core.Localization.Handlers {
|
||||
namespace Orchard.Localization.Handlers {
|
||||
[UsedImplicitly]
|
||||
public class LocalizationPartHandler : ContentHandler {
|
||||
private readonly ICultureManager _cultureManager;
|
@@ -2,7 +2,7 @@
|
||||
using Orchard.Core.Contents.Extensions;
|
||||
using Orchard.Data.Migration;
|
||||
|
||||
namespace Orchard.Core.Localization {
|
||||
namespace Orchard.Localization {
|
||||
public class Migrations : DataMigrationImpl {
|
||||
|
||||
public int Create() {
|
@@ -1,9 +1,8 @@
|
||||
using System.Web.Mvc;
|
||||
using Orchard.ContentManagement;
|
||||
using Orchard.ContentManagement;
|
||||
using Orchard.ContentManagement.Utilities;
|
||||
using Orchard.Localization.Records;
|
||||
|
||||
namespace Orchard.Core.Localization.Models {
|
||||
namespace Orchard.Localization.Models {
|
||||
public sealed class LocalizationPart : ContentPart<LocalizationPartRecord> {
|
||||
private readonly LazyField<CultureRecord> _culture = new LazyField<CultureRecord>();
|
||||
private readonly LazyField<IContent> _masterContentItem = new LazyField<IContent>();
|
@@ -1,6 +1,6 @@
|
||||
using Orchard.ContentManagement.Records;
|
||||
|
||||
namespace Orchard.Core.Localization.Models {
|
||||
namespace Orchard.Localization.Models {
|
||||
public class LocalizationPartRecord : ContentPartRecord {
|
||||
public virtual int CultureId { get; set; }
|
||||
public virtual int MasterContentItemId { get; set; }
|
@@ -6,7 +6,7 @@ Version: 0.8.0
|
||||
OrchardVersion: 0.8.0
|
||||
Description: The localization module enables the localization of content items.
|
||||
Features:
|
||||
Localization:
|
||||
Orchard.Localization:
|
||||
Description: Localize content items.
|
||||
Dependencies: Settings
|
||||
Category: Content
|
@@ -0,0 +1,142 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>8.0.30703</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{FBC8B571-ED50-49D8-8D9D-64AB7454A0D6}</ProjectGuid>
|
||||
<ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>Orchard.Localization</RootNamespace>
|
||||
<AssemblyName>Orchard.Localization</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<FileUpgradeFlags>0</FileUpgradeFlags>
|
||||
<OldToolsVersion>4.0</OldToolsVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.ComponentModel.DataAnnotations" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="System.Web" />
|
||||
<Reference Include="System.Web.ApplicationServices" />
|
||||
<Reference Include="System.Web.DynamicData" />
|
||||
<Reference Include="System.Web.Entity" />
|
||||
<Reference Include="System.Web.Extensions" />
|
||||
<Reference Include="System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\..\lib\aspnetmvc\System.Web.Mvc.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Controllers\AdminController.cs" />
|
||||
<Compile Include="Drivers\LocalizationPartDriver.cs" />
|
||||
<Compile Include="Handlers\LocalizationPartHandler.cs" />
|
||||
<Compile Include="Migrations.cs" />
|
||||
<Compile Include="Models\LocalizationPart.cs" />
|
||||
<Compile Include="Models\LocalizationPartRecord.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="ResourceManifest.cs" />
|
||||
<Compile Include="Services\ILocalizationService.cs" />
|
||||
<Compile Include="Services\LocalizationService.cs" />
|
||||
<Compile Include="ViewModels\AddLocalizationViewModel.cs" />
|
||||
<Compile Include="ViewModels\ContentLocalizationsViewModel.cs" />
|
||||
<Compile Include="ViewModels\EditLocalizationViewModel.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Module.txt" />
|
||||
<Content Include="Styles\admin.css" />
|
||||
<Content Include="Styles\base.css" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Styles\Web.config">
|
||||
<SubType>Designer</SubType>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Views\Admin\Translate.cshtml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Views\CultureSelection.cshtml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Views\EditorTemplates\Parts\Localization.ContentTranslations.Edit.cshtml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Views\Parts\Localization.ContentTranslations.cshtml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Views\Parts\Localization.ContentTranslations.Summary.cshtml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Views\Parts\Localization.ContentTranslations.SummaryAdmin.cshtml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Views\Web.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Placement.info" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\Orchard\Orchard.Framework.csproj">
|
||||
<Project>{2D1D92BB-4555-4CBE-8D0E-63563D6CE4C6}</Project>
|
||||
<Name>Orchard.Framework</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\Core\Orchard.Core.csproj">
|
||||
<Project>{9916839C-39FC-4CEB-A5AF-89CA7E87119F}</Project>
|
||||
<Name>Orchard.Core</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" />
|
||||
<ProjectExtensions>
|
||||
<VisualStudio>
|
||||
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
|
||||
<WebProjectProperties>
|
||||
<UseIIS>False</UseIIS>
|
||||
<AutoAssignPort>True</AutoAssignPort>
|
||||
<DevelopmentServerPort>29612</DevelopmentServerPort>
|
||||
<DevelopmentServerVPath>/</DevelopmentServerVPath>
|
||||
<IISUrl>
|
||||
</IISUrl>
|
||||
<NTLMAuthentication>False</NTLMAuthentication>
|
||||
<UseCustomServer>True</UseCustomServer>
|
||||
<CustomServerUrl>http://orchard.codeplex.com</CustomServerUrl>
|
||||
<SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
|
||||
</WebProjectProperties>
|
||||
</FlavorProperties>
|
||||
</VisualStudio>
|
||||
</ProjectExtensions>
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
@@ -0,0 +1,36 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("Orchard.Localization")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("Microsoft")]
|
||||
[assembly: AssemblyProduct("Orchard.Localization")]
|
||||
[assembly: AssemblyCopyright("Copyright © Microsoft 2010")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("9ed42012-3a6e-4fdc-af6f-ceb7f8b48687")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
@@ -1,10 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Orchard.UI.Resources;
|
||||
|
||||
namespace Orchard.Core.Localization {
|
||||
namespace Orchard.Localization {
|
||||
public class ResourceManifest : IResourceManifestProvider {
|
||||
public void BuildManifests(ResourceManifestBuilder builder) {
|
||||
var manifest = builder.Add();
|
@@ -1,8 +1,8 @@
|
||||
using System.Collections.Generic;
|
||||
using Orchard.ContentManagement;
|
||||
using Orchard.Core.Localization.Models;
|
||||
using Orchard.Localization.Models;
|
||||
|
||||
namespace Orchard.Core.Localization.Services {
|
||||
namespace Orchard.Localization.Services {
|
||||
public interface ILocalizationService : IDependency {
|
||||
LocalizationPart GetLocalizedContentItem(IContent masterContentItem, string culture);
|
||||
string GetContentCulture(IContent contentItem);
|
@@ -2,10 +2,9 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Orchard.ContentManagement;
|
||||
using Orchard.Core.Localization.Models;
|
||||
using Orchard.Localization.Services;
|
||||
using Orchard.Localization.Models;
|
||||
|
||||
namespace Orchard.Core.Localization.Services {
|
||||
namespace Orchard.Localization.Services {
|
||||
public class LocalizationService : ILocalizationService {
|
||||
private readonly IContentManager _contentManager;
|
||||
private readonly ICultureManager _cultureManager;
|
@@ -2,7 +2,7 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Orchard.ContentManagement;
|
||||
|
||||
namespace Orchard.Core.Localization.ViewModels {
|
||||
namespace Orchard.Localization.ViewModels {
|
||||
public class AddLocalizationViewModel {
|
||||
public int Id { get; set; }
|
||||
[Required]
|
@@ -1,7 +1,7 @@
|
||||
using System.Collections.Generic;
|
||||
using Orchard.Core.Localization.Models;
|
||||
using Orchard.Localization.Models;
|
||||
|
||||
namespace Orchard.Core.Localization.ViewModels {
|
||||
namespace Orchard.Localization.ViewModels {
|
||||
public class ContentLocalizationsViewModel {
|
||||
public ContentLocalizationsViewModel(LocalizationPart part) {
|
||||
MasterId = part.MasterContentItem != null
|
@@ -1,7 +1,7 @@
|
||||
using System.Collections.Generic;
|
||||
using Orchard.ContentManagement;
|
||||
|
||||
namespace Orchard.Core.Localization.ViewModels {
|
||||
namespace Orchard.Localization.ViewModels {
|
||||
public class EditLocalizationViewModel {
|
||||
public string SelectedCulture { get; set; }
|
||||
public IEnumerable<string> SiteCultures { get; set; }
|
@@ -1,12 +1,12 @@
|
||||
using JetBrains.Annotations;
|
||||
using Orchard.ContentManagement;
|
||||
using Orchard.ContentManagement.Drivers;
|
||||
using Orchard.Core.Messaging.Models;
|
||||
using Orchard.Core.Messaging.ViewModels;
|
||||
using Orchard.Localization;
|
||||
using Orchard.Messaging.Models;
|
||||
using Orchard.Messaging.Services;
|
||||
using Orchard.Messaging.ViewModels;
|
||||
|
||||
namespace Orchard.Core.Messaging.Drivers {
|
||||
namespace Orchard.Messaging.Drivers {
|
||||
[UsedImplicitly]
|
||||
public class MessageSettingsPartDriver : ContentPartDriver<MessageSettingsPart> {
|
||||
private const string TemplateName = "Parts/MessageSettings";
|
@@ -1,9 +1,9 @@
|
||||
using JetBrains.Annotations;
|
||||
using Orchard.Core.Messaging.Models;
|
||||
using Orchard.Data;
|
||||
using Orchard.ContentManagement.Handlers;
|
||||
using Orchard.Messaging.Models;
|
||||
|
||||
namespace Orchard.Core.Messaging.Handlers {
|
||||
namespace Orchard.Messaging.Handlers {
|
||||
[UsedImplicitly]
|
||||
public class MessageSettingsPartHandler : ContentHandler {
|
||||
public MessageSettingsPartHandler(IRepository<MessageSettingsPartRecord> repository) {
|
@@ -1,6 +1,6 @@
|
||||
using Orchard.Data.Migration;
|
||||
|
||||
namespace Orchard.Core.Messaging {
|
||||
namespace Orchard.Messaging {
|
||||
public class Migrations : DataMigrationImpl {
|
||||
|
||||
public int Create() {
|
@@ -1,7 +1,7 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Orchard.ContentManagement;
|
||||
|
||||
namespace Orchard.Core.Messaging.Models {
|
||||
namespace Orchard.Messaging.Models {
|
||||
public class MessageSettingsPart : ContentPart<MessageSettingsPartRecord> {
|
||||
|
||||
[StringLength(MessageSettingsPartRecord.DefaultChannelServiceLength)]
|
@@ -1,7 +1,7 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Orchard.ContentManagement.Records;
|
||||
|
||||
namespace Orchard.Core.Messaging.Models {
|
||||
namespace Orchard.Messaging.Models {
|
||||
public class MessageSettingsPartRecord : ContentPartRecord {
|
||||
public const ushort DefaultChannelServiceLength = 64;
|
||||
|
@@ -6,7 +6,7 @@ Version: 0.8.0
|
||||
OrchardVersion: 0.8.0
|
||||
Description: The Messaging module adds messaging functionalities.
|
||||
Features:
|
||||
Messaging:
|
||||
Orchard.Messaging:
|
||||
Description: Messaging services.
|
||||
Category: Messaging
|
||||
Dependencies: Settings
|
@@ -0,0 +1,104 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>8.0.30703</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{085948FF-0E9B-4A9A-B564-F8B8B4BDDDBC}</ProjectGuid>
|
||||
<ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>Orchard.Messaging</RootNamespace>
|
||||
<AssemblyName>Orchard.Messaging</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<FileUpgradeFlags>0</FileUpgradeFlags>
|
||||
<OldToolsVersion>4.0</OldToolsVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.ComponentModel.DataAnnotations" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="System.Web.ApplicationServices" />
|
||||
<Reference Include="System.Web.DynamicData" />
|
||||
<Reference Include="System.Web.Entity" />
|
||||
<Reference Include="System.Web.Extensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Drivers\MessageSettingsPartDriver.cs" />
|
||||
<Compile Include="Handlers\MessageSettingsPartHandler.cs" />
|
||||
<Compile Include="Migrations.cs" />
|
||||
<Compile Include="Models\MessageSettingsPart.cs" />
|
||||
<Compile Include="Models\MessageSettingsPartRecord.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="ViewModels\MessageSettingsPartViewModel.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Module.txt" />
|
||||
<Content Include="Placement.info" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Views\EditorTemplates\Parts\MessageSettings.cshtml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Views\Web.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\Orchard\Orchard.Framework.csproj">
|
||||
<Project>{2D1D92BB-4555-4CBE-8D0E-63563D6CE4C6}</Project>
|
||||
<Name>Orchard.Framework</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" />
|
||||
<ProjectExtensions>
|
||||
<VisualStudio>
|
||||
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
|
||||
<WebProjectProperties>
|
||||
<UseIIS>False</UseIIS>
|
||||
<AutoAssignPort>True</AutoAssignPort>
|
||||
<DevelopmentServerPort>29609</DevelopmentServerPort>
|
||||
<DevelopmentServerVPath>/</DevelopmentServerVPath>
|
||||
<IISUrl>
|
||||
</IISUrl>
|
||||
<NTLMAuthentication>False</NTLMAuthentication>
|
||||
<UseCustomServer>True</UseCustomServer>
|
||||
<CustomServerUrl>http://orchard.codeplex.com</CustomServerUrl>
|
||||
<SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
|
||||
</WebProjectProperties>
|
||||
</FlavorProperties>
|
||||
</VisualStudio>
|
||||
</ProjectExtensions>
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
@@ -0,0 +1,36 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("Orchard.Messaging")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("Microsoft")]
|
||||
[assembly: AssemblyProduct("Orchard.Messaging")]
|
||||
[assembly: AssemblyCopyright("Copyright © Microsoft 2010")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("c39c2970-b7a5-466b-8dcb-0fc571a7d8c7")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
@@ -1,7 +1,7 @@
|
||||
using Orchard.Core.Messaging.Models;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
using Orchard.Messaging.Models;
|
||||
|
||||
namespace Orchard.Core.Messaging.ViewModels {
|
||||
namespace Orchard.Messaging.ViewModels {
|
||||
public class MessageSettingsPartViewModel {
|
||||
public MessageSettingsPart MessageSettings { get; set; }
|
||||
public IEnumerable<string> ChannelServices { get; set; }
|
@@ -8,7 +8,6 @@ using Orchard.Environment.Features;
|
||||
using Orchard.Localization;
|
||||
using Orchard.Modules.Services;
|
||||
using Orchard.Modules.ViewModels;
|
||||
using Orchard.Packaging.Services;
|
||||
using Orchard.Reports.Services;
|
||||
using Orchard.UI.Notify;
|
||||
|
||||
@@ -16,7 +15,6 @@ namespace Orchard.Modules.Controllers {
|
||||
public class AdminController : Controller {
|
||||
private readonly IModuleService _moduleService;
|
||||
private readonly IDataMigrationManager _dataMigrationManager;
|
||||
private readonly IPackageManager _packageManager;
|
||||
private readonly IReportsCoordinator _reportsCoordinator;
|
||||
private readonly IExtensionManager _extensionManager;
|
||||
private readonly IFeatureManager _featureManager;
|
||||
@@ -25,7 +23,6 @@ namespace Orchard.Modules.Controllers {
|
||||
public AdminController(IOrchardServices services,
|
||||
IModuleService moduleService,
|
||||
IDataMigrationManager dataMigrationManager,
|
||||
IPackageManager packageManager,
|
||||
IReportsCoordinator reportsCoordinator,
|
||||
IExtensionManager extensionManager,
|
||||
IFeatureManager featureManager,
|
||||
@@ -34,7 +31,6 @@ namespace Orchard.Modules.Controllers {
|
||||
Services = services;
|
||||
_moduleService = moduleService;
|
||||
_dataMigrationManager = dataMigrationManager;
|
||||
_packageManager = packageManager;
|
||||
_reportsCoordinator = reportsCoordinator;
|
||||
_extensionManager = extensionManager;
|
||||
_featureManager = featureManager;
|
||||
|
@@ -8,5 +8,4 @@ Description: The Modules module enables the administrator of the site to manage
|
||||
Features:
|
||||
Orchard.Modules:
|
||||
Description: Standard module and feature management.
|
||||
Dependencies: PackagingServices
|
||||
Category: Core
|
||||
|
@@ -9,4 +9,4 @@ Features:
|
||||
Orchard.PublishLater:
|
||||
Description: Draft creation and scheduled publishing.
|
||||
Category: Content
|
||||
Dependencies: Common, Settings, Scheduling
|
||||
Dependencies: Common, Scheduling, Orchard.jQuery
|
||||
|
@@ -25,7 +25,6 @@ using Orchard.Localization.Services;
|
||||
using Orchard.Reports.Services;
|
||||
using Orchard.Security;
|
||||
using Orchard.Settings;
|
||||
using Orchard.Themes;
|
||||
using Orchard.Environment.State;
|
||||
using Orchard.Data.Migration;
|
||||
using Orchard.Themes.Services;
|
||||
@@ -67,35 +66,42 @@ namespace Orchard.Setup.Services {
|
||||
// The vanilla Orchard distibution has the following features enabled.
|
||||
if (context.EnabledFeatures == null || context.EnabledFeatures.Count() == 0) {
|
||||
string[] hardcoded = {
|
||||
// Framework
|
||||
"Orchard.Framework",
|
||||
|
||||
// Core
|
||||
"Common",
|
||||
"Shapes",
|
||||
"Containers",
|
||||
"Contents",
|
||||
"Dashboard",
|
||||
"Reports",
|
||||
"Feeds",
|
||||
"HomePage",
|
||||
"Navigation",
|
||||
"Scheduling",
|
||||
"Indexing",
|
||||
"Localization",
|
||||
"Reports",
|
||||
"Routable",
|
||||
"Scheduling",
|
||||
"Settings",
|
||||
"Messaging",
|
||||
"Orchard.Users",
|
||||
"Orchard.Roles",
|
||||
"TinyMce",
|
||||
"PackagingServices",
|
||||
"Orchard.Pages",
|
||||
"Orchard.Modules",
|
||||
"Orchard.Themes",
|
||||
"Orchard.PublishLater",
|
||||
"Shapes",
|
||||
|
||||
// Other
|
||||
"Orchard.PublishLater", // todo: (sebros) remove
|
||||
"Orchard.Blogs",
|
||||
"Orchard.Comments",
|
||||
"Orchard.Tags",
|
||||
"Orchard.Media",
|
||||
"Orchard.Widgets",
|
||||
"Orchard.ContentTypes",
|
||||
"Orchard.jQuery",
|
||||
"Orchard.Lists",
|
||||
"Orchard.Media",
|
||||
"Orchard.Migrations",
|
||||
"Orchard.Modules",
|
||||
"Orchard.Pages",
|
||||
"Orchard.Roles",
|
||||
"Orchard.Tags",
|
||||
"Orchard.Themes",
|
||||
"Orchard.Users",
|
||||
"Orchard.Widgets",
|
||||
"TinyMce",
|
||||
|
||||
// Themes
|
||||
"TheThemeMachine",
|
||||
};
|
||||
|
||||
|
@@ -8,5 +8,4 @@ Description: The users module enables user management.
|
||||
Features:
|
||||
Orchard.Users:
|
||||
Description: Standard users.
|
||||
Dependencies: Messaging
|
||||
Category: Core
|
||||
|
@@ -78,14 +78,14 @@ namespace Orchard.Users.Services {
|
||||
if ( registrationSettings != null && registrationSettings.UsersAreModerated && registrationSettings.NotifyModeration && !createUserParams.IsApproved ) {
|
||||
var superUser = GetUser(_orchardServices.WorkContext.CurrentSite.SuperUser);
|
||||
if(superUser != null)
|
||||
_messageManager.Send(superUser.ContentItem.Record, MessageTypes.Moderation);
|
||||
_messageManager.Send(superUser.ContentItem.Record, MessageTypes.Moderation, "email");
|
||||
}
|
||||
|
||||
return user;
|
||||
}
|
||||
|
||||
public void SendChallengeEmail(IUser user, string url) {
|
||||
_messageManager.Send(user.ContentItem.Record, MessageTypes.Validation, "Email", new Dictionary<string, string> { { "ChallengeUrl", url } });
|
||||
_messageManager.Send(user.ContentItem.Record, MessageTypes.Validation, "email", new Dictionary<string, string> { { "ChallengeUrl", url } });
|
||||
}
|
||||
|
||||
public IUser ValidateChallengeToken(string challengeToken) {
|
||||
|
@@ -172,47 +172,44 @@ button:focus::-moz-focus-inner, .button:focus::-moz-focus-inner {
|
||||
|
||||
|
||||
/* Confirmations, Messages and the like
|
||||
----------------------------------------------------------*/
|
||||
***************************************************************/
|
||||
.message, .validation-summary-errors {
|
||||
margin:10px 0 4px 0;
|
||||
padding:4px;
|
||||
white-space:pre-wrap;
|
||||
}
|
||||
form .message, form .validation-summary-errors {
|
||||
margin:0 10px;
|
||||
white-space:inherit;
|
||||
messages div.message {
|
||||
clear:both;
|
||||
}
|
||||
span.message {
|
||||
display:block;
|
||||
margin:4px 0 4px 4px;
|
||||
}
|
||||
.message a {
|
||||
.messages a {
|
||||
font-weight:bold;
|
||||
}
|
||||
|
||||
.confirmation.message {
|
||||
background:#e6f1c9; /* green */
|
||||
border:1px solid #cfe493;
|
||||
}
|
||||
.warning.message {
|
||||
background:#fdf5bc; /* yellow */
|
||||
border:1px solid #ffea9b;
|
||||
}
|
||||
/* todo: (heskew) what else (other inputs) needs this? */
|
||||
.critical.message, .validation-summary-errors,
|
||||
.input-validation-error.text-box, .input-validation-error.text,
|
||||
input[type="password"].input-validation-error {
|
||||
.input-validation-error.text-box, .input-validation-error.text {
|
||||
border:1px solid #990808;
|
||||
}
|
||||
.critical.message, .validation-summary-errors {
|
||||
background:#e68585; /* red */
|
||||
color:#fff;
|
||||
}
|
||||
.info.message {
|
||||
background:#fff; /* orange :P */
|
||||
border:1px dashed #D2D6C6;
|
||||
.message-Information {
|
||||
background:#e6f1c9; /* green */
|
||||
border:1px solid #cfe493;
|
||||
color:#062232;
|
||||
}
|
||||
.debug.message {
|
||||
.message-Warning {
|
||||
background:#fdf5bc; /* yellow */
|
||||
border:1px solid #ffea9b;
|
||||
}
|
||||
.message-Error {
|
||||
background:#e68585; /* red */
|
||||
border:1px solid #990808;
|
||||
color:#fff;
|
||||
}.debug.message {
|
||||
background:#eee;
|
||||
border:1px dashed #D2D6C6;
|
||||
color:#7a7a7a;
|
||||
|
@@ -96,6 +96,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Orchard.Lists", "Orchard.We
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Orchard.Pages", "Orchard.Web\Modules\Orchard.Pages\Orchard.Pages.csproj", "{3420C92A-747F-4990-BA08-F2C9531E44AD}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Orchard.Messaging", "Orchard.Web\Modules\Orchard.Messaging\Orchard.Messaging.csproj", "{085948FF-0E9B-4A9A-B564-F8B8B4BDDDBC}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Orchard.Localization", "Orchard.Web\Modules\Orchard.Localization\Orchard.Localization.csproj", "{FBC8B571-ED50-49D8-8D9D-64AB7454A0D6}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
CodeCoverage|Any CPU = CodeCoverage|Any CPU
|
||||
@@ -512,6 +516,26 @@ Global
|
||||
{3420C92A-747F-4990-BA08-F2C9531E44AD}.FxCop|Any CPU.Build.0 = Release|Any CPU
|
||||
{3420C92A-747F-4990-BA08-F2C9531E44AD}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{3420C92A-747F-4990-BA08-F2C9531E44AD}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{085948FF-0E9B-4A9A-B564-F8B8B4BDDDBC}.CodeCoverage|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{085948FF-0E9B-4A9A-B564-F8B8B4BDDDBC}.CodeCoverage|Any CPU.Build.0 = Release|Any CPU
|
||||
{085948FF-0E9B-4A9A-B564-F8B8B4BDDDBC}.Coverage|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{085948FF-0E9B-4A9A-B564-F8B8B4BDDDBC}.Coverage|Any CPU.Build.0 = Release|Any CPU
|
||||
{085948FF-0E9B-4A9A-B564-F8B8B4BDDDBC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{085948FF-0E9B-4A9A-B564-F8B8B4BDDDBC}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{085948FF-0E9B-4A9A-B564-F8B8B4BDDDBC}.FxCop|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{085948FF-0E9B-4A9A-B564-F8B8B4BDDDBC}.FxCop|Any CPU.Build.0 = Release|Any CPU
|
||||
{085948FF-0E9B-4A9A-B564-F8B8B4BDDDBC}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{085948FF-0E9B-4A9A-B564-F8B8B4BDDDBC}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{FBC8B571-ED50-49D8-8D9D-64AB7454A0D6}.CodeCoverage|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{FBC8B571-ED50-49D8-8D9D-64AB7454A0D6}.CodeCoverage|Any CPU.Build.0 = Release|Any CPU
|
||||
{FBC8B571-ED50-49D8-8D9D-64AB7454A0D6}.Coverage|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{FBC8B571-ED50-49D8-8D9D-64AB7454A0D6}.Coverage|Any CPU.Build.0 = Release|Any CPU
|
||||
{FBC8B571-ED50-49D8-8D9D-64AB7454A0D6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{FBC8B571-ED50-49D8-8D9D-64AB7454A0D6}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{FBC8B571-ED50-49D8-8D9D-64AB7454A0D6}.FxCop|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{FBC8B571-ED50-49D8-8D9D-64AB7454A0D6}.FxCop|Any CPU.Build.0 = Release|Any CPU
|
||||
{FBC8B571-ED50-49D8-8D9D-64AB7454A0D6}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{FBC8B571-ED50-49D8-8D9D-64AB7454A0D6}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
@@ -543,6 +567,8 @@ Global
|
||||
{C889167C-E52C-4A65-A419-224B3D1B957D} = {E9C9F120-07BA-4DFB-B9C3-3AFB9D44C9D5}
|
||||
{137906EA-15FE-4AD8-A6A0-27528F0477D6} = {E9C9F120-07BA-4DFB-B9C3-3AFB9D44C9D5}
|
||||
{3420C92A-747F-4990-BA08-F2C9531E44AD} = {E9C9F120-07BA-4DFB-B9C3-3AFB9D44C9D5}
|
||||
{085948FF-0E9B-4A9A-B564-F8B8B4BDDDBC} = {E9C9F120-07BA-4DFB-B9C3-3AFB9D44C9D5}
|
||||
{FBC8B571-ED50-49D8-8D9D-64AB7454A0D6} = {E9C9F120-07BA-4DFB-B9C3-3AFB9D44C9D5}
|
||||
{ABC826D4-2FA1-4F2F-87DE-E6095F653810} = {74E681ED-FECC-4034-B9BD-01B0BB1BDECA}
|
||||
{F112851D-B023-4746-B6B1-8D2E5AD8F7AA} = {74E681ED-FECC-4034-B9BD-01B0BB1BDECA}
|
||||
{6CB3EB30-F725-45C0-9742-42599BA8E8D2} = {74E681ED-FECC-4034-B9BD-01B0BB1BDECA}
|
||||
|
@@ -1,49 +1,32 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Orchard.ContentManagement;
|
||||
using Orchard.Core.Messaging.Models;
|
||||
using Orchard.Logging;
|
||||
using Orchard.Messaging.Events;
|
||||
using Orchard.Messaging.Models;
|
||||
using Orchard.Messaging.Services;
|
||||
using Orchard.ContentManagement.Records;
|
||||
|
||||
namespace Orchard.Core.Messaging.Services {
|
||||
namespace Orchard.Messaging.Services {
|
||||
public class DefaultMessageManager : IMessageManager {
|
||||
private readonly IMessageEventHandler _messageEventHandler;
|
||||
private readonly IEnumerable<IMessagingChannel> _channels;
|
||||
private readonly IOrchardServices _orchardServices;
|
||||
|
||||
public ILogger Logger { get; set; }
|
||||
|
||||
public DefaultMessageManager(
|
||||
IMessageEventHandler messageEventHandler,
|
||||
IEnumerable<IMessagingChannel> channels,
|
||||
IOrchardServices orchardServices) {
|
||||
IEnumerable<IMessagingChannel> channels) {
|
||||
_messageEventHandler = messageEventHandler;
|
||||
_channels = channels;
|
||||
_orchardServices = orchardServices;
|
||||
}
|
||||
|
||||
public void Send(ContentItemRecord recipient, string type, string service = null, Dictionary<string, string> properties = null) {
|
||||
public void Send(ContentItemRecord recipient, string type, string service, Dictionary<string, string> properties = null) {
|
||||
if ( !HasChannels() )
|
||||
return;
|
||||
|
||||
var messageSettings = _orchardServices.WorkContext.CurrentSite.As<MessageSettingsPart>().Record;
|
||||
|
||||
if ( messageSettings == null || String.IsNullOrWhiteSpace(messageSettings.DefaultChannelService) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
Logger.Information("Sending message {0}", type);
|
||||
try {
|
||||
|
||||
// if the service is not explicit, use the default one, as per settings configuration
|
||||
if (String.IsNullOrWhiteSpace(service)) {
|
||||
service = messageSettings.DefaultChannelService;
|
||||
}
|
||||
|
||||
var context = new MessageContext {
|
||||
Recipient = recipient,
|
||||
Type = type,
|
@@ -6,7 +6,7 @@ namespace Orchard.Messaging.Services {
|
||||
/// <summary>
|
||||
/// Sends a message to a channel
|
||||
/// </summary>
|
||||
void Send(ContentItemRecord recipient, string type, string service = null, Dictionary<string, string> properties = null);
|
||||
void Send(ContentItemRecord recipient, string type, string service, Dictionary<string, string> properties = null);
|
||||
|
||||
/// <summary>
|
||||
/// Wether at least one channel is active on the current site
|
||||
|
@@ -1,5 +1,4 @@
|
||||
using System.Collections.Generic;
|
||||
using Orchard.ContentManagement;
|
||||
using Orchard.Messaging.Models;
|
||||
|
||||
namespace Orchard.Messaging.Services {
|
||||
|
@@ -181,6 +181,7 @@
|
||||
<Compile Include="Environment\Features\FeatureManager.cs" />
|
||||
<Compile Include="Localization\Services\DefaultLocalizedStringManager.cs" />
|
||||
<Compile Include="Localization\Services\ILocalizedStringManager.cs" />
|
||||
<Compile Include="Messaging\Services\DefaultMessageManager.cs" />
|
||||
<Compile Include="Mvc\IOrchardViewPage.cs" />
|
||||
<Compile Include="Mvc\Spooling\HtmlStringWriter.cs" />
|
||||
<Compile Include="Scripting\IScriptingManager.cs" />
|
||||
|
Reference in New Issue
Block a user