--HG--
branch : dev
This commit is contained in:
Andre Rodrigues
2010-11-29 17:37:22 -08:00
23 changed files with 345 additions and 162 deletions

View File

@@ -256,6 +256,10 @@
<Project>{D10AD48F-407D-4DB5-A328-173EC7CB010F}</Project>
<Name>Orchard.Roles</Name>
</ProjectReference>
<ProjectReference Include="..\..\Orchard.Web\Modules\Orchard.Scripting.Dlr\Orchard.Scripting.Dlr.csproj">
<Project>{2AD6973D-C7BB-416E-89FE-EEE34664E05F}</Project>
<Name>Orchard.Scripting.Dlr</Name>
</ProjectReference>
<ProjectReference Include="..\..\Orchard.Web\Modules\Orchard.Scripting\Orchard.Scripting.csproj">
<Project>{2AD6973D-C7BB-416E-89FE-EEE34664E05F}</Project>
<Name>Orchard.Scripting</Name>

View File

@@ -1,9 +1,5 @@
<?xml version="1.0"?>
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
<!-- system.web>
<machineKey xdt:Transform="Remove" />
<machineKey xdt:Transform="Insert" validationKey="AutoGenerate" decryptionKey="AutoGenerate" validation="SHA1" decryption="AES" />
</system.web -->
<system.web.extensions xdt:Transform="Remove" />
</configuration>

View File

@@ -1,9 +1,5 @@
<?xml version="1.0"?>
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
<!-- system.web>
<machineKey xdt:Transform="Remove" />
<machineKey xdt:Transform="Insert" validationKey="AutoGenerate" decryptionKey="AutoGenerate" validation="SHA1" decryption="AES" />
</system.web -->
<system.web.extensions xdt:Transform="Remove" />
</configuration>

View File

@@ -40,7 +40,6 @@
<defaultSettings timeout="00:30:00"/>
</system.transactions>
<system.web>
<machineKey validationKey="013B82F217ABB7EAB1F699E4E5B4D290030644D435994692354DAE82B06568B058BFE3C57BF199A41FFDBC84F3BC74D9C5BD96D1265F36A22D58347B591AC8DD" decryptionKey="04797035C490263D73ED991C84C5DFCD0D0206AD4F12BC3638A38FBEABEBB8C7" validation="SHA1" decryption="AES" />
<httpRuntime requestValidationMode="2.0" />
<!--

View File

