diff --git a/Orchard.proj b/Orchard.proj index 1ca555008..5f1ae878d 100644 --- a/Orchard.proj +++ b/Orchard.proj @@ -27,6 +27,7 @@ x64 x86 + Release $(BUILD_NUMBER) @@ -115,7 +116,7 @@ + Properties="Configuration=$(Configuration);OutputPath=$(CompileFolder)" /> + Properties="Configuration=$(Configuration);OutputPath=$(MsBuildTasksFolder)" /> @@ -273,19 +274,19 @@ diff --git a/src/Gulpfile.js b/src/Gulpfile.js index 05b62a89e..fce38f9fe 100644 --- a/src/Gulpfile.js +++ b/src/Gulpfile.js @@ -74,15 +74,15 @@ function getAssetGroups() { function resolveAssetGroupPaths(assetGroup, assetManifestPath) { assetGroup.basePath = path.dirname(assetManifestPath); assetGroup.inputPaths = assetGroup.inputs.map(function (inputPath) { - return path.join(assetGroup.basePath, inputPath); + return path.resolve(path.join(assetGroup.basePath, inputPath)); }); assetGroup.watchPaths = []; if (!!assetGroup.watch) { assetGroup.watchPaths = assetGroup.watch.map(function (watchPath) { - return path.join(assetGroup.basePath, watchPath); + return path.resolve(path.join(assetGroup.basePath, watchPath)); }); } - assetGroup.outputPath = path.join(assetGroup.basePath, assetGroup.output); + assetGroup.outputPath = path.resolve(path.join(assetGroup.basePath, assetGroup.output)); assetGroup.outputDir = path.dirname(assetGroup.outputPath); assetGroup.outputFileName = path.basename(assetGroup.output); } diff --git a/src/Orchard.Tests/ContentManagement/DynamicContentItemTests.cs b/src/Orchard.Tests/ContentManagement/DynamicContentItemTests.cs index ba90a629e..0c82d68e8 100644 --- a/src/Orchard.Tests/ContentManagement/DynamicContentItemTests.cs +++ b/src/Orchard.Tests/ContentManagement/DynamicContentItemTests.cs @@ -76,5 +76,39 @@ namespace Orchard.Tests.ContentManagement { Assert.That((object)testingPartDynamic, Is.AssignableTo>()); } + + + [Test] + public void NullCheckingCanBeDoneOnProperties() { + var contentItem = new ContentItem(); + var contentPart = new ContentPart { TypePartDefinition = new ContentTypePartDefinition(new ContentPartDefinition("FooPart"), new SettingsDictionary()) }; + var contentField = new ContentField { PartFieldDefinition = new ContentPartFieldDefinition(new ContentFieldDefinition("FooType"), "FooField", new SettingsDictionary()) }; + + dynamic item = contentItem; + dynamic part = contentPart; + + Assert.That(item.FooPart == null, Is.True); + Assert.That(item.FooPart != null, Is.False); + + contentItem.Weld(contentPart); + + Assert.That(item.FooPart == null, Is.False); + Assert.That(item.FooPart != null, Is.True); + Assert.That(item.FooPart, Is.SameAs(contentPart)); + + Assert.That(part.FooField == null, Is.True); + Assert.That(part.FooField != null, Is.False); + Assert.That(item.FooPart.FooField == null, Is.True); + Assert.That(item.FooPart.FooField != null, Is.False); + + contentPart.Weld(contentField); + + Assert.That(part.FooField == null, Is.False); + Assert.That(part.FooField != null, Is.True); + Assert.That(item.FooPart.FooField == null, Is.False); + Assert.That(item.FooPart.FooField != null, Is.True); + Assert.That(part.FooField, Is.SameAs(contentField)); + Assert.That(item.FooPart.FooField, Is.SameAs(contentField)); + } } } diff --git a/src/Orchard.Web/Core/Contents/Views/Admin/Create.cshtml b/src/Orchard.Web/Core/Contents/Views/Admin/Create.cshtml index 68c10887c..9bb4def2a 100644 --- a/src/Orchard.Web/Core/Contents/Views/Admin/Create.cshtml +++ b/src/Orchard.Web/Core/Contents/Views/Admin/Create.cshtml @@ -4,9 +4,8 @@ @{ ContentItem contentItem = Model.ContentItem; var typeDisplayName = contentItem.TypeDefinition.DisplayName ?? contentItem.ContentType.CamelFriendly(); - var pageTitle = T("New {0}", typeDisplayName); - Layout.Title = (string)pageTitle.Text; + 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" })) { diff --git a/src/Orchard.Web/Core/Contents/Views/Admin/List.cshtml b/src/Orchard.Web/Core/Contents/Views/Admin/List.cshtml index a678329b5..130ddf957 100644 --- a/src/Orchard.Web/Core/Contents/Views/Admin/List.cshtml +++ b/src/Orchard.Web/Core/Contents/Views/Admin/List.cshtml @@ -4,13 +4,13 @@ var pageTitle = T("Manage Content"); var createLinkText = T("Create New Content"); if (!string.IsNullOrWhiteSpace(typeDisplayName)) { - pageTitle = T("Manage {0} Content", typeDisplayName); - createLinkText = T("Create New {0}", typeDisplayName); + pageTitle = T("Manage {0} Content", Html.Raw(typeDisplayName)); + createLinkText = T("Create New {0}", Html.Raw(typeDisplayName)); } IEnumerable cultures = Model.Options.Cultures; - Layout.Title = pageTitle; + Layout.Title = pageTitle.Text; }
diff --git a/src/Orchard.Web/Modules/Orchard.ContentTypes/Views/Admin/Edit.cshtml b/src/Orchard.Web/Modules/Orchard.ContentTypes/Views/Admin/Edit.cshtml index 14535ea78..8de35fe22 100644 --- a/src/Orchard.Web/Modules/Orchard.ContentTypes/Views/Admin/Edit.cshtml +++ b/src/Orchard.Web/Modules/Orchard.ContentTypes/Views/Admin/Edit.cshtml @@ -2,7 +2,7 @@ @{ Style.Require("ContentTypesAdmin"); Script.Require("jQuery"); - Layout.Title = T("Edit Content Type - {0}", Model.DisplayName).ToString(); + Layout.Title = T("Edit Content Type - {0}", Html.Raw(Model.DisplayName)).Text; }
diff --git a/src/Orchard.Web/Modules/Orchard.ContentTypes/Views/Admin/EditField.cshtml b/src/Orchard.Web/Modules/Orchard.ContentTypes/Views/Admin/EditField.cshtml index 945ec905f..725e6b2cf 100644 --- a/src/Orchard.Web/Modules/Orchard.ContentTypes/Views/Admin/EditField.cshtml +++ b/src/Orchard.Web/Modules/Orchard.ContentTypes/Views/Admin/EditField.cshtml @@ -3,7 +3,7 @@ @{ Style.Require("ContentTypesAdmin"); - Layout.Title = T("Edit Field \"{0}\"", Model.Name).ToString(); + Layout.Title = T("Edit Field \"{0}\"", Html.Raw(Model.DisplayName)).ToString(); } @using (Html.BeginFormAntiForgeryPost()) { diff --git a/src/Orchard.Web/Modules/Orchard.ContentTypes/Views/DisplayTemplates/EditTypeViewModel.cshtml b/src/Orchard.Web/Modules/Orchard.ContentTypes/Views/DisplayTemplates/EditTypeViewModel.cshtml index bfe7535cc..a1d0804dc 100644 --- a/src/Orchard.Web/Modules/Orchard.ContentTypes/Views/DisplayTemplates/EditTypeViewModel.cshtml +++ b/src/Orchard.Web/Modules/Orchard.ContentTypes/Views/DisplayTemplates/EditTypeViewModel.cshtml @@ -9,7 +9,7 @@

@Model.DisplayName

@if (!string.IsNullOrWhiteSpace(stereotype)) { - @stereotype} @if (creatable) { -

@Html.ActionLink(T("Create New {0}", Model.DisplayName).Text, "Create", new {area = "Contents", id = Model.Name})

+

@Html.ActionLink(T("Create New {0}", Html.Raw(Model.DisplayName)).Text, "Create", new {area = "Contents", id = Model.Name})

}