--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);
}
@@ -389,6 +389,74 @@ testRunner.And("I should see \"<manifest xmlns=\"http\\://schemas\\.microsoft\\.
"g\">\"");
#line 128
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);
}

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);
}
}