mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2026-02-09 09:16:41 +08:00
Compare commits
10 Commits
feature/ca
...
tests/nuni
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4a5a5a3b0b | ||
|
|
da4ff5277a | ||
|
|
2f85021753 | ||
|
|
4a2255ddf9 | ||
|
|
dd81c3c2bd | ||
|
|
075287b958 | ||
|
|
4bf21bb177 | ||
|
|
8f59a764a1 | ||
|
|
cfdeb53323 | ||
|
|
4ed0f4651e |
@@ -23,14 +23,13 @@ echo "Unable to detect suitable environment. Build may not succeed."
|
||||
|
||||
SET target=%1
|
||||
SET project=%2
|
||||
SET solution=%3
|
||||
|
||||
IF "%target%" == "" SET target=Build
|
||||
IF "%project%" == "" SET project=Orchard.proj
|
||||
IF "%solution%" == "" SET solution=src\Orchard.sln
|
||||
IF "%project%" =="" SET project=Orchard.proj
|
||||
|
||||
lib\nuget\nuget.exe restore %solution%
|
||||
lib\nuget\nuget.exe restore .\src\Orchard.sln
|
||||
|
||||
msbuild /t:%target% %project% /p:Solution=%solution% /m
|
||||
msbuild /t:%target% %project%
|
||||
|
||||
pause
|
||||
|
||||
pause
|
||||
53
Orchard.proj
53
Orchard.proj
@@ -28,14 +28,11 @@
|
||||
<BuildPlatform Condition="$(ProgramW6432) != ''">x64</BuildPlatform>
|
||||
<BuildPlatform Condition="$(BuildPlatform) == ''">x86</BuildPlatform>
|
||||
<Configuration Condition="$(Configuration) == ''">Release</Configuration>
|
||||
|
||||
<OrchardSolution>$(SrcFolder)\Orchard.sln</OrchardSolution>
|
||||
<Solution Condition="$(Solution) == ''">$(OrchardSolution)</Solution>
|
||||
|
||||
<!-- TeamCity build number -->
|
||||
<Version>$(BUILD_NUMBER)</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
<!-- Finding the restored NuGet package of NUnit (version number doesn't matter)
|
||||
to be able to reference the test runner executable (http://stackoverflow.com/a/25617556). -->
|
||||
<ItemGroup>
|
||||
@@ -48,11 +45,11 @@
|
||||
|
||||
<!-- Coordinating Targets -->
|
||||
|
||||
<Target Name="Build">
|
||||
<Target Name ="Build">
|
||||
<CallTarget Targets="Clean"/>
|
||||
<CallTarget Targets="Compile"/>
|
||||
<CallTarget Targets="Test"/>
|
||||
<CallTarget Targets="Package"/>
|
||||
<CallTarget Targets="Package"/>
|
||||
</Target>
|
||||
|
||||
<Target Name="FastBuild">
|
||||
@@ -106,7 +103,7 @@
|
||||
<!-- Building -->
|
||||
|
||||
<Target Name="Clean">
|
||||
<MSBuild Projects="$(Solution)" Targets="Clean" />
|
||||
<MSBuild Projects="$(SrcFolder)\Orchard.sln" Targets="Clean" />
|
||||
<RemoveDir Directories="$(BuildFolder)" ContinueOnError="true"/>
|
||||
<RemoveDir Directories="$(ArtifactsFolder)" />
|
||||
</Target>
|
||||
@@ -114,16 +111,16 @@
|
||||
<Target Name="Compile">
|
||||
<!-- Compile to "OutputFolder" -->
|
||||
<MSBuild
|
||||
Projects="$(Solution)"
|
||||
Projects="$(SrcFolder)\Orchard.sln"
|
||||
Targets="Build"
|
||||
Properties="Configuration=$(Configuration);OutputPath=$(CompileFolder)" />
|
||||
<!-- Compile to "regular" output folder for devs using VS locally -->
|
||||
<MSBuild
|
||||
Projects="$(Solution)"
|
||||
Projects="$(SrcFolder)\Orchard.sln"
|
||||
Targets="Build"/>
|
||||
</Target>
|
||||
|
||||
<Target Name="CompileMsBuildTasks">
|
||||
<Target Name ="CompileMsBuildTasks">
|
||||
<MSBuild
|
||||
Projects="$(SrcFolder)\Tools\MSBuild.Orchard.Tasks\MSBuild.Orchard.Tasks.csproj"
|
||||
Targets="Build"
|
||||
@@ -132,25 +129,27 @@
|
||||
|
||||
<!-- Testing -->
|
||||
|
||||
<Target Name="Test">
|
||||
<Target Name ="Test">
|
||||
<!-- TeamCity support -->
|
||||
<ItemGroup>
|
||||
<NUnitAddinFiles Include="$(teamcity_dotnet_nunitaddin)-2.5.2.*" />
|
||||
</ItemGroup>
|
||||
<Copy SourceFiles="@(NUnitAddinFiles)" DestinationFolder="$(NUnitPackageToolsFolder)\addins" />
|
||||
|
||||
<!-- Run unit test assemblies -->
|
||||
<CreateItem Include="$(CompileFolder)\*.Tests.*dll" Exclude="$(CompileFolder)\Orchard.Azure.Tests.dll">
|
||||
<CreateItem Include="$(CompileFolder)\*.Tests.*dll">
|
||||
<Output TaskParameter="Include" ItemName="TestAssemblies" />
|
||||
</CreateItem>
|
||||
|
||||
|
||||
<NUnit Assemblies="@(TestAssemblies)" ToolPath="@(NUnitPackageToolsFolder)" WorkingDirectory="$(CompileFolder)" OutputXmlFile="$(BuildFolder)\Orchard.Tests.xml" ExcludeCategory="longrunning" />
|
||||
</Target>
|
||||
|
||||
<Target Name="TestAzure">
|
||||
<!-- Run unit test assemblies -->
|
||||
<CreateItem Include="$(CompileFolder)\Orchard.Azure.Tests.dll">
|
||||
<Output TaskParameter="Include" ItemName="TestAssemblies" />
|
||||
</CreateItem>
|
||||
|
||||
<NUnit Assemblies="@(TestAssemblies)" ToolPath="@(NUnitPackageToolsFolder)" WorkingDirectory="$(CompileFolder)" OutputXmlFile="$(BuildFolder)\Orchard.Tests.xml" ExcludeCategory="longrunning" />
|
||||
</Target>
|
||||
|
||||
<Target Name="Spec" DependsOnTargets="Package-Stage">
|
||||
<Target Name ="Spec" DependsOnTargets="Package-Stage">
|
||||
<!-- TeamCity support -->
|
||||
<ItemGroup>
|
||||
<NUnitAddinFiles Include="$(teamcity_dotnet_nunitaddin)-2.5.2.*" />
|
||||
</ItemGroup>
|
||||
<Copy SourceFiles="@(NUnitAddinFiles)" DestinationFolder="$(NUnitPackageToolsFolder)\addins" />
|
||||
|
||||
<CreateItem Include="$(CompileFolder)\*.Specs.dll">
|
||||
<Output TaskParameter="Include" ItemName="SpecAssemblies" />
|
||||
@@ -282,6 +281,7 @@
|
||||
<!-- Packaging (MsDeploy) -->
|
||||
<Target Name="Package-MsDeploy">
|
||||
<ItemGroup>
|
||||
<!--<MsDeploy-Folder-Input Include="$(StageFolder)\**\*" Exclude="$(StageFolder)\**\bin\**\*.pdb;$(StageFolder)\**\bin\**\*.xml" />-->
|
||||
|
||||
<MsDeploy-Exclude-Modules Include="
|
||||
$(StageFolder)\**\Modules\Orchard.CustomForms\**;
|
||||
@@ -292,7 +292,7 @@
|
||||
$(StageFolder)\**\Modules\Orchard.TaskLease\**;
|
||||
" />
|
||||
|
||||
<MsDeploy-Folder-Input Include="$(StageFolder)\**\*" Exclude="$(StageFolder)\**\bin\**\*.xml;$(StageFolder)\**\obj\**\*;$(StageFolder)\**\bin\**\*.pdb;$(StageFolder)\**\bin\**\*.dll.config;@(MsDeploy-Exclude-Modules)" />
|
||||
<MsDeploy-Folder-Input Include="$(StageFolder)\**\*" Exclude="$(StageFolder)\**\bin\**\*.xml;$(StageFolder)\**\obj\**\*;@(MsDeploy-Exclude-Modules)" />
|
||||
<MsDeploy-Parameters Include="$(LibFolder)\msdeploy\*.xml;$(LibFolder)\msdeploy\*.sql"/>
|
||||
</ItemGroup>
|
||||
|
||||
@@ -331,12 +331,11 @@
|
||||
$(MSBuildProjectDirectory)\**\*.user;
|
||||
$(MSBuildProjectDirectory)\**\*.patch;
|
||||
$(MSBuildProjectDirectory)\**\*.hgignore;
|
||||
$(MSBuildProjectDirectory)\**\*.hg*\**\*;
|
||||
$(LibFolder)\nunit\addins\**\*;" />
|
||||
$(MSBuildProjectDirectory)\**\*.hg*\**\*;" />
|
||||
|
||||
<Zip-Stage Include="$(StageFolder)\**\*" />
|
||||
|
||||
<Zip-MsDeploy Include="$(MsDeployFolder)\**\*" Exclude=""/>
|
||||
<Zip-MsDeploy Include="$(MsDeployFolder)\**\*" Exclude="$(MSBuildProjectDirectory)\**\bin\**\*.pdb;" />
|
||||
|
||||
<Zip-Source Include="
|
||||
$(MSBuildProjectDirectory)\lib\**\*;
|
||||
|
||||
15
README.md
15
README.md
@@ -6,7 +6,7 @@ Orchard is a free, open source, community-focused Content Management System buil
|
||||
|
||||
You can try it for free on [DotNest.com](https://dotnest.com) or on Microsoft Azure by clicking on this button.
|
||||
|
||||
[](https://portal.azure.com/#create/OutercurveFoundation.OrchardCMS)
|
||||
[](https://portal.azure.com/#create/OutercurveFoundation.OrchardCMS.1.0.4)
|
||||
|
||||
## About The Orchard Project
|
||||
|
||||
@@ -22,13 +22,8 @@ Our mission is to empower our users and foster a dedicated and diverse community
|
||||
|
||||
## Project Status
|
||||
|
||||
Orchard is currently in version **[1.10.1](https://github.com/OrchardCMS/Orchard/releases/tag/1.10.1)** and **[1.9.3](https://github.com/OrchardCMS/Orchard/releases/tag/1.9.3)**:
|
||||
|
||||
- *1.10.1* is the latest minor version that contains bugfixes and the more impactful changes and new features added in the latest major version (*1.10*). **If you're new to Orchard, you should use this version.**
|
||||
- *1.9.3* contains further bugfixes in addition to *1.9.2* and these versions are based on the feature set of Orchard *1.9*.
|
||||
|
||||
We invite participation by the developer community in shaping the project’s direction, so that we can publicly validate our designs and development approach.
|
||||
All our releases are available on our [Releases](https://github.com/OrchardCMS/Orchard/releases) page, and it's easy to [Install Orchard using the Web Platform Installer](http://docs.orchardproject.net/Documentation/Installing-Orchard) as well. We encourage interested developers to check out the source code on the Orchard GitHub site and get involved with the project.
|
||||
Orchard is currently in version 1.9.2. We invite participation by the developer community in shaping the project’s direction, so that we can publicly validate our designs and development approach.
|
||||
Our 1.9.2 release is available from our Downloads page, and is easy to [Install Orchard using the Web Platform Installer](http://docs.orchardproject.net/Documentation/Installing-Orchard). We encourage interested developers to check out the source code on the Orchard Github site and get involved with the project.
|
||||
|
||||
* [Download the latest release](https://github.com/OrchardCMS/Orchard/releases)
|
||||
* [Feature roadmap](http://docs.orchardproject.net/Documentation/feature-roadmap)
|
||||
@@ -50,10 +45,10 @@ There are many ways you can [contribute to Orchard](http://orchardproject.net/co
|
||||
* [Participate in our gitter.im chatroom](https://gitter.im/OrchardCMS/Orchard)
|
||||
* [Participate in forum discussions](http://orchard.codeplex.com/discussions)
|
||||
* [Submit a pull request](http://docs.orchardproject.net/Documentation/Contributing-patches)
|
||||
* [Translate Orchard](http://orchardproject.net/localization)
|
||||
* [Translate Orchard](http://orchardproject.net/localize)
|
||||
* [Contribute modules and themes to our gallery](http://gallery.orchardproject.net/)
|
||||
* [Send us feedback](mailto:ofeedbk@microsoft.com)
|
||||
|
||||
## The Future Of Orchard CMS: Orchard 2
|
||||
|
||||
As the underlying frameworks (.NET, ASP.NET and ASP.NET MVC) are constantly evolving, Orchard of course keeps track of the changes and improvements of these: Orchard 2 is the next generation of Orchard releases that is based on [ASP.NET Core](http://www.asp.net/core). Just like the current Orchard project, it's fully [open-source and is publicly available on GitHub](https://github.com/OrchardCMS/Orchard2). Orchard 2 (as a framework) is being built from scratch: it's still in development and does not share any of its code base (at least directly) with the current versions of Orchard.
|
||||
As the underlying frameworks (.NET, ASP.NET and ASP.NET MVC) are constantly evolving, Orchard of course keeps track of the changes and improvements of these: Orchard 2 is the next generation of Orchard releases that is based on [ASP.NET vNext](http://www.asp.net/vnext). Just like the current Orchard project, it's fully [open-source and is publicly available on GitHub](https://github.com/OrchardCMS/Orchard2). Orchard 2 (as a framework) is being built from scratch: it's still in development and does not share any of its code base (at least directly) with the current versions of Orchard.
|
||||
|
||||
@@ -68,11 +68,13 @@ IF NOT DEFINED MSBUILD_PATH (
|
||||
echo Handling .NET Web Application deployment.
|
||||
|
||||
:: 1. Restore NuGet packages
|
||||
call :ExecuteCmd nuget restore "%DEPLOYMENT_SOURCE%\src\Orchard.sln"
|
||||
IF !ERRORLEVEL! NEQ 0 goto error
|
||||
IF /I "" NEQ "" (
|
||||
call :ExecuteCmd nuget restore "%DEPLOYMENT_SOURCE%\"
|
||||
IF !ERRORLEVEL! NEQ 0 goto error
|
||||
)
|
||||
|
||||
:: 2. Build to the temporary path
|
||||
call :ExecuteCmd "%MSBUILD_PATH%" "%DEPLOYMENT_SOURCE%\Orchard.proj" /t:Precompiled /v:m /m
|
||||
call :ExecuteCmd "%MSBUILD_PATH%" "%DEPLOYMENT_SOURCE%\Orchard.proj" /t:Precompiled /v:m
|
||||
IF !ERRORLEVEL! NEQ 0 goto error
|
||||
|
||||
:: 3. KuduSync
|
||||
|
||||
@@ -10,7 +10,6 @@ var fs = require("fs"),
|
||||
plumber = require("gulp-plumber"),
|
||||
sourcemaps = require("gulp-sourcemaps"),
|
||||
less = require("gulp-less"),
|
||||
sass = require("gulp-sass"),
|
||||
cssnano = require("gulp-cssnano"),
|
||||
typescript = require("gulp-typescript"),
|
||||
uglify = require("gulp-uglify"),
|
||||
@@ -132,16 +131,12 @@ function createAssetGroupTask(assetGroup, doRebuild) {
|
||||
function buildCssPipeline(assetGroup, doConcat, doRebuild) {
|
||||
assetGroup.inputPaths.forEach(function (inputPath) {
|
||||
var ext = path.extname(inputPath).toLowerCase();
|
||||
if (ext !== ".less" && ext !== ".scss" && ext !== ".css")
|
||||
if (ext !== ".less" && ext !== ".css")
|
||||
throw "Input file '" + inputPath + "' is not of a valid type for output file '" + assetGroup.outputPath + "'.";
|
||||
});
|
||||
var generateSourceMaps = assetGroup.hasOwnProperty("generateSourceMaps") ? assetGroup.generateSourceMaps : true;
|
||||
var containsLessOrScss = assetGroup.inputPaths.some(function (inputPath) {
|
||||
var ext = path.extname(inputPath).toLowerCase();
|
||||
return ext === ".less" || ext === ".scss";
|
||||
});
|
||||
// Source maps are useless if neither concatenating nor transforming.
|
||||
if ((!doConcat || assetGroup.inputPaths.length < 2) && !containsLessOrScss)
|
||||
if ((!doConcat || assetGroup.inputPaths.length < 2) && !assetGroup.inputPaths.some(function (inputPath) { return path.extname(inputPath).toLowerCase() === ".less"; }))
|
||||
generateSourceMaps = false;
|
||||
var minifiedStream = gulp.src(assetGroup.inputPaths) // Minified output, source mapping completely disabled.
|
||||
.pipe(gulpif(!doRebuild,
|
||||
@@ -153,9 +148,6 @@ function buildCssPipeline(assetGroup, doConcat, doRebuild) {
|
||||
}))))
|
||||
.pipe(plumber())
|
||||
.pipe(gulpif("*.less", less()))
|
||||
.pipe(gulpif("*.scss", sass({
|
||||
precision: 10
|
||||
})))
|
||||
.pipe(gulpif(doConcat, concat(assetGroup.outputFileName)))
|
||||
.pipe(cssnano({
|
||||
autoprefixer: { browsers: ["last 2 versions"] },
|
||||
@@ -181,9 +173,6 @@ function buildCssPipeline(assetGroup, doConcat, doRebuild) {
|
||||
.pipe(plumber())
|
||||
.pipe(gulpif(generateSourceMaps, sourcemaps.init()))
|
||||
.pipe(gulpif("*.less", less()))
|
||||
.pipe(gulpif("*.scss", sass({
|
||||
precision: 10
|
||||
})))
|
||||
.pipe(gulpif(doConcat, concat(assetGroup.outputFileName)))
|
||||
.pipe(header(
|
||||
"/*\n" +
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace Orchard.Azure.Tests.FileSystems.Media {
|
||||
[ExpectedException(typeof(ArgumentException))]
|
||||
public void GetFileShouldOnlyAcceptRelativePath() {
|
||||
_azureBlobStorageProvider.CreateFile("foo.txt");
|
||||
_azureBlobStorageProvider.GetFile("/foo.txt");
|
||||
_azureBlobStorageProvider.GetFile("/foot.txt");
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -291,7 +291,7 @@ namespace Orchard.Azure.Tests.FileSystems.Media {
|
||||
[Test]
|
||||
public void GetStoragePathShouldReturnNullIfPathIsNotLocal()
|
||||
{
|
||||
var storagePath = _azureBlobStorageProvider.GetStoragePath("http://orchardproject.net/foo");
|
||||
var storagePath = _azureBlobStorageProvider.GetStoragePath("foo");
|
||||
|
||||
Assert.IsNull(storagePath);
|
||||
}
|
||||
|
||||
@@ -91,14 +91,6 @@
|
||||
<HintPath>..\packages\NUnit.2.5.10.11092\lib\nunit.framework.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="nunit.mocks, Version=2.5.10.11092, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\NUnit.2.5.10.11092\lib\nunit.mocks.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="pnunit.framework, Version=1.0.4109.34242, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\NUnit.2.5.10.11092\lib\pnunit.framework.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Configuration" />
|
||||
<Reference Include="System.Core">
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<package id="Microsoft.Data.Services.Client" version="5.6.4" targetFramework="net452" />
|
||||
<package id="Moq" version="4.2.1510.2205" targetFramework="net452" />
|
||||
<package id="Newtonsoft.Json" version="7.0.1" targetFramework="net452" />
|
||||
<package id="NUnit" version="2.5.10.11092" targetFramework="net452" />
|
||||
<package id="System.Spatial" version="5.6.4" targetFramework="net452" />
|
||||
<package id="WindowsAzure.Storage" version="5.0.2" targetFramework="net452" />
|
||||
<package id="NUnit" version="2.5.10.11092" targetFramework="net452" />
|
||||
</packages>
|
||||
@@ -61,8 +61,8 @@
|
||||
<HintPath>..\packages\Autofac.3.5.2\lib\net40\Autofac.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="FluentNHibernate, Version=2.0.3.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\FluentNHibernate.2.0.3.0\lib\net40\FluentNHibernate.dll</HintPath>
|
||||
<Reference Include="FluentNHibernate, Version=1.4.0.0, Culture=neutral, PublicKeyToken=8aa435e3cb308880, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\FluentNHibernate.1.4.0.0\lib\net35\FluentNHibernate.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Iesi.Collections, Version=4.0.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL">
|
||||
|
||||
@@ -30,5 +30,5 @@ using System.Runtime.InteropServices;
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
|
||||
[assembly: AssemblyVersion("1.10.1")]
|
||||
[assembly: AssemblyFileVersion("1.10.1")]
|
||||
[assembly: AssemblyVersion("1.10")]
|
||||
[assembly: AssemblyFileVersion("1.10")]
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Autofac" version="3.5.2" targetFramework="net452" />
|
||||
<package id="FluentNHibernate" version="2.0.3.0" targetFramework="net452" />
|
||||
<package id="FluentNHibernate" version="1.4.0.0" targetFramework="net452" />
|
||||
<package id="Iesi.Collections" version="4.0.1.4000" targetFramework="net452" />
|
||||
<package id="Microsoft.AspNet.Mvc" version="5.2.3" targetFramework="net452" />
|
||||
<package id="Microsoft.AspNet.Razor" version="3.2.3" targetFramework="net452" />
|
||||
|
||||
@@ -30,5 +30,5 @@ using System.Runtime.InteropServices;
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
|
||||
[assembly: AssemblyVersion("1.10.1")]
|
||||
[assembly: AssemblyFileVersion("1.10.1")]
|
||||
[assembly: AssemblyVersion("1.10")]
|
||||
[assembly: AssemblyFileVersion("1.10")]
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace Orchard.Specs.Bindings {
|
||||
webApp.GivenIHaveACleanSiteWith(
|
||||
virtualDirectory,
|
||||
TableData(
|
||||
new { extension = "Module", names = "Lucene, Markdown, Orchard.Alias, Orchard.AntiSpam, Orchard.ArchiveLater, Orchard.Autoroute, Orchard.Azure, Orchard.Blogs, Orchard.Caching, Orchard.CodeGeneration, Orchard.Comments, Orchard.ContentPermissions, Orchard.ContentPicker, Orchard.ContentTypes, Orchard.DesignerTools, Orchard.Email, Orchard.Fields, Orchard.Forms, Orchard.ImageEditor, Orchard.ImportExport, Orchard.Indexing, Orchard.JobsQueue, Orchard.Resources, Orchard.Layouts, Orchard.Lists, Orchard.Localization, Orchard.MediaLibrary, Orchard.MediaProcessing, Orchard.Migrations, Orchard.Modules, Orchard.MultiTenancy, Orchard.OutputCache, Orchard.Packaging, Orchard.Pages, Orchard.Projections, Orchard.PublishLater, Orchard.Recipes, Orchard.Roles, Orchard.Scripting, Orchard.Scripting.CSharp, Orchard.Scripting.Dlr, Orchard.Search, Orchard.SecureSocketsLayer, Orchard.Setup, Orchard.Tags, Orchard.Taxonomies, Orchard.Templates, Orchard.Themes, Orchard.Tokens, Orchard.Users, Orchard.Warmup, Orchard.Widgets, Orchard.Workflows, Orchard.Conditions, SysCache, TinyMce, Upgrade" },
|
||||
new { extension = "Module", names = "Lucene, Markdown, Orchard.Alias, Orchard.AntiSpam, Orchard.ArchiveLater, Orchard.Autoroute, Orchard.Azure, Orchard.Blogs, Orchard.Caching, Orchard.CodeGeneration, Orchard.Comments, Orchard.ContentPermissions, Orchard.ContentPicker, Orchard.ContentTypes, Orchard.CustomForms, Orchard.DesignerTools, Orchard.Email, Orchard.Fields, Orchard.Forms, Orchard.ImageEditor, Orchard.ImportExport, Orchard.Indexing, Orchard.JobsQueue, Orchard.Resources, Orchard.Layouts, Orchard.Lists, Orchard.Localization, Orchard.Media, Orchard.MediaLibrary, Orchard.MediaPicker, Orchard.MediaProcessing, Orchard.Migrations, Orchard.Modules, Orchard.MultiTenancy, Orchard.OutputCache, Orchard.Packaging, Orchard.Pages, Orchard.Projections, Orchard.PublishLater, Orchard.Recipes, Orchard.Roles, Orchard.Rules, Orchard.Scripting, Orchard.Scripting.CSharp, Orchard.Scripting.Dlr, Orchard.Search, Orchard.SecureSocketsLayer, Orchard.Setup, Orchard.Tags, Orchard.TaskLease, Orchard.Taxonomies, Orchard.Templates, Orchard.Themes, Orchard.Tokens, Orchard.Users, Orchard.Warmup, Orchard.Widgets, Orchard.Workflows, Orchard.Conditions, SysCache, TinyMce, Upgrade" },
|
||||
new { extension = "Core", names = "Common, Containers, Contents, Dashboard, Feeds, Navigation, Scheduling, Settings, Shapes, Title, XmlRpc" },
|
||||
new { extension = "Theme", names = "SafeMode, TheAdmin, TheThemeMachine" }));
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ Scenario: Creating and using Boolean fields
|
||||
And I go to "Admin/Contents/Create/Event"
|
||||
Then I should see "Check if the event is active"
|
||||
|
||||
# The default value should be proposed on creation
|
||||
# The default value should be selected
|
||||
When I go to "Admin/ContentTypes/Edit/Event"
|
||||
And I fill in
|
||||
| name | value |
|
||||
@@ -65,8 +65,14 @@ Scenario: Creating and using Boolean fields
|
||||
# The value should be required
|
||||
When I go to "Admin/ContentTypes/Edit/Event"
|
||||
And I fill in
|
||||
| name | value |
|
||||
| Fields[0].BooleanFieldSettings.Optional | false |
|
||||
| name | value |
|
||||
| Fields[0].BooleanFieldSettings.Optional | false |
|
||||
And I fill in
|
||||
| name | value |
|
||||
| Fields[0].BooleanFieldSettings.NotSetLabel | May be |
|
||||
And I fill in
|
||||
| name | value |
|
||||
| Fields[0].BooleanFieldSettings.SelectionMode | Radiobutton |
|
||||
And I hit "Save"
|
||||
And I go to "Admin/Contents/Create/Event"
|
||||
And I fill in
|
||||
|
||||
34
src/Orchard.Specs/Boolean.feature.cs
generated
34
src/Orchard.Specs/Boolean.feature.cs
generated
@@ -195,22 +195,40 @@ this.ScenarioSetup(scenarioInfo);
|
||||
"false"});
|
||||
#line 67
|
||||
testRunner.And("I fill in", ((string)(null)), table6, "And ");
|
||||
#line 70
|
||||
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 71
|
||||
testRunner.And("I go to \"Admin/Contents/Create/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line hidden
|
||||
TechTalk.SpecFlow.Table table7 = new TechTalk.SpecFlow.Table(new string[] {
|
||||
"name",
|
||||
"value"});
|
||||
table7.AddRow(new string[] {
|
||||
"Fields[0].BooleanFieldSettings.NotSetLabel",
|
||||
"May be"});
|
||||
#line 70
|
||||
testRunner.And("I fill in", ((string)(null)), table7, "And ");
|
||||
#line hidden
|
||||
TechTalk.SpecFlow.Table table8 = new TechTalk.SpecFlow.Table(new string[] {
|
||||
"name",
|
||||
"value"});
|
||||
table8.AddRow(new string[] {
|
||||
"Fields[0].BooleanFieldSettings.SelectionMode",
|
||||
"Radiobutton"});
|
||||
#line 73
|
||||
testRunner.And("I fill in", ((string)(null)), table8, "And ");
|
||||
#line 76
|
||||
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 77
|
||||
testRunner.And("I go to \"Admin/Contents/Create/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line hidden
|
||||
TechTalk.SpecFlow.Table table9 = new TechTalk.SpecFlow.Table(new string[] {
|
||||
"name",
|
||||
"value"});
|
||||
table9.AddRow(new string[] {
|
||||
"Event.Active.Value",
|
||||
""});
|
||||
#line 72
|
||||
testRunner.And("I fill in", ((string)(null)), table7, "And ");
|
||||
#line 75
|
||||
#line 78
|
||||
testRunner.And("I fill in", ((string)(null)), table9, "And ");
|
||||
#line 81
|
||||
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 76
|
||||
#line 82
|
||||
testRunner.Then("I should see \"The field Active is mandatory.\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line hidden
|
||||
this.ScenarioCleanup();
|
||||
|
||||
@@ -89,9 +89,9 @@ Scenario: Creating and using Date fields
|
||||
# Required & Date and Time
|
||||
When I go to "Admin/ContentTypes/Edit/Event"
|
||||
And I fill in
|
||||
| name | value |
|
||||
| Fields[0].DateTimeFieldSettings.Display | DateAndTime |
|
||||
| Fields[0].DateTimeFieldSettings.Required | true |
|
||||
| name | value |
|
||||
| Fields[0].DateTimeFieldSettings.Display | DateAndTime |
|
||||
| Fields[0].DateTimeFieldSettings.Required | true |
|
||||
And I hit "Save"
|
||||
And I go to "Admin/Contents/Create/Event"
|
||||
Then I should see "Event.EventDate.Editor.Date"
|
||||
@@ -139,23 +139,6 @@ Scenario: Creating and using Date fields
|
||||
When I hit "Save"
|
||||
Then I should see "Date of the event is required."
|
||||
|
||||
# The default value should be proposed on creation
|
||||
When I go to "Admin/ContentTypes/Edit/Event"
|
||||
And I fill in
|
||||
| name | value |
|
||||
| Fields[0].DateTimeFieldSettings.Display | DateAndTime |
|
||||
| Fields[0].DateTimeFieldSettings.Editor.Date | 01/31/2016 |
|
||||
| Fields[0].DateTimeFieldSettings.Editor.Time | 10:00 AM |
|
||||
And I hit "Save"
|
||||
And I go to "Admin/Contents/Create/Event"
|
||||
Then I should see "Event.EventDate.Editor.Date"
|
||||
When I hit "Save"
|
||||
And I am redirected
|
||||
Then I should see "Your Event has been created."
|
||||
When I go to "Admin/Contents/List"
|
||||
Then I should see "Date of the event"
|
||||
And I should see "1/31/2016 10:00"
|
||||
|
||||
Scenario: Creating and using date time fields in another culture
|
||||
|
||||
# Creating an Event content type
|
||||
@@ -207,4 +190,4 @@ Scenario: Creating and using date time fields in another culture
|
||||
| Event.EventDate.Editor.Time | 18:00 |
|
||||
And I hit "Save"
|
||||
And I am redirected
|
||||
Then I should see "Your Event has been created."
|
||||
Then I should see "Your Event has been created."
|
||||
|
||||
167
src/Orchard.Specs/DateTime.feature.cs
generated
167
src/Orchard.Specs/DateTime.feature.cs
generated
@@ -350,41 +350,6 @@ this.ScenarioSetup(scenarioInfo);
|
||||
testRunner.When("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
|
||||
#line 140
|
||||
testRunner.Then("I should see \"Date of the event is required.\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line 143
|
||||
testRunner.When("I go to \"Admin/ContentTypes/Edit/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
|
||||
#line hidden
|
||||
TechTalk.SpecFlow.Table table15 = new TechTalk.SpecFlow.Table(new string[] {
|
||||
"name",
|
||||
"value"});
|
||||
table15.AddRow(new string[] {
|
||||
"Fields[0].DateTimeFieldSettings.Display",
|
||||
"DateAndTime"});
|
||||
table15.AddRow(new string[] {
|
||||
"Fields[0].DateTimeFieldSettings.Editor.Date",
|
||||
"01/31/2016"});
|
||||
table15.AddRow(new string[] {
|
||||
"Fields[0].DateTimeFieldSettings.Editor.Time",
|
||||
"10:00 AM"});
|
||||
#line 144
|
||||
testRunner.And("I fill in", ((string)(null)), table15, "And ");
|
||||
#line 149
|
||||
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 150
|
||||
testRunner.And("I go to \"Admin/Contents/Create/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 151
|
||||
testRunner.Then("I should see \"Event.EventDate.Editor.Date\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line 152
|
||||
testRunner.When("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
|
||||
#line 153
|
||||
testRunner.And("I am redirected", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 154
|
||||
testRunner.Then("I should see \"Your Event has been created.\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line 155
|
||||
testRunner.When("I go to \"Admin/Contents/List\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
|
||||
#line 156
|
||||
testRunner.Then("I should see \"Date of the event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line 157
|
||||
testRunner.And("I should see \"1/31/2016 10:00\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line hidden
|
||||
this.ScenarioCleanup();
|
||||
}
|
||||
@@ -394,83 +359,101 @@ this.ScenarioSetup(scenarioInfo);
|
||||
public virtual void CreatingAndUsingDateTimeFieldsInAnotherCulture()
|
||||
{
|
||||
TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Creating and using date time fields in another culture", ((string[])(null)));
|
||||
#line 159
|
||||
#line 142
|
||||
this.ScenarioSetup(scenarioInfo);
|
||||
#line 162
|
||||
#line 145
|
||||
testRunner.Given("I have installed Orchard", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given ");
|
||||
#line 163
|
||||
#line 146
|
||||
testRunner.And("I have installed \"Orchard.Fields\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 164
|
||||
#line 147
|
||||
testRunner.And("I have the file \"Content\\orchard.core.po\" in \"Core\\App_Data\\Localization\\fr-FR\\or" +
|
||||
"chard.core.po\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 165
|
||||
#line 148
|
||||
testRunner.When("I go to \"Admin/ContentTypes\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
|
||||
#line 166
|
||||
#line 149
|
||||
testRunner.Then("I should see \"<a[^>]*>.*?Create new type</a>\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line 167
|
||||
#line 150
|
||||
testRunner.When("I go to \"Admin/ContentTypes/Create\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
|
||||
#line hidden
|
||||
TechTalk.SpecFlow.Table table15 = new TechTalk.SpecFlow.Table(new string[] {
|
||||
"name",
|
||||
"value"});
|
||||
table15.AddRow(new string[] {
|
||||
"DisplayName",
|
||||
"Event"});
|
||||
table15.AddRow(new string[] {
|
||||
"Name",
|
||||
"Event"});
|
||||
#line 151
|
||||
testRunner.And("I fill in", ((string)(null)), table15, "And ");
|
||||
#line 155
|
||||
testRunner.And("I hit \"Create\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 156
|
||||
testRunner.And("I go to \"Admin/ContentTypes/\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 157
|
||||
testRunner.Then("I should see \"Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line 160
|
||||
testRunner.When("I go to \"Admin/ContentTypes/Edit/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
|
||||
#line 161
|
||||
testRunner.And("I follow \"Add Field\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line hidden
|
||||
TechTalk.SpecFlow.Table table16 = new TechTalk.SpecFlow.Table(new string[] {
|
||||
"name",
|
||||
"value"});
|
||||
table16.AddRow(new string[] {
|
||||
"DisplayName",
|
||||
"Event"});
|
||||
"Date of the event"});
|
||||
table16.AddRow(new string[] {
|
||||
"Name",
|
||||
"Event"});
|
||||
#line 168
|
||||
"EventDate"});
|
||||
table16.AddRow(new string[] {
|
||||
"FieldTypeName",
|
||||
"DateTimeField"});
|
||||
#line 162
|
||||
testRunner.And("I fill in", ((string)(null)), table16, "And ");
|
||||
#line 167
|
||||
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 168
|
||||
testRunner.And("I am redirected", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 169
|
||||
testRunner.Then("I should see \"The \\\"Date of the event\\\" field has been added.\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line 172
|
||||
testRunner.And("I hit \"Create\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
testRunner.When("I have \"fr-FR\" as the default culture", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
|
||||
#line 173
|
||||
testRunner.And("I go to \"Admin/ContentTypes/\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 174
|
||||
testRunner.Then("I should see \"Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line 177
|
||||
testRunner.When("I go to \"Admin/ContentTypes/Edit/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
|
||||
#line 178
|
||||
testRunner.And("I follow \"Add Field\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
testRunner.And("I go to \"Admin/ContentTypes/Edit/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line hidden
|
||||
TechTalk.SpecFlow.Table table17 = new TechTalk.SpecFlow.Table(new string[] {
|
||||
"name",
|
||||
"value"});
|
||||
table17.AddRow(new string[] {
|
||||
"DisplayName",
|
||||
"Date of the event"});
|
||||
"Fields[0].DateTimeFieldSettings.Display",
|
||||
"DateAndTime"});
|
||||
table17.AddRow(new string[] {
|
||||
"Name",
|
||||
"EventDate"});
|
||||
table17.AddRow(new string[] {
|
||||
"FieldTypeName",
|
||||
"DateTimeField"});
|
||||
#line 179
|
||||
"Fields[0].DateTimeFieldSettings.Required",
|
||||
"true"});
|
||||
#line 174
|
||||
testRunner.And("I fill in", ((string)(null)), table17, "And ");
|
||||
#line 184
|
||||
#line 178
|
||||
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 185
|
||||
testRunner.And("I am redirected", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 186
|
||||
testRunner.Then("I should see \"The \\\"Date of the event\\\" field has been added.\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line 189
|
||||
testRunner.When("I have \"fr-FR\" as the default culture", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
|
||||
#line 190
|
||||
testRunner.And("I go to \"Admin/ContentTypes/Edit/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 179
|
||||
testRunner.When("I go to \"Admin/Contents/Create/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
|
||||
#line hidden
|
||||
TechTalk.SpecFlow.Table table18 = new TechTalk.SpecFlow.Table(new string[] {
|
||||
"name",
|
||||
"value"});
|
||||
table18.AddRow(new string[] {
|
||||
"Fields[0].DateTimeFieldSettings.Display",
|
||||
"DateAndTime"});
|
||||
"Event.EventDate.Editor.Date",
|
||||
"01/31/2012"});
|
||||
table18.AddRow(new string[] {
|
||||
"Fields[0].DateTimeFieldSettings.Required",
|
||||
"true"});
|
||||
#line 191
|
||||
"Event.EventDate.Editor.Time",
|
||||
"12:00 AM"});
|
||||
#line 180
|
||||
testRunner.And("I fill in", ((string)(null)), table18, "And ");
|
||||
#line 195
|
||||
#line 184
|
||||
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 196
|
||||
#line 185
|
||||
testRunner.Then("I should see \"Date of the event could not be parsed as a valid date and time\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line 186
|
||||
testRunner.When("I go to \"Admin/Contents/Create/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
|
||||
#line hidden
|
||||
TechTalk.SpecFlow.Table table19 = new TechTalk.SpecFlow.Table(new string[] {
|
||||
@@ -478,35 +461,17 @@ this.ScenarioSetup(scenarioInfo);
|
||||
"value"});
|
||||
table19.AddRow(new string[] {
|
||||
"Event.EventDate.Editor.Date",
|
||||
"01/31/2012"});
|
||||
"31/01/2012"});
|
||||
table19.AddRow(new string[] {
|
||||
"Event.EventDate.Editor.Time",
|
||||
"12:00 AM"});
|
||||
#line 197
|
||||
testRunner.And("I fill in", ((string)(null)), table19, "And ");
|
||||
#line 201
|
||||
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 202
|
||||
testRunner.Then("I should see \"Date of the event could not be parsed as a valid date and time\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line 203
|
||||
testRunner.When("I go to \"Admin/Contents/Create/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
|
||||
#line hidden
|
||||
TechTalk.SpecFlow.Table table20 = new TechTalk.SpecFlow.Table(new string[] {
|
||||
"name",
|
||||
"value"});
|
||||
table20.AddRow(new string[] {
|
||||
"Event.EventDate.Editor.Date",
|
||||
"31/01/2012"});
|
||||
table20.AddRow(new string[] {
|
||||
"Event.EventDate.Editor.Time",
|
||||
"18:00"});
|
||||
#line 204
|
||||
testRunner.And("I fill in", ((string)(null)), table20, "And ");
|
||||
#line 208
|
||||
#line 187
|
||||
testRunner.And("I fill in", ((string)(null)), table19, "And ");
|
||||
#line 191
|
||||
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 209
|
||||
#line 192
|
||||
testRunner.And("I am redirected", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 210
|
||||
#line 193
|
||||
testRunner.Then("I should see \"Your Event has been created.\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line hidden
|
||||
this.ScenarioCleanup();
|
||||
|
||||
@@ -107,34 +107,3 @@ Scenario: Creating and using Enumeration fields
|
||||
And I go to "Admin/Contents/Create/Event"
|
||||
And I hit "Save"
|
||||
Then I should see "The field Location is mandatory."
|
||||
|
||||
# The default value should be proposed on creation
|
||||
When I go to "Admin/ContentTypes/Edit/Event"
|
||||
And I fill in
|
||||
| name | value |
|
||||
| Fields[0].EnumerationFieldSettings.Options | Seattle |
|
||||
| Fields[0].EnumerationFieldSettings.ListMode | Dropdown |
|
||||
| Fields[0].EnumerationFieldSettings.DefaultValue | Seattle |
|
||||
And I hit "Save"
|
||||
And I go to "Admin/Contents/Create/Event"
|
||||
Then I should see "selected=\"selected">Seattle"
|
||||
|
||||
# The required attribute should be used
|
||||
When I go to "Admin/ContentTypes/Edit/Event"
|
||||
And I fill in
|
||||
| name | value |
|
||||
| Fields[0].EnumerationFieldSettings.Required | true |
|
||||
| Fields[0].EnumerationFieldSettings.ListMode | Listbox |
|
||||
And I hit "Save"
|
||||
And I go to "Admin/Contents/Create/Event"
|
||||
Then I should see "required=\"required\""
|
||||
|
||||
# The required attribute should not be used
|
||||
When I go to "Admin/ContentTypes/Edit/Event"
|
||||
And I fill in
|
||||
| name | value |
|
||||
| Fields[0].EnumerationFieldSettings.Required | false |
|
||||
| Fields[0].EnumerationFieldSettings.ListMode | Listbox |
|
||||
And I hit "Save"
|
||||
And I go to "Admin/Contents/Create/Event"
|
||||
Then I should not see "required=\"required\""
|
||||
|
||||
63
src/Orchard.Specs/Enumeration.feature.cs
generated
63
src/Orchard.Specs/Enumeration.feature.cs
generated
@@ -273,69 +273,6 @@ this.ScenarioSetup(scenarioInfo);
|
||||
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 109
|
||||
testRunner.Then("I should see \"The field Location is mandatory.\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line 112
|
||||
testRunner.When("I go to \"Admin/ContentTypes/Edit/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
|
||||
#line hidden
|
||||
TechTalk.SpecFlow.Table table11 = new TechTalk.SpecFlow.Table(new string[] {
|
||||
"name",
|
||||
"value"});
|
||||
table11.AddRow(new string[] {
|
||||
"Fields[0].EnumerationFieldSettings.Options",
|
||||
"Seattle"});
|
||||
table11.AddRow(new string[] {
|
||||
"Fields[0].EnumerationFieldSettings.ListMode",
|
||||
"Dropdown"});
|
||||
table11.AddRow(new string[] {
|
||||
"Fields[0].EnumerationFieldSettings.DefaultValue",
|
||||
"Seattle"});
|
||||
#line 113
|
||||
testRunner.And("I fill in", ((string)(null)), table11, "And ");
|
||||
#line 118
|
||||
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 119
|
||||
testRunner.And("I go to \"Admin/Contents/Create/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 120
|
||||
testRunner.Then("I should see \"selected=\\\"selected\">Seattle\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line 123
|
||||
testRunner.When("I go to \"Admin/ContentTypes/Edit/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
|
||||
#line hidden
|
||||
TechTalk.SpecFlow.Table table12 = new TechTalk.SpecFlow.Table(new string[] {
|
||||
"name",
|
||||
"value"});
|
||||
table12.AddRow(new string[] {
|
||||
"Fields[0].EnumerationFieldSettings.Required",
|
||||
"true"});
|
||||
table12.AddRow(new string[] {
|
||||
"Fields[0].EnumerationFieldSettings.ListMode",
|
||||
"Listbox"});
|
||||
#line 124
|
||||
testRunner.And("I fill in", ((string)(null)), table12, "And ");
|
||||
#line 128
|
||||
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 129
|
||||
testRunner.And("I go to \"Admin/Contents/Create/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 130
|
||||
testRunner.Then("I should see \"required=\\\"required\\\"\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line 133
|
||||
testRunner.When("I go to \"Admin/ContentTypes/Edit/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
|
||||
#line hidden
|
||||
TechTalk.SpecFlow.Table table13 = new TechTalk.SpecFlow.Table(new string[] {
|
||||
"name",
|
||||
"value"});
|
||||
table13.AddRow(new string[] {
|
||||
"Fields[0].EnumerationFieldSettings.Required",
|
||||
"false"});
|
||||
table13.AddRow(new string[] {
|
||||
"Fields[0].EnumerationFieldSettings.ListMode",
|
||||
"Listbox"});
|
||||
#line 134
|
||||
testRunner.And("I fill in", ((string)(null)), table13, "And ");
|
||||
#line 138
|
||||
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 139
|
||||
testRunner.And("I go to \"Admin/Contents/Create/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 140
|
||||
testRunner.Then("I should not see \"required=\\\"required\\\"\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line hidden
|
||||
this.ScenarioCleanup();
|
||||
}
|
||||
|
||||
@@ -13,8 +13,7 @@ namespace Orchard.Specs.Hosting {
|
||||
}
|
||||
public override IPersistenceConfigurer GetPersistenceConfigurer(bool createDatabase) {
|
||||
var config = (MsSqlCeConfiguration)base.GetPersistenceConfigurer(createDatabase);
|
||||
// Uncomment to display SQL while running tests
|
||||
// config.ShowSql();
|
||||
config.ShowSql();
|
||||
return config;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -128,30 +128,3 @@ Scenario: Creating and using Input fields
|
||||
When I go to "Admin/Contents/List"
|
||||
Then I should see "Contact:"
|
||||
And I should see "contact@orchardproject.net"
|
||||
|
||||
# The default value should be proposed on creation
|
||||
When I go to "Admin/ContentTypes/Edit/Event"
|
||||
And I fill in
|
||||
| name | value |
|
||||
| Fields[0].InputFieldSettings.DefaultValue | contact@orchardproject.net |
|
||||
And I hit "Save"
|
||||
And I go to "Admin/Contents/Create/Event"
|
||||
Then I should see "value=\"contact@orchardproject.net\""
|
||||
|
||||
# The required attribute should be used
|
||||
When I go to "Admin/ContentTypes/Edit/Event"
|
||||
And I fill in
|
||||
| name | value |
|
||||
| Fields[0].InputFieldSettings.Required | true |
|
||||
And I hit "Save"
|
||||
And I go to "Admin/Contents/Create/Event"
|
||||
Then I should see "required=\"required\""
|
||||
|
||||
# The required attribute should not be used
|
||||
When I go to "Admin/ContentTypes/Edit/Event"
|
||||
And I fill in
|
||||
| name | value |
|
||||
| Fields[0].InputFieldSettings.Required | false |
|
||||
And I hit "Save"
|
||||
And I go to "Admin/Contents/Create/Event"
|
||||
Then I should not see "required=\"required\""
|
||||
51
src/Orchard.Specs/Input.feature.cs
generated
51
src/Orchard.Specs/Input.feature.cs
generated
@@ -297,57 +297,6 @@ this.ScenarioSetup(scenarioInfo);
|
||||
testRunner.Then("I should see \"Contact:\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line 130
|
||||
testRunner.And("I should see \"contact@orchardproject.net\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 133
|
||||
testRunner.When("I go to \"Admin/ContentTypes/Edit/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
|
||||
#line hidden
|
||||
TechTalk.SpecFlow.Table table13 = new TechTalk.SpecFlow.Table(new string[] {
|
||||
"name",
|
||||
"value"});
|
||||
table13.AddRow(new string[] {
|
||||
"Fields[0].InputFieldSettings.DefaultValue",
|
||||
"contact@orchardproject.net"});
|
||||
#line 134
|
||||
testRunner.And("I fill in", ((string)(null)), table13, "And ");
|
||||
#line 137
|
||||
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 138
|
||||
testRunner.And("I go to \"Admin/Contents/Create/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 139
|
||||
testRunner.Then("I should see \"value=\\\"contact@orchardproject.net\\\"\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line 142
|
||||
testRunner.When("I go to \"Admin/ContentTypes/Edit/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
|
||||
#line hidden
|
||||
TechTalk.SpecFlow.Table table14 = new TechTalk.SpecFlow.Table(new string[] {
|
||||
"name",
|
||||
"value"});
|
||||
table14.AddRow(new string[] {
|
||||
"Fields[0].InputFieldSettings.Required",
|
||||
"true"});
|
||||
#line 143
|
||||
testRunner.And("I fill in", ((string)(null)), table14, "And ");
|
||||
#line 146
|
||||
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 147
|
||||
testRunner.And("I go to \"Admin/Contents/Create/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 148
|
||||
testRunner.Then("I should see \"required=\\\"required\\\"\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line 151
|
||||
testRunner.When("I go to \"Admin/ContentTypes/Edit/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
|
||||
#line hidden
|
||||
TechTalk.SpecFlow.Table table15 = new TechTalk.SpecFlow.Table(new string[] {
|
||||
"name",
|
||||
"value"});
|
||||
table15.AddRow(new string[] {
|
||||
"Fields[0].InputFieldSettings.Required",
|
||||
"false"});
|
||||
#line 152
|
||||
testRunner.And("I fill in", ((string)(null)), table15, "And ");
|
||||
#line 155
|
||||
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 156
|
||||
testRunner.And("I go to \"Admin/Contents/Create/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 157
|
||||
testRunner.Then("I should not see \"required=\\\"required\\\"\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line hidden
|
||||
this.ScenarioCleanup();
|
||||
}
|
||||
|
||||
@@ -67,31 +67,4 @@ Scenario: Creating and using Link fields
|
||||
| name | value |
|
||||
| Event.SiteUrl.Value | |
|
||||
And I hit "Save"
|
||||
Then I should see "Url is required for Site Url."
|
||||
|
||||
# The default value should be proposed on creation
|
||||
When I go to "Admin/ContentTypes/Edit/Event"
|
||||
And I fill in
|
||||
| name | value |
|
||||
| Fields[0].LinkFieldSettings.DefaultValue | http://www.orchardproject.net |
|
||||
And I hit "Save"
|
||||
And I go to "Admin/Contents/Create/Event"
|
||||
Then I should see "value=\"http://www.orchardproject.net\""
|
||||
|
||||
# The required attribute should be used
|
||||
When I go to "Admin/ContentTypes/Edit/Event"
|
||||
And I fill in
|
||||
| name | value |
|
||||
| Fields[0].LinkFieldSettings.Required | true |
|
||||
And I hit "Save"
|
||||
And I go to "Admin/Contents/Create/Event"
|
||||
Then I should see "required=\"required\""
|
||||
|
||||
# The required attribute should not be used
|
||||
When I go to "Admin/ContentTypes/Edit/Event"
|
||||
And I fill in
|
||||
| name | value |
|
||||
| Fields[0].LinkFieldSettings.Required | false |
|
||||
And I hit "Save"
|
||||
And I go to "Admin/Contents/Create/Event"
|
||||
Then I should not see "required=\"required\""
|
||||
Then I should see "Url is required for Site Url."
|
||||
51
src/Orchard.Specs/Link.feature.cs
generated
51
src/Orchard.Specs/Link.feature.cs
generated
@@ -204,57 +204,6 @@ this.ScenarioSetup(scenarioInfo);
|
||||
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 70
|
||||
testRunner.Then("I should see \"Url is required for Site Url.\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line 73
|
||||
testRunner.When("I go to \"Admin/ContentTypes/Edit/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
|
||||
#line hidden
|
||||
TechTalk.SpecFlow.Table table8 = new TechTalk.SpecFlow.Table(new string[] {
|
||||
"name",
|
||||
"value"});
|
||||
table8.AddRow(new string[] {
|
||||
"Fields[0].LinkFieldSettings.DefaultValue",
|
||||
"http://www.orchardproject.net"});
|
||||
#line 74
|
||||
testRunner.And("I fill in", ((string)(null)), table8, "And ");
|
||||
#line 77
|
||||
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 78
|
||||
testRunner.And("I go to \"Admin/Contents/Create/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 79
|
||||
testRunner.Then("I should see \"value=\\\"http://www.orchardproject.net\\\"\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line 82
|
||||
testRunner.When("I go to \"Admin/ContentTypes/Edit/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
|
||||
#line hidden
|
||||
TechTalk.SpecFlow.Table table9 = new TechTalk.SpecFlow.Table(new string[] {
|
||||
"name",
|
||||
"value"});
|
||||
table9.AddRow(new string[] {
|
||||
"Fields[0].LinkFieldSettings.Required",
|
||||
"true"});
|
||||
#line 83
|
||||
testRunner.And("I fill in", ((string)(null)), table9, "And ");
|
||||
#line 86
|
||||
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 87
|
||||
testRunner.And("I go to \"Admin/Contents/Create/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 88
|
||||
testRunner.Then("I should see \"required=\\\"required\\\"\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line 91
|
||||
testRunner.When("I go to \"Admin/ContentTypes/Edit/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
|
||||
#line hidden
|
||||
TechTalk.SpecFlow.Table table10 = new TechTalk.SpecFlow.Table(new string[] {
|
||||
"name",
|
||||
"value"});
|
||||
table10.AddRow(new string[] {
|
||||
"Fields[0].LinkFieldSettings.Required",
|
||||
"false"});
|
||||
#line 92
|
||||
testRunner.And("I fill in", ((string)(null)), table10, "And ");
|
||||
#line 95
|
||||
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 96
|
||||
testRunner.And("I go to \"Admin/Contents/Create/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 97
|
||||
testRunner.Then("I should not see \"required=\\\"required\\\"\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line hidden
|
||||
this.ScenarioCleanup();
|
||||
}
|
||||
|
||||
@@ -25,7 +25,6 @@ Scenario: A new tenant is created
|
||||
And I fill in
|
||||
| name | value |
|
||||
| Name | Scott |
|
||||
| RequestUrlPrefix | scott |
|
||||
And I hit "Save"
|
||||
And I am redirected
|
||||
Then I should see "<h3>Scott\s*</h3>"
|
||||
@@ -38,7 +37,6 @@ Scenario: A new tenant is created with uninitialized state
|
||||
And I fill in
|
||||
| name | value |
|
||||
| Name | Scott |
|
||||
| RequestUrlPrefix | scott |
|
||||
And I hit "Save"
|
||||
And I am redirected
|
||||
Then I should see "<li class="tenant Uninitialized">"
|
||||
@@ -201,4 +199,4 @@ Scenario: Listing tenants from command line
|
||||
And I have tenant "Alpha" on "example.org" as "New-site-name"
|
||||
When I execute >tenant list
|
||||
Then I should see "Name: Alpha"
|
||||
And I should see "Request URL host: example.org"
|
||||
And I should see "Request URL host: example.org"
|
||||
6
src/Orchard.Specs/MultiTenancy.feature.cs
generated
6
src/Orchard.Specs/MultiTenancy.feature.cs
generated
@@ -129,9 +129,6 @@ this.ScenarioSetup(scenarioInfo);
|
||||
table1.AddRow(new string[] {
|
||||
"Name",
|
||||
"Scott"});
|
||||
table1.AddRow(new string[] {
|
||||
"RequestUrlPrefix",
|
||||
"scott"});
|
||||
#line 25
|
||||
testRunner.And("I fill in", ((string)(null)), table1, "And ");
|
||||
#line 28
|
||||
@@ -166,9 +163,6 @@ this.ScenarioSetup(scenarioInfo);
|
||||
table2.AddRow(new string[] {
|
||||
"Name",
|
||||
"Scott"});
|
||||
table2.AddRow(new string[] {
|
||||
"RequestUrlPrefix",
|
||||
"scott"});
|
||||
#line 37
|
||||
testRunner.And("I fill in", ((string)(null)), table2, "And ");
|
||||
#line 40
|
||||
|
||||
@@ -96,39 +96,4 @@ Scenario: Creating and using numeric fields
|
||||
| Fields[0].NumericFieldSettings.Maximum | b |
|
||||
And I hit "Save"
|
||||
Then I should see "The value 'a' is not valid for Minimum."
|
||||
And I should see "The value 'b' is not valid for Maximum."
|
||||
|
||||
# The value should be validated
|
||||
When I go to "Admin/Contents/Create/Event"
|
||||
And I fill in
|
||||
| name | value |
|
||||
| Event.Guests.Value | a |
|
||||
And I hit "Save"
|
||||
Then I should see "Guests is an invalid number"
|
||||
|
||||
# The default value should be proposed on creation
|
||||
When I go to "Admin/ContentTypes/Edit/Event"
|
||||
And I fill in
|
||||
| name | value |
|
||||
| Fields[0].NumericFieldSettings.DefaultValue | 1234 |
|
||||
And I hit "Save"
|
||||
And I go to "Admin/Contents/Create/Event"
|
||||
Then I should see "value=\"1234\""
|
||||
|
||||
# The required attribute should be used
|
||||
When I go to "Admin/ContentTypes/Edit/Event"
|
||||
And I fill in
|
||||
| name | value |
|
||||
| Fields[0].NumericFieldSettings.Required | true |
|
||||
And I hit "Save"
|
||||
And I go to "Admin/Contents/Create/Event"
|
||||
Then I should see "required=\"required\""
|
||||
|
||||
# The required attribute should not be used
|
||||
When I go to "Admin/ContentTypes/Edit/Event"
|
||||
And I fill in
|
||||
| name | value |
|
||||
| Fields[0].NumericFieldSettings.Required | false |
|
||||
And I hit "Save"
|
||||
And I go to "Admin/Contents/Create/Event"
|
||||
Then I should not see "required=\"required\""
|
||||
And I should see "The value 'b' is not valid for Maximum."
|
||||
66
src/Orchard.Specs/Numeric.feature.cs
generated
66
src/Orchard.Specs/Numeric.feature.cs
generated
@@ -265,72 +265,6 @@ this.ScenarioSetup(scenarioInfo);
|
||||
testRunner.Then("I should see \"The value 'a' is not valid for Minimum.\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line 99
|
||||
testRunner.And("I should see \"The value 'b' is not valid for Maximum.\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 102
|
||||
testRunner.When("I go to \"Admin/Contents/Create/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
|
||||
#line hidden
|
||||
TechTalk.SpecFlow.Table table11 = new TechTalk.SpecFlow.Table(new string[] {
|
||||
"name",
|
||||
"value"});
|
||||
table11.AddRow(new string[] {
|
||||
"Event.Guests.Value",
|
||||
"a"});
|
||||
#line 103
|
||||
testRunner.And("I fill in", ((string)(null)), table11, "And ");
|
||||
#line 106
|
||||
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 107
|
||||
testRunner.Then("I should see \"Guests is an invalid number\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line 110
|
||||
testRunner.When("I go to \"Admin/ContentTypes/Edit/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
|
||||
#line hidden
|
||||
TechTalk.SpecFlow.Table table12 = new TechTalk.SpecFlow.Table(new string[] {
|
||||
"name",
|
||||
"value"});
|
||||
table12.AddRow(new string[] {
|
||||
"Fields[0].NumericFieldSettings.DefaultValue",
|
||||
"1234"});
|
||||
#line 111
|
||||
testRunner.And("I fill in", ((string)(null)), table12, "And ");
|
||||
#line 114
|
||||
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 115
|
||||
testRunner.And("I go to \"Admin/Contents/Create/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 116
|
||||
testRunner.Then("I should see \"value=\\\"1234\\\"\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line 119
|
||||
testRunner.When("I go to \"Admin/ContentTypes/Edit/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
|
||||
#line hidden
|
||||
TechTalk.SpecFlow.Table table13 = new TechTalk.SpecFlow.Table(new string[] {
|
||||
"name",
|
||||
"value"});
|
||||
table13.AddRow(new string[] {
|
||||
"Fields[0].NumericFieldSettings.Required",
|
||||
"true"});
|
||||
#line 120
|
||||
testRunner.And("I fill in", ((string)(null)), table13, "And ");
|
||||
#line 123
|
||||
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 124
|
||||
testRunner.And("I go to \"Admin/Contents/Create/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 125
|
||||
testRunner.Then("I should see \"required=\\\"required\\\"\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line 128
|
||||
testRunner.When("I go to \"Admin/ContentTypes/Edit/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
|
||||
#line hidden
|
||||
TechTalk.SpecFlow.Table table14 = new TechTalk.SpecFlow.Table(new string[] {
|
||||
"name",
|
||||
"value"});
|
||||
table14.AddRow(new string[] {
|
||||
"Fields[0].NumericFieldSettings.Required",
|
||||
"false"});
|
||||
#line 129
|
||||
testRunner.And("I fill in", ((string)(null)), table14, "And ");
|
||||
#line 132
|
||||
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 133
|
||||
testRunner.And("I go to \"Admin/Contents/Create/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 134
|
||||
testRunner.Then("I should not see \"required=\\\"required\\\"\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line hidden
|
||||
this.ScenarioCleanup();
|
||||
}
|
||||
|
||||
@@ -65,8 +65,8 @@
|
||||
<HintPath>..\packages\Castle.Core.3.3.1\lib\net45\Castle.Core.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="FluentNHibernate, Version=2.0.3.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\FluentNHibernate.2.0.3.0\lib\net40\FluentNHibernate.dll</HintPath>
|
||||
<Reference Include="FluentNHibernate, Version=1.4.0.0, Culture=neutral, PublicKeyToken=8aa435e3cb308880, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\FluentNHibernate.1.4.0.0\lib\net35\FluentNHibernate.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="FluentPath, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
@@ -205,11 +205,6 @@
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
</Compile>
|
||||
<Compile Include="Text.feature.cs">
|
||||
<DependentUpon>Text.feature</DependentUpon>
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
</Compile>
|
||||
<Compile Include="Input.feature.cs">
|
||||
<DependentUpon>Input.feature</DependentUpon>
|
||||
<AutoGen>True</AutoGen>
|
||||
@@ -376,10 +371,6 @@
|
||||
<None Include="Hosting\Orchard.Web\Config\HostComponents.Release.config">
|
||||
<DependentUpon>HostComponents.config</DependentUpon>
|
||||
</None>
|
||||
<None Include="Text.feature">
|
||||
<Generator>SpecFlowSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Text.feature.cs</LastGenOutput>
|
||||
</None>
|
||||
<None Include="Input.feature">
|
||||
<Generator>SpecFlowSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Input.feature.cs</LastGenOutput>
|
||||
|
||||
@@ -30,5 +30,5 @@ using System.Runtime.InteropServices;
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
|
||||
[assembly: AssemblyVersion("1.10.1")]
|
||||
[assembly: AssemblyFileVersion("1.10.1")]
|
||||
[assembly: AssemblyVersion("1.10")]
|
||||
[assembly: AssemblyFileVersion("1.10")]
|
||||
|
||||
@@ -1,101 +0,0 @@
|
||||
Feature: Text Field
|
||||
In order to add Text content to my types
|
||||
As an administrator
|
||||
I want to create, edit and publish Text fields
|
||||
|
||||
Scenario: Creating and using Text fields
|
||||
|
||||
# Creating an Event content type
|
||||
Given I have installed Orchard
|
||||
And I have installed "Orchard.Fields"
|
||||
When I go to "Admin/ContentTypes"
|
||||
Then I should see "<a[^>]*>.*?Create new type</a>"
|
||||
When I go to "Admin/ContentTypes/Create"
|
||||
And I fill in
|
||||
| name | value |
|
||||
| DisplayName | Event |
|
||||
| Name | Event |
|
||||
And I hit "Create"
|
||||
And I go to "Admin/ContentTypes/"
|
||||
Then I should see "Event"
|
||||
|
||||
# Adding a Text field
|
||||
When I go to "Admin/ContentTypes/Edit/Event"
|
||||
And I follow "Add Field"
|
||||
And I fill in
|
||||
| name | value |
|
||||
| DisplayName | Subject |
|
||||
| Name | Subject |
|
||||
| FieldTypeName | TextField |
|
||||
And I hit "Save"
|
||||
And I am redirected
|
||||
Then I should see "The \"Subject\" field has been added."
|
||||
|
||||
# The display option should be effective
|
||||
When I go to "Admin/ContentTypes/Edit/Event"
|
||||
And I fill in
|
||||
| name | value |
|
||||
| Fields[0].TextFieldSettingsEventsViewModel.Settings.Flavor | Large |
|
||||
And I hit "Save"
|
||||
And I go to "Admin/Contents/Create/Event"
|
||||
Then I should see "class=\"text large\""
|
||||
|
||||
# The value should be required
|
||||
When I go to "Admin/ContentTypes/Edit/Event"
|
||||
And I fill in
|
||||
| name | value |
|
||||
| Fields[0].TextFieldSettingsEventsViewModel.Settings.Required | true |
|
||||
And I hit "Save"
|
||||
And I go to "Admin/Contents/Create/Event"
|
||||
And I fill in
|
||||
| name | value |
|
||||
| Event.Subject.Text | |
|
||||
And I hit "Save"
|
||||
Then I should see "The field Subject is mandatory."
|
||||
|
||||
# The hint should be displayed
|
||||
When I go to "Admin/ContentTypes/Edit/Event"
|
||||
And I fill in
|
||||
| name | value |
|
||||
| Fields[0].TextFieldSettingsEventsViewModel.Settings.Hint | Subject of the event |
|
||||
And I hit "Save"
|
||||
And I go to "Admin/Contents/Create/Event"
|
||||
Then I should see "Subject of the event"
|
||||
|
||||
# Creating an Event content item
|
||||
When I go to "Admin/Contents/Create/Event"
|
||||
Then I should see "Subject"
|
||||
When I fill in
|
||||
| name | value |
|
||||
| Event.Subject.Text | Orchard Harvest 2015 |
|
||||
And I hit "Save"
|
||||
And I am redirected
|
||||
Then I should see "Your Event has been created."
|
||||
And I should see "Orchard Harvest 2015"
|
||||
|
||||
# The default value should be proposed on creation
|
||||
When I go to "Admin/ContentTypes/Edit/Event"
|
||||
And I fill in
|
||||
| name | value |
|
||||
| Fields[0].TextFieldSettingsEventsViewModel.Settings.DefaultValue | Orchard Harvest 2016 |
|
||||
And I hit "Save"
|
||||
And I go to "Admin/Contents/Create/Event"
|
||||
Then I should see "value=\"Orchard Harvest 2016\""
|
||||
|
||||
# The required attribute should be used
|
||||
When I go to "Admin/ContentTypes/Edit/Event"
|
||||
And I fill in
|
||||
| name | value |
|
||||
| Fields[0].TextFieldSettingsEventsViewModel.Settings.Required | true |
|
||||
And I hit "Save"
|
||||
And I go to "Admin/Contents/Create/Event"
|
||||
Then I should see "required=\"required\""
|
||||
|
||||
# The required attribute should not be used
|
||||
When I go to "Admin/ContentTypes/Edit/Event"
|
||||
And I fill in
|
||||
| name | value |
|
||||
| Fields[0].TextFieldSettingsEventsViewModel.Settings.Required | false |
|
||||
And I hit "Save"
|
||||
And I go to "Admin/Contents/Create/Event"
|
||||
Then I should not see "required=\"required\""
|
||||
268
src/Orchard.Specs/Text.feature.cs
generated
268
src/Orchard.Specs/Text.feature.cs
generated
@@ -1,268 +0,0 @@
|
||||
// ------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by SpecFlow (http://www.specflow.org/).
|
||||
// SpecFlow Version:1.9.0.77
|
||||
// SpecFlow Generator Version:1.9.0.0
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
// ------------------------------------------------------------------------------
|
||||
#region Designer generated code
|
||||
#pragma warning disable
|
||||
namespace Orchard.Specs
|
||||
{
|
||||
using TechTalk.SpecFlow;
|
||||
|
||||
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "1.9.0.77")]
|
||||
[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[NUnit.Framework.TestFixtureAttribute()]
|
||||
[NUnit.Framework.DescriptionAttribute("Text Field")]
|
||||
public partial class TextFieldFeature
|
||||
{
|
||||
|
||||
private static TechTalk.SpecFlow.ITestRunner testRunner;
|
||||
|
||||
#line 1 "Text.feature"
|
||||
#line hidden
|
||||
|
||||
[NUnit.Framework.TestFixtureSetUpAttribute()]
|
||||
public virtual void FeatureSetup()
|
||||
{
|
||||
testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner();
|
||||
TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Text Field", " In order to add Text content to my types\r\n As an administrator\r\n I want to cr" +
|
||||
"eate, edit and publish Text fields", ProgrammingLanguage.CSharp, ((string[])(null)));
|
||||
testRunner.OnFeatureStart(featureInfo);
|
||||
}
|
||||
|
||||
[NUnit.Framework.TestFixtureTearDownAttribute()]
|
||||
public virtual void FeatureTearDown()
|
||||
{
|
||||
testRunner.OnFeatureEnd();
|
||||
testRunner = null;
|
||||
}
|
||||
|
||||
[NUnit.Framework.SetUpAttribute()]
|
||||
public virtual void TestInitialize()
|
||||
{
|
||||
}
|
||||
|
||||
[NUnit.Framework.TearDownAttribute()]
|
||||
public virtual void ScenarioTearDown()
|
||||
{
|
||||
testRunner.OnScenarioEnd();
|
||||
}
|
||||
|
||||
public virtual void ScenarioSetup(TechTalk.SpecFlow.ScenarioInfo scenarioInfo)
|
||||
{
|
||||
testRunner.OnScenarioStart(scenarioInfo);
|
||||
}
|
||||
|
||||
public virtual void ScenarioCleanup()
|
||||
{
|
||||
testRunner.CollectScenarioErrors();
|
||||
}
|
||||
|
||||
[NUnit.Framework.TestAttribute()]
|
||||
[NUnit.Framework.DescriptionAttribute("Creating and using Text fields")]
|
||||
public virtual void CreatingAndUsingTextFields()
|
||||
{
|
||||
TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Creating and using Text fields", ((string[])(null)));
|
||||
#line 6
|
||||
this.ScenarioSetup(scenarioInfo);
|
||||
#line 9
|
||||
testRunner.Given("I have installed Orchard", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given ");
|
||||
#line 10
|
||||
testRunner.And("I have installed \"Orchard.Fields\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 11
|
||||
testRunner.When("I go to \"Admin/ContentTypes\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
|
||||
#line 12
|
||||
testRunner.Then("I should see \"<a[^>]*>.*?Create new type</a>\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line 13
|
||||
testRunner.When("I go to \"Admin/ContentTypes/Create\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
|
||||
#line hidden
|
||||
TechTalk.SpecFlow.Table table1 = new TechTalk.SpecFlow.Table(new string[] {
|
||||
"name",
|
||||
"value"});
|
||||
table1.AddRow(new string[] {
|
||||
"DisplayName",
|
||||
"Event"});
|
||||
table1.AddRow(new string[] {
|
||||
"Name",
|
||||
"Event"});
|
||||
#line 14
|
||||
testRunner.And("I fill in", ((string)(null)), table1, "And ");
|
||||
#line 18
|
||||
testRunner.And("I hit \"Create\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 19
|
||||
testRunner.And("I go to \"Admin/ContentTypes/\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 20
|
||||
testRunner.Then("I should see \"Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line 23
|
||||
testRunner.When("I go to \"Admin/ContentTypes/Edit/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
|
||||
#line 24
|
||||
testRunner.And("I follow \"Add Field\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line hidden
|
||||
TechTalk.SpecFlow.Table table2 = new TechTalk.SpecFlow.Table(new string[] {
|
||||
"name",
|
||||
"value"});
|
||||
table2.AddRow(new string[] {
|
||||
"DisplayName",
|
||||
"Subject"});
|
||||
table2.AddRow(new string[] {
|
||||
"Name",
|
||||
"Subject"});
|
||||
table2.AddRow(new string[] {
|
||||
"FieldTypeName",
|
||||
"TextField"});
|
||||
#line 25
|
||||
testRunner.And("I fill in", ((string)(null)), table2, "And ");
|
||||
#line 30
|
||||
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 31
|
||||
testRunner.And("I am redirected", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 32
|
||||
testRunner.Then("I should see \"The \\\"Subject\\\" field has been added.\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line 35
|
||||
testRunner.When("I go to \"Admin/ContentTypes/Edit/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
|
||||
#line hidden
|
||||
TechTalk.SpecFlow.Table table3 = new TechTalk.SpecFlow.Table(new string[] {
|
||||
"name",
|
||||
"value"});
|
||||
table3.AddRow(new string[] {
|
||||
"Fields[0].TextFieldSettingsEventsViewModel.Settings.Flavor",
|
||||
"Large"});
|
||||
#line 36
|
||||
testRunner.And("I fill in", ((string)(null)), table3, "And ");
|
||||
#line 39
|
||||
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 40
|
||||
testRunner.And("I go to \"Admin/Contents/Create/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 41
|
||||
testRunner.Then("I should see \"class=\\\"text large\\\"\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line 44
|
||||
testRunner.When("I go to \"Admin/ContentTypes/Edit/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
|
||||
#line hidden
|
||||
TechTalk.SpecFlow.Table table4 = new TechTalk.SpecFlow.Table(new string[] {
|
||||
"name",
|
||||
"value"});
|
||||
table4.AddRow(new string[] {
|
||||
"Fields[0].TextFieldSettingsEventsViewModel.Settings.Required",
|
||||
"true"});
|
||||
#line 45
|
||||
testRunner.And("I fill in", ((string)(null)), table4, "And ");
|
||||
#line 48
|
||||
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 49
|
||||
testRunner.And("I go to \"Admin/Contents/Create/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line hidden
|
||||
TechTalk.SpecFlow.Table table5 = new TechTalk.SpecFlow.Table(new string[] {
|
||||
"name",
|
||||
"value"});
|
||||
table5.AddRow(new string[] {
|
||||
"Event.Subject.Text",
|
||||
""});
|
||||
#line 50
|
||||
testRunner.And("I fill in", ((string)(null)), table5, "And ");
|
||||
#line 53
|
||||
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 54
|
||||
testRunner.Then("I should see \"The field Subject is mandatory.\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line 57
|
||||
testRunner.When("I go to \"Admin/ContentTypes/Edit/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
|
||||
#line hidden
|
||||
TechTalk.SpecFlow.Table table6 = new TechTalk.SpecFlow.Table(new string[] {
|
||||
"name",
|
||||
"value"});
|
||||
table6.AddRow(new string[] {
|
||||
"Fields[0].TextFieldSettingsEventsViewModel.Settings.Hint",
|
||||
"Subject of the event"});
|
||||
#line 58
|
||||
testRunner.And("I fill in", ((string)(null)), table6, "And ");
|
||||
#line 61
|
||||
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 62
|
||||
testRunner.And("I go to \"Admin/Contents/Create/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 63
|
||||
testRunner.Then("I should see \"Subject of the event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line 66
|
||||
testRunner.When("I go to \"Admin/Contents/Create/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
|
||||
#line 67
|
||||
testRunner.Then("I should see \"Subject\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line hidden
|
||||
TechTalk.SpecFlow.Table table7 = new TechTalk.SpecFlow.Table(new string[] {
|
||||
"name",
|
||||
"value"});
|
||||
table7.AddRow(new string[] {
|
||||
"Event.Subject.Text",
|
||||
"Orchard Harvest 2015"});
|
||||
#line 68
|
||||
testRunner.When("I fill in", ((string)(null)), table7, "When ");
|
||||
#line 71
|
||||
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 72
|
||||
testRunner.And("I am redirected", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 73
|
||||
testRunner.Then("I should see \"Your Event has been created.\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line 74
|
||||
testRunner.And("I should see \"Orchard Harvest 2015\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 77
|
||||
testRunner.When("I go to \"Admin/ContentTypes/Edit/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
|
||||
#line hidden
|
||||
TechTalk.SpecFlow.Table table8 = new TechTalk.SpecFlow.Table(new string[] {
|
||||
"name",
|
||||
"value"});
|
||||
table8.AddRow(new string[] {
|
||||
"Fields[0].TextFieldSettingsEventsViewModel.Settings.DefaultValue",
|
||||
"Orchard Harvest 2016"});
|
||||
#line 78
|
||||
testRunner.And("I fill in", ((string)(null)), table8, "And ");
|
||||
#line 81
|
||||
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 82
|
||||
testRunner.And("I go to \"Admin/Contents/Create/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 83
|
||||
testRunner.Then("I should see \"value=\\\"Orchard Harvest 2016\\\"\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line 86
|
||||
testRunner.When("I go to \"Admin/ContentTypes/Edit/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
|
||||
#line hidden
|
||||
TechTalk.SpecFlow.Table table9 = new TechTalk.SpecFlow.Table(new string[] {
|
||||
"name",
|
||||
"value"});
|
||||
table9.AddRow(new string[] {
|
||||
"Fields[0].TextFieldSettingsEventsViewModel.Settings.Required",
|
||||
"true"});
|
||||
#line 87
|
||||
testRunner.And("I fill in", ((string)(null)), table9, "And ");
|
||||
#line 90
|
||||
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 91
|
||||
testRunner.And("I go to \"Admin/Contents/Create/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 92
|
||||
testRunner.Then("I should see \"required=\\\"required\\\"\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line 95
|
||||
testRunner.When("I go to \"Admin/ContentTypes/Edit/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
|
||||
#line hidden
|
||||
TechTalk.SpecFlow.Table table10 = new TechTalk.SpecFlow.Table(new string[] {
|
||||
"name",
|
||||
"value"});
|
||||
table10.AddRow(new string[] {
|
||||
"Fields[0].TextFieldSettingsEventsViewModel.Settings.Required",
|
||||
"false"});
|
||||
#line 96
|
||||
testRunner.And("I fill in", ((string)(null)), table10, "And ");
|
||||
#line 99
|
||||
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 100
|
||||
testRunner.And("I go to \"Admin/Contents/Create/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 101
|
||||
testRunner.Then("I should not see \"required=\\\"required\\\"\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line hidden
|
||||
this.ScenarioCleanup();
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma warning restore
|
||||
#endregion
|
||||
@@ -2,7 +2,7 @@
|
||||
<packages>
|
||||
<package id="Autofac" version="3.5.2" targetFramework="net452" />
|
||||
<package id="Castle.Core" version="3.3.1" targetFramework="net452" />
|
||||
<package id="FluentNHibernate" version="2.0.3.0" targetFramework="net452" />
|
||||
<package id="FluentNHibernate" version="1.4.0.0" targetFramework="net452" />
|
||||
<package id="HtmlAgilityPack" version="1.4.9" targetFramework="net452" />
|
||||
<package id="Iesi.Collections" version="4.0.1.4000" targetFramework="net452" />
|
||||
<package id="log4net" version="2.0.3" targetFramework="net452" />
|
||||
|
||||
@@ -203,8 +203,6 @@ namespace Orchard.Tests.Modules.Comments.Services {
|
||||
|
||||
public class ProcessingEngineStub : IProcessingEngine {
|
||||
|
||||
public void Initialize() { }
|
||||
|
||||
public string AddTask(ShellSettings shellSettings, ShellDescriptor shellDescriptor, string messageName, Dictionary<string, object> parameters) {
|
||||
return "";
|
||||
}
|
||||
|
||||
@@ -65,8 +65,8 @@
|
||||
<HintPath>..\packages\Castle.Core.3.3.1\lib\net45\Castle.Core.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="FluentNHibernate, Version=2.0.3.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\FluentNHibernate.2.0.3.0\lib\net40\FluentNHibernate.dll</HintPath>
|
||||
<Reference Include="FluentNHibernate, Version=1.4.0.0, Culture=neutral, PublicKeyToken=8aa435e3cb308880, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\FluentNHibernate.1.4.0.0\lib\net35\FluentNHibernate.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="FluentPath, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
|
||||
@@ -30,5 +30,5 @@ using System.Runtime.InteropServices;
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
|
||||
[assembly: AssemblyVersion("1.10.1")]
|
||||
[assembly: AssemblyFileVersion("1.10.1")]
|
||||
[assembly: AssemblyVersion("1.10")]
|
||||
[assembly: AssemblyFileVersion("1.10")]
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<package id="Autofac" version="3.5.2" targetFramework="net452" />
|
||||
<package id="Castle.Core" version="3.3.1" targetFramework="net452" />
|
||||
<package id="DotNetZip" version="1.9.1.8" targetFramework="net452" />
|
||||
<package id="FluentNHibernate" version="2.0.3.0" targetFramework="net452" />
|
||||
<package id="FluentNHibernate" version="1.4.0.0" targetFramework="net452" />
|
||||
<package id="Iesi.Collections" version="4.0.1.4000" targetFramework="net452" />
|
||||
<package id="IronRuby" version="1.1.3" targetFramework="net452" />
|
||||
<package id="Lucene.Net" version="3.0.3" targetFramework="net452" />
|
||||
|
||||
@@ -23,8 +23,7 @@ namespace Orchard.Tests {
|
||||
// .Conventions.AddFromAssemblyOf<DataModule>();
|
||||
var persistenceModel = AbstractDataServicesProvider.CreatePersistenceModel(types.Select(t => new RecordBlueprint { TableName = "Test_" + t.Name, Type = t }).ToList());
|
||||
var persistenceConfigurer = new SqlCeDataServicesProvider(fileName).GetPersistenceConfigurer(true/*createDatabase*/);
|
||||
// Uncomment to display SQL while running tests
|
||||
// ((MsSqlCeConfiguration)persistenceConfigurer).ShowSql();
|
||||
((MsSqlCeConfiguration)persistenceConfigurer).ShowSql();
|
||||
|
||||
return Fluently.Configure()
|
||||
.Database(persistenceConfigurer)
|
||||
|
||||
@@ -46,8 +46,7 @@ namespace Orchard.Tests {
|
||||
|
||||
var fileName = "temp.sdf";
|
||||
var persistenceConfigurer = new SqlCeDataServicesProvider(fileName).GetPersistenceConfigurer(true/*createDatabase*/);
|
||||
// Uncomment to display SQL while running tests
|
||||
// ((MsSqlCeConfiguration)persistenceConfigurer).ShowSql();
|
||||
((MsSqlCeConfiguration)persistenceConfigurer).ShowSql();
|
||||
|
||||
var sessionFactory = Fluently.Configure()
|
||||
.Database(persistenceConfigurer)
|
||||
|
||||
@@ -3,7 +3,6 @@ using Autofac;
|
||||
using NUnit.Framework;
|
||||
using Orchard.Localization.Models;
|
||||
using Orchard.Localization.Services;
|
||||
using Orchard.Tests.Stubs;
|
||||
|
||||
namespace Orchard.Tests.Localization {
|
||||
|
||||
@@ -304,11 +303,10 @@ namespace Orchard.Tests.Localization {
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Description("DST is ignored when date is ignored (non-DST date).")]
|
||||
[Description("DST date and time are not properly round-tripped when date is ignored.")]
|
||||
public void ConvertToLocalizedTimeStringTest03() {
|
||||
var timeZone = TimeZoneInfo.FindSystemTimeZoneById("Pacific Standard Time");
|
||||
var clock = new StubClock(new DateTime(2012, 1, 1, 12, 0, 0, DateTimeKind.Utc));
|
||||
var container = TestHelpers.InitializeContainer("en-US", null, timeZone, clock);
|
||||
var container = TestHelpers.InitializeContainer("en-US", null, timeZone);
|
||||
var target = container.Resolve<IDateLocalizationServices>();
|
||||
|
||||
var dateString = "3/10/2012";
|
||||
@@ -320,27 +318,7 @@ namespace Orchard.Tests.Localization {
|
||||
var timeString2 = target.ConvertToLocalizedTimeString(dateTimeUtc, new DateLocalizationOptions() { IgnoreDate = true });
|
||||
|
||||
Assert.AreEqual(dateString, dateString2);
|
||||
Assert.AreEqual(timeString, timeString2);
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Description("DST is ignored when date is ignored (DST date).")]
|
||||
public void ConvertToLocalizedTimeStringTest04() {
|
||||
var timeZone = TimeZoneInfo.FindSystemTimeZoneById("Pacific Standard Time");
|
||||
var clock = new StubClock(new DateTime(2012, 10, 3, 12, 0, 0, DateTimeKind.Utc));
|
||||
var container = TestHelpers.InitializeContainer("en-US", null, timeZone, clock);
|
||||
var target = container.Resolve<IDateLocalizationServices>();
|
||||
|
||||
var dateString = "3/10/2012";
|
||||
var timeString = "12:00:00 PM";
|
||||
|
||||
var dateTimeUtc = target.ConvertFromLocalizedString(dateString, timeString);
|
||||
|
||||
var dateString2 = target.ConvertToLocalizedDateString(dateTimeUtc);
|
||||
var timeString2 = target.ConvertToLocalizedTimeString(dateTimeUtc, new DateLocalizationOptions() { IgnoreDate = true });
|
||||
|
||||
Assert.AreEqual(dateString, dateString2);
|
||||
Assert.AreEqual(timeString, timeString2);
|
||||
Assert.AreNotEqual(timeString, timeString2);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -9,12 +9,9 @@ using Orchard.Tests.Stubs;
|
||||
namespace Orchard.Tests.Localization {
|
||||
|
||||
internal class TestHelpers {
|
||||
public static IContainer InitializeContainer(string cultureName, string calendarName, TimeZoneInfo timeZone, IClock clock = null) {
|
||||
public static IContainer InitializeContainer(string cultureName, string calendarName, TimeZoneInfo timeZone) {
|
||||
var builder = new ContainerBuilder();
|
||||
if (clock != null)
|
||||
builder.RegisterInstance(clock);
|
||||
else
|
||||
builder.RegisterType<StubClock>().As<IClock>();
|
||||
builder.RegisterType<StubClock>().As<IClock>();
|
||||
builder.RegisterInstance<WorkContext>(new StubWorkContext(cultureName, calendarName, timeZone));
|
||||
builder.RegisterType<StubWorkContextAccessor>().As<IWorkContextAccessor>();
|
||||
builder.RegisterType<CultureDateTimeFormatProvider>().As<IDateTimeFormatProvider>();
|
||||
|
||||
@@ -69,8 +69,8 @@
|
||||
<HintPath>..\packages\Castle.Core.3.3.1\lib\net45\Castle.Core.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="FluentNHibernate, Version=2.0.3.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\FluentNHibernate.2.0.3.0\lib\net40\FluentNHibernate.dll</HintPath>
|
||||
<Reference Include="FluentNHibernate, Version=1.4.0.0, Culture=neutral, PublicKeyToken=8aa435e3cb308880, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\FluentNHibernate.1.4.0.0\lib\net35\FluentNHibernate.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Iesi.Collections, Version=4.0.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL">
|
||||
|
||||
@@ -33,5 +33,5 @@ using System.Runtime.InteropServices;
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
|
||||
[assembly: AssemblyVersion("1.10.1")]
|
||||
[assembly: AssemblyFileVersion("1.10.1")]
|
||||
[assembly: AssemblyVersion("1.10")]
|
||||
[assembly: AssemblyFileVersion("1.10")]
|
||||
|
||||
@@ -4,13 +4,8 @@ using Orchard.Services;
|
||||
|
||||
namespace Orchard.Tests.Stubs {
|
||||
public class StubClock : IClock {
|
||||
|
||||
public StubClock()
|
||||
: this(new DateTime(2009, 10, 14, 12, 34, 56, DateTimeKind.Utc)) {
|
||||
}
|
||||
|
||||
public StubClock(DateTime utcNow) {
|
||||
UtcNow = utcNow;
|
||||
public StubClock() {
|
||||
UtcNow = new DateTime(2009, 10, 14, 12, 34, 56, DateTimeKind.Utc);
|
||||
}
|
||||
|
||||
public DateTime UtcNow { get; private set; }
|
||||
@@ -23,6 +18,7 @@ namespace Orchard.Tests.Stubs {
|
||||
return UtcNow.Add(span);
|
||||
}
|
||||
|
||||
|
||||
public IVolatileToken When(TimeSpan duration) {
|
||||
return new Clock.AbsoluteExpirationToken(this, duration);
|
||||
}
|
||||
|
||||
@@ -31,13 +31,9 @@ namespace Orchard.Tests.UI.Resources {
|
||||
}
|
||||
|
||||
private void VerifyPaths(string resourceType, RequireSettings defaultSettings, string expectedPaths) {
|
||||
VerifyPaths(resourceType, defaultSettings, expectedPaths, false);
|
||||
}
|
||||
|
||||
private void VerifyPaths(string resourceType, RequireSettings defaultSettings, string expectedPaths, bool ssl) {
|
||||
defaultSettings = defaultSettings ?? new RequireSettings();
|
||||
var requiredResources = _resourceManager.BuildRequiredResources(resourceType);
|
||||
var renderedResources = string.Join(",", requiredResources.Select(context => context.GetResourceUrl(defaultSettings, _appPath, ssl)).ToArray());
|
||||
var renderedResources = string.Join(",", requiredResources.Select(context => context.GetResourceUrl(defaultSettings, _appPath)).ToArray());
|
||||
Assert.That(renderedResources, Is.EqualTo(expectedPaths));
|
||||
}
|
||||
|
||||
@@ -96,33 +92,6 @@ namespace Orchard.Tests.UI.Resources {
|
||||
VerifyPaths("script", new RequireSettings { CdnMode = true }, "http://cdn/script1.min.js");
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void CdnSslPathIsUsedInCdnMode() {
|
||||
_testManifest.DefineManifest = m => {
|
||||
m.DefineResource("script", "Script1").SetUrl("script1.js").SetCdn("https://cdn/script1.min.js");
|
||||
};
|
||||
_resourceManager.Require("script", "Script1");
|
||||
VerifyPaths("script", new RequireSettings { CdnMode = true }, "https://cdn/script1.min.js", true);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void LocalPathIsUsedInCdnModeNotSupportsSsl() {
|
||||
_testManifest.DefineManifest = m => {
|
||||
m.DefineResource("script", "Script1").SetUrl("script1.min.js", "script1.js").SetCdn("http://cdn/script1.min.js", "http://cdn/script1.js", false);
|
||||
};
|
||||
_resourceManager.Require("script", "Script1");
|
||||
VerifyPaths("script", new RequireSettings { CdnMode = true }, "script1.min.js", true);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void LocalDebugPathIsUsedInCdnModeNotSupportsSslAndDebug() {
|
||||
_testManifest.DefineManifest = m => {
|
||||
m.DefineResource("script", "Script1").SetUrl("script1.min.js", "script1.js").SetCdn("http://cdn/script1.min.js", "http://cdn/script1.js", false);
|
||||
};
|
||||
_resourceManager.Require("script", "Script1");
|
||||
VerifyPaths("script", new RequireSettings { CdnMode = true, DebugMode = true }, "script1.js", true);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void CdnDebugPathIsUsedInCdnModeAndDebugMode() {
|
||||
_testManifest.DefineManifest = m => {
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<package id="Autofac" version="3.5.2" targetFramework="net452" />
|
||||
<package id="Autofac.Web" version="3.2.0" targetFramework="net452" />
|
||||
<package id="Castle.Core" version="3.3.1" targetFramework="net452" />
|
||||
<package id="FluentNHibernate" version="2.0.3.0" targetFramework="net452" />
|
||||
<package id="FluentNHibernate" version="1.4.0.0" targetFramework="net452" />
|
||||
<package id="Iesi.Collections" version="4.0.1.4000" targetFramework="net452" />
|
||||
<package id="IronRuby" version="1.1.3" targetFramework="net452" />
|
||||
<package id="log4net" version="2.0.3" targetFramework="net452" />
|
||||
|
||||
@@ -32,8 +32,8 @@ using System.Security;
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
|
||||
[assembly: AssemblyVersion("1.10.1")]
|
||||
[assembly: AssemblyFileVersion("1.10.1")]
|
||||
[assembly: AssemblyVersion("1.10")]
|
||||
[assembly: AssemblyFileVersion("1.10")]
|
||||
|
||||
// Enable web application to call this assembly in Full Trust
|
||||
[assembly: AllowPartiallyTrustedCallers]
|
||||
|
||||
@@ -33,5 +33,5 @@ using System.Runtime.InteropServices;
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
|
||||
[assembly: AssemblyVersion("1.10.1")]
|
||||
[assembly: AssemblyFileVersion("1.10.1")]
|
||||
[assembly: AssemblyVersion("1.10")]
|
||||
[assembly: AssemblyFileVersion("1.10")]
|
||||
|
||||
@@ -95,7 +95,7 @@
|
||||
</Properties>
|
||||
</Component>
|
||||
|
||||
<Component Type="Orchard.Services.ClientHostAddressAccessor">
|
||||
<Component Type="Orchard.Services.ClientAddressAccessor">
|
||||
<Properties>
|
||||
<!-- Set Value="true" to read the client host address from the specified HTTP header. -->
|
||||
<Property Name="EnableClientHostAddressHeader" Value="false"/>
|
||||
@@ -120,13 +120,5 @@
|
||||
</Properties>
|
||||
</Component>
|
||||
|
||||
<Component Type="Orchard.Environment.DefaultOrchardHost">
|
||||
<Properties>
|
||||
<!-- The number of retries when a tenant can't be loaded -->
|
||||
<Property Name="Retries" Value="1"/>
|
||||
<Property Name="DelayRetries" Value="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
|
||||
</Components>
|
||||
</HostComponents>
|
||||
|
||||
@@ -11,7 +11,6 @@ using Orchard.Core.Common.ViewModels;
|
||||
using Orchard.Services;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Routing;
|
||||
using Orchard.ContentManagement.Handlers;
|
||||
|
||||
namespace Orchard.Core.Common.Drivers {
|
||||
public class BodyPartDriver : ContentPartDriver<BodyPart> {
|
||||
@@ -76,10 +75,6 @@ namespace Orchard.Core.Common.Drivers {
|
||||
context.Element(part.PartDefinition.Name).SetAttributeValue("Text", part.Text);
|
||||
}
|
||||
|
||||
protected override void Cloning(BodyPart originalPart, BodyPart clonePart, CloneContentContext context) {
|
||||
clonePart.Text = originalPart.Text;
|
||||
}
|
||||
|
||||
private static BodyEditorViewModel BuildEditorViewModel(BodyPart part,RequestContext requestContext) {
|
||||
return new BodyEditorViewModel {
|
||||
BodyPart = part,
|
||||
|
||||
@@ -123,9 +123,5 @@ namespace Orchard.Core.Common.Drivers {
|
||||
.SetAttributeValue("ModifiedUtc", XmlConvert.ToString(part.ModifiedUtc.Value, XmlDateTimeSerializationMode.Utc));
|
||||
}
|
||||
}
|
||||
|
||||
protected override void Cloning(CommonPart originalPart, CommonPart clonePart, CloneContentContext context) {
|
||||
clonePart.Container = originalPart.Container;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -45,13 +45,10 @@ namespace Orchard.Core.Common.Drivers {
|
||||
protected override DriverResult Editor(ContentPart part, TextField field, dynamic shapeHelper) {
|
||||
return ContentShape("Fields_Common_Text_Edit", GetDifferentiator(field, part),
|
||||
() => {
|
||||
var settings = field.PartFieldDefinition.Settings.GetModel<TextFieldSettings>();
|
||||
var text = part.IsNew() ? settings.DefaultValue : field.Value;
|
||||
|
||||
var viewModel = new TextFieldDriverViewModel {
|
||||
Field = field,
|
||||
Text = text,
|
||||
Settings = settings,
|
||||
Text = field.Value,
|
||||
Settings = field.PartFieldDefinition.Settings.GetModel<TextFieldSettings>(),
|
||||
ContentItem = part.ContentItem
|
||||
};
|
||||
|
||||
@@ -61,15 +58,28 @@ namespace Orchard.Core.Common.Drivers {
|
||||
|
||||
protected override DriverResult Editor(ContentPart part, TextField field, IUpdateModel updater, dynamic shapeHelper) {
|
||||
|
||||
var viewModel = new TextFieldDriverViewModel();
|
||||
var viewModel = new TextFieldDriverViewModel {
|
||||
Field = field,
|
||||
Text = field.Value,
|
||||
Settings = field.PartFieldDefinition.Settings.GetModel<TextFieldSettings>(),
|
||||
ContentItem = part.ContentItem
|
||||
};
|
||||
|
||||
if (updater.TryUpdateModel(viewModel, GetPrefix(field, part), null, null)) {
|
||||
var settings = field.PartFieldDefinition.Settings.GetModel<TextFieldSettings>();
|
||||
if (viewModel.Settings.Required && string.IsNullOrWhiteSpace(viewModel.Text)) {
|
||||
updater.AddModelError("Text", T("The field {0} is mandatory", T(field.DisplayName)));
|
||||
return ContentShape("Fields_Common_Text_Edit", GetDifferentiator(field, part),
|
||||
() => shapeHelper.EditorTemplate(TemplateName: "Fields.Common.Text.Edit", Model: viewModel, Prefix: GetPrefix(field, part)));
|
||||
}
|
||||
|
||||
field.Value = viewModel.Text;
|
||||
var settings = field.PartFieldDefinition.Settings.GetModel<TextFieldSettings>();
|
||||
|
||||
if (settings.Required && String.IsNullOrWhiteSpace(field.Value)) {
|
||||
updater.AddModelError("Text", T("The field {0} is mandatory", T(field.DisplayName)));
|
||||
if (String.IsNullOrEmpty(field.Value) && !String.IsNullOrEmpty(settings.DefaultValue)) {
|
||||
field.Value = settings.DefaultValue;
|
||||
}
|
||||
else {
|
||||
field.Value = viewModel.Text;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -88,10 +98,6 @@ namespace Orchard.Core.Common.Drivers {
|
||||
context.Element(field.FieldDefinition.Name + "." + field.Name).SetAttributeValue("Text", field.Value);
|
||||
}
|
||||
|
||||
protected override void Cloning(ContentPart part, TextField originalField, TextField cloneField, CloneContentContext context) {
|
||||
cloneField.Value = originalField.Value;
|
||||
}
|
||||
|
||||
protected override void Describe(DescribeMembersContext context) {
|
||||
context
|
||||
.Member(null, typeof(string), T("Value"), T("The text associated with the field."))
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
AntiForgery: enabled
|
||||
Author: The Orchard Team
|
||||
Website: http://orchardproject.net
|
||||
Version: 1.10.1
|
||||
Version: 1.10
|
||||
OrchardVersion: 1.9
|
||||
Description: The common module introduces content parts that are going to be used by most content types (common, body, identity).
|
||||
FeatureDescription: Core content parts.
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
@model Orchard.Core.Common.ViewModels.TextFieldSettingsEventsViewModel
|
||||
|
||||
@* This is a token-less default value editor that can be overridden from features that can depend on Orchard.Tokens. *@
|
||||
|
||||
<label for="@Html.FieldIdFor(m => m.Settings.DefaultValue)">@T("Default value")</label>
|
||||
@Html.TextBoxFor(m => m.Settings.DefaultValue, new { @class = "text large" })
|
||||
<span class="hint">@T("The default value proposed when creating a content item. (optional)")</span>
|
||||
<span class="hint">@T("Default value for the field. If there is no value given for the actual field, this will be filled in. (optional)")</span>
|
||||
@Html.ValidationMessageFor(m => m.Settings.DefaultValue)
|
||||
@@ -14,4 +14,7 @@
|
||||
@if (HasText(Model.Settings.Hint)) {
|
||||
<span class="hint">@Model.Settings.Hint</span>
|
||||
}
|
||||
@if (!String.IsNullOrWhiteSpace(Model.Settings.DefaultValue)) {
|
||||
<span class="hint">@T("If the field is left empty then the default value will be used.")</span>
|
||||
}
|
||||
</fieldset>
|
||||
@@ -0,0 +1,66 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Routing;
|
||||
using Orchard.ContentManagement;
|
||||
using Orchard.Core.Common.Models;
|
||||
using Orchard.Core.Containers.Extensions;
|
||||
using Orchard.Core.Containers.Models;
|
||||
using Orchard.Core.Contents;
|
||||
using Orchard.Core.Feeds;
|
||||
using Orchard.DisplayManagement;
|
||||
using Orchard.Mvc;
|
||||
using Orchard.Themes;
|
||||
using Orchard.UI.Navigation;
|
||||
using Orchard.Settings;
|
||||
using Orchard.Localization;
|
||||
|
||||
namespace Orchard.Core.Containers.Controllers {
|
||||
|
||||
public class ItemController : Controller {
|
||||
private readonly IContentManager _contentManager;
|
||||
private readonly ISiteService _siteService;
|
||||
private readonly IFeedManager _feedManager;
|
||||
|
||||
public ItemController(
|
||||
IContentManager contentManager,
|
||||
IShapeFactory shapeFactory,
|
||||
ISiteService siteService,
|
||||
IFeedManager feedManager,
|
||||
IOrchardServices services) {
|
||||
|
||||
_contentManager = contentManager;
|
||||
_siteService = siteService;
|
||||
_feedManager = feedManager;
|
||||
Shape = shapeFactory;
|
||||
Services = services;
|
||||
T = NullLocalizer.Instance;
|
||||
}
|
||||
|
||||
dynamic Shape { get; set; }
|
||||
public IOrchardServices Services { get; private set; }
|
||||
|
||||
public Localizer T { get; set; }
|
||||
[Themed]
|
||||
public ActionResult Display(int id, PagerParameters pagerParameters) {
|
||||
var container = _contentManager
|
||||
.Get(id, VersionOptions.Published)
|
||||
.As<ContainerPart>();
|
||||
|
||||
if (container == null) {
|
||||
return HttpNotFound(T("Container not found").Text);
|
||||
}
|
||||
|
||||
if (!Services.Authorizer.Authorize(Permissions.ViewContent, container, T("Cannot view content"))) {
|
||||
return new HttpUnauthorizedResult();
|
||||
}
|
||||
|
||||
// TODO: (PH) Find a way to apply PagerParameters via a driver so we can lose this controller
|
||||
container.PagerParameters = pagerParameters;
|
||||
var model = _contentManager.BuildDisplay(container);
|
||||
|
||||
return new ShapeResult(this, model);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Xml;
|
||||
using Orchard.ContentManagement;
|
||||
@@ -28,8 +27,8 @@ namespace Orchard.Core.Containers.Drivers {
|
||||
private readonly IContainerService _containerService;
|
||||
|
||||
public ContainerPartDriver(
|
||||
IContentDefinitionManager contentDefinitionManager,
|
||||
IOrchardServices orchardServices,
|
||||
IContentDefinitionManager contentDefinitionManager,
|
||||
IOrchardServices orchardServices,
|
||||
ISiteService siteService,
|
||||
IFeedManager feedManager, IContainerService containerService) {
|
||||
_contentDefinitionManager = contentDefinitionManager;
|
||||
@@ -48,7 +47,7 @@ namespace Orchard.Core.Containers.Drivers {
|
||||
if (!part.ItemsShown)
|
||||
return null;
|
||||
|
||||
return ContentShape("Parts_Container_Contained", () => {
|
||||
return ContentShape("Parts_Container_Contained", () => {
|
||||
var container = part.ContentItem;
|
||||
var query = _contentManager
|
||||
.Query(VersionOptions.Published)
|
||||
@@ -56,26 +55,13 @@ namespace Orchard.Core.Containers.Drivers {
|
||||
.Join<ContainablePartRecord>().OrderByDescending(x => x.Position);
|
||||
|
||||
var metadata = container.ContentManager.GetItemMetadata(container);
|
||||
if (metadata != null) {
|
||||
_feedManager.Register(metadata.DisplayText, "rss", new RouteValueDictionary {{"containerid", container.Id}});
|
||||
}
|
||||
if (metadata!=null)
|
||||
_feedManager.Register(metadata.DisplayText, "rss", new RouteValueDictionary { { "containerid", container.Id } });
|
||||
|
||||
// Retrieving pager parameters.
|
||||
var queryString = _orchardServices.WorkContext.HttpContext.Request.QueryString;
|
||||
|
||||
var page = 0;
|
||||
// Don't try to page if not necessary.
|
||||
if (part.Paginated && queryString["page"] != null) {
|
||||
Int32.TryParse(queryString["page"], out page);
|
||||
}
|
||||
|
||||
var pageSize = part.PageSize;
|
||||
// If the container is paginated and pageSize is provided in the query string then retrieve it.
|
||||
if (part.Paginated && queryString["pageSize"] != null) {
|
||||
Int32.TryParse(queryString["pageSize"], out pageSize);
|
||||
}
|
||||
|
||||
var pager = new Pager(_siteService.GetSiteSettings(), page, pageSize);
|
||||
var pager = new Pager(_siteService.GetSiteSettings(), part.PagerParameters);
|
||||
pager.PageSize = part.PagerParameters.PageSize != null && part.Paginated
|
||||
? pager.PageSize
|
||||
: part.PageSize;
|
||||
|
||||
var pagerShape = shapeHelper.Pager(pager).TotalItemCount(query.Count());
|
||||
var startIndex = part.Paginated ? pager.GetStartIndex() : 0;
|
||||
@@ -102,7 +88,7 @@ namespace Orchard.Core.Containers.Drivers {
|
||||
|
||||
protected override DriverResult Editor(ContainerPart part, IUpdateModel updater, dynamic shapeHelper) {
|
||||
return ContentShape("Parts_Container_Edit", () => {
|
||||
if (!part.ContainerSettings.DisplayContainerEditor) {
|
||||
if(!part.ContainerSettings.DisplayContainerEditor) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -121,7 +107,7 @@ namespace Orchard.Core.Containers.Drivers {
|
||||
EnablePositioning = part.Record.EnablePositioning,
|
||||
OverrideEnablePositioning = part.ContainerSettings.EnablePositioning == null
|
||||
};
|
||||
|
||||
|
||||
if (updater != null) {
|
||||
if (updater.TryUpdateModel(model, "Container", null, new[] { "OverrideEnablePositioning" })) {
|
||||
part.AdminMenuPosition = model.AdminMenuPosition;
|
||||
@@ -141,7 +127,7 @@ namespace Orchard.Core.Containers.Drivers {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return shapeHelper.EditorTemplate(TemplateName: "Container", Model: model, Prefix: "Container");
|
||||
});
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ using Orchard.Core.Containers.Models;
|
||||
using Orchard.Core.Containers.Services;
|
||||
using Orchard.Core.Containers.Settings;
|
||||
using Orchard.Data;
|
||||
using System.Web.Routing;
|
||||
|
||||
namespace Orchard.Core.Containers.Handlers {
|
||||
public class ContainerPartHandler : ContentHandler {
|
||||
@@ -34,6 +35,14 @@ namespace Orchard.Core.Containers.Handlers {
|
||||
|
||||
});
|
||||
|
||||
OnGetContentItemMetadata<ContainerPart>((context, part) => {
|
||||
context.Metadata.DisplayRouteValues = new RouteValueDictionary {
|
||||
{"Area", "Containers"},
|
||||
{"Controller", "Item"},
|
||||
{"Action", "Display"},
|
||||
{"id", context.ContentItem.Id}
|
||||
};
|
||||
});
|
||||
|
||||
OnActivated<ContainerPart>((context, part) => {
|
||||
part.ContainerSettingsField.Loader(() => part.Settings.GetModel<ContainerTypePartSettings>());
|
||||
|
||||
@@ -71,6 +71,12 @@ namespace Orchard.Core.Containers.Models {
|
||||
get { return Record.ItemCount; }
|
||||
set { Record.ItemCount = value; }
|
||||
}
|
||||
|
||||
public PagerParameters PagerParameters { get; set; }
|
||||
|
||||
public ContainerPart() {
|
||||
PagerParameters = new PagerParameters();
|
||||
}
|
||||
}
|
||||
|
||||
public class ContainerPartRecord : ContentPartRecord {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
AntiForgery: enabled
|
||||
Author: The Orchard Team
|
||||
Website: http://orchardproject.net
|
||||
Version: 1.10.1
|
||||
Version: 1.10
|
||||
OrchardVersion: 1.9
|
||||
Description: The containers module introduces container and containable behaviors for content items.
|
||||
FeatureDescription: Container and containable parts to enable parent-child relationships between content items.
|
||||
|
||||
@@ -383,24 +383,26 @@ namespace Orchard.Core.Contents.Controllers {
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
public ActionResult Clone(int id) {
|
||||
var originalContentItem = _contentManager.GetLatest(id);
|
||||
public ActionResult Clone(int id, string returnUrl) {
|
||||
var contentItem = _contentManager.GetLatest(id);
|
||||
|
||||
if (!Services.Authorizer.Authorize(Permissions.ViewContent, originalContentItem, T("Couldn't open original content")))
|
||||
if (contentItem == null)
|
||||
return HttpNotFound();
|
||||
|
||||
if (!Services.Authorizer.Authorize(Permissions.EditContent, contentItem, T("Couldn't clone content")))
|
||||
return new HttpUnauthorizedResult();
|
||||
|
||||
// pass a dummy content to the authorization check to check for "own" variations
|
||||
var dummyContent = _contentManager.New(originalContentItem.ContentType);
|
||||
|
||||
if (!Services.Authorizer.Authorize(Permissions.EditContent, dummyContent, T("Couldn't create clone content")))
|
||||
return new HttpUnauthorizedResult();
|
||||
|
||||
var cloneContentItem = _contentManager.Clone(originalContentItem);
|
||||
try {
|
||||
Services.ContentManager.Clone(contentItem);
|
||||
}
|
||||
catch (InvalidOperationException) {
|
||||
Services.Notifier.Warning(T("Could not clone the content item."));
|
||||
return this.RedirectLocal(returnUrl, () => RedirectToAction("List"));
|
||||
}
|
||||
|
||||
Services.Notifier.Success(T("Successfully cloned. The clone was saved as a draft."));
|
||||
|
||||
var adminRouteValues = _contentManager.GetItemMetadata(cloneContentItem).AdminRouteValues;
|
||||
return RedirectToRoute(adminRouteValues);
|
||||
return this.RedirectLocal(returnUrl, () => RedirectToAction("List"));
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
AntiForgery: enabled
|
||||
Author: The Orchard Team
|
||||
Website: http://orchardproject.net
|
||||
Version: 1.10.1
|
||||
Version: 1.10
|
||||
OrchardVersion: 1.9
|
||||
Description: The contents module enables the creation of custom content types.
|
||||
Features:
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
Layout.Title = T("New {0}", Html.Raw(typeDisplayName)).Text;
|
||||
}
|
||||
|
||||
@using (Html.BeginFormAntiForgeryPost(Url.Action("Create", new { ReturnUrl = Request.QueryString["ReturnUrl"] }), FormMethod.Post, new { enctype = "multipart/form-data", @class = "no-multisubmit" })) {
|
||||
@using (Html.BeginFormAntiForgeryPost(Url.Action("Create", new { ReturnUrl = Request.QueryString["ReturnUrl"] }), FormMethod.Post, new { enctype = "multipart/form-data" })) {
|
||||
@Html.ValidationSummary()
|
||||
// Model is a Shape, calling Display() so that it is rendered using the most specific template for its Shape type
|
||||
@Display(Model)
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
Layout.Title = pageTitle;
|
||||
}
|
||||
|
||||
@using (Html.BeginFormAntiForgeryPost(Url.Action("Edit"), FormMethod.Post, new { enctype = "multipart/form-data", @class= "no-multisubmit" })) {
|
||||
@using (Html.BeginFormAntiForgeryPost(Url.Action("Edit"), FormMethod.Post, new { enctype = "multipart/form-data" })) {
|
||||
@Html.ValidationSummary()
|
||||
// Model is a Shape, calling Display() so that it is rendered using the most specific template for its Shape type
|
||||
@Display(Model)
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
@using Orchard.ContentManagement
|
||||
@using Orchard.Core.Contents
|
||||
@using Orchard.Utility.Extensions
|
||||
@{
|
||||
ContentPart contentPart = Model.ContentPart;
|
||||
}
|
||||
@if (Authorizer.Authorize(Permissions.EditContent, contentPart)) {
|
||||
<a href="@Url.Action("Clone", "Admin", new { Id = Model.ContentItem.Id, Area = "Contents" })" itemprop="UnsafeUrl">@T("Clone")</a>
|
||||
<a href="@Url.Action("Clone", "Admin", new { Id = Model.ContentItem.Id, ReturnUrl = Request.ToUrlString(), Area = "Contents" })" itemprop="UnsafeUrl">@T("Clone")</a>
|
||||
@T(" | ")
|
||||
}
|
||||
@@ -2,7 +2,7 @@
|
||||
AntiForgery: enabled
|
||||
Author: The Orchard Team
|
||||
Website: http://orchardproject.net
|
||||
Version: 1.10.1
|
||||
Version: 1.10
|
||||
OrchardVersion: 1.9
|
||||
Description: The dashboard module is providing the dashboard screen of the admininstration UI of the application.
|
||||
FeatureDescription: Standard admin dashboard.
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
AntiForgery: enabled
|
||||
Author: The Orchard Team
|
||||
Website: http://orchardproject.net
|
||||
Version: 1.10.1
|
||||
Version: 1.10
|
||||
OrchardVersion: 1.9
|
||||
Description: The Feeds module is providing RSS feeds to content items.
|
||||
FeatureDescription: RSS feeds for content items.
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
AntiForgery: enabled
|
||||
Author: The Orchard Team
|
||||
Website: http://orchardproject.net
|
||||
Version: 1.10.1
|
||||
Version: 1.10
|
||||
OrchardVersion: 1.9
|
||||
Description: The navigation module creates and manages a simple navigation menu for the front-end of the application and allows you to add content items to the admin menu.
|
||||
FeatureDescription: Menu management.
|
||||
|
||||
@@ -11,7 +11,3 @@
|
||||
@Display(Model.Sidebar)
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if (!String.IsNullOrWhiteSpace(Request.QueryString["returnUrl"])) {
|
||||
@Html.Hidden("returnUrl", Request.QueryString["returnUrl"])
|
||||
}
|
||||
|
||||
@@ -119,6 +119,7 @@
|
||||
<Compile Include="Common\ViewModels\DateTimeEditor.cs" />
|
||||
<Compile Include="Common\ViewModels\TextFieldDriverViewModel.cs" />
|
||||
<Compile Include="Common\ViewModels\TextFieldSettingsEventsViewModel.cs" />
|
||||
<Compile Include="Containers\Controllers\ItemController.cs" />
|
||||
<Compile Include="Containers\Drivers\ContainablePartDriver.cs" />
|
||||
<Compile Include="Containers\Drivers\ContainerPartDriver.cs" />
|
||||
<Compile Include="Common\Migrations.cs" />
|
||||
|
||||
@@ -30,6 +30,6 @@ using System.Security;
|
||||
//
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
[assembly: AssemblyVersion("1.10.1")]
|
||||
[assembly: AssemblyFileVersion("1.10.1")]
|
||||
[assembly: AssemblyVersion("1.10")]
|
||||
[assembly: AssemblyFileVersion("1.10")]
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
AntiForgery: enabled
|
||||
Author: The Orchard Team
|
||||
Website: http://orchardproject.net
|
||||
Version: 1.10.1
|
||||
Version: 1.10
|
||||
OrchardVersion: 1.9
|
||||
Description: The dashboard module is providing the reports screen of the application.
|
||||
FeatureDescription: Reports management.
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
AntiForgery: enabled
|
||||
Author: The Orchard Team
|
||||
Website: http://orchardproject.net
|
||||
Version: 1.10.1
|
||||
Version: 1.10
|
||||
OrchardVersion: 1.9
|
||||
Description: The scheduling module enables background task scheduling.
|
||||
FeatureDescription: Scheduled background tasks.
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
AntiForgery: enabled
|
||||
Author: The Orchard Team
|
||||
Website: http://orchardproject.net
|
||||
Version: 1.10.1
|
||||
Version: 1.10
|
||||
OrchardVersion: 1.9
|
||||
Description: The settings module creates site settings that other modules can contribute to.
|
||||
FeatureDescription: Site settings.
|
||||
|
||||
@@ -455,12 +455,12 @@ namespace Orchard.Core.Shapes {
|
||||
var appPath = httpContext == null || httpContext.Request == null
|
||||
? null
|
||||
: httpContext.Request.ApplicationPath;
|
||||
var ssl = httpContext?.Request?.IsSecureConnection ?? false;
|
||||
|
||||
foreach (var context in requiredResources.Where(r =>
|
||||
(includeLocation.HasValue ? r.Settings.Location == includeLocation.Value : true) &&
|
||||
(excludeLocation.HasValue ? r.Settings.Location != excludeLocation.Value : true))) {
|
||||
|
||||
var path = context.GetResourceUrl(defaultSettings, appPath, ssl);
|
||||
var path = context.GetResourceUrl(defaultSettings, appPath);
|
||||
var condition = context.Settings.Condition;
|
||||
var attributes = context.Settings.HasAttributes ? context.Settings.Attributes : null;
|
||||
IHtmlString result;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
AntiForgery: enabled
|
||||
Author: The Orchard Team
|
||||
Website: http://orchardproject.net
|
||||
Version: 1.10.1
|
||||
Version: 1.10
|
||||
OrchardVersion: 1.9
|
||||
Description: The shapes module contains core shape templates and display hooks.
|
||||
FeatureDescription: Core shape templates and display hooks.
|
||||
|
||||
@@ -52,9 +52,5 @@ namespace Orchard.Core.Title.Drivers {
|
||||
protected override void Exporting(TitlePart part, ExportContentContext context) {
|
||||
context.Element(part.PartDefinition.Name).SetAttributeValue("Title", part.Title);
|
||||
}
|
||||
|
||||
protected override void Cloning(TitlePart originalPart, TitlePart clonePart, CloneContentContext context) {
|
||||
clonePart.Title = originalPart.Title;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2,7 +2,7 @@
|
||||
AntiForgery: enabled
|
||||
Author: The Orchard Team
|
||||
Website: http://orchardproject.net
|
||||
Version: 1.10.1
|
||||
Version: 1.10
|
||||
OrchardVersion: 1.9
|
||||
Description: The title module enables content items to have titles.
|
||||
FeatureDescription: Title content part.
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
AntiForgery: enabled
|
||||
Author: The Orchard Team
|
||||
Website: http://orchardproject.net
|
||||
Version: 1.10.1
|
||||
Version: 1.10
|
||||
OrchardVersion: 1.9
|
||||
Description: The XmlRpc module enables creation of contents from client applications such as LiveWriter.
|
||||
FeatureDescription: XML-RPC opt-in implementation.
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace Lucene.Models {
|
||||
_score = score;
|
||||
}
|
||||
|
||||
public int ContentItemId { get { return GetInt("id"); } }
|
||||
public int ContentItemId { get { return int.Parse(GetString("id")); } }
|
||||
|
||||
public int GetInt(string name) {
|
||||
var field = _doc.GetField(name);
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
AntiForgery: enabled
|
||||
Author: The Orchard Team
|
||||
Website: http://orchardproject.net
|
||||
Version: 1.10.1
|
||||
Version: 1.10
|
||||
OrchardVersion: 1.9
|
||||
Description: The Lucene module enables the site to be indexed using Lucene.NET. The index generated by this module can then be used by the search module to provide an integrated full-text search experience to a web site.
|
||||
FeatureDescription: Lucene indexing services.
|
||||
|
||||
@@ -30,6 +30,6 @@ using System.Security;
|
||||
//
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
[assembly: AssemblyVersion("1.10.1")]
|
||||
[assembly: AssemblyFileVersion("1.10.1")]
|
||||
[assembly: AssemblyVersion("1.10")]
|
||||
[assembly: AssemblyFileVersion("1.10")]
|
||||
|
||||
|
||||
1829
src/Orchard.Web/Modules/Markdown/Markdown.cs
Normal file
1829
src/Orchard.Web/Modules/Markdown/Markdown.cs
Normal file
File diff suppressed because it is too large
Load Diff
@@ -49,10 +49,6 @@
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="MarkdownSharp, Version=1.5.1.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\StackExchange.MarkdownSharp.1.5.1.0\lib\net35\MarkdownSharp.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
@@ -154,6 +150,7 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Handlers\MarkdownSiteSettingsPartHandler.cs" />
|
||||
<Compile Include="Markdown.cs" />
|
||||
<Compile Include="Migrations.cs" />
|
||||
<Compile Include="Models\MarkdownSiteSettingsPart.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
AntiForgery: enabled
|
||||
Author: The Orchard Team
|
||||
Website: http://orchardproject.net
|
||||
Version: 1.10.1
|
||||
Version: 1.10
|
||||
OrchardVersion: 1.9
|
||||
Description: The Markdown module enables rich text contents to be created using the Markdown syntax.
|
||||
FeatureDescription: Markdown editor.
|
||||
|
||||
@@ -26,6 +26,6 @@ using System.Runtime.InteropServices;
|
||||
//
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
[assembly: AssemblyVersion("1.10.1")]
|
||||
[assembly: AssemblyFileVersion("1.10.1")]
|
||||
[assembly: AssemblyVersion("1.10")]
|
||||
[assembly: AssemblyFileVersion("1.10")]
|
||||
|
||||
|
||||
@@ -4,5 +4,4 @@
|
||||
<package id="Microsoft.AspNet.Razor" version="3.2.3" targetFramework="net452" />
|
||||
<package id="Microsoft.AspNet.WebPages" version="3.2.3" targetFramework="net452" />
|
||||
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net452" />
|
||||
<package id="StackExchange.MarkdownSharp" version="1.5.1.0" targetFramework="net452" />
|
||||
</packages>
|
||||
@@ -0,0 +1,37 @@
|
||||
using System;
|
||||
using Orchard.Environment;
|
||||
using Orchard.Tasks;
|
||||
using Orchard.Logging;
|
||||
|
||||
namespace Orchard.Alias.Implementation.Updater {
|
||||
public class AliasHolderUpdaterTask : IOrchardShellEvents, IBackgroundTask {
|
||||
private readonly IAliasHolderUpdater _aliasHolderUpdater;
|
||||
|
||||
public ILogger Logger { get; set; }
|
||||
|
||||
public AliasHolderUpdaterTask(IAliasHolderUpdater aliasHolderUpdater) {
|
||||
_aliasHolderUpdater = aliasHolderUpdater;
|
||||
Logger = NullLogger.Instance;
|
||||
}
|
||||
|
||||
void IOrchardShellEvents.Activated() {
|
||||
Refresh();
|
||||
}
|
||||
|
||||
void IOrchardShellEvents.Terminating() {
|
||||
}
|
||||
|
||||
private void Refresh() {
|
||||
try {
|
||||
_aliasHolderUpdater.Refresh();
|
||||
}
|
||||
catch (Exception ex) {
|
||||
Logger.Error(ex, "Exception during Alias refresh");
|
||||
}
|
||||
}
|
||||
|
||||
public void Sweep() {
|
||||
Refresh();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2,7 +2,7 @@ Name: Alias
|
||||
AntiForgery: enabled
|
||||
Author: The Orchard Team
|
||||
Website: http://orchardproject.net
|
||||
Version: 1.10.1
|
||||
Version: 1.10
|
||||
OrchardVersion: 1.9
|
||||
Description: Maps friendly urls to specific module actions.
|
||||
FeatureDescription: Maps friendly urls to specific module actions.
|
||||
|
||||
@@ -41,14 +41,14 @@ namespace Orchard.Alias.Navigation {
|
||||
var urlLevel = endsWithSlash ? requestUrl.Count(l => l == '/') - 1 : requestUrl.Count(l => l == '/');
|
||||
var menuLevel = menuPosition.Count(l => l == '.');
|
||||
|
||||
// Checking the menu item whether it's the leaf element or it's an intermediate element
|
||||
// Checking menu item if it's the leaf element or it's an intermediate element
|
||||
// or it's an unneccessary element according to the url.
|
||||
RouteValueDictionary contentRoute;
|
||||
if (menuLevel == urlLevel) {
|
||||
contentRoute = request.RequestContext.RouteData.Values;
|
||||
}
|
||||
else {
|
||||
// If menuLevel doesn't equal to urlLevel it can mean that this menu item is
|
||||
// If menuLevel doesn't equal with urlLevel it can mean that this menu item is
|
||||
// an intermediate element (the difference is a positive value) or this menu
|
||||
// item is lower in the navigation hierarchy according to the url (negative
|
||||
// value). If the value is negative, removing the menu item, if the value
|
||||
|
||||
@@ -135,6 +135,7 @@
|
||||
<Compile Include="Implementation\Holder\IAliasHolder.cs" />
|
||||
<Compile Include="Implementation\Map\AliasMap.cs" />
|
||||
<Compile Include="Implementation\Storage\AliasStorage.cs" />
|
||||
<Compile Include="Implementation\Updater\AliasHolderUpdaterTask.cs" />
|
||||
<Compile Include="Implementation\Utils.cs" />
|
||||
<Compile Include="Migrations.cs" />
|
||||
<Compile Include="Recipes\Builders\AliasStep.cs" />
|
||||
@@ -194,4 +195,4 @@
|
||||
</FlavorProperties>
|
||||
</VisualStudio>
|
||||
</ProjectExtensions>
|
||||
</Project>
|
||||
</Project>
|
||||
@@ -30,6 +30,6 @@ using System.Security;
|
||||
//
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
[assembly: AssemblyVersion("1.10.1")]
|
||||
[assembly: AssemblyFileVersion("1.10.1")]
|
||||
[assembly: AssemblyVersion("1.10")]
|
||||
[assembly: AssemblyFileVersion("1.10")]
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ Name: AntiSpam
|
||||
AntiForgery: enabled
|
||||
Author: The Orchard Team
|
||||
Website: http://orchardproject.net
|
||||
Version: 1.10.1
|
||||
Version: 1.10
|
||||
OrchardVersion: 1.9
|
||||
Description: Provides anti-spam services to protect your content from malicious submissions.
|
||||
Features:
|
||||
|
||||
@@ -29,6 +29,6 @@ using System.Runtime.InteropServices;
|
||||
//
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
[assembly: AssemblyVersion("1.10.1")]
|
||||
[assembly: AssemblyFileVersion("1.10.1")]
|
||||
[assembly: AssemblyVersion("1.10")]
|
||||
[assembly: AssemblyFileVersion("1.10")]
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ Path: ArchiveLater
|
||||
AntiForgery: enabled
|
||||
Author: The Orchard Team
|
||||
Website: http://orchardproject.net
|
||||
Version: 1.10.1
|
||||
Version: 1.10
|
||||
OrchardVersion: 1.9
|
||||
Description: The ArchiveLater module introduces scheduled archiving functionality.
|
||||
FeatureDescription: Scheduled archiving.
|
||||
|
||||
@@ -30,6 +30,6 @@ using System.Security;
|
||||
//
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
[assembly: AssemblyVersion("1.10.1")]
|
||||
[assembly: AssemblyFileVersion("1.10.1")]
|
||||
[assembly: AssemblyVersion("1.10")]
|
||||
[assembly: AssemblyFileVersion("1.10")]
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
AntiForgery: enabled
|
||||
Author: The Orchard Team
|
||||
Website: http://orchardproject.net
|
||||
Version: 1.10.1
|
||||
Version: 1.10
|
||||
OrchardVersion: 1.9
|
||||
Description: Provides a log for recording and viewing back-end changes.
|
||||
Features:
|
||||
@@ -19,7 +19,7 @@ Features:
|
||||
Name: Audit Trail Trimming
|
||||
Description: Provides a background task that regularly deletes old audit trail records.
|
||||
Category: Security
|
||||
Dependencies: Orchard.AuditTrail
|
||||
Dependencies: Orchard.AuditTrail, Orchard.TaskLease
|
||||
Orchard.AuditTrail.Users:
|
||||
Name: Audit Trail User Events
|
||||
Description: Provides audit trail support for user related events.
|
||||
|
||||
@@ -135,7 +135,7 @@
|
||||
</Content>
|
||||
<Content Include="Scripts\Web.config" />
|
||||
<Content Include="Styles\Web.config" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Content Include="Properties\AssemblyInfo.cs" />
|
||||
<Content Include="Module.txt" />
|
||||
<Content Include="Views\Parts.Contents.AuditTrail.SummaryAdmin.cshtml" />
|
||||
<Content Include="Views\DefinitionTemplates\AuditTrailPartSettings.cshtml" />
|
||||
@@ -213,6 +213,10 @@
|
||||
<Project>{d10ad48f-407d-4db5-a328-173ec7cb010f}</Project>
|
||||
<Name>Orchard.Roles</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Orchard.TaskLease\Orchard.TaskLease.csproj">
|
||||
<Project>{3f72a4e9-7b72-4260-b010-c16ec54f9baf}</Project>
|
||||
<Name>Orchard.TaskLease</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Orchard.Users\Orchard.Users.csproj">
|
||||
<Project>{79aed36e-abd0-4747-93d3-8722b042454b}</Project>
|
||||
<Name>Orchard.Users</Name>
|
||||
|
||||
@@ -32,6 +32,6 @@ using System.Security;
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
|
||||
[assembly: AssemblyVersion("1.10.1")]
|
||||
[assembly: AssemblyFileVersion("1.10.1")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
|
||||
|
||||
@@ -34,10 +34,7 @@ namespace Orchard.AuditTrail.Providers.Content {
|
||||
protected override void Updating(UpdateContentContext context) {
|
||||
var contentItem = context.ContentItem;
|
||||
|
||||
if (contentItem.IsNew())
|
||||
return;
|
||||
|
||||
_ignoreExportHandlerFor = contentItem;
|
||||
_ignoreExportHandlerFor = contentItem;
|
||||
_previousVersionXml = _contentItemCreated
|
||||
? default(XElement) // No need to do a diff on a newly created content item.
|
||||
: _contentManager.Export(contentItem);
|
||||
@@ -46,10 +43,7 @@ namespace Orchard.AuditTrail.Providers.Content {
|
||||
|
||||
protected override void Updated(UpdateContentContext context) {
|
||||
var contentItem = context.ContentItem;
|
||||
|
||||
if (contentItem.IsNew())
|
||||
return;
|
||||
|
||||
|
||||
if (_contentItemCreated) {
|
||||
RecordAuditTrailEvent(ContentAuditTrailEventProvider.Created, context.ContentItem);
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user