@@ -77,7 +77,9 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Orchard.Pages", "..\Orchard
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Orchard.PublishLater", "..\Orchard.Web\Modules\Orchard.PublishLater\Orchard.PublishLater.csproj", "{C889167C-E52C-4A65-A419-224B3D1B957D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Orchard.Scripting", "..\Orchard.Web\Modules\Orchard.Scripting\Orchard.Scripting.csproj", "{2AD6973D-C7BB-416E-89FE-EEE34664E05F}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Orchard.Scripting", "..\Orchard.Web\Modules\Orchard.Scripting\Orchard.Scripting.csproj", "{99002B65-86F7-415E-BF4A-381AA8AB9CCC}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Orchard.Scripting.Dlr", "..\Orchard.Web\Modules\Orchard.Scripting.Dlr\Orchard.Scripting.Dlr.csproj", "{2AD6973D-C7BB-416E-89FE-EEE34664E05F}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -225,6 +227,10 @@ Global
{C889167C-E52C-4A65-A419-224B3D1B957D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C889167C-E52C-4A65-A419-224B3D1B957D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C889167C-E52C-4A65-A419-224B3D1B957D}.Release|Any CPU.Build.0 = Release|Any CPU
{99002B65-86F7-415E-BF4A-381AA8AB9CCC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{99002B65-86F7-415E-BF4A-381AA8AB9CCC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{99002B65-86F7-415E-BF4A-381AA8AB9CCC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{99002B65-86F7-415E-BF4A-381AA8AB9CCC}.Release|Any CPU.Build.0 = Release|Any CPU
{2AD6973D-C7BB-416E-89FE-EEE34664E05F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2AD6973D-C7BB-416E-89FE-EEE34664E05F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2AD6973D-C7BB-416E-89FE-EEE34664E05F}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -262,6 +268,7 @@ Global
{085948FF-0E9B-4A9A-B564-F8B8B4BDDDBC} = {8E3DE014-9B28-4B32-8AC1-B2BE404E9B2D}
{3420C92A-747F-4990-BA08-F2C9531E44AD} = {8E3DE014-9B28-4B32-8AC1-B2BE404E9B2D}
{C889167C-E52C-4A65-A419-224B3D1B957D} = {8E3DE014-9B28-4B32-8AC1-B2BE404E9B2D}
{99002B65-86F7-415E-BF4A-381AA8AB9CCC} = {8E3DE014-9B28-4B32-8AC1-B2BE404E9B2D}
{2AD6973D-C7BB-416E-89FE-EEE34664E05F} = {8E3DE014-9B28-4B32-8AC1-B2BE404E9B2D}
{33B1BC8D-E292-4972-A363-22056B207156} = {75E7476C-C05B-4C41-8E38-081D3EB55659}
{CB70A642-8CEC-4DDE-8C9F-AD08900EC98D} = {84650275-884D-4CBB-9CC0-67553996E211}

View File

@@ -10,12 +10,18 @@ namespace Orchard.Specs.Bindings {
public class OrchardSiteFactory : BindingBase {
[Given(@"I have installed Orchard")]
public void GivenIHaveInstalledOrchard() {
GivenIHaveInstalledOrchard("/");
}
[Given(@"I have installed Orchard at ""(.*)\""")]
public void GivenIHaveInstalledOrchard(string virtualDirectory) {
var webApp = Binding<WebAppHosting>();
webApp.GivenIHaveACleanSiteWith(TableData(
new { extension = "module", names = "Orchard.Setup, Orchard.Pages, Orchard.Blogs, Orchard.Messaging, Orchard.Modules, Orchard.Packaging, Orchard.PublishLater, Orchard.Themes, Orchard.Scripting, Orchard.Widgets, Orchard.Users, Orchard.Roles, Orchard.Comments, Orchard.jQuery, Orchard.Tags, TinyMce" },
new { extension = "core", names = "Common, Dashboard, Feeds, HomePage, Navigation, Contents, Routable, Scheduling, Settings, Shapes, XmlRpc" },
new { extension = "theme", names = "SafeMode, TheAdmin, TheThemeMachine" }));
new { extension = "theme", names = "SafeMode, TheAdmin, TheThemeMachine" }),
virtualDirectory);
webApp.WhenIGoTo("Setup");

View File

@@ -60,8 +60,8 @@ namespace Orchard.Specs.Bindings {
}
[Given(@"I have a clean site")]
public void GivenIHaveACleanSite() {
GivenIHaveACleanSiteBasedOn("Orchard.Web");
public void GivenIHaveACleanSite(string virtualDirectory = "/") {
GivenIHaveACleanSiteBasedOn("Orchard.Web", virtualDirectory);
}
[Given(@"I have chosen to deploy modules as source files only")]
@@ -71,8 +71,13 @@ namespace Orchard.Specs.Bindings {
[Given(@"I have a clean site based on (.*)")]
public void GivenIHaveACleanSiteBasedOn(string siteFolder) {
GivenIHaveACleanSiteBasedOn(siteFolder, "/");
}
[Given(@"I have a clean site based on (.*) at ""(.*)\""")]
public void GivenIHaveACleanSiteBasedOn(string siteFolder, string virtualDirectory) {
_webHost = new WebHost(_orchardTemp);
Host.Initialize(siteFolder, "/");
Host.Initialize(siteFolder, virtualDirectory ?? "/");
var shuttle = new Shuttle();
Host.Execute(() => {
log4net.Config.BasicConfigurator.Configure(new CastleAppender());
@@ -124,8 +129,8 @@ namespace Orchard.Specs.Bindings {
}
[Given(@"I have a clean site with")]
public void GivenIHaveACleanSiteWith(Table table) {
GivenIHaveACleanSite();
public void GivenIHaveACleanSiteWith(Table table, string virtualDirectory = "/") {
GivenIHaveACleanSite(virtualDirectory);
foreach (var row in table.Rows) {
foreach (var name in row["names"].Split(',').Select(x => x.Trim())) {
switch (row["extension"]) {

View File

@@ -126,3 +126,25 @@ Scenario: Enabling remote blog publishing inserts the appropriate metaweblogapi
Then the content type should be "\btext/xml\b"
And I should see "<manifest xmlns="http\://schemas\.microsoft\.com/wlw/manifest/weblog">"
And I should see "<clientType>Metaweblog</clientType>"
Scenario: The virtual path of my installation when not at the root is reflected in the URL example for the slug field when creating a blog or blog post
Given I have installed Orchard at "/OrchardLocal"
When I go to "admin/blogs/create"
Then I should see "<span>http\://localhost/OrchardLocal/</span>"
When I fill in
| name | value |
| Routable.Title | My Blog |
And I hit "Save"
And I go to "admin/blogs/my-blog/posts/create"
Then I should see "<span>http\://localhost/OrchardLocal/my-blog/</span>"
Scenario: The virtual path of my installation when at the root is reflected in the URL example for the slug field when creating a blog or blog post
Given I have installed Orchard at "/"
When I go to "admin/blogs/create"
Then I should see "<span>http\://localhost/</span>"
When I fill in
| name | value |
| Routable.Title | My Blog |
And I hit "Save"
And I go to "admin/blogs/my-blog/posts/create"
Then I should see "<span>http\://localhost/my-blog/</span>"

View File

@@ -1,7 +1,7 @@
// ------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by SpecFlow (http://www.specflow.org/).
// SpecFlow Version:1.3.2.0
// SpecFlow Version:1.4.0.0
// Runtime Version:4.0.30319.1
//
// Changes to this file may cause incorrect behavior and will be lost if
@@ -14,7 +14,7 @@ namespace Orchard.Specs
using TechTalk.SpecFlow;
[System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "1.3.2.0")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "1.4.0.0")]
[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[NUnit.Framework.TestFixtureAttribute()]
[NUnit.Framework.DescriptionAttribute("Blog")]
@@ -31,7 +31,7 @@ namespace Orchard.Specs
{
testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner();
TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Blog", "In order to add blogs to my site\r\nAs an author\r\nI want to create blogs and create" +
", publish and edit blog posts", ((string[])(null)));
", publish and edit blog posts", GenerationTargetLanguage.CSharp, ((string[])(null)));
testRunner.OnFeatureStart(featureInfo);
}
@@ -61,11 +61,11 @@ namespace Orchard.Specs
#line 6
this.ScenarioSetup(scenarioInfo);
#line 7
testRunner.Given("I have installed Orchard");
testRunner.Given("I have installed Orchard");
#line 8
testRunner.When("I go to \"admin\"");
testRunner.When("I go to \"admin\"");
#line 9
testRunner.Then("I should see \"<a href=\"/Admin/Blogs/Create\">Blogs</a>\"");
testRunner.Then("I should see \"<a href=\"/Admin/Blogs/Create\">Blogs</a>\"");
#line hidden
testRunner.CollectScenarioErrors();
}
@@ -78,9 +78,9 @@ testRunner.Then("I should see \"<a href=\"/Admin/Blogs/Create\">Blogs</a>\"");
#line 11
this.ScenarioSetup(scenarioInfo);
#line 12
testRunner.Given("I have installed Orchard");
testRunner.Given("I have installed Orchard");
#line 13
testRunner.When("I go to \"admin/blogs/create\"");
testRunner.When("I go to \"admin/blogs/create\"");
#line hidden
TechTalk.SpecFlow.Table table1 = new TechTalk.SpecFlow.Table(new string[] {
"name",
@@ -89,15 +89,15 @@ testRunner.When("I go to \"admin/blogs/create\"");
"Routable.Title",
"My Blog"});
#line 14
testRunner.And("I fill in", ((string)(null)), table1);
testRunner.And("I fill in", ((string)(null)), table1);
#line 17
testRunner.And("I hit \"Save\"");
testRunner.And("I hit \"Save\"");
#line 18
testRunner.And("I go to \"my-blog\"");
testRunner.And("I go to \"my-blog\"");
#line 19
testRunner.Then("I should see \"<h1[^>]*>.*?My Blog.*?</h1>\"");
testRunner.Then("I should see \"<h1[^>]*>.*?My Blog.*?</h1>\"");
#line 20
testRunner.When("I go to \"admin/blogs/my-blog/posts/create\"");
testRunner.When("I go to \"admin/blogs/my-blog/posts/create\"");
#line hidden
TechTalk.SpecFlow.Table table2 = new TechTalk.SpecFlow.Table(new string[] {
"name",
@@ -109,15 +109,15 @@ testRunner.When("I go to \"admin/blogs/my-blog/posts/create\"");
"Body.Text",
"Hi there."});
#line 21
testRunner.And("I fill in", ((string)(null)), table2);
testRunner.And("I fill in", ((string)(null)), table2);
#line 25
testRunner.And("I hit \"Publish Now\"");
testRunner.And("I hit \"Publish Now\"");
#line 26
testRunner.And("I go to \"my-blog/my-post\"");
testRunner.And("I go to \"my-blog/my-post\"");
#line 27
testRunner.Then("I should see \"<h1[^>]*>.*?My Post.*?</h1>\"");
testRunner.Then("I should see \"<h1[^>]*>.*?My Post.*?</h1>\"");
#line 28
testRunner.And("I should see \"Hi there.\"");
testRunner.And("I should see \"Hi there.\"");
#line hidden
testRunner.CollectScenarioErrors();
}
@@ -132,9 +132,9 @@ testRunner.And("I should see \"Hi there.\"");
#line 30
this.ScenarioSetup(scenarioInfo);
#line 31
testRunner.Given("I have installed Orchard");
testRunner.Given("I have installed Orchard");
#line 32
testRunner.When("I go to \"admin/blogs/create\"");
testRunner.When("I go to \"admin/blogs/create\"");
#line hidden
TechTalk.SpecFlow.Table table3 = new TechTalk.SpecFlow.Table(new string[] {
"name",
@@ -143,11 +143,11 @@ testRunner.When("I go to \"admin/blogs/create\"");
"Routable.Title",
"My Blog"});
#line 33
testRunner.And("I fill in", ((string)(null)), table3);
testRunner.And("I fill in", ((string)(null)), table3);
#line 36
testRunner.And("I hit \"Save\"");
testRunner.And("I hit \"Save\"");
#line 37
testRunner.And("I go to \"admin/blogs/my-blog/posts/create\"");
testRunner.And("I go to \"admin/blogs/my-blog/posts/create\"");
#line hidden
TechTalk.SpecFlow.Table table4 = new TechTalk.SpecFlow.Table(new string[] {
"name",
@@ -159,17 +159,17 @@ testRunner.And("I go to \"admin/blogs/my-blog/posts/create\"");
"Body.Text",
"Hi there."});
#line 38
testRunner.And("I fill in", ((string)(null)), table4);
testRunner.And("I fill in", ((string)(null)), table4);
#line 42
testRunner.And("I hit \"Publish Now\"");
testRunner.And("I hit \"Publish Now\"");
#line 43
testRunner.And("I go to \"my-blog/my-post\"");
testRunner.And("I go to \"my-blog/my-post\"");
#line 44
testRunner.Then("I should see \"<h1[^>]*>.*?My Post.*?</h1>\"");
testRunner.Then("I should see \"<h1[^>]*>.*?My Post.*?</h1>\"");
#line 45
testRunner.And("I should see \"Hi there.\"");
testRunner.And("I should see \"Hi there.\"");
#line 46
testRunner.When("I go to \"admin/blogs/my-blog/posts/create\"");
testRunner.When("I go to \"admin/blogs/my-blog/posts/create\"");
#line hidden
TechTalk.SpecFlow.Table table5 = new TechTalk.SpecFlow.Table(new string[] {
"name",
@@ -181,17 +181,17 @@ testRunner.When("I go to \"admin/blogs/my-blog/posts/create\"");
"Body.Text",
"Hi there, again."});
#line 47
testRunner.And("I fill in", ((string)(null)), table5);
testRunner.And("I fill in", ((string)(null)), table5);
#line 51
testRunner.And("I hit \"Publish Now\"");
testRunner.And("I hit \"Publish Now\"");
#line 52
testRunner.And("I go to \"my-blog/my-post-2\"");
testRunner.And("I go to \"my-blog/my-post-2\"");
#line 53
testRunner.Then("I should see \"<h1[^>]*>.*?My Post.*?</h1>\"");
testRunner.Then("I should see \"<h1[^>]*>.*?My Post.*?</h1>\"");
#line 54
testRunner.And("I should see \"Hi there, again.\"");
testRunner.And("I should see \"Hi there, again.\"");
#line 55
testRunner.When("I go to \"admin/blogs/my-blog/posts/create\"");
testRunner.When("I go to \"admin/blogs/my-blog/posts/create\"");
#line hidden
TechTalk.SpecFlow.Table table6 = new TechTalk.SpecFlow.Table(new string[] {
"name",
@@ -206,15 +206,15 @@ testRunner.When("I go to \"admin/blogs/my-blog/posts/create\"");
"Body.Text",
"Are you still there?"});
#line 56
testRunner.And("I fill in", ((string)(null)), table6);
testRunner.And("I fill in", ((string)(null)), table6);
#line 61
testRunner.And("I hit \"Publish Now\"");
testRunner.And("I hit \"Publish Now\"");
#line 62
testRunner.And("I go to \"my-blog/my-post-3\"");
testRunner.And("I go to \"my-blog/my-post-3\"");
#line 63
testRunner.Then("I should see \"<h1[^>]*>.*?My Post.*?</h1>\"");
testRunner.Then("I should see \"<h1[^>]*>.*?My Post.*?</h1>\"");
#line 64
testRunner.And("I should see \"Are you still there?\"");
testRunner.And("I should see \"Are you still there?\"");
#line hidden
testRunner.CollectScenarioErrors();
}
@@ -229,9 +229,9 @@ testRunner.And("I should see \"Are you still there?\"");
#line 66
this.ScenarioSetup(scenarioInfo);
#line 67
testRunner.Given("I have installed Orchard");
testRunner.Given("I have installed Orchard");
#line 68
testRunner.When("I go to \"admin/blogs/create\"");
testRunner.When("I go to \"admin/blogs/create\"");
#line hidden
TechTalk.SpecFlow.Table table7 = new TechTalk.SpecFlow.Table(new string[] {
"name",
@@ -240,15 +240,15 @@ testRunner.When("I go to \"admin/blogs/create\"");
"Routable.Title",
"My Blog"});
#line 69
testRunner.And("I fill in", ((string)(null)), table7);
testRunner.And("I fill in", ((string)(null)), table7);
#line 72
testRunner.And("I hit \"Save\"");
testRunner.And("I hit \"Save\"");
#line 73
testRunner.And("I go to \"my-blog\"");
testRunner.And("I go to \"my-blog\"");
#line 74
testRunner.Then("I should see \"<h1[^>]*>.*?My Blog.*?</h1>\"");
testRunner.Then("I should see \"<h1[^>]*>.*?My Blog.*?</h1>\"");
#line 75
testRunner.When("I go to \"admin/blogs/my-blog/posts/create\"");
testRunner.When("I go to \"admin/blogs/my-blog/posts/create\"");
#line hidden
TechTalk.SpecFlow.Table table8 = new TechTalk.SpecFlow.Table(new string[] {
"name",
@@ -260,19 +260,19 @@ testRunner.When("I go to \"admin/blogs/my-blog/posts/create\"");
"Body.Text",
"Hi there."});
#line 76
testRunner.And("I fill in", ((string)(null)), table8);
testRunner.And("I fill in", ((string)(null)), table8);
#line 80
testRunner.And("I hit \"Publish Now\"");
testRunner.And("I hit \"Publish Now\"");
#line 81
testRunner.And("I go to \"my-blog/my-post\"");
testRunner.And("I go to \"my-blog/my-post\"");
#line 82
testRunner.Then("I should see \"<h1[^>]*>.*?My Post.*?</h1>\"");
testRunner.Then("I should see \"<h1[^>]*>.*?My Post.*?</h1>\"");
#line 83
testRunner.And("I should see \"Hi there.\"");
testRunner.And("I should see \"Hi there.\"");
#line 84
testRunner.When("I go to \"admin/blogs/my-blog\"");
testRunner.When("I go to \"admin/blogs/my-blog\"");
#line 85
testRunner.And("I follow \"Blog Properties\"");
testRunner.And("I follow \"Blog Properties\"");
#line hidden
TechTalk.SpecFlow.Table table9 = new TechTalk.SpecFlow.Table(new string[] {
"name",
@@ -281,19 +281,19 @@ testRunner.And("I follow \"Blog Properties\"");
"Routable.Slug",
"my-other-blog"});
#line 86
testRunner.And("I fill in", ((string)(null)), table9);
testRunner.And("I fill in", ((string)(null)), table9);
#line 89
testRunner.And("I hit \"Save\"");
testRunner.And("I hit \"Save\"");
#line 90
testRunner.And("I go to \"my-other-blog\"");
testRunner.And("I go to \"my-other-blog\"");
#line 91
testRunner.Then("I should see \"<h1[^>]*>.*?My Blog.*?</h1>\"");
testRunner.Then("I should see \"<h1[^>]*>.*?My Blog.*?</h1>\"");
#line 92
testRunner.When("I go to \"my-other-blog/my-post\"");
testRunner.When("I go to \"my-other-blog/my-post\"");
#line 93
testRunner.Then("I should see \"<h1[^>]*>.*?My Post.*?</h1>\"");
testRunner.Then("I should see \"<h1[^>]*>.*?My Post.*?</h1>\"");
#line 94
testRunner.And("I should see \"Hi there.\"");
testRunner.And("I should see \"Hi there.\"");
#line hidden
testRunner.CollectScenarioErrors();
}
@@ -306,9 +306,9 @@ testRunner.And("I should see \"Hi there.\"");
#line 96
this.ScenarioSetup(scenarioInfo);
#line 97
testRunner.Given("I have installed Orchard");
testRunner.Given("I have installed Orchard");
#line 98
testRunner.When("I go to \"admin/blogs/create\"");
testRunner.When("I go to \"admin/blogs/create\"");
#line hidden
TechTalk.SpecFlow.Table table10 = new TechTalk.SpecFlow.Table(new string[] {
"name",
@@ -317,11 +317,11 @@ testRunner.When("I go to \"admin/blogs/create\"");
"Routable.Title",
"My Blog"});
#line 99
testRunner.And("I fill in", ((string)(null)), table10);
testRunner.And("I fill in", ((string)(null)), table10);
#line 102
testRunner.And("I hit \"Save\"");
testRunner.And("I hit \"Save\"");
#line 103
testRunner.And("I go to \"admin/blogs/my-blog/posts/create\"");
testRunner.And("I go to \"admin/blogs/my-blog/posts/create\"");
#line hidden
TechTalk.SpecFlow.Table table11 = new TechTalk.SpecFlow.Table(new string[] {
"name",
@@ -333,15 +333,15 @@ testRunner.And("I go to \"admin/blogs/my-blog/posts/create\"");
"Body.Text",
"Hi there."});
#line 104
testRunner.And("I fill in", ((string)(null)), table11);
testRunner.And("I fill in", ((string)(null)), table11);
#line 108
testRunner.And("I hit \"Publish Now\"");
testRunner.And("I hit \"Publish Now\"");
#line 109
testRunner.And("I am redirected");
testRunner.And("I am redirected");
#line 110
testRunner.And("I go to \"my-blog/my-post\"");
testRunner.And("I go to \"my-blog/my-post\"");
#line 111
testRunner.Then("I should see \"<link rel=\"alternate\" type=\"application/rss\\+xml\" title=\"My Blog\" h" +
testRunner.Then("I should see \"<link rel=\"alternate\" type=\"application/rss\\+xml\" title=\"My Blog\" h" +
"ref=\"/rss\\?containerid=\\d+\" />\"");
#line hidden
testRunner.CollectScenarioErrors();
@@ -357,13 +357,13 @@ testRunner.Then("I should see \"<link rel=\"alternate\" type=\"application/rss\\
#line 114
this.ScenarioSetup(scenarioInfo);
#line 115
testRunner.Given("I have installed Orchard");
testRunner.Given("I have installed Orchard");
#line 116
testRunner.And("I have enabled \"XmlRpc\"");
testRunner.And("I have enabled \"XmlRpc\"");
#line 117
testRunner.And("I have enabled \"Orchard.Blogs.RemotePublishing\"");
testRunner.And("I have enabled \"Orchard.Blogs.RemotePublishing\"");
#line 118
testRunner.When("I go to \"admin/blogs/create\"");
testRunner.When("I go to \"admin/blogs/create\"");
#line hidden
TechTalk.SpecFlow.Table table12 = new TechTalk.SpecFlow.Table(new string[] {
"name",
@@ -372,23 +372,91 @@ testRunner.When("I go to \"admin/blogs/create\"");
"Routable.Title",
"My Blog"});
#line 119
testRunner.And("I fill in", ((string)(null)), table12);
testRunner.And("I fill in", ((string)(null)), table12);
#line 122
testRunner.And("I hit \"Save\"");
testRunner.And("I hit \"Save\"");
#line 123
testRunner.And("I go to \"my-blog\"");
testRunner.And("I go to \"my-blog\"");
#line 124
testRunner.Then("I should see \"<link href=\"[^\"]*/XmlRpc/LiveWriter/Manifest\" rel=\"wlwmanifest\" typ" +
testRunner.Then("I should see \"<link href=\"[^\"]*/XmlRpc/LiveWriter/Manifest\" rel=\"wlwmanifest\" typ" +
"e=\"application/wlwmanifest\\+xml\" />\"");
#line 125
testRunner.When("I go to \"/XmlRpc/LiveWriter/Manifest\"");
testRunner.When("I go to \"/XmlRpc/LiveWriter/Manifest\"");
#line 126
testRunner.Then("the content type should be \"\\btext/xml\\b\"");
testRunner.Then("the content type should be \"\\btext/xml\\b\"");
#line 127
testRunner.And("I should see \"<manifest xmlns=\"http\\://schemas\\.microsoft\\.com/wlw/manifest/weblo" +
testRunner.And("I should see \"<manifest xmlns=\"http\\://schemas\\.microsoft\\.com/wlw/manifest/weblo" +
"g\">\"");
#line 128
testRunner.And("I should see \"<clientType>Metaweblog</clientType>\"");
testRunner.And("I should see \"<clientType>Metaweblog</clientType>\"");
#line hidden
testRunner.CollectScenarioErrors();
}
[NUnit.Framework.TestAttribute()]
[NUnit.Framework.DescriptionAttribute("The virtual path of my installation when not at the root is reflected in the URL " +
"example for the slug field when creating a blog or blog post")]
public virtual void TheVirtualPathOfMyInstallationWhenNotAtTheRootIsReflectedInTheURLExampleForTheSlugFieldWhenCreatingABlogOrBlogPost()
{
TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("The virtual path of my installation when not at the root is reflected in the URL " +
"example for the slug field when creating a blog or blog post", ((string[])(null)));
#line 130
this.ScenarioSetup(scenarioInfo);
#line 131
testRunner.Given("I have installed Orchard at \"/OrchardLocal\"");
#line 132
testRunner.When("I go to \"admin/blogs/create\"");
#line 133
testRunner.Then("I should see \"<span>http\\://localhost/OrchardLocal/</span>\"");
#line hidden
TechTalk.SpecFlow.Table table13 = new TechTalk.SpecFlow.Table(new string[] {
"name",
"value"});
table13.AddRow(new string[] {
"Routable.Title",
"My Blog"});
#line 134
testRunner.When("I fill in", ((string)(null)), table13);
#line 137
testRunner.And("I hit \"Save\"");
#line 138
testRunner.And("I go to \"admin/blogs/my-blog/posts/create\"");
#line 139
testRunner.Then("I should see \"<span>http\\://localhost/OrchardLocal/my-blog/</span>\"");
#line hidden
testRunner.CollectScenarioErrors();
}
[NUnit.Framework.TestAttribute()]
[NUnit.Framework.DescriptionAttribute("The virtual path of my installation when at the root is reflected in the URL exam" +
"ple for the slug field when creating a blog or blog post")]
public virtual void TheVirtualPathOfMyInstallationWhenAtTheRootIsReflectedInTheURLExampleForTheSlugFieldWhenCreatingABlogOrBlogPost()
{
TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("The virtual path of my installation when at the root is reflected in the URL exam" +
"ple for the slug field when creating a blog or blog post", ((string[])(null)));
#line 141
this.ScenarioSetup(scenarioInfo);
#line 142
testRunner.Given("I have installed Orchard at \"/\"");
#line 143
testRunner.When("I go to \"admin/blogs/create\"");
#line 144
testRunner.Then("I should see \"<span>http\\://localhost/</span>\"");
#line hidden
TechTalk.SpecFlow.Table table14 = new TechTalk.SpecFlow.Table(new string[] {
"name",
"value"});
table14.AddRow(new string[] {
"Routable.Title",
"My Blog"});
#line 145
testRunner.When("I fill in", ((string)(null)), table14);
#line 148
testRunner.And("I hit \"Save\"");
#line 149
testRunner.And("I go to \"admin/blogs/my-blog/posts/create\"");
#line 150
testRunner.Then("I should see \"<span>http\\://localhost/my-blog/</span>\"");
#line hidden
testRunner.CollectScenarioErrors();
}

View File

@@ -6,8 +6,6 @@ using System.Linq;
using System.Text;
using System.Web;
using System.Web.Hosting;
using HtmlAgilityPack;
using Orchard.Commands;
using Orchard.Specs.Util;
namespace Orchard.Specs.Hosting {
@@ -16,12 +14,13 @@ namespace Orchard.Specs.Hosting {
var physicalPath = Bleroy.FluentPath.Path.Get(webHost.PhysicalDirectory);
urlPath = StripVDir(urlPath, webHost.VirtualDirectory);
var details = new RequestDetails {
HostName = webHost.HostName,
UrlPath = urlPath,
Page = physicalPath
.Combine(urlPath.TrimStart('/', '\\'))
.GetRelativePath(physicalPath),
.GetRelativePath(physicalPath)
};
if (!string.IsNullOrEmpty(webHost.Cookies)) {
@@ -52,6 +51,12 @@ namespace Orchard.Specs.Hosting {
return details;
}
private static string StripVDir(string urlPath, string virtualDirectory) {
return urlPath.StartsWith(virtualDirectory, StringComparison.OrdinalIgnoreCase)
? urlPath.Substring(virtualDirectory.Length)
: urlPath;
}
public static RequestDetails SendRequest(this WebHost webHost, string urlPath) {
return webHost.SendRequest(urlPath, null);
}

View File

@@ -1,7 +1,7 @@
// ------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by SpecFlow (http://www.specflow.org/).
// SpecFlow Version:1.3.2.0
// SpecFlow Version:1.4.0.0
// Runtime Version:4.0.30319.1
//
// Changes to this file may cause incorrect behavior and will be lost if
@@ -14,7 +14,7 @@ namespace Orchard.Specs
using TechTalk.SpecFlow;
[System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "1.3.2.0")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "1.4.0.0")]
[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[NUnit.Framework.TestFixtureAttribute()]
[NUnit.Framework.DescriptionAttribute("Web Hosting")]
@@ -31,7 +31,7 @@ namespace Orchard.Specs
{
testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner();
TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Web Hosting", "In order to test orchard\r\nAs an integration runner\r\nI want to verify basic hostin" +
"g is working", ((string[])(null)));
"g is working", GenerationTargetLanguage.CSharp, ((string[])(null)));
testRunner.OnFeatureStart(featureInfo);
}
@@ -61,13 +61,13 @@ namespace Orchard.Specs
#line 6
this.ScenarioSetup(scenarioInfo);
#line 7
testRunner.Given("I have a clean site based on Simple.Web");
testRunner.Given("I have a clean site based on Simple.Web");
#line 8
testRunner.When("I go to \"Content/Static.txt\"");
testRunner.When("I go to \"Content/Static.txt\"");
#line 9
testRunner.Then("I should see \"Hello world!\"");
testRunner.Then("I should see \"Hello world!\"");
#line 10
testRunner.And("the status should be 200 \"OK\"");
testRunner.And("the status should be 200 \"OK\"");
#line hidden
testRunner.CollectScenarioErrors();
}
@@ -80,13 +80,13 @@ testRunner.And("the status should be 200 \"OK\"");
#line 12
this.ScenarioSetup(scenarioInfo);
#line 13
testRunner.Given("I have a clean site based on Simple.Web");
testRunner.Given("I have a clean site based on Simple.Web");
#line 14
testRunner.When("I go to \"Simple/Page.aspx\"");
testRunner.When("I go to \"Simple/Page.aspx\"");
#line 15
testRunner.Then("I should see \"Hello again\"");
testRunner.Then("I should see \"Hello again\"");
#line 16
testRunner.And("the status should be 200 \"OK\"");
testRunner.And("the status should be 200 \"OK\"");
#line hidden
testRunner.CollectScenarioErrors();
}
@@ -99,13 +99,13 @@ testRunner.And("the status should be 200 \"OK\"");
#line 18
this.ScenarioSetup(scenarioInfo);
#line 19
testRunner.Given("I have a clean site based on Simple.Web");
testRunner.Given("I have a clean site based on Simple.Web");
#line 20
testRunner.When("I go to \"hello-world\"");
testRunner.When("I go to \"hello-world\"");
#line 21
testRunner.Then("the status should be 200 \"OK\"");
testRunner.Then("the status should be 200 \"OK\"");
#line 22
testRunner.And("I should see \"Hello yet again\"");
testRunner.And("I should see \"Hello yet again\"");
#line hidden
testRunner.CollectScenarioErrors();
}
@@ -118,15 +118,15 @@ testRunner.And("I should see \"Hello yet again\"");
#line 24
this.ScenarioSetup(scenarioInfo);
#line 25
testRunner.Given("I have a clean site based on Simple.Web");
testRunner.Given("I have a clean site based on Simple.Web");
#line 26
testRunner.When("I go to \"/simple/page.aspx\"");
testRunner.When("I go to \"/simple/page.aspx\"");
#line 27
testRunner.And("I follow \"next page\"");
testRunner.And("I follow \"next page\"");
#line 28
testRunner.Then("the status should be 200 \"OK\"");
testRunner.Then("the status should be 200 \"OK\"");
#line 29
testRunner.And("I should see \"Hello yet again\"");
testRunner.And("I should see \"Hello yet again\"");
#line hidden
testRunner.CollectScenarioErrors();
}
@@ -139,9 +139,9 @@ testRunner.And("I should see \"Hello yet again\"");
#line 31
this.ScenarioSetup(scenarioInfo);
#line 32
testRunner.Given("I have a clean site based on Simple.Web");
testRunner.Given("I have a clean site based on Simple.Web");
#line 33
testRunner.And("I am on \"/simple/page.aspx\"");
testRunner.And("I am on \"/simple/page.aspx\"");
#line hidden
TechTalk.SpecFlow.Table table1 = new TechTalk.SpecFlow.Table(new string[] {
"name",
@@ -150,15 +150,15 @@ testRunner.And("I am on \"/simple/page.aspx\"");
"input1",
"gamma"});
#line 34
testRunner.When("I fill in", ((string)(null)), table1);
testRunner.When("I fill in", ((string)(null)), table1);
#line 37
testRunner.And("I hit \"Go!\"");
testRunner.And("I hit \"Go!\"");
#line 38
testRunner.Then("I should see \"passthrough1:alpha\"");
testRunner.Then("I should see \"passthrough1:alpha\"");
#line 39
testRunner.And("I should see \"passthrough2:beta\"");
testRunner.And("I should see \"passthrough2:beta\"");
#line 40
testRunner.And("I should see \"input1:gamma\"");
testRunner.And("I should see \"input1:gamma\"");
#line hidden
testRunner.CollectScenarioErrors();
}
@@ -171,13 +171,13 @@ testRunner.And("I should see \"input1:gamma\"");
#line 42
this.ScenarioSetup(scenarioInfo);
#line 43
testRunner.Given("I have a clean site based on Simple.Web");
testRunner.Given("I have a clean site based on Simple.Web");
#line 44
testRunner.When("I go to \"/simple/cookie-set.aspx\"");
testRunner.When("I go to \"/simple/cookie-set.aspx\"");
#line 45
testRunner.And("I go to \"/simple/cookie-show.aspx\"");
testRunner.And("I go to \"/simple/cookie-show.aspx\"");
#line 46
testRunner.Then("I should see \"foo:bar\"");
testRunner.Then("I should see \"foo:bar\"");
#line hidden
testRunner.CollectScenarioErrors();
}
@@ -190,13 +190,13 @@ testRunner.Then("I should see \"foo:bar\"");
#line 48
this.ScenarioSetup(scenarioInfo);
#line 49
testRunner.Given("I have a clean site based on Simple.Web");
testRunner.Given("I have a clean site based on Simple.Web");
#line 50
testRunner.When("I go to \"/simple/redir.aspx\"");
testRunner.When("I go to \"/simple/redir.aspx\"");
#line 51
testRunner.And("I am redirected");
testRunner.And("I am redirected");
#line 52
testRunner.Then("I should see \"Hello again\"");
testRunner.Then("I should see \"Hello again\"");
#line hidden
testRunner.CollectScenarioErrors();
}
@@ -209,11 +209,11 @@ testRunner.Then("I should see \"Hello again\"");
#line 54
this.ScenarioSetup(scenarioInfo);
#line 55
testRunner.Given("I have a clean site based on Simple.Web");
testRunner.Given("I have a clean site based on Simple.Web");
#line 56
testRunner.When("I go to \"/Modules/Orchard.Blogs/module.txt\"");
testRunner.When("I go to \"/Modules/Orchard.Blogs/module.txt\"");
#line 57
testRunner.Then("the status should be 404 \"Not Found\"");
testRunner.Then("the status should be 404 \"Not Found\"");
#line hidden
testRunner.CollectScenarioErrors();
}
@@ -226,11 +226,11 @@ testRunner.Then("the status should be 404 \"Not Found\"");
#line 59
this.ScenarioSetup(scenarioInfo);
#line 60
testRunner.Given("I have a clean site based on Simple.Web");
testRunner.Given("I have a clean site based on Simple.Web");
#line 61
testRunner.When("I go to \"/Themes/Classic/theme.txt\"");
testRunner.When("I go to \"/Themes/Classic/theme.txt\"");
#line 62
testRunner.Then("the status should be 404 \"Not Found\"");
testRunner.Then("the status should be 404 \"Not Found\"");
#line hidden
testRunner.CollectScenarioErrors();
}

View File

@@ -8,17 +8,24 @@ using Orchard.Core.Routable.Models;
using Orchard.Core.Routable.Services;
using Orchard.Core.Routable.ViewModels;
using Orchard.Localization;
using Orchard.Mvc;
using Orchard.Services;
using Orchard.Utility.Extensions;
namespace Orchard.Core.Routable.Drivers {
public class RoutePartDriver : ContentPartDriver<RoutePart> {
private readonly IOrchardServices _services;
private readonly IRoutableService _routableService;
private readonly IHttpContextAccessor _httpContextAccessor;
private readonly IHomePageProvider _routableHomePageProvider;
public RoutePartDriver(IOrchardServices services, IRoutableService routableService, IEnumerable<IHomePageProvider> homePageProviders) {
public RoutePartDriver(IOrchardServices services,
IRoutableService routableService,
IEnumerable<IHomePageProvider> homePageProviders,
IHttpContextAccessor httpContextAccessor) {
_services = services;
_routableService = routableService;
_httpContextAccessor = httpContextAccessor;
_routableHomePageProvider = homePageProviders.SingleOrDefault(p => p.GetProviderName() == RoutableHomePageProvider.Name);
T = NullLocalizer.Instance;
}
@@ -59,10 +66,9 @@ namespace Orchard.Core.Routable.Drivers {
ContainerId = GetContainerId(part),
};
var containerPath = part.GetContainerPath();
model.DisplayLeadingPath = !string.IsNullOrWhiteSpace(containerPath)
? string.Format("{0}/", containerPath)
: "";
var request = _httpContextAccessor.Current().Request;
var containerUrl = new UriBuilder(request.ToRootUrlString()) { Path = (request.ApplicationPath ?? "").TrimEnd('/') + "/" + (part.GetContainerPath() ?? "") };
model.ContainerAbsoluteUrl = containerUrl.Uri.ToString().TrimEnd('/');
model.PromoteToHomePage = model.Id != 0 && part.Path != null && _routableHomePageProvider != null && _services.WorkContext.CurrentSite.HomePage == _routableHomePageProvider.GetSettingValue(model.Id);
return ContentShape("Parts_Routable_Edit",

View File

@@ -1,5 +1,4 @@
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations;
namespace Orchard.Core.Routable.ViewModels {
public class RoutableEditorViewModel {
@@ -15,6 +14,6 @@ namespace Orchard.Core.Routable.ViewModels {
public int? ContainerId { get; set; }
public bool PromoteToHomePage { get; set; }
public string DisplayLeadingPath { get; set; }
public string ContainerAbsoluteUrl { get; set; }
}
}

View File

@@ -7,7 +7,7 @@
@Html.TextBoxFor(m => m.Title, new { @class = "large text" })
</fieldset>
<fieldset class="permalink">
<label class="sub" for="Slug">@T("Permalink")<br /><span>@Request.ToApplicationRootUrlString()/@Model.DisplayLeadingPath</span></label>
<label class="sub" for="Slug">@T("Permalink")<br /><span>@Model.ContainerAbsoluteUrl/</span></label>
<span>@Html.TextBoxFor(m => m.Slug, new { @class = "text" })</span>
<span class="checkbox-and-label">
@Html.EditorFor(m => m.PromoteToHomePage)

View File

@@ -225,7 +225,14 @@ namespace Orchard.Core.Shapes {
foreach (var context in requiredResources.Where(r =>
(includeLocation.HasValue ? r.Settings.Location == includeLocation.Value : true) &&
(excludeLocation.HasValue ? r.Settings.Location != excludeLocation.Value : true))) {
var condition = context.Settings.Condition;
if (!string.IsNullOrEmpty(condition)) {
html.ViewContext.Writer.WriteLine("<!--[if " + condition + "]>");
}
html.ViewContext.Writer.WriteLine(context.GetTagBuilder(defaultSettings, appPath).ToString(context.Resource.TagRenderMode));
if (!string.IsNullOrEmpty(condition)) {
html.ViewContext.Writer.WriteLine("<![endif]-->");
}
}
}

View File

@@ -44,10 +44,11 @@
}
var dependencies = (from d in feature.Descriptor.Dependencies
select (from f in Model.Features where f.Descriptor.Id == d select f).SingleOrDefault()).Where(f => f != null).OrderBy(f => f.Descriptor.Name);
@* todo: missingDependencies -- show them in a special way. Can be found like this:
var missingDependencies = feature.Descriptor.Dependencies
.Where(d => !Model.Features.Any(f => f.Descriptor.Id == d));
*@
if (showActions) {
showActions = missingDependencies.Count() == 0;
}
<li class="@featureClassName" id="@featureId" title="@T("{0} is {1}", Html.AttributeEncode(featureName), featureState)">
<div class="summary">
<div class="properties">
@@ -61,6 +62,11 @@
"dependency",
"")
</div>}
@if (missingDependencies.Any()) {
<div class="missingdependencies">
<h4>@T("Missing:")</h4>
@Html.UnorderedList(missingDependencies, (s, i) => MvcHtmlString.Create(s), "", "missingdependency", "")
</div>}
</div>
<div class="actions">
@if (showActions) {

View File

@@ -107,6 +107,24 @@
.features .dependencies li:last-child::after {
content:"";
}
.features .missingdependencies {
font-size:.9em;
color:Red;
margin:.44em 0 0;
}
.features .missingdependencies>* {
display:inline;
}
.features .missingdependencies li {
display:inline;
margin-left:.5em;
}
.features .missingdependencies li::after {
content:", ";
}
.features .missingdependencies li:last-child::after {
content:"";
}
.features .feature .actions {
position:absolute;
right:.4em;

View File

@@ -283,7 +283,25 @@ namespace Orchard.Setup.Services {
page.As<RoutePart>().Title = T("Welcome to Orchard!").Text;
page.As<RoutePart>().Path = "";
page.As<RoutePart>().Slug = "";
page.As<BodyPart>().Text = string.Format(CultureInfo.CurrentCulture, "<p>Youve successfully setup your Orchard Site and this is the homepage of your new site. Here are a few things you can look at to get familiar with the application. Once you feel confident you dont need this anymore, you can <a href=\"Admin/Contents/Edit/{0}\">remove this by going into editing mode</a> and replacing it with whatever you want.</p><p>First things first - Youll probably want to <a href=\"Admin/Settings\">manage your settings</a> and configure Orchard to your liking. After that, you can head over to <a href=\"Admin/Themes\">manage themes to change or install new themes</a> and really make it your own. Once youre happy with a look and feel, its time for some content. You can start creating new custom content types or start with some built-in ones by <a href=\"Admin/Pages/Create\">adding a page</a>, <a href=\"Admin/Blogs/Create\">creating a blog</a> or <a href=\"Admin/Navigation\">managing your menus.</a></p><p>Finally, Orchard has been designed to be extended. It comes with a few built-in modules such as pages and blogs or themes. If youre looking to add additional functionality, you can do so by creating your own module or installing a new one that someone has made. Modules are created by other users of Orchard just like you so if you feel up to it, <a href=\"http://www.orchardproject.net/\">please consider participating</a>. XOXO The Orchard Team </p>", page.Id);
page.As<BodyPart>().Text = T(
@"<p>You've successfully setup your Orchard Site and this is the homepage of your new site.
Here are a few things you can look at to get familiar with the application.
Once you feel confident you don't need this anymore, you can
<a href=""Admin/Contents/Edit/{0}"">remove it by going into editing mode</a>
and replacing it with whatever you want.</p>
<p>First things first - You'll probably want to <a href=""Admin/Settings"">manage your settings</a>
and configure Orchard to your liking. After that, you can head over to
<a href=""Admin/Themes"">manage themes to change or install new themes</a>
and really make it your own. Once you're happy with a look and feel, it's time for some content.
You can start creating new custom content types or start from the built-in ones by
<a href=""Admin/Pages/Create"">adding a page</a>, <a href=""Admin/Blogs/Create"">creating a blog</a>
or <a href=""Admin/Navigation"">managing your menus.</a></p>
<p>Finally, Orchard has been designed to be extended. It comes with a few built-in
modules such as pages and blogs or themes. If you're looking to add additional functionality,
you can do so by creating your own module or by installing one that somebody else built.
Modules are created by other users of Orchard just like you so if you feel up to it,
<a href=""http://orchardproject.net/contribution"">please consider participating</a>.</p>
<p>Thanks for using Orchard The Orchard Team </p>", page.Id).Text;
contentManager.Publish(page);
siteSettings.Record.HomePage = "RoutableHomePageProvider;" + page.Id;

View File

@@ -425,7 +425,7 @@ span.message {
border:1px solid #ffea9b;
}
.message-Error {
background:#e68585; /* green */
background:#e68585; /* red */
border:1px solid #990808;
color:#fff;
}.debug.message {
@@ -477,6 +477,8 @@ label input {
}
.hint {
display:block;
font-size:0.923em;
color:#7c7c7c;
}
/* todo: (heskew) try to get .text on stuff like .text-box */
select, textarea, input.text, input.textMedium, input.text-box {
@@ -821,7 +823,7 @@ table.items th, table.items td {
/* Core Modules
----------------------------------------------------------*/
***************************************************************/
/* Routable */
.permalink input.text {
background:transparent;
@@ -897,7 +899,7 @@ fieldset.publish-later-datetime input {
}
/* Fields
----------------------------------------------------------*/
***************************************************************/
/* TextField */
#main .summary p.text-field {
margin:.5em 0;

View File

@@ -143,7 +143,7 @@ aside h6 { font-size: 1em; }
/* Lists */
li ul,
li ol { margin:0 1.5em; }
ul, ol { margin: 0 1.5em 1.5em 1.5em; }
ul, ol { margin: 1.5em; line-height: 1.538em; }
ul { list-style-type: disc; }
ol { list-style-type: decimal; }
@@ -391,6 +391,12 @@ nav ul
.search-results .blog-post .metadata .published { display: inline; margin: 0 6px 0 0; }
.search-results .blog-post .metadata .commentcount { display: inline; }
/* Confirmations */
.message, .validation-summary-errors { margin:10px 0 4px 0; padding:4px; }
.messages a { font-weight:bold; }
.message-Information { background:#e6f1c9; /* green */ border:1px solid #cfe493; color:#062232; }
.message-Warning { background:#fdf5bc; /* yellow */ border:1px solid #ffea9b; }
.critical.message, .validation-summary-errors, .message-Error { background:#e68585; /* red */ border:1px solid #990808; color:#fff; }
/* Secondary

View File

@@ -1 +1 @@
 <div class="credits"><span class="poweredby">@T("Powered by <a href=\"{0}\" title=\"Welcome to the New World Order\" target=\"_blank\">Orchard</a>", "http://www.orchardproject.net")</span> <span class="copyright">@T("&#169; The Theme Machine 2010.")</span></div>
 <div class="credits"><span class="poweredby">@T("Powered by <a href=\"{0}\" target=\"_blank\">Orchard</a>", "http://www.orchardproject.net")</span> <span class="copyright">@T("&#169; The Theme Machine 2010.")</span></div>

View File

@@ -77,7 +77,13 @@ namespace Orchard.Environment.Extensions {
var featureId = featureDescriptor.Id;
var extensionId = extensionDescriptor.Id;
var extensionEntry = _cacheManager.Get(extensionId, ctx => BuildEntry(extensionDescriptor));
ExtensionEntry extensionEntry;
try {
extensionEntry = _cacheManager.Get(extensionId, ctx => BuildEntry(extensionDescriptor));
}
catch (Exception ex) {
throw new OrchardException(T("Error while loading extension '{0}'.", extensionId), ex);
}
if (extensionEntry == null) {
// If the feature could not be compiled for some reason,
// return a "null" feature, i.e. a feature with no exported types.

View File

@@ -9,6 +9,7 @@ namespace Orchard.UI.Resources {
public bool DebugMode { get; set; }
public bool CdnMode { get; set; }
public ResourceLocation Location { get; set; }
public string Condition { get; set; }
public Action<ResourceDefinition> InlineDefinition { get; set; }
public RequireSettings AtHead() {
@@ -55,6 +56,11 @@ namespace Orchard.UI.Resources {
return this;
}
public RequireSettings UseCondition(string condition) {
Condition = Condition ?? condition;
return this;
}
public RequireSettings Define(Action<ResourceDefinition> resourceDefinition) {
InlineDefinition = resourceDefinition ?? InlineDefinition;
return this;
@@ -69,6 +75,7 @@ namespace Orchard.UI.Resources {
.UseCdn(CdnMode).UseCdn(other.CdnMode)
.UseDebugMode(DebugMode).UseDebugMode(other.DebugMode)
.UseCulture(Culture).UseCulture(other.Culture)
.UseCondition(Condition).UseCondition(other.Condition)
.Define(InlineDefinition).Define(other.InlineDefinition);
}
}