diff --git a/Orchard.proj b/Orchard.proj index 34938468e..98581c860 100644 --- a/Orchard.proj +++ b/Orchard.proj @@ -116,11 +116,19 @@ + Properties="Configuration=$(Configuration);OutputPath=$(CompileFolder);MvcBuildViews=false" /> + Targets="Build" + Properties="Configuration=$(Configuration);MvcBuildViews=$(MvcBuildViews)" /> + + + + diff --git a/src/Orchard.Azure.Tests/Orchard.Azure.Tests.csproj b/src/Orchard.Azure.Tests/Orchard.Azure.Tests.csproj index 0ffbf455e..b888387ac 100644 --- a/src/Orchard.Azure.Tests/Orchard.Azure.Tests.csproj +++ b/src/Orchard.Azure.Tests/Orchard.Azure.Tests.csproj @@ -43,6 +43,7 @@ 4 AllRules.ruleset false + 6 pdbonly @@ -53,6 +54,7 @@ 4 AllRules.ruleset false + 6 diff --git a/src/Orchard.Core.Tests/Orchard.Core.Tests.csproj b/src/Orchard.Core.Tests/Orchard.Core.Tests.csproj index 3bfb322ed..29f657ddf 100644 --- a/src/Orchard.Core.Tests/Orchard.Core.Tests.csproj +++ b/src/Orchard.Core.Tests/Orchard.Core.Tests.csproj @@ -44,6 +44,7 @@ ..\OrchardBasicCorrectness.ruleset AnyCPU false + 6 pdbonly @@ -55,6 +56,7 @@ AllRules.ruleset AnyCPU false + 6 diff --git a/src/Orchard.Profile/Orchard.Profile.csproj b/src/Orchard.Profile/Orchard.Profile.csproj index 22aeba99a..d8a3f8d0e 100644 --- a/src/Orchard.Profile/Orchard.Profile.csproj +++ b/src/Orchard.Profile/Orchard.Profile.csproj @@ -44,6 +44,7 @@ AnyCPU ..\OrchardBasicCorrectness.ruleset false + 6 pdbonly @@ -54,6 +55,7 @@ 4 AllRules.ruleset false + 6 diff --git a/src/Orchard.Specs/Orchard.Specs.csproj b/src/Orchard.Specs/Orchard.Specs.csproj index c5cb3ef99..2e1c16a72 100644 --- a/src/Orchard.Specs/Orchard.Specs.csproj +++ b/src/Orchard.Specs/Orchard.Specs.csproj @@ -44,7 +44,7 @@ ..\OrchardBasicCorrectness.ruleset AnyCPU false - 5 + 6 pdbonly @@ -56,7 +56,7 @@ AllRules.ruleset AnyCPU false - 5 + 6 diff --git a/src/Orchard.Tests.Modules/Orchard.Tests.Modules.csproj b/src/Orchard.Tests.Modules/Orchard.Tests.Modules.csproj index 6e4fd9400..55181604a 100644 --- a/src/Orchard.Tests.Modules/Orchard.Tests.Modules.csproj +++ b/src/Orchard.Tests.Modules/Orchard.Tests.Modules.csproj @@ -44,6 +44,7 @@ ..\OrchardBasicCorrectness.ruleset AnyCPU false + 6 pdbonly @@ -55,6 +56,7 @@ AllRules.ruleset AnyCPU false + 6 diff --git a/src/Orchard.Tests/DisplayManagement/Descriptors/DefaultShapeTableManagerTests.cs b/src/Orchard.Tests/DisplayManagement/Descriptors/DefaultShapeTableManagerTests.cs index 5f2f210ba..70a847561 100644 --- a/src/Orchard.Tests/DisplayManagement/Descriptors/DefaultShapeTableManagerTests.cs +++ b/src/Orchard.Tests/DisplayManagement/Descriptors/DefaultShapeTableManagerTests.cs @@ -247,7 +247,10 @@ namespace Orchard.Tests.DisplayManagement.Descriptors { _container.Resolve().Discover = builder => builder.Describe("Hello").From(TestFeature()) - .Placement(ShapePlacementParsingStrategy.BuildPredicate(c => true, new KeyValuePair("Path", path)), new PlacementInfo { Location = "Match" }); + .Placement(ShapePlacementParsingStrategy.BuildPredicate(c => true, + new KeyValuePair("Path", path), + new[] { new PathPlacementParseMatchProvider() }), + new PlacementInfo { Location = "Match" }); var manager = _container.Resolve(); var hello = manager.GetShapeTable(null).Descriptors["Hello"]; diff --git a/src/Orchard.Tests/Orchard.Framework.Tests.csproj b/src/Orchard.Tests/Orchard.Framework.Tests.csproj index c6d108361..2e1effa07 100644 --- a/src/Orchard.Tests/Orchard.Framework.Tests.csproj +++ b/src/Orchard.Tests/Orchard.Framework.Tests.csproj @@ -44,6 +44,7 @@ ..\OrchardBasicCorrectness.ruleset AnyCPU false + 6 pdbonly @@ -55,6 +56,7 @@ AllRules.ruleset AnyCPU false + 6 diff --git a/src/Orchard.WarmupStarter/Orchard.WarmupStarter.csproj b/src/Orchard.WarmupStarter/Orchard.WarmupStarter.csproj index 8caa2c946..1d2414cf1 100644 --- a/src/Orchard.WarmupStarter/Orchard.WarmupStarter.csproj +++ b/src/Orchard.WarmupStarter/Orchard.WarmupStarter.csproj @@ -23,7 +23,7 @@ prompt 4 false - 5 + 6 false ..\OrchardBasicCorrectness.ruleset @@ -35,7 +35,7 @@ prompt 4 false - 5 + 6 diff --git a/src/Orchard.Web.Tests/Orchard.Web.Tests.csproj b/src/Orchard.Web.Tests/Orchard.Web.Tests.csproj index 4829478d3..c14af3f10 100644 --- a/src/Orchard.Web.Tests/Orchard.Web.Tests.csproj +++ b/src/Orchard.Web.Tests/Orchard.Web.Tests.csproj @@ -44,7 +44,7 @@ ..\OrchardBasicCorrectness.ruleset AnyCPU false - 5 + 6 pdbonly @@ -55,7 +55,7 @@ 4 AllRules.ruleset false - 5 + 6 diff --git a/src/Orchard.Web/Core/Containers/Drivers/ContainerWidgetPartDriver.cs b/src/Orchard.Web/Core/Containers/Drivers/ContainerWidgetPartDriver.cs index 974743aa3..fec9f18fe 100644 --- a/src/Orchard.Web/Core/Containers/Drivers/ContainerWidgetPartDriver.cs +++ b/src/Orchard.Web/Core/Containers/Drivers/ContainerWidgetPartDriver.cs @@ -32,7 +32,8 @@ namespace Orchard.Core.Containers.Drivers { IContentQuery query = _contentManager .Query(VersionOptions.Published) - .Join().Where(cr => cr.Container.Id == container.Id); + .Join().Where(cr => cr.Container.Id == container.Id) + .Join().OrderByDescending(x => x.Position); if (part.Record.ApplyFilter) query = query.Where(part.Record.FilterByProperty, part.Record.FilterByOperator, part.Record.FilterByValue); @@ -54,7 +55,7 @@ namespace Orchard.Core.Containers.Drivers { return ContentShape( "Parts_ContainerWidget_Edit", () => { - var model = new ContainerWidgetViewModel {Part = part}; + var model = new ContainerWidgetViewModel { Part = part }; var containers = _contentManager.Query(VersionOptions.Latest).List().ToArray(); if (updater != null) { @@ -67,12 +68,12 @@ namespace Orchard.Core.Containers.Drivers { } var listItems = !containers.Any() - ? new[] {new SelectListItem {Text = T("(None - create container enabled items first)").Text, Value = "0"}} + ? new[] { new SelectListItem { Text = T("(None - create container enabled items first)").Text, Value = "0" } } : containers.Select(x => new SelectListItem { - Value = Convert.ToString(x.Id), - Text = x.ContentItem.TypeDefinition.DisplayName + ": " + _contentManager.GetItemMetadata(x.ContentItem).DisplayText, - Selected = x.Id == model.Part.Record.ContainerId, - }); + Value = Convert.ToString(x.Id), + Text = x.ContentItem.TypeDefinition.DisplayName + ": " + _contentManager.GetItemMetadata(x.ContentItem).DisplayText, + Selected = x.Id == model.Part.Record.ContainerId, + }); model.AvailableContainers = new SelectList(listItems, "Value", "Text", model.Part.Record.ContainerId); diff --git a/src/Orchard.Web/Core/Navigation/Migrations.cs b/src/Orchard.Web/Core/Navigation/Migrations.cs index 0e9dfc0ff..61d4e8e7d 100644 --- a/src/Orchard.Web/Core/Navigation/Migrations.cs +++ b/src/Orchard.Web/Core/Navigation/Migrations.cs @@ -177,7 +177,7 @@ namespace Orchard.Core.Navigation { return 6; } - + public int UpdateFrom6() { ContentDefinitionManager.AlterTypeDefinition("ShapeMenuItem", cfg => cfg .WithIdentity() diff --git a/src/Orchard.Web/Core/Orchard.Core.csproj b/src/Orchard.Web/Core/Orchard.Core.csproj index 0bcbd08cd..621e73470 100644 --- a/src/Orchard.Web/Core/Orchard.Core.csproj +++ b/src/Orchard.Web/Core/Orchard.Core.csproj @@ -37,7 +37,7 @@ 4 ..\..\OrchardBasicCorrectness.ruleset false - 5 + 6 false @@ -49,7 +49,7 @@ 4 AllRules.ruleset false - 5 + 6 @@ -377,7 +377,7 @@ {2D1D92BB-4555-4CBE-8D0E-63563D6CE4C6} Orchard.Framework - False + $(MvcBuildViews) @@ -629,7 +629,7 @@ --> - + diff --git a/src/Orchard.Web/Core/Web.config b/src/Orchard.Web/Core/Web.config index a3cb5df90..e30edbf7e 100644 --- a/src/Orchard.Web/Core/Web.config +++ b/src/Orchard.Web/Core/Web.config @@ -21,6 +21,12 @@ + + + + + + diff --git a/src/Orchard.Web/Modules/Lucene/Lucene.csproj b/src/Orchard.Web/Modules/Lucene/Lucene.csproj index 04eee793f..6201d3df0 100644 --- a/src/Orchard.Web/Modules/Lucene/Lucene.csproj +++ b/src/Orchard.Web/Modules/Lucene/Lucene.csproj @@ -38,7 +38,7 @@ 4 ..\..\..\OrchardBasicCorrectness.ruleset false - 5 + 6 pdbonly @@ -48,7 +48,7 @@ prompt 4 false - 5 + 6 @@ -123,7 +123,7 @@ {2D1D92BB-4555-4CBE-8D0E-63563D6CE4C6} Orchard.Framework - false + $(MvcBuildViews) diff --git a/src/Orchard.Web/Modules/Lucene/Web.config b/src/Orchard.Web/Modules/Lucene/Web.config index 314606a77..267e5a286 100644 --- a/src/Orchard.Web/Modules/Lucene/Web.config +++ b/src/Orchard.Web/Modules/Lucene/Web.config @@ -21,6 +21,12 @@ + + + + + + @@ -30,6 +36,7 @@ + diff --git a/src/Orchard.Web/Modules/Markdown/Markdown.csproj b/src/Orchard.Web/Modules/Markdown/Markdown.csproj index 484573507..55ebcf6a0 100644 --- a/src/Orchard.Web/Modules/Markdown/Markdown.csproj +++ b/src/Orchard.Web/Modules/Markdown/Markdown.csproj @@ -37,7 +37,7 @@ 4 ..\..\..\OrchardBasicCorrectness.ruleset false - 5 + 6 pdbonly @@ -48,7 +48,7 @@ 4 AllRules.ruleset false - 5 + 6 @@ -97,12 +97,12 @@ {2D1D92BB-4555-4CBE-8D0E-63563D6CE4C6} Orchard.Framework - false + $(MvcBuildViews) {9916839C-39FC-4CEB-A5AF-89CA7E87119F} Orchard.Core - false + $(MvcBuildViews) {73a7688a-5bd3-4f7e-adfa-ce36c5a10e3b} @@ -202,7 +202,7 @@ --> - + diff --git a/src/Orchard.Web/Modules/Markdown/Web.config b/src/Orchard.Web/Modules/Markdown/Web.config index a3cb5df90..e30edbf7e 100644 --- a/src/Orchard.Web/Modules/Markdown/Web.config +++ b/src/Orchard.Web/Modules/Markdown/Web.config @@ -21,6 +21,12 @@ + + + + + + diff --git a/src/Orchard.Web/Modules/Orchard.Alias/Orchard.Alias.csproj b/src/Orchard.Web/Modules/Orchard.Alias/Orchard.Alias.csproj index 43309329a..6eeeaf4d5 100644 --- a/src/Orchard.Web/Modules/Orchard.Alias/Orchard.Alias.csproj +++ b/src/Orchard.Web/Modules/Orchard.Alias/Orchard.Alias.csproj @@ -37,7 +37,7 @@ 4 ..\..\..\OrchardBasicCorrectness.ruleset false - 5 + 6 pdbonly @@ -48,7 +48,7 @@ 4 AllRules.ruleset false - 5 + 6 @@ -118,12 +118,12 @@ {2D1D92BB-4555-4CBE-8D0E-63563D6CE4C6} Orchard.Framework - false + $(MvcBuildViews) {9916839C-39FC-4CEB-A5AF-89CA7E87119F} Orchard.Core - false + $(MvcBuildViews) @@ -176,7 +176,7 @@ --> - + diff --git a/src/Orchard.Web/Modules/Orchard.Alias/Web.config b/src/Orchard.Web/Modules/Orchard.Alias/Web.config index a3cb5df90..e30edbf7e 100644 --- a/src/Orchard.Web/Modules/Orchard.Alias/Web.config +++ b/src/Orchard.Web/Modules/Orchard.Alias/Web.config @@ -21,6 +21,12 @@ + + + + + + diff --git a/src/Orchard.Web/Modules/Orchard.AntiSpam/Drivers/SpamFilterPartDriver.cs b/src/Orchard.Web/Modules/Orchard.AntiSpam/Drivers/SpamFilterPartDriver.cs index c6cc8377d..772f515a3 100644 --- a/src/Orchard.Web/Modules/Orchard.AntiSpam/Drivers/SpamFilterPartDriver.cs +++ b/src/Orchard.Web/Modules/Orchard.AntiSpam/Drivers/SpamFilterPartDriver.cs @@ -22,10 +22,6 @@ namespace Orchard.AntiSpam.Drivers { } protected override DriverResult Editor(SpamFilterPart part, ContentManagement.IUpdateModel updater, dynamic shapeHelper) { - if (part.Settings.GetModel().DeleteSpam) { - updater.AddModelError("Spam", T("Spam detected.")); - } - return Editor(part, shapeHelper); } diff --git a/src/Orchard.Web/Modules/Orchard.AntiSpam/Orchard.AntiSpam.csproj b/src/Orchard.Web/Modules/Orchard.AntiSpam/Orchard.AntiSpam.csproj index e7e31b4b5..a8428445f 100644 --- a/src/Orchard.Web/Modules/Orchard.AntiSpam/Orchard.AntiSpam.csproj +++ b/src/Orchard.Web/Modules/Orchard.AntiSpam/Orchard.AntiSpam.csproj @@ -37,7 +37,7 @@ 4 ..\..\..\OrchardBasicCorrectness.ruleset false - 5 + 6 pdbonly @@ -48,7 +48,7 @@ 4 AllRules.ruleset false - 5 + 6 @@ -115,12 +115,12 @@ {2D1D92BB-4555-4CBE-8D0E-63563D6CE4C6} Orchard.Framework - false + $(MvcBuildViews) {9916839C-39FC-4CEB-A5AF-89CA7E87119F} Orchard.Core - false + $(MvcBuildViews) {6F759635-13D7-4E94-BCC9-80445D63F117} @@ -234,7 +234,7 @@ --> - + diff --git a/src/Orchard.Web/Modules/Orchard.AntiSpam/Web.config b/src/Orchard.Web/Modules/Orchard.AntiSpam/Web.config index a3cb5df90..e30edbf7e 100644 --- a/src/Orchard.Web/Modules/Orchard.AntiSpam/Web.config +++ b/src/Orchard.Web/Modules/Orchard.AntiSpam/Web.config @@ -21,6 +21,12 @@ + + + + + + diff --git a/src/Orchard.Web/Modules/Orchard.ArchiveLater/Orchard.ArchiveLater.csproj b/src/Orchard.Web/Modules/Orchard.ArchiveLater/Orchard.ArchiveLater.csproj index e445714ab..751d6f79c 100644 --- a/src/Orchard.Web/Modules/Orchard.ArchiveLater/Orchard.ArchiveLater.csproj +++ b/src/Orchard.Web/Modules/Orchard.ArchiveLater/Orchard.ArchiveLater.csproj @@ -38,7 +38,7 @@ 4 ..\..\..\OrchardBasicCorrectness.ruleset false - 5 + 6 pdbonly @@ -48,7 +48,7 @@ prompt 4 false - 5 + 6 @@ -109,12 +109,12 @@ {9916839C-39FC-4CEB-A5AF-89CA7E87119F} Orchard.Core - false + $(MvcBuildViews) {2D1D92BB-4555-4CBE-8D0E-63563D6CE4C6} Orchard.Framework - false + $(MvcBuildViews) diff --git a/src/Orchard.Web/Modules/Orchard.ArchiveLater/Web.config b/src/Orchard.Web/Modules/Orchard.ArchiveLater/Web.config index a3cb5df90..e30edbf7e 100644 --- a/src/Orchard.Web/Modules/Orchard.ArchiveLater/Web.config +++ b/src/Orchard.Web/Modules/Orchard.ArchiveLater/Web.config @@ -21,6 +21,12 @@ + + + + + + diff --git a/src/Orchard.Web/Modules/Orchard.AuditTrail/Orchard.AuditTrail.csproj b/src/Orchard.Web/Modules/Orchard.AuditTrail/Orchard.AuditTrail.csproj index 79bb00346..0f2914b54 100644 --- a/src/Orchard.Web/Modules/Orchard.AuditTrail/Orchard.AuditTrail.csproj +++ b/src/Orchard.Web/Modules/Orchard.AuditTrail/Orchard.AuditTrail.csproj @@ -36,7 +36,7 @@ 4 ..\..\..\OrchardBasicCorrectness.ruleset false - 5 + 6 pdbonly @@ -47,7 +47,7 @@ 4 AllRules.ruleset false - 5 + 6 @@ -196,12 +196,12 @@ {2D1D92BB-4555-4CBE-8D0E-63563D6CE4C6} Orchard.Framework - false + $(MvcBuildViews) {9916839C-39FC-4CEB-A5AF-89CA7E87119F} Orchard.Core - false + $(MvcBuildViews) {0e7646e8-fe8f-43c1-8799-d97860925ec4} @@ -386,7 +386,7 @@ --> - + diff --git a/src/Orchard.Web/Modules/Orchard.AuditTrail/Views/AuditTrailEvent-Content.SummaryAdmin.cshtml b/src/Orchard.Web/Modules/Orchard.AuditTrail/Views/AuditTrailEvent-Content.SummaryAdmin.cshtml index 0acfc563a..81ec6e3b1 100644 --- a/src/Orchard.Web/Modules/Orchard.AuditTrail/Views/AuditTrailEvent-Content.SummaryAdmin.cshtml +++ b/src/Orchard.Web/Modules/Orchard.AuditTrail/Views/AuditTrailEvent-Content.SummaryAdmin.cshtml @@ -1,11 +1,11 @@ -@using Orchard.AuditTrail.Helpers +@using Orchard.AuditTrail.Helpers @using Orchard.AuditTrail.Services.Models @using Orchard.ContentManagement @{ var descriptor = (AuditTrailEventDescriptor)Model.Descriptor; var eventData = (IDictionary) Model.EventData; var eventPastTense = descriptor.Name.Text.ToLower(); - var contentItemId = (int)Model.ContentItemId; + var contentItemId = (int?)Model.ContentItemId; var contentItem = (ContentItem) Model.ContentItem; var eventVersionNumber = eventData.Get("VersionNumber"); var isPublishedEvent = eventData.Get("Published"); @@ -18,17 +18,16 @@ var isLatest = contentItem.VersionRecord.Number == eventVersionNumber; var isRemoved = !contentItem.VersionRecord.Latest && !contentItem.VersionRecord.Published; if (isPublishedEvent || isLatest) { - @T("{0} of the {1} {2} was {3}.", Html.ActionLink(T("Version {0}", eventVersionNumber).Text, "Detail", "Content", new { area = "Orchard.AuditTrail", id = contentItemId, version = eventVersionNumber }, null), contentType.ToLower(), isRemoved ? Html.Raw("" + title + "") : Html.ItemEditLink(title, contentItemId), eventPastTense) + @T("{0} of the {1} {2} was {3}.", Html.ActionLink(T("Version {0}", eventVersionNumber).Text, "Detail", "Content", new { area = "Orchard.AuditTrail", id = contentItemId.Value, version = eventVersionNumber }, null), contentType.ToLower(), isRemoved ? Html.Raw("" + title + "") : Html.ItemEditLink(title, contentItemId.Value), eventPastTense) } else if (isRemoved) { @T("The {0} {1} was {2}.", contentType.ToLower(), title, eventPastTense) } else { - @T("The {0} {1} was {2}.", contentType.ToLower(), Html.ItemEditLink(title, contentItemId), eventPastTense) - + @T("The {0} {1} was {2}.", contentType.ToLower(), Html.ItemEditLink(title, contentItemId.Value), eventPastTense) } } else { @T("Version {0} of content item {1} was {2}.", eventVersionNumber, title, eventPastTense) } - \ No newline at end of file + diff --git a/src/Orchard.Web/Modules/Orchard.AuditTrail/Web.config b/src/Orchard.Web/Modules/Orchard.AuditTrail/Web.config index bfeea149d..c8e5ecc71 100644 --- a/src/Orchard.Web/Modules/Orchard.AuditTrail/Web.config +++ b/src/Orchard.Web/Modules/Orchard.AuditTrail/Web.config @@ -21,6 +21,12 @@ + + + + + + diff --git a/src/Orchard.Web/Modules/Orchard.Autoroute/Orchard.Autoroute.csproj b/src/Orchard.Web/Modules/Orchard.Autoroute/Orchard.Autoroute.csproj index b226595f6..9eb0c9168 100644 --- a/src/Orchard.Web/Modules/Orchard.Autoroute/Orchard.Autoroute.csproj +++ b/src/Orchard.Web/Modules/Orchard.Autoroute/Orchard.Autoroute.csproj @@ -37,7 +37,7 @@ 4 ..\..\..\OrchardBasicCorrectness.ruleset false - 5 + 6 pdbonly @@ -48,7 +48,7 @@ 4 AllRules.ruleset false - 5 + 6 @@ -111,12 +111,12 @@ {2D1D92BB-4555-4CBE-8D0E-63563D6CE4C6} Orchard.Framework - false + $(MvcBuildViews) {9916839C-39FC-4CEB-A5AF-89CA7E87119F} Orchard.Core - false + $(MvcBuildViews) {475B6C45-B27C-438B-8966-908B9D6D1077} @@ -196,7 +196,7 @@ --> - + diff --git a/src/Orchard.Web/Modules/Orchard.Autoroute/Settings/AutorouteSettingsEvents.cs b/src/Orchard.Web/Modules/Orchard.Autoroute/Settings/AutorouteSettingsEvents.cs index fa369575f..49b867b99 100644 --- a/src/Orchard.Web/Modules/Orchard.Autoroute/Settings/AutorouteSettingsEvents.cs +++ b/src/Orchard.Web/Modules/Orchard.Autoroute/Settings/AutorouteSettingsEvents.cs @@ -37,17 +37,15 @@ namespace Orchard.Autoroute.Settings { List newPatterns = new List(); // Adding a null culture for the culture neutral pattern - List cultures = new List(); + var cultures = new List(); cultures.Add(null); cultures.AddRange(settings.SiteCultures); - - int current = 0; + foreach (string culture in cultures) { // Adding all existing patterns for the culture - foreach (RoutePattern routePattern in settings.Patterns.Where(x => String.Equals(x.Culture, culture, StringComparison.OrdinalIgnoreCase))) { - newPatterns.Add(settings.Patterns[current]); - current++; - } + newPatterns.AddRange( + settings.Patterns.Where(x => String.Equals(x.Culture, culture, StringComparison.OrdinalIgnoreCase)) + ); // Adding a pattern for each culture if there is none if (!settings.Patterns.Where(x => String.Equals(x.Culture, culture, StringComparison.OrdinalIgnoreCase)).Any()) { @@ -58,7 +56,7 @@ namespace Orchard.Autoroute.Settings { newPatterns.Add(new RoutePattern { Culture = culture, Name = null, Description = null, Pattern = null }); // If the content type has no defaultPattern for autoroute, assign one - bool defaultPatternExists = false; + var defaultPatternExists = false; if (String.IsNullOrEmpty(culture)) defaultPatternExists = settings.DefaultPatterns.Any(x => String.IsNullOrEmpty(x.Culture)); else @@ -102,7 +100,7 @@ namespace Orchard.Autoroute.Settings { //TODO need to add validations client and/or server side here // If some default pattern is an empty pattern set it to the first pattern for the language - List newDefaultPatterns = new List(); + var newDefaultPatterns = new List(); foreach (var defaultPattern in settings.DefaultPatterns) { RoutePattern correspondingPattern = null; @@ -125,7 +123,7 @@ namespace Orchard.Autoroute.Settings { patterns.RemoveAll(p => String.IsNullOrWhiteSpace(p.Name) && String.IsNullOrWhiteSpace(p.Pattern) && String.IsNullOrWhiteSpace(p.Description)); // Adding a null culture for the culture neutral pattern - List cultures = new List(); + var cultures = new List(); cultures.Add(null); cultures.AddRange(settings.SiteCultures); diff --git a/src/Orchard.Web/Modules/Orchard.Autoroute/Web.config b/src/Orchard.Web/Modules/Orchard.Autoroute/Web.config index 91ff00375..1a0b35eba 100644 --- a/src/Orchard.Web/Modules/Orchard.Autoroute/Web.config +++ b/src/Orchard.Web/Modules/Orchard.Autoroute/Web.config @@ -20,6 +20,12 @@ + + + + + + diff --git a/src/Orchard.Web/Modules/Orchard.Azure.MediaServices/Orchard.Azure.MediaServices.csproj b/src/Orchard.Web/Modules/Orchard.Azure.MediaServices/Orchard.Azure.MediaServices.csproj index 95a48c47d..e4f489204 100644 --- a/src/Orchard.Web/Modules/Orchard.Azure.MediaServices/Orchard.Azure.MediaServices.csproj +++ b/src/Orchard.Web/Modules/Orchard.Azure.MediaServices/Orchard.Azure.MediaServices.csproj @@ -36,7 +36,7 @@ 4 ..\..\..\OrchardBasicCorrectness.ruleset false - 5 + 6 pdbonly @@ -47,7 +47,7 @@ 4 AllRules.ruleset false - 5 + 6 @@ -290,12 +290,12 @@ {2D1D92BB-4555-4CBE-8D0E-63563D6CE4C6} Orchard.Framework - false + $(MvcBuildViews) {9916839C-39FC-4CEB-A5AF-89CA7E87119F} Orchard.Core - false + $(MvcBuildViews) {73a7688a-5bd3-4f7e-adfa-ce36c5a10e3b} @@ -577,7 +577,7 @@ --> - + diff --git a/src/Orchard.Web/Modules/Orchard.Azure.MediaServices/Tests/Microsoft.CloudMedia.Tests/Microsoft.CloudMedia.Tests.csproj b/src/Orchard.Web/Modules/Orchard.Azure.MediaServices/Tests/Microsoft.CloudMedia.Tests/Microsoft.CloudMedia.Tests.csproj index f3c8a6ea8..11d43c195 100644 --- a/src/Orchard.Web/Modules/Orchard.Azure.MediaServices/Tests/Microsoft.CloudMedia.Tests/Microsoft.CloudMedia.Tests.csproj +++ b/src/Orchard.Web/Modules/Orchard.Azure.MediaServices/Tests/Microsoft.CloudMedia.Tests/Microsoft.CloudMedia.Tests.csproj @@ -44,7 +44,7 @@ ..\OrchardBasicCorrectness.ruleset AnyCPU false - 5 + 6 pdbonly @@ -56,7 +56,7 @@ AllRules.ruleset AnyCPU false - 5 + 6 diff --git a/src/Orchard.Web/Modules/Orchard.Azure.MediaServices/Web.config b/src/Orchard.Web/Modules/Orchard.Azure.MediaServices/Web.config index 246f2ed47..b40394cd5 100644 --- a/src/Orchard.Web/Modules/Orchard.Azure.MediaServices/Web.config +++ b/src/Orchard.Web/Modules/Orchard.Azure.MediaServices/Web.config @@ -21,6 +21,12 @@ + + + + + + diff --git a/src/Orchard.Web/Modules/Orchard.Azure/Orchard.Azure.csproj b/src/Orchard.Web/Modules/Orchard.Azure/Orchard.Azure.csproj index b6d62ebcc..7cc263529 100644 --- a/src/Orchard.Web/Modules/Orchard.Azure/Orchard.Azure.csproj +++ b/src/Orchard.Web/Modules/Orchard.Azure/Orchard.Azure.csproj @@ -36,7 +36,7 @@ 4 ..\..\..\OrchardBasicCorrectness.ruleset false - 5 + 6 pdbonly @@ -47,7 +47,7 @@ 4 AllRules.ruleset false - 5 + 6 @@ -150,7 +150,7 @@ {2D1D92BB-4555-4CBE-8D0E-63563D6CE4C6} Orchard.Framework - false + $(MvcBuildViews) @@ -187,7 +187,7 @@ --> - + diff --git a/src/Orchard.Web/Modules/Orchard.Azure/Services/FileSystems/AzureFileSystem.cs b/src/Orchard.Web/Modules/Orchard.Azure/Services/FileSystems/AzureFileSystem.cs index f10dfc9bf..57a9002f3 100644 --- a/src/Orchard.Web/Modules/Orchard.Azure/Services/FileSystems/AzureFileSystem.cs +++ b/src/Orchard.Web/Modules/Orchard.Azure/Services/FileSystems/AzureFileSystem.cs @@ -246,7 +246,8 @@ namespace Orchard.Azure.Services.FileSystems { } if (blob is CloudBlobDirectory) { - string foldername = blob.Uri.Segments.Last(); + var blobDir = (CloudBlobDirectory)blob; + string foldername = blobDir.Prefix.Substring(blobDir.Parent.Prefix.Length); string source = String.Concat(path, foldername); string destination = String.Concat(newPath, foldername); RenameFolder(source, destination); diff --git a/src/Orchard.Web/Modules/Orchard.Azure/Web.config b/src/Orchard.Web/Modules/Orchard.Azure/Web.config index 210940090..020c5ddcd 100644 --- a/src/Orchard.Web/Modules/Orchard.Azure/Web.config +++ b/src/Orchard.Web/Modules/Orchard.Azure/Web.config @@ -21,6 +21,12 @@ + + + + + + diff --git a/src/Orchard.Web/Modules/Orchard.Blogs/Orchard.Blogs.csproj b/src/Orchard.Web/Modules/Orchard.Blogs/Orchard.Blogs.csproj index a4545baca..701572462 100644 --- a/src/Orchard.Web/Modules/Orchard.Blogs/Orchard.Blogs.csproj +++ b/src/Orchard.Web/Modules/Orchard.Blogs/Orchard.Blogs.csproj @@ -37,7 +37,7 @@ 4 ..\..\..\OrchardBasicCorrectness.ruleset false - 5 + 6 pdbonly @@ -48,7 +48,7 @@ 4 AllRules.ruleset false - 5 + 6 @@ -178,12 +178,12 @@ {2D1D92BB-4555-4CBE-8D0E-63563D6CE4C6} Orchard.Framework - false + $(MvcBuildViews) {9916839C-39FC-4CEB-A5AF-89CA7E87119F} Orchard.Core - false + $(MvcBuildViews) {475b6c45-b27c-438b-8966-908b9d6d1077} diff --git a/src/Orchard.Web/Modules/Orchard.Blogs/Web.config b/src/Orchard.Web/Modules/Orchard.Blogs/Web.config index a3cb5df90..e30edbf7e 100644 --- a/src/Orchard.Web/Modules/Orchard.Blogs/Web.config +++ b/src/Orchard.Web/Modules/Orchard.Blogs/Web.config @@ -21,6 +21,12 @@ + + + + + + diff --git a/src/Orchard.Web/Modules/Orchard.Caching/Orchard.Caching.csproj b/src/Orchard.Web/Modules/Orchard.Caching/Orchard.Caching.csproj index dcc8efe1d..2024a4e06 100644 --- a/src/Orchard.Web/Modules/Orchard.Caching/Orchard.Caching.csproj +++ b/src/Orchard.Web/Modules/Orchard.Caching/Orchard.Caching.csproj @@ -36,7 +36,7 @@ 4 ..\..\..\OrchardBasicCorrectness.ruleset false - 5 + 6 pdbonly @@ -47,7 +47,7 @@ 4 AllRules.ruleset false - 5 + 6 @@ -99,7 +99,7 @@ {2D1D92BB-4555-4CBE-8D0E-63563D6CE4C6} Orchard.Framework - false + $(MvcBuildViews) @@ -136,7 +136,7 @@ --> - + diff --git a/src/Orchard.Web/Modules/Orchard.Caching/Web.config b/src/Orchard.Web/Modules/Orchard.Caching/Web.config index 314606a77..6499c3044 100644 --- a/src/Orchard.Web/Modules/Orchard.Caching/Web.config +++ b/src/Orchard.Web/Modules/Orchard.Caching/Web.config @@ -21,6 +21,12 @@ + + + + + + diff --git a/src/Orchard.Web/Modules/Orchard.CodeGeneration/CodeGenerationTemplates/ModuleCsProj.txt b/src/Orchard.Web/Modules/Orchard.CodeGeneration/CodeGenerationTemplates/ModuleCsProj.txt index e26dd842d..b92e68ccb 100644 --- a/src/Orchard.Web/Modules/Orchard.CodeGeneration/CodeGenerationTemplates/ModuleCsProj.txt +++ b/src/Orchard.Web/Modules/Orchard.CodeGeneration/CodeGenerationTemplates/ModuleCsProj.txt @@ -35,6 +35,7 @@ 4 ..\..\..\OrchardBasicCorrectness.ruleset false + 6 pdbonly @@ -45,28 +46,53 @@ 4 AllRules.ruleset false + 6 + + ..\..\..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.8\lib\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.dll + True + + + ..\..\..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll + True + - 3.5 + - - False - ..\..\..\packages\Microsoft.AspNet.Mvc.5.2.3\lib\net45\System.Web.Mvc.dll + + ..\..\..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.Helpers.dll + True + + + ..\..\..\packages\Microsoft.AspNet.Mvc.5.2.3\lib\net45\System.Web.Mvc.dll + True + + + ..\..\..\packages\Microsoft.AspNet.Razor.3.2.3\lib\net45\System.Web.Razor.dll + True + + + ..\..\..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.WebPages.dll + True + + + ..\..\..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.WebPages.Deployment.dll + True + + + ..\..\..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.WebPages.Razor.dll + True - - - - $$CompileIncludes$$ @@ -98,7 +124,7 @@ --> - + @@ -112,7 +138,7 @@ False True - http://orchard.codeplex.com + https://github.com/OrchardCMS/Orchard False diff --git a/src/Orchard.Web/Modules/Orchard.CodeGeneration/CodeGenerationTemplates/ModulePackagesConfig.txt b/src/Orchard.Web/Modules/Orchard.CodeGeneration/CodeGenerationTemplates/ModulePackagesConfig.txt new file mode 100644 index 000000000..1fe9388ba --- /dev/null +++ b/src/Orchard.Web/Modules/Orchard.CodeGeneration/CodeGenerationTemplates/ModulePackagesConfig.txt @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/src/Orchard.Web/Modules/Orchard.CodeGeneration/CodeGenerationTemplates/ModuleRootWebConfig.txt b/src/Orchard.Web/Modules/Orchard.CodeGeneration/CodeGenerationTemplates/ModuleRootWebConfig.txt index 9c722b6de..7df7824c9 100644 --- a/src/Orchard.Web/Modules/Orchard.CodeGeneration/CodeGenerationTemplates/ModuleRootWebConfig.txt +++ b/src/Orchard.Web/Modules/Orchard.CodeGeneration/CodeGenerationTemplates/ModuleRootWebConfig.txt @@ -21,14 +21,12 @@ - + + + + + + diff --git a/src/Orchard.Web/Modules/Orchard.CodeGeneration/Commands/CodeGenerationCommands.cs b/src/Orchard.Web/Modules/Orchard.CodeGeneration/Commands/CodeGenerationCommands.cs index 5f5501776..7f3523094 100644 --- a/src/Orchard.Web/Modules/Orchard.CodeGeneration/Commands/CodeGenerationCommands.cs +++ b/src/Orchard.Web/Modules/Orchard.CodeGeneration/Commands/CodeGenerationCommands.cs @@ -291,6 +291,8 @@ namespace Orchard.CodeGeneration.Commands { File.WriteAllText(modulePath + "Styles\\Styles.min.css", File.ReadAllText(_codeGenTemplatePath + "ModuleStylesMinCss.txt")); content.Add(modulePath + "Styles\\Styles.min.css"); + File.WriteAllText(modulePath + "packages.config", File.ReadAllText(_codeGenTemplatePath + "ModulePackagesConfig.txt")); + content.Add(modulePath + "packages.config"); File.WriteAllText(modulePath + "Web.config", File.ReadAllText(_codeGenTemplatePath + "ModuleRootWebConfig.txt")); content.Add(modulePath + "Web.config"); File.WriteAllText(modulePath + "Scripts\\Web.config", File.ReadAllText(_codeGenTemplatePath + "StaticFilesWebConfig.txt")); @@ -330,22 +332,22 @@ namespace Orchard.CodeGeneration.Commands { @" {2D1D92BB-4555-4CBE-8D0E-63563D6CE4C6} Orchard.Framework - false + $(MvcBuildViews) {9916839C-39FC-4CEB-A5AF-89CA7E87119F} Orchard.Core - false + $(MvcBuildViews) " : @" False ..\..\bin\Orchard.Core.dll - false + $(MvcBuildViews) False ..\..\bin\Orchard.Framework.dll - false + $(MvcBuildViews) "; } @@ -404,6 +406,9 @@ namespace Orchard.CodeGeneration.Commands { // create new csproj for the theme if (projectGuid != null) { + File.WriteAllText(themePath + "packages.config", File.ReadAllText(_codeGenTemplatePath + "ModulePackagesConfig.txt")); + createdFiles.Add(themePath + "packages.config"); + var itemGroup = CreateProjectItemGroup(themePath, createdFiles, createdFolders); string projectText = CreateCsProject(themeName, projectGuid, itemGroup, null); File.WriteAllText(themePath + "\\" + themeName + ".csproj", projectText); diff --git a/src/Orchard.Web/Modules/Orchard.CodeGeneration/Orchard.CodeGeneration.csproj b/src/Orchard.Web/Modules/Orchard.CodeGeneration/Orchard.CodeGeneration.csproj index e615f059d..109be8140 100644 --- a/src/Orchard.Web/Modules/Orchard.CodeGeneration/Orchard.CodeGeneration.csproj +++ b/src/Orchard.Web/Modules/Orchard.CodeGeneration/Orchard.CodeGeneration.csproj @@ -38,7 +38,7 @@ 4 ..\..\..\OrchardBasicCorrectness.ruleset false - 5 + 6 pdbonly @@ -48,7 +48,7 @@ prompt 4 false - 5 + 6 @@ -103,14 +103,19 @@ - + + + + + + Designer @@ -119,26 +124,14 @@ {2D1D92BB-4555-4CBE-8D0E-63563D6CE4C6} Orchard.Framework - false + $(MvcBuildViews) {9916839C-39FC-4CEB-A5AF-89CA7E87119F} Orchard.Core - false + $(MvcBuildViews) - - - - - - - - - - - - 10.0 $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) diff --git a/src/Orchard.Web/Modules/Orchard.CodeGeneration/Web.config b/src/Orchard.Web/Modules/Orchard.CodeGeneration/Web.config index 314606a77..6499c3044 100644 --- a/src/Orchard.Web/Modules/Orchard.CodeGeneration/Web.config +++ b/src/Orchard.Web/Modules/Orchard.CodeGeneration/Web.config @@ -21,6 +21,12 @@ + + + + + + diff --git a/src/Orchard.Web/Modules/Orchard.Comments/Orchard.Comments.csproj b/src/Orchard.Web/Modules/Orchard.Comments/Orchard.Comments.csproj index cc89b52cc..d9d810657 100644 --- a/src/Orchard.Web/Modules/Orchard.Comments/Orchard.Comments.csproj +++ b/src/Orchard.Web/Modules/Orchard.Comments/Orchard.Comments.csproj @@ -37,7 +37,7 @@ 4 ..\..\..\OrchardBasicCorrectness.ruleset false - 5 + 6 pdbonly @@ -48,7 +48,7 @@ 4 AllRules.ruleset false - 5 + 6 @@ -150,12 +150,12 @@ {2D1D92BB-4555-4CBE-8D0E-63563D6CE4C6} Orchard.Framework - false + $(MvcBuildViews) {9916839C-39FC-4CEB-A5AF-89CA7E87119F} Orchard.Core - false + $(MvcBuildViews) {6f759635-13d7-4e94-bcc9-80445d63f117} @@ -248,7 +248,7 @@ --> - + diff --git a/src/Orchard.Web/Modules/Orchard.Comments/Web.config b/src/Orchard.Web/Modules/Orchard.Comments/Web.config index f7746e576..d1c7e877b 100644 --- a/src/Orchard.Web/Modules/Orchard.Comments/Web.config +++ b/src/Orchard.Web/Modules/Orchard.Comments/Web.config @@ -21,6 +21,12 @@ + + + + + + diff --git a/src/Orchard.Web/Modules/Orchard.Conditions/Orchard.Conditions.csproj b/src/Orchard.Web/Modules/Orchard.Conditions/Orchard.Conditions.csproj index 5a884414e..72737d9ec 100644 --- a/src/Orchard.Web/Modules/Orchard.Conditions/Orchard.Conditions.csproj +++ b/src/Orchard.Web/Modules/Orchard.Conditions/Orchard.Conditions.csproj @@ -36,7 +36,7 @@ 4 ..\..\..\OrchardBasicCorrectness.ruleset false - 5 + 6 pdbonly @@ -47,7 +47,7 @@ 4 AllRules.ruleset false - 5 + 6 @@ -102,12 +102,12 @@ {2D1D92BB-4555-4CBE-8D0E-63563D6CE4C6} Orchard.Framework - false + $(MvcBuildViews) {9916839C-39FC-4CEB-A5AF-89CA7E87119F} Orchard.Core - false + $(MvcBuildViews) {99002b65-86f7-415e-bf4a-381aa8ab9ccc} @@ -150,7 +150,7 @@ --> - + diff --git a/src/Orchard.Web/Modules/Orchard.Conditions/Providers/UrlCondition.cs b/src/Orchard.Web/Modules/Orchard.Conditions/Providers/UrlCondition.cs index 5a7e0b9d2..e09c0d5cc 100644 --- a/src/Orchard.Web/Modules/Orchard.Conditions/Providers/UrlCondition.cs +++ b/src/Orchard.Web/Modules/Orchard.Conditions/Providers/UrlCondition.cs @@ -14,33 +14,39 @@ namespace Orchard.Conditions.Providers { } public void Evaluate(ConditionEvaluationContext evaluationContext) { - if (!String.Equals(evaluationContext.FunctionName, "url", StringComparison.OrdinalIgnoreCase)) + if (!string.Equals(evaluationContext.FunctionName, "url", StringComparison.OrdinalIgnoreCase)) return; var context = _httpContextAccessor.Current(); - var url = Convert.ToString(evaluationContext.Arguments[0]); - if (url.StartsWith("~/")) { - url = url.Substring(2); - var appPath = context.Request.ApplicationPath; - if (appPath == "/") - appPath = ""; + foreach (var argument in evaluationContext.Arguments) { + var url = Convert.ToString(argument); + if (url.StartsWith("~/")) { + url = url.Substring(2); + var appPath = context.Request.ApplicationPath; + if (appPath == "/") + appPath = ""; - if(!String.IsNullOrEmpty(_shellSettings.RequestUrlPrefix)) - appPath = String.Concat(appPath, "/", _shellSettings.RequestUrlPrefix); + if (!string.IsNullOrEmpty(_shellSettings.RequestUrlPrefix)) + appPath = string.Concat(appPath, "/", _shellSettings.RequestUrlPrefix); - url = String.Concat(appPath, "/", url); + url = string.Concat(appPath, "/", url); + } + + if (!url.Contains("?")) + url = url.TrimEnd('/'); + + var requestPath = context.Request.Path; + if (!requestPath.Contains("?")) + requestPath = requestPath.TrimEnd('/'); + + if ((url.EndsWith("*") && requestPath.StartsWith(url.TrimEnd('*'), StringComparison.OrdinalIgnoreCase)) || + string.Equals(requestPath, url, StringComparison.OrdinalIgnoreCase)) { + evaluationContext.Result = true; + return; + } } - if (!url.Contains("?")) - url = url.TrimEnd('/'); - - var requestPath = context.Request.Path; - if (!requestPath.Contains("?")) - requestPath = requestPath.TrimEnd('/'); - - evaluationContext.Result = url.EndsWith("*") - ? requestPath.StartsWith(url.TrimEnd('*'), StringComparison.OrdinalIgnoreCase) - : string.Equals(requestPath, url, StringComparison.OrdinalIgnoreCase); + evaluationContext.Result = false; } } } \ No newline at end of file diff --git a/src/Orchard.Web/Modules/Orchard.Conditions/Web.config b/src/Orchard.Web/Modules/Orchard.Conditions/Web.config index 104465f24..52e7d22a0 100644 --- a/src/Orchard.Web/Modules/Orchard.Conditions/Web.config +++ b/src/Orchard.Web/Modules/Orchard.Conditions/Web.config @@ -21,6 +21,12 @@ + + + + + + diff --git a/src/Orchard.Web/Modules/Orchard.ContentPermissions/Orchard.ContentPermissions.csproj b/src/Orchard.Web/Modules/Orchard.ContentPermissions/Orchard.ContentPermissions.csproj index 11b3c8a72..e2e06548c 100644 --- a/src/Orchard.Web/Modules/Orchard.ContentPermissions/Orchard.ContentPermissions.csproj +++ b/src/Orchard.Web/Modules/Orchard.ContentPermissions/Orchard.ContentPermissions.csproj @@ -37,7 +37,7 @@ 4 ..\..\..\OrchardBasicCorrectness.ruleset false - 5 + 6 pdbonly @@ -48,7 +48,7 @@ 4 AllRules.ruleset false - 5 + 6 @@ -109,12 +109,12 @@ {2D1D92BB-4555-4CBE-8D0E-63563D6CE4C6} Orchard.Framework - false + $(MvcBuildViews) {9916839C-39FC-4CEB-A5AF-89CA7E87119F} Orchard.Core - false + $(MvcBuildViews) {D10AD48F-407D-4DB5-A328-173EC7CB010F} @@ -182,7 +182,7 @@ --> - + diff --git a/src/Orchard.Web/Modules/Orchard.ContentPermissions/Web.config b/src/Orchard.Web/Modules/Orchard.ContentPermissions/Web.config index a3cb5df90..e30edbf7e 100644 --- a/src/Orchard.Web/Modules/Orchard.ContentPermissions/Web.config +++ b/src/Orchard.Web/Modules/Orchard.ContentPermissions/Web.config @@ -21,6 +21,12 @@ + + + + + + diff --git a/src/Orchard.Web/Modules/Orchard.ContentPicker/Orchard.ContentPicker.csproj b/src/Orchard.Web/Modules/Orchard.ContentPicker/Orchard.ContentPicker.csproj index 99610943c..24d3e3cde 100644 --- a/src/Orchard.Web/Modules/Orchard.ContentPicker/Orchard.ContentPicker.csproj +++ b/src/Orchard.Web/Modules/Orchard.ContentPicker/Orchard.ContentPicker.csproj @@ -37,7 +37,7 @@ 4 ..\..\..\OrchardBasicCorrectness.ruleset false - 5 + 6 pdbonly @@ -48,7 +48,7 @@ 4 AllRules.ruleset false - 5 + 6 @@ -179,12 +179,12 @@ {2d1d92bb-4555-4cbe-8d0e-63563d6ce4c6} Orchard.Framework - false + $(MvcBuildViews) {9916839c-39fc-4ceb-a5af-89ca7e87119f} Orchard.Core - false + $(MvcBuildViews) {fbc8b571-ed50-49d8-8d9d-64ab7454a0d6} @@ -227,7 +227,7 @@ --> - + diff --git a/src/Orchard.Web/Modules/Orchard.ContentPicker/Web.config b/src/Orchard.Web/Modules/Orchard.ContentPicker/Web.config index a3cb5df90..e30edbf7e 100644 --- a/src/Orchard.Web/Modules/Orchard.ContentPicker/Web.config +++ b/src/Orchard.Web/Modules/Orchard.ContentPicker/Web.config @@ -21,6 +21,12 @@ + + + + + + diff --git a/src/Orchard.Web/Modules/Orchard.ContentTypes/Orchard.ContentTypes.csproj b/src/Orchard.Web/Modules/Orchard.ContentTypes/Orchard.ContentTypes.csproj index 54187253b..5e186107b 100644 --- a/src/Orchard.Web/Modules/Orchard.ContentTypes/Orchard.ContentTypes.csproj +++ b/src/Orchard.Web/Modules/Orchard.ContentTypes/Orchard.ContentTypes.csproj @@ -38,7 +38,7 @@ 4 ..\..\..\OrchardBasicCorrectness.ruleset false - 5 + 6 pdbonly @@ -48,7 +48,7 @@ prompt 4 false - 5 + 6 @@ -183,12 +183,12 @@ {2D1D92BB-4555-4CBE-8D0E-63563D6CE4C6} Orchard.Framework - false + $(MvcBuildViews) {9916839C-39FC-4CEB-A5AF-89CA7E87119F} Orchard.Core - false + $(MvcBuildViews) {CDE24A24-01D3-403C-84B9-37722E18DFB7} diff --git a/src/Orchard.Web/Modules/Orchard.ContentTypes/ViewModels/EditPartFieldViewModel.cs b/src/Orchard.Web/Modules/Orchard.ContentTypes/ViewModels/EditPartFieldViewModel.cs index e57cba1cf..18707f830 100644 --- a/src/Orchard.Web/Modules/Orchard.ContentTypes/ViewModels/EditPartFieldViewModel.cs +++ b/src/Orchard.Web/Modules/Orchard.ContentTypes/ViewModels/EditPartFieldViewModel.cs @@ -19,7 +19,7 @@ namespace Orchard.ContentTypes.ViewModels { } public int Index { get; set; } - public string Prefix { get { return "Fields[" + Index + "]"; } } + public string Prefix { get { return "Fields[" + Name + "]"; } } public EditPartViewModel Part { get; set; } public string Name { get; set; } @@ -29,4 +29,4 @@ namespace Orchard.ContentTypes.ViewModels { public SettingsDictionary Settings { get; set; } public ContentPartFieldDefinition _Definition { get; private set; } } -} \ No newline at end of file +} diff --git a/src/Orchard.Web/Modules/Orchard.ContentTypes/ViewModels/EditTypePartViewModel.cs b/src/Orchard.Web/Modules/Orchard.ContentTypes/ViewModels/EditTypePartViewModel.cs index 324dce6bd..4d21f83fe 100644 --- a/src/Orchard.Web/Modules/Orchard.ContentTypes/ViewModels/EditTypePartViewModel.cs +++ b/src/Orchard.Web/Modules/Orchard.ContentTypes/ViewModels/EditTypePartViewModel.cs @@ -17,7 +17,7 @@ namespace Orchard.ContentTypes.ViewModels { } public int Index { get; set; } - public string Prefix { get { return "Parts[" + Index + "]"; } } + public string Prefix { get { return "Parts[" + PartDefinition.Name + "]"; } } public EditPartViewModel PartDefinition { get; set; } public SettingsDictionary PartSettings { get; set; } public SettingsDictionary Settings { get; set; } @@ -29,4 +29,4 @@ namespace Orchard.ContentTypes.ViewModels { get { return PartSettings.ContainsKey("ContentPartSettings.Description") ? PartSettings["ContentPartSettings.Description"] : null; } } } -} \ No newline at end of file +} diff --git a/src/Orchard.Web/Modules/Orchard.ContentTypes/Web.config b/src/Orchard.Web/Modules/Orchard.ContentTypes/Web.config index a3cb5df90..e30edbf7e 100644 --- a/src/Orchard.Web/Modules/Orchard.ContentTypes/Web.config +++ b/src/Orchard.Web/Modules/Orchard.ContentTypes/Web.config @@ -21,6 +21,12 @@ + + + + + + diff --git a/src/Orchard.Web/Modules/Orchard.CustomForms/Orchard.CustomForms.csproj b/src/Orchard.Web/Modules/Orchard.CustomForms/Orchard.CustomForms.csproj index 9d56e086a..df336a67d 100644 --- a/src/Orchard.Web/Modules/Orchard.CustomForms/Orchard.CustomForms.csproj +++ b/src/Orchard.Web/Modules/Orchard.CustomForms/Orchard.CustomForms.csproj @@ -37,7 +37,7 @@ 4 ..\..\..\OrchardBasicCorrectness.ruleset false - 5 + 6 pdbonly @@ -48,7 +48,7 @@ 4 AllRules.ruleset false - 5 + 6 @@ -113,12 +113,12 @@ {2D1D92BB-4555-4CBE-8D0E-63563D6CE4C6} Orchard.Framework - false + $(MvcBuildViews) {9916839C-39FC-4CEB-A5AF-89CA7E87119F} Orchard.Core - false + $(MvcBuildViews) {642a49d7-8752-4177-80d6-bfbbcfad3de0} @@ -205,7 +205,7 @@ --> - + diff --git a/src/Orchard.Web/Modules/Orchard.CustomForms/Web.config b/src/Orchard.Web/Modules/Orchard.CustomForms/Web.config index a3cb5df90..e30edbf7e 100644 --- a/src/Orchard.Web/Modules/Orchard.CustomForms/Web.config +++ b/src/Orchard.Web/Modules/Orchard.CustomForms/Web.config @@ -21,6 +21,12 @@ + + + + + + diff --git a/src/Orchard.Web/Modules/Orchard.Dashboards/Orchard.Dashboards.csproj b/src/Orchard.Web/Modules/Orchard.Dashboards/Orchard.Dashboards.csproj index 94ee0e873..ce0b033ae 100644 --- a/src/Orchard.Web/Modules/Orchard.Dashboards/Orchard.Dashboards.csproj +++ b/src/Orchard.Web/Modules/Orchard.Dashboards/Orchard.Dashboards.csproj @@ -36,7 +36,7 @@ 4 AllRules.ruleset false - 5 + 6 pdbonly @@ -47,7 +47,7 @@ 4 AllRules.ruleset false - 5 + 6 @@ -95,8 +95,6 @@ - - @@ -118,17 +116,17 @@ {2D1D92BB-4555-4CBE-8D0E-63563D6CE4C6} Orchard.Framework - false + $(MvcBuildViews) {9916839C-39FC-4CEB-A5AF-89CA7E87119F} Orchard.Core - false + $(MvcBuildViews) {6bd8b2fa-f2e3-4ac8-a4c3-2925a653889a} Orchard.Layouts - False + $(MvcBuildViews) @@ -174,7 +172,7 @@ --> - + diff --git a/src/Orchard.Web/Modules/Orchard.Dashboards/Styles/bootstrap.css b/src/Orchard.Web/Modules/Orchard.Dashboards/Styles/bootstrap.css deleted file mode 100644 index 9d77ed40d..000000000 --- a/src/Orchard.Web/Modules/Orchard.Dashboards/Styles/bootstrap.css +++ /dev/null @@ -1,2199 +0,0 @@ -/*! - * Bootstrap v3.3.4 (http://getbootstrap.com) - * Copyright 2011-2015 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - */ - -/*! - * Generated using the Bootstrap Customizer (http://getbootstrap.com/customize/?id=6737c6372ebd005d9906) - * Config saved to config.json and https://gist.github.com/6737c6372ebd005d9906 - */ -/*! normalize.css v3.0.2 | MIT License | git.io/normalize */ -html { - font-family: sans-serif; - -ms-text-size-adjust: 100%; - -webkit-text-size-adjust: 100%; -} -body { - margin: 0; -} -article, -aside, -details, -figcaption, -figure, -footer, -header, -hgroup, -main, -menu, -nav, -section, -summary { - display: block; -} -audio, -canvas, -progress, -video { - display: inline-block; - vertical-align: baseline; -} -audio:not([controls]) { - display: none; - height: 0; -} -[hidden], -template { - display: none; -} -a { - background-color: transparent; -} -a:active, -a:hover { - outline: 0; -} -abbr[title] { - border-bottom: 1px dotted; -} -b, -strong { - font-weight: bold; -} -dfn { - font-style: italic; -} -h1 { - font-size: 2em; - margin: 0.67em 0; -} -mark { - background: #ff0; - color: #000; -} -small { - font-size: 80%; -} -sub, -sup { - font-size: 75%; - line-height: 0; - position: relative; - vertical-align: baseline; -} -sup { - top: -0.5em; -} -sub { - bottom: -0.25em; -} -img { - border: 0; -} -svg:not(:root) { - overflow: hidden; -} -figure { - margin: 1em 40px; -} -hr { - -moz-box-sizing: content-box; - -webkit-box-sizing: content-box; - box-sizing: content-box; - height: 0; -} -pre { - overflow: auto; -} -code, -kbd, -pre, -samp { - font-family: monospace, monospace; - font-size: 1em; -} -button, -input, -optgroup, -select, -textarea { - color: inherit; - font: inherit; - margin: 0; -} -button { - overflow: visible; -} -button, -select { - text-transform: none; -} -button, -html input[type="button"], -input[type="reset"], -input[type="submit"] { - -webkit-appearance: button; - cursor: pointer; -} -button[disabled], -html input[disabled] { - cursor: default; -} -button::-moz-focus-inner, -input::-moz-focus-inner { - border: 0; - padding: 0; -} -input { - line-height: normal; -} -input[type="checkbox"], -input[type="radio"] { - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; - padding: 0; -} -input[type="number"]::-webkit-inner-spin-button, -input[type="number"]::-webkit-outer-spin-button { - height: auto; -} -input[type="search"] { - -webkit-appearance: textfield; - -moz-box-sizing: content-box; - -webkit-box-sizing: content-box; - box-sizing: content-box; -} -input[type="search"]::-webkit-search-cancel-button, -input[type="search"]::-webkit-search-decoration { - -webkit-appearance: none; -} -fieldset { - border: 1px solid #c0c0c0; - margin: 0 2px; - padding: 0.35em 0.625em 0.75em; -} -legend { - border: 0; - padding: 0; -} -textarea { - overflow: auto; -} -optgroup { - font-weight: bold; -} -table { - border-collapse: collapse; - border-spacing: 0; -} -td, -th { - padding: 0; -} -* { - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; -} -*:before, -*:after { - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; -} -html { - font-size: 10px; - -webkit-tap-highlight-color: rgba(0, 0, 0, 0); -} -body { - font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; - font-size: 14px; - line-height: 1.42857143; - color: #333333; - background-color: #ffffff; -} -input, -button, -select, -textarea { - font-family: inherit; - font-size: inherit; - line-height: inherit; -} -a { - color: #337ab7; - text-decoration: none; -} -a:hover, -a:focus { - color: #23527c; - text-decoration: underline; -} -a:focus { - outline: thin dotted; - outline: 5px auto -webkit-focus-ring-color; - outline-offset: -2px; -} -figure { - margin: 0; -} -img { - vertical-align: middle; -} -.img-responsive { - display: block; - max-width: 100%; - height: auto; -} -.img-rounded { - border-radius: 6px; -} -.img-thumbnail { - padding: 4px; - line-height: 1.42857143; - background-color: #ffffff; - border: 1px solid #dddddd; - border-radius: 4px; - -webkit-transition: all 0.2s ease-in-out; - -o-transition: all 0.2s ease-in-out; - transition: all 0.2s ease-in-out; - display: inline-block; - max-width: 100%; - height: auto; -} -.img-circle { - border-radius: 50%; -} -hr { - margin-top: 20px; - margin-bottom: 20px; - border: 0; - border-top: 1px solid #eeeeee; -} -.sr-only { - position: absolute; - width: 1px; - height: 1px; - margin: -1px; - padding: 0; - overflow: hidden; - clip: rect(0, 0, 0, 0); - border: 0; -} -.sr-only-focusable:active, -.sr-only-focusable:focus { - position: static; - width: auto; - height: auto; - margin: 0; - overflow: visible; - clip: auto; -} -[role="button"] { - cursor: pointer; -} -h1, -h2, -h3, -h4, -h5, -h6, -.h1, -.h2, -.h3, -.h4, -.h5, -.h6 { - font-family: inherit; - font-weight: 500; - line-height: 1.1; - color: inherit; -} -h1 small, -h2 small, -h3 small, -h4 small, -h5 small, -h6 small, -.h1 small, -.h2 small, -.h3 small, -.h4 small, -.h5 small, -.h6 small, -h1 .small, -h2 .small, -h3 .small, -h4 .small, -h5 .small, -h6 .small, -.h1 .small, -.h2 .small, -.h3 .small, -.h4 .small, -.h5 .small, -.h6 .small { - font-weight: normal; - line-height: 1; - color: #777777; -} -h1, -.h1, -h2, -.h2, -h3, -.h3 { - margin-top: 20px; - margin-bottom: 10px; -} -h1 small, -.h1 small, -h2 small, -.h2 small, -h3 small, -.h3 small, -h1 .small, -.h1 .small, -h2 .small, -.h2 .small, -h3 .small, -.h3 .small { - font-size: 65%; -} -h4, -.h4, -h5, -.h5, -h6, -.h6 { - margin-top: 10px; - margin-bottom: 10px; -} -h4 small, -.h4 small, -h5 small, -.h5 small, -h6 small, -.h6 small, -h4 .small, -.h4 .small, -h5 .small, -.h5 .small, -h6 .small, -.h6 .small { - font-size: 75%; -} -h1, -.h1 { - font-size: 36px; -} -h2, -.h2 { - font-size: 30px; -} -h3, -.h3 { - font-size: 24px; -} -h4, -.h4 { - font-size: 18px; -} -h5, -.h5 { - font-size: 14px; -} -h6, -.h6 { - font-size: 12px; -} -p { - margin: 0 0 10px; -} -.lead { - margin-bottom: 20px; - font-size: 16px; - font-weight: 300; - line-height: 1.4; -} -@media (min-width: 768px) { - .lead { - font-size: 21px; - } -} -small, -.small { - font-size: 85%; -} -mark, -.mark { - background-color: #fcf8e3; - padding: .2em; -} -.text-left { - text-align: left; -} -.text-right { - text-align: right; -} -.text-center { - text-align: center; -} -.text-justify { - text-align: justify; -} -.text-nowrap { - white-space: nowrap; -} -.text-lowercase { - text-transform: lowercase; -} -.text-uppercase { - text-transform: uppercase; -} -.text-capitalize { - text-transform: capitalize; -} -.text-muted { - color: #777777; -} -.text-primary { - color: #337ab7; -} -a.text-primary:hover { - color: #286090; -} -.text-success { - color: #3c763d; -} -a.text-success:hover { - color: #2b542c; -} -.text-info { - color: #31708f; -} -a.text-info:hover { - color: #245269; -} -.text-warning { - color: #8a6d3b; -} -a.text-warning:hover { - color: #66512c; -} -.text-danger { - color: #a94442; -} -a.text-danger:hover { - color: #843534; -} -.bg-primary { - color: #fff; - background-color: #337ab7; -} -a.bg-primary:hover { - background-color: #286090; -} -.bg-success { - background-color: #dff0d8; -} -a.bg-success:hover { - background-color: #c1e2b3; -} -.bg-info { - background-color: #d9edf7; -} -a.bg-info:hover { - background-color: #afd9ee; -} -.bg-warning { - background-color: #fcf8e3; -} -a.bg-warning:hover { - background-color: #f7ecb5; -} -.bg-danger { - background-color: #f2dede; -} -a.bg-danger:hover { - background-color: #e4b9b9; -} -.page-header { - padding-bottom: 9px; - margin: 40px 0 20px; - border-bottom: 1px solid #eeeeee; -} -ul, -ol { - margin-top: 0; - margin-bottom: 10px; -} -ul ul, -ol ul, -ul ol, -ol ol { - margin-bottom: 0; -} -.list-unstyled { - padding-left: 0; - list-style: none; -} -.list-inline { - padding-left: 0; - list-style: none; - margin-left: -5px; -} -.list-inline > li { - display: inline-block; - padding-left: 5px; - padding-right: 5px; -} -dl { - margin-top: 0; - margin-bottom: 20px; -} -dt, -dd { - line-height: 1.42857143; -} -dt { - font-weight: bold; -} -dd { - margin-left: 0; -} -@media (min-width: 768px) { - .dl-horizontal dt { - float: left; - width: 160px; - clear: left; - text-align: right; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; - } - .dl-horizontal dd { - margin-left: 180px; - } -} -abbr[title], -abbr[data-original-title] { - cursor: help; - border-bottom: 1px dotted #777777; -} -.initialism { - font-size: 90%; - text-transform: uppercase; -} -blockquote { - padding: 10px 20px; - margin: 0 0 20px; - font-size: 17.5px; - border-left: 5px solid #eeeeee; -} -blockquote p:last-child, -blockquote ul:last-child, -blockquote ol:last-child { - margin-bottom: 0; -} -blockquote footer, -blockquote small, -blockquote .small { - display: block; - font-size: 80%; - line-height: 1.42857143; - color: #777777; -} -blockquote footer:before, -blockquote small:before, -blockquote .small:before { - content: '\2014 \00A0'; -} -.blockquote-reverse, -blockquote.pull-right { - padding-right: 15px; - padding-left: 0; - border-right: 5px solid #eeeeee; - border-left: 0; - text-align: right; -} -.blockquote-reverse footer:before, -blockquote.pull-right footer:before, -.blockquote-reverse small:before, -blockquote.pull-right small:before, -.blockquote-reverse .small:before, -blockquote.pull-right .small:before { - content: ''; -} -.blockquote-reverse footer:after, -blockquote.pull-right footer:after, -.blockquote-reverse small:after, -blockquote.pull-right small:after, -.blockquote-reverse .small:after, -blockquote.pull-right .small:after { - content: '\00A0 \2014'; -} -address { - margin-bottom: 20px; - font-style: normal; - line-height: 1.42857143; -} -.container { - margin-right: auto; - margin-left: auto; - padding-left: 15px; - padding-right: 15px; -} -@media (min-width: 768px) { - .container { - width: 750px; - } -} -@media (min-width: 992px) { - .container { - width: 970px; - } -} -@media (min-width: 1200px) { - .container { - width: 1170px; - } -} -.container-fluid { - margin-right: auto; - margin-left: auto; - padding-left: 15px; - padding-right: 15px; -} -.row { - margin-left: -15px; - margin-right: -15px; -} -.col-xs-1, .col-sm-1, .col-md-1, .col-lg-1, .col-xs-2, .col-sm-2, .col-md-2, .col-lg-2, .col-xs-3, .col-sm-3, .col-md-3, .col-lg-3, .col-xs-4, .col-sm-4, .col-md-4, .col-lg-4, .col-xs-5, .col-sm-5, .col-md-5, .col-lg-5, .col-xs-6, .col-sm-6, .col-md-6, .col-lg-6, .col-xs-7, .col-sm-7, .col-md-7, .col-lg-7, .col-xs-8, .col-sm-8, .col-md-8, .col-lg-8, .col-xs-9, .col-sm-9, .col-md-9, .col-lg-9, .col-xs-10, .col-sm-10, .col-md-10, .col-lg-10, .col-xs-11, .col-sm-11, .col-md-11, .col-lg-11, .col-xs-12, .col-sm-12, .col-md-12, .col-lg-12 { - position: relative; - min-height: 1px; - padding-left: 15px; - padding-right: 15px; -} -.col-xs-1, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6, .col-xs-7, .col-xs-8, .col-xs-9, .col-xs-10, .col-xs-11, .col-xs-12 { - float: left; -} -.col-xs-12 { - width: 100%; -} -.col-xs-11 { - width: 91.66666667%; -} -.col-xs-10 { - width: 83.33333333%; -} -.col-xs-9 { - width: 75%; -} -.col-xs-8 { - width: 66.66666667%; -} -.col-xs-7 { - width: 58.33333333%; -} -.col-xs-6 { - width: 50%; -} -.col-xs-5 { - width: 41.66666667%; -} -.col-xs-4 { - width: 33.33333333%; -} -.col-xs-3 { - width: 25%; -} -.col-xs-2 { - width: 16.66666667%; -} -.col-xs-1 { - width: 8.33333333%; -} -.col-xs-pull-12 { - right: 100%; -} -.col-xs-pull-11 { - right: 91.66666667%; -} -.col-xs-pull-10 { - right: 83.33333333%; -} -.col-xs-pull-9 { - right: 75%; -} -.col-xs-pull-8 { - right: 66.66666667%; -} -.col-xs-pull-7 { - right: 58.33333333%; -} -.col-xs-pull-6 { - right: 50%; -} -.col-xs-pull-5 { - right: 41.66666667%; -} -.col-xs-pull-4 { - right: 33.33333333%; -} -.col-xs-pull-3 { - right: 25%; -} -.col-xs-pull-2 { - right: 16.66666667%; -} -.col-xs-pull-1 { - right: 8.33333333%; -} -.col-xs-pull-0 { - right: auto; -} -.col-xs-push-12 { - left: 100%; -} -.col-xs-push-11 { - left: 91.66666667%; -} -.col-xs-push-10 { - left: 83.33333333%; -} -.col-xs-push-9 { - left: 75%; -} -.col-xs-push-8 { - left: 66.66666667%; -} -.col-xs-push-7 { - left: 58.33333333%; -} -.col-xs-push-6 { - left: 50%; -} -.col-xs-push-5 { - left: 41.66666667%; -} -.col-xs-push-4 { - left: 33.33333333%; -} -.col-xs-push-3 { - left: 25%; -} -.col-xs-push-2 { - left: 16.66666667%; -} -.col-xs-push-1 { - left: 8.33333333%; -} -.col-xs-push-0 { - left: auto; -} -.col-xs-offset-12 { - margin-left: 100%; -} -.col-xs-offset-11 { - margin-left: 91.66666667%; -} -.col-xs-offset-10 { - margin-left: 83.33333333%; -} -.col-xs-offset-9 { - margin-left: 75%; -} -.col-xs-offset-8 { - margin-left: 66.66666667%; -} -.col-xs-offset-7 { - margin-left: 58.33333333%; -} -.col-xs-offset-6 { - margin-left: 50%; -} -.col-xs-offset-5 { - margin-left: 41.66666667%; -} -.col-xs-offset-4 { - margin-left: 33.33333333%; -} -.col-xs-offset-3 { - margin-left: 25%; -} -.col-xs-offset-2 { - margin-left: 16.66666667%; -} -.col-xs-offset-1 { - margin-left: 8.33333333%; -} -.col-xs-offset-0 { - margin-left: 0%; -} -@media (min-width: 768px) { - .col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12 { - float: left; - } - .col-sm-12 { - width: 100%; - } - .col-sm-11 { - width: 91.66666667%; - } - .col-sm-10 { - width: 83.33333333%; - } - .col-sm-9 { - width: 75%; - } - .col-sm-8 { - width: 66.66666667%; - } - .col-sm-7 { - width: 58.33333333%; - } - .col-sm-6 { - width: 50%; - } - .col-sm-5 { - width: 41.66666667%; - } - .col-sm-4 { - width: 33.33333333%; - } - .col-sm-3 { - width: 25%; - } - .col-sm-2 { - width: 16.66666667%; - } - .col-sm-1 { - width: 8.33333333%; - } - .col-sm-pull-12 { - right: 100%; - } - .col-sm-pull-11 { - right: 91.66666667%; - } - .col-sm-pull-10 { - right: 83.33333333%; - } - .col-sm-pull-9 { - right: 75%; - } - .col-sm-pull-8 { - right: 66.66666667%; - } - .col-sm-pull-7 { - right: 58.33333333%; - } - .col-sm-pull-6 { - right: 50%; - } - .col-sm-pull-5 { - right: 41.66666667%; - } - .col-sm-pull-4 { - right: 33.33333333%; - } - .col-sm-pull-3 { - right: 25%; - } - .col-sm-pull-2 { - right: 16.66666667%; - } - .col-sm-pull-1 { - right: 8.33333333%; - } - .col-sm-pull-0 { - right: auto; - } - .col-sm-push-12 { - left: 100%; - } - .col-sm-push-11 { - left: 91.66666667%; - } - .col-sm-push-10 { - left: 83.33333333%; - } - .col-sm-push-9 { - left: 75%; - } - .col-sm-push-8 { - left: 66.66666667%; - } - .col-sm-push-7 { - left: 58.33333333%; - } - .col-sm-push-6 { - left: 50%; - } - .col-sm-push-5 { - left: 41.66666667%; - } - .col-sm-push-4 { - left: 33.33333333%; - } - .col-sm-push-3 { - left: 25%; - } - .col-sm-push-2 { - left: 16.66666667%; - } - .col-sm-push-1 { - left: 8.33333333%; - } - .col-sm-push-0 { - left: auto; - } - .col-sm-offset-12 { - margin-left: 100%; - } - .col-sm-offset-11 { - margin-left: 91.66666667%; - } - .col-sm-offset-10 { - margin-left: 83.33333333%; - } - .col-sm-offset-9 { - margin-left: 75%; - } - .col-sm-offset-8 { - margin-left: 66.66666667%; - } - .col-sm-offset-7 { - margin-left: 58.33333333%; - } - .col-sm-offset-6 { - margin-left: 50%; - } - .col-sm-offset-5 { - margin-left: 41.66666667%; - } - .col-sm-offset-4 { - margin-left: 33.33333333%; - } - .col-sm-offset-3 { - margin-left: 25%; - } - .col-sm-offset-2 { - margin-left: 16.66666667%; - } - .col-sm-offset-1 { - margin-left: 8.33333333%; - } - .col-sm-offset-0 { - margin-left: 0%; - } -} -@media (min-width: 992px) { - .col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12 { - float: left; - } - .col-md-12 { - width: 100%; - } - .col-md-11 { - width: 91.66666667%; - } - .col-md-10 { - width: 83.33333333%; - } - .col-md-9 { - width: 75%; - } - .col-md-8 { - width: 66.66666667%; - } - .col-md-7 { - width: 58.33333333%; - } - .col-md-6 { - width: 50%; - } - .col-md-5 { - width: 41.66666667%; - } - .col-md-4 { - width: 33.33333333%; - } - .col-md-3 { - width: 25%; - } - .col-md-2 { - width: 16.66666667%; - } - .col-md-1 { - width: 8.33333333%; - } - .col-md-pull-12 { - right: 100%; - } - .col-md-pull-11 { - right: 91.66666667%; - } - .col-md-pull-10 { - right: 83.33333333%; - } - .col-md-pull-9 { - right: 75%; - } - .col-md-pull-8 { - right: 66.66666667%; - } - .col-md-pull-7 { - right: 58.33333333%; - } - .col-md-pull-6 { - right: 50%; - } - .col-md-pull-5 { - right: 41.66666667%; - } - .col-md-pull-4 { - right: 33.33333333%; - } - .col-md-pull-3 { - right: 25%; - } - .col-md-pull-2 { - right: 16.66666667%; - } - .col-md-pull-1 { - right: 8.33333333%; - } - .col-md-pull-0 { - right: auto; - } - .col-md-push-12 { - left: 100%; - } - .col-md-push-11 { - left: 91.66666667%; - } - .col-md-push-10 { - left: 83.33333333%; - } - .col-md-push-9 { - left: 75%; - } - .col-md-push-8 { - left: 66.66666667%; - } - .col-md-push-7 { - left: 58.33333333%; - } - .col-md-push-6 { - left: 50%; - } - .col-md-push-5 { - left: 41.66666667%; - } - .col-md-push-4 { - left: 33.33333333%; - } - .col-md-push-3 { - left: 25%; - } - .col-md-push-2 { - left: 16.66666667%; - } - .col-md-push-1 { - left: 8.33333333%; - } - .col-md-push-0 { - left: auto; - } - .col-md-offset-12 { - margin-left: 100%; - } - .col-md-offset-11 { - margin-left: 91.66666667%; - } - .col-md-offset-10 { - margin-left: 83.33333333%; - } - .col-md-offset-9 { - margin-left: 75%; - } - .col-md-offset-8 { - margin-left: 66.66666667%; - } - .col-md-offset-7 { - margin-left: 58.33333333%; - } - .col-md-offset-6 { - margin-left: 50%; - } - .col-md-offset-5 { - margin-left: 41.66666667%; - } - .col-md-offset-4 { - margin-left: 33.33333333%; - } - .col-md-offset-3 { - margin-left: 25%; - } - .col-md-offset-2 { - margin-left: 16.66666667%; - } - .col-md-offset-1 { - margin-left: 8.33333333%; - } - .col-md-offset-0 { - margin-left: 0%; - } -} -@media (min-width: 1200px) { - .col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12 { - float: left; - } - .col-lg-12 { - width: 100%; - } - .col-lg-11 { - width: 91.66666667%; - } - .col-lg-10 { - width: 83.33333333%; - } - .col-lg-9 { - width: 75%; - } - .col-lg-8 { - width: 66.66666667%; - } - .col-lg-7 { - width: 58.33333333%; - } - .col-lg-6 { - width: 50%; - } - .col-lg-5 { - width: 41.66666667%; - } - .col-lg-4 { - width: 33.33333333%; - } - .col-lg-3 { - width: 25%; - } - .col-lg-2 { - width: 16.66666667%; - } - .col-lg-1 { - width: 8.33333333%; - } - .col-lg-pull-12 { - right: 100%; - } - .col-lg-pull-11 { - right: 91.66666667%; - } - .col-lg-pull-10 { - right: 83.33333333%; - } - .col-lg-pull-9 { - right: 75%; - } - .col-lg-pull-8 { - right: 66.66666667%; - } - .col-lg-pull-7 { - right: 58.33333333%; - } - .col-lg-pull-6 { - right: 50%; - } - .col-lg-pull-5 { - right: 41.66666667%; - } - .col-lg-pull-4 { - right: 33.33333333%; - } - .col-lg-pull-3 { - right: 25%; - } - .col-lg-pull-2 { - right: 16.66666667%; - } - .col-lg-pull-1 { - right: 8.33333333%; - } - .col-lg-pull-0 { - right: auto; - } - .col-lg-push-12 { - left: 100%; - } - .col-lg-push-11 { - left: 91.66666667%; - } - .col-lg-push-10 { - left: 83.33333333%; - } - .col-lg-push-9 { - left: 75%; - } - .col-lg-push-8 { - left: 66.66666667%; - } - .col-lg-push-7 { - left: 58.33333333%; - } - .col-lg-push-6 { - left: 50%; - } - .col-lg-push-5 { - left: 41.66666667%; - } - .col-lg-push-4 { - left: 33.33333333%; - } - .col-lg-push-3 { - left: 25%; - } - .col-lg-push-2 { - left: 16.66666667%; - } - .col-lg-push-1 { - left: 8.33333333%; - } - .col-lg-push-0 { - left: auto; - } - .col-lg-offset-12 { - margin-left: 100%; - } - .col-lg-offset-11 { - margin-left: 91.66666667%; - } - .col-lg-offset-10 { - margin-left: 83.33333333%; - } - .col-lg-offset-9 { - margin-left: 75%; - } - .col-lg-offset-8 { - margin-left: 66.66666667%; - } - .col-lg-offset-7 { - margin-left: 58.33333333%; - } - .col-lg-offset-6 { - margin-left: 50%; - } - .col-lg-offset-5 { - margin-left: 41.66666667%; - } - .col-lg-offset-4 { - margin-left: 33.33333333%; - } - .col-lg-offset-3 { - margin-left: 25%; - } - .col-lg-offset-2 { - margin-left: 16.66666667%; - } - .col-lg-offset-1 { - margin-left: 8.33333333%; - } - .col-lg-offset-0 { - margin-left: 0%; - } -} -table { - background-color: transparent; -} -caption { - padding-top: 8px; - padding-bottom: 8px; - color: #777777; - text-align: left; -} -th { - text-align: left; -} -.table { - width: 100%; - max-width: 100%; - margin-bottom: 20px; -} -.table > thead > tr > th, -.table > tbody > tr > th, -.table > tfoot > tr > th, -.table > thead > tr > td, -.table > tbody > tr > td, -.table > tfoot > tr > td { - padding: 8px; - line-height: 1.42857143; - vertical-align: top; - border-top: 1px solid #dddddd; -} -.table > thead > tr > th { - vertical-align: bottom; - border-bottom: 2px solid #dddddd; -} -.table > caption + thead > tr:first-child > th, -.table > colgroup + thead > tr:first-child > th, -.table > thead:first-child > tr:first-child > th, -.table > caption + thead > tr:first-child > td, -.table > colgroup + thead > tr:first-child > td, -.table > thead:first-child > tr:first-child > td { - border-top: 0; -} -.table > tbody + tbody { - border-top: 2px solid #dddddd; -} -.table .table { - background-color: #ffffff; -} -.table-condensed > thead > tr > th, -.table-condensed > tbody > tr > th, -.table-condensed > tfoot > tr > th, -.table-condensed > thead > tr > td, -.table-condensed > tbody > tr > td, -.table-condensed > tfoot > tr > td { - padding: 5px; -} -.table-bordered { - border: 1px solid #dddddd; -} -.table-bordered > thead > tr > th, -.table-bordered > tbody > tr > th, -.table-bordered > tfoot > tr > th, -.table-bordered > thead > tr > td, -.table-bordered > tbody > tr > td, -.table-bordered > tfoot > tr > td { - border: 1px solid #dddddd; -} -.table-bordered > thead > tr > th, -.table-bordered > thead > tr > td { - border-bottom-width: 2px; -} -.table-striped > tbody > tr:nth-of-type(odd) { - background-color: #f9f9f9; -} -.table-hover > tbody > tr:hover { - background-color: #f5f5f5; -} -table col[class*="col-"] { - position: static; - float: none; - display: table-column; -} -table td[class*="col-"], -table th[class*="col-"] { - position: static; - float: none; - display: table-cell; -} -.table > thead > tr > td.active, -.table > tbody > tr > td.active, -.table > tfoot > tr > td.active, -.table > thead > tr > th.active, -.table > tbody > tr > th.active, -.table > tfoot > tr > th.active, -.table > thead > tr.active > td, -.table > tbody > tr.active > td, -.table > tfoot > tr.active > td, -.table > thead > tr.active > th, -.table > tbody > tr.active > th, -.table > tfoot > tr.active > th { - background-color: #f5f5f5; -} -.table-hover > tbody > tr > td.active:hover, -.table-hover > tbody > tr > th.active:hover, -.table-hover > tbody > tr.active:hover > td, -.table-hover > tbody > tr:hover > .active, -.table-hover > tbody > tr.active:hover > th { - background-color: #e8e8e8; -} -.table > thead > tr > td.success, -.table > tbody > tr > td.success, -.table > tfoot > tr > td.success, -.table > thead > tr > th.success, -.table > tbody > tr > th.success, -.table > tfoot > tr > th.success, -.table > thead > tr.success > td, -.table > tbody > tr.success > td, -.table > tfoot > tr.success > td, -.table > thead > tr.success > th, -.table > tbody > tr.success > th, -.table > tfoot > tr.success > th { - background-color: #dff0d8; -} -.table-hover > tbody > tr > td.success:hover, -.table-hover > tbody > tr > th.success:hover, -.table-hover > tbody > tr.success:hover > td, -.table-hover > tbody > tr:hover > .success, -.table-hover > tbody > tr.success:hover > th { - background-color: #d0e9c6; -} -.table > thead > tr > td.info, -.table > tbody > tr > td.info, -.table > tfoot > tr > td.info, -.table > thead > tr > th.info, -.table > tbody > tr > th.info, -.table > tfoot > tr > th.info, -.table > thead > tr.info > td, -.table > tbody > tr.info > td, -.table > tfoot > tr.info > td, -.table > thead > tr.info > th, -.table > tbody > tr.info > th, -.table > tfoot > tr.info > th { - background-color: #d9edf7; -} -.table-hover > tbody > tr > td.info:hover, -.table-hover > tbody > tr > th.info:hover, -.table-hover > tbody > tr.info:hover > td, -.table-hover > tbody > tr:hover > .info, -.table-hover > tbody > tr.info:hover > th { - background-color: #c4e3f3; -} -.table > thead > tr > td.warning, -.table > tbody > tr > td.warning, -.table > tfoot > tr > td.warning, -.table > thead > tr > th.warning, -.table > tbody > tr > th.warning, -.table > tfoot > tr > th.warning, -.table > thead > tr.warning > td, -.table > tbody > tr.warning > td, -.table > tfoot > tr.warning > td, -.table > thead > tr.warning > th, -.table > tbody > tr.warning > th, -.table > tfoot > tr.warning > th { - background-color: #fcf8e3; -} -.table-hover > tbody > tr > td.warning:hover, -.table-hover > tbody > tr > th.warning:hover, -.table-hover > tbody > tr.warning:hover > td, -.table-hover > tbody > tr:hover > .warning, -.table-hover > tbody > tr.warning:hover > th { - background-color: #faf2cc; -} -.table > thead > tr > td.danger, -.table > tbody > tr > td.danger, -.table > tfoot > tr > td.danger, -.table > thead > tr > th.danger, -.table > tbody > tr > th.danger, -.table > tfoot > tr > th.danger, -.table > thead > tr.danger > td, -.table > tbody > tr.danger > td, -.table > tfoot > tr.danger > td, -.table > thead > tr.danger > th, -.table > tbody > tr.danger > th, -.table > tfoot > tr.danger > th { - background-color: #f2dede; -} -.table-hover > tbody > tr > td.danger:hover, -.table-hover > tbody > tr > th.danger:hover, -.table-hover > tbody > tr.danger:hover > td, -.table-hover > tbody > tr:hover > .danger, -.table-hover > tbody > tr.danger:hover > th { - background-color: #ebcccc; -} -.table-responsive { - overflow-x: auto; - min-height: 0.01%; -} -@media screen and (max-width: 767px) { - .table-responsive { - width: 100%; - margin-bottom: 15px; - overflow-y: hidden; - -ms-overflow-style: -ms-autohiding-scrollbar; - border: 1px solid #dddddd; - } - .table-responsive > .table { - margin-bottom: 0; - } - .table-responsive > .table > thead > tr > th, - .table-responsive > .table > tbody > tr > th, - .table-responsive > .table > tfoot > tr > th, - .table-responsive > .table > thead > tr > td, - .table-responsive > .table > tbody > tr > td, - .table-responsive > .table > tfoot > tr > td { - white-space: nowrap; - } - .table-responsive > .table-bordered { - border: 0; - } - .table-responsive > .table-bordered > thead > tr > th:first-child, - .table-responsive > .table-bordered > tbody > tr > th:first-child, - .table-responsive > .table-bordered > tfoot > tr > th:first-child, - .table-responsive > .table-bordered > thead > tr > td:first-child, - .table-responsive > .table-bordered > tbody > tr > td:first-child, - .table-responsive > .table-bordered > tfoot > tr > td:first-child { - border-left: 0; - } - .table-responsive > .table-bordered > thead > tr > th:last-child, - .table-responsive > .table-bordered > tbody > tr > th:last-child, - .table-responsive > .table-bordered > tfoot > tr > th:last-child, - .table-responsive > .table-bordered > thead > tr > td:last-child, - .table-responsive > .table-bordered > tbody > tr > td:last-child, - .table-responsive > .table-bordered > tfoot > tr > td:last-child { - border-right: 0; - } - .table-responsive > .table-bordered > tbody > tr:last-child > th, - .table-responsive > .table-bordered > tfoot > tr:last-child > th, - .table-responsive > .table-bordered > tbody > tr:last-child > td, - .table-responsive > .table-bordered > tfoot > tr:last-child > td { - border-bottom: 0; - } -} -.btn { - display: inline-block; - margin-bottom: 0; - font-weight: normal; - text-align: center; - vertical-align: middle; - -ms-touch-action: manipulation; - touch-action: manipulation; - cursor: pointer; - background-image: none; - border: 1px solid transparent; - white-space: nowrap; - padding: 6px 12px; - font-size: 14px; - line-height: 1.42857143; - border-radius: 4px; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; -} -.btn:focus, -.btn:active:focus, -.btn.active:focus, -.btn.focus, -.btn:active.focus, -.btn.active.focus { - outline: thin dotted; - outline: 5px auto -webkit-focus-ring-color; - outline-offset: -2px; -} -.btn:hover, -.btn:focus, -.btn.focus { - color: #333333; - text-decoration: none; -} -.btn:active, -.btn.active { - outline: 0; - background-image: none; - -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); - box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); -} -.btn.disabled, -.btn[disabled], -fieldset[disabled] .btn { - cursor: not-allowed; - pointer-events: none; - opacity: 0.65; - filter: alpha(opacity=65); - -webkit-box-shadow: none; - box-shadow: none; -} -.btn-default { - color: #333333; - background-color: #ffffff; - border-color: #cccccc; -} -.btn-default:hover, -.btn-default:focus, -.btn-default.focus, -.btn-default:active, -.btn-default.active, -.open > .dropdown-toggle.btn-default { - color: #333333; - background-color: #e6e6e6; - border-color: #adadad; -} -.btn-default:active, -.btn-default.active, -.open > .dropdown-toggle.btn-default { - background-image: none; -} -.btn-default.disabled, -.btn-default[disabled], -fieldset[disabled] .btn-default, -.btn-default.disabled:hover, -.btn-default[disabled]:hover, -fieldset[disabled] .btn-default:hover, -.btn-default.disabled:focus, -.btn-default[disabled]:focus, -fieldset[disabled] .btn-default:focus, -.btn-default.disabled.focus, -.btn-default[disabled].focus, -fieldset[disabled] .btn-default.focus, -.btn-default.disabled:active, -.btn-default[disabled]:active, -fieldset[disabled] .btn-default:active, -.btn-default.disabled.active, -.btn-default[disabled].active, -fieldset[disabled] .btn-default.active { - background-color: #ffffff; - border-color: #cccccc; -} -.btn-default .badge { - color: #ffffff; - background-color: #333333; -} -.btn-primary { - color: #ffffff; - background-color: #337ab7; - border-color: #2e6da4; -} -.btn-primary:hover, -.btn-primary:focus, -.btn-primary.focus, -.btn-primary:active, -.btn-primary.active, -.open > .dropdown-toggle.btn-primary { - color: #ffffff; - background-color: #286090; - border-color: #204d74; -} -.btn-primary:active, -.btn-primary.active, -.open > .dropdown-toggle.btn-primary { - background-image: none; -} -.btn-primary.disabled, -.btn-primary[disabled], -fieldset[disabled] .btn-primary, -.btn-primary.disabled:hover, -.btn-primary[disabled]:hover, -fieldset[disabled] .btn-primary:hover, -.btn-primary.disabled:focus, -.btn-primary[disabled]:focus, -fieldset[disabled] .btn-primary:focus, -.btn-primary.disabled.focus, -.btn-primary[disabled].focus, -fieldset[disabled] .btn-primary.focus, -.btn-primary.disabled:active, -.btn-primary[disabled]:active, -fieldset[disabled] .btn-primary:active, -.btn-primary.disabled.active, -.btn-primary[disabled].active, -fieldset[disabled] .btn-primary.active { - background-color: #337ab7; - border-color: #2e6da4; -} -.btn-primary .badge { - color: #337ab7; - background-color: #ffffff; -} -.btn-success { - color: #ffffff; - background-color: #5cb85c; - border-color: #4cae4c; -} -.btn-success:hover, -.btn-success:focus, -.btn-success.focus, -.btn-success:active, -.btn-success.active, -.open > .dropdown-toggle.btn-success { - color: #ffffff; - background-color: #449d44; - border-color: #398439; -} -.btn-success:active, -.btn-success.active, -.open > .dropdown-toggle.btn-success { - background-image: none; -} -.btn-success.disabled, -.btn-success[disabled], -fieldset[disabled] .btn-success, -.btn-success.disabled:hover, -.btn-success[disabled]:hover, -fieldset[disabled] .btn-success:hover, -.btn-success.disabled:focus, -.btn-success[disabled]:focus, -fieldset[disabled] .btn-success:focus, -.btn-success.disabled.focus, -.btn-success[disabled].focus, -fieldset[disabled] .btn-success.focus, -.btn-success.disabled:active, -.btn-success[disabled]:active, -fieldset[disabled] .btn-success:active, -.btn-success.disabled.active, -.btn-success[disabled].active, -fieldset[disabled] .btn-success.active { - background-color: #5cb85c; - border-color: #4cae4c; -} -.btn-success .badge { - color: #5cb85c; - background-color: #ffffff; -} -.btn-info { - color: #ffffff; - background-color: #5bc0de; - border-color: #46b8da; -} -.btn-info:hover, -.btn-info:focus, -.btn-info.focus, -.btn-info:active, -.btn-info.active, -.open > .dropdown-toggle.btn-info { - color: #ffffff; - background-color: #31b0d5; - border-color: #269abc; -} -.btn-info:active, -.btn-info.active, -.open > .dropdown-toggle.btn-info { - background-image: none; -} -.btn-info.disabled, -.btn-info[disabled], -fieldset[disabled] .btn-info, -.btn-info.disabled:hover, -.btn-info[disabled]:hover, -fieldset[disabled] .btn-info:hover, -.btn-info.disabled:focus, -.btn-info[disabled]:focus, -fieldset[disabled] .btn-info:focus, -.btn-info.disabled.focus, -.btn-info[disabled].focus, -fieldset[disabled] .btn-info.focus, -.btn-info.disabled:active, -.btn-info[disabled]:active, -fieldset[disabled] .btn-info:active, -.btn-info.disabled.active, -.btn-info[disabled].active, -fieldset[disabled] .btn-info.active { - background-color: #5bc0de; - border-color: #46b8da; -} -.btn-info .badge { - color: #5bc0de; - background-color: #ffffff; -} -.btn-warning { - color: #ffffff; - background-color: #f0ad4e; - border-color: #eea236; -} -.btn-warning:hover, -.btn-warning:focus, -.btn-warning.focus, -.btn-warning:active, -.btn-warning.active, -.open > .dropdown-toggle.btn-warning { - color: #ffffff; - background-color: #ec971f; - border-color: #d58512; -} -.btn-warning:active, -.btn-warning.active, -.open > .dropdown-toggle.btn-warning { - background-image: none; -} -.btn-warning.disabled, -.btn-warning[disabled], -fieldset[disabled] .btn-warning, -.btn-warning.disabled:hover, -.btn-warning[disabled]:hover, -fieldset[disabled] .btn-warning:hover, -.btn-warning.disabled:focus, -.btn-warning[disabled]:focus, -fieldset[disabled] .btn-warning:focus, -.btn-warning.disabled.focus, -.btn-warning[disabled].focus, -fieldset[disabled] .btn-warning.focus, -.btn-warning.disabled:active, -.btn-warning[disabled]:active, -fieldset[disabled] .btn-warning:active, -.btn-warning.disabled.active, -.btn-warning[disabled].active, -fieldset[disabled] .btn-warning.active { - background-color: #f0ad4e; - border-color: #eea236; -} -.btn-warning .badge { - color: #f0ad4e; - background-color: #ffffff; -} -.btn-danger { - color: #ffffff; - background-color: #d9534f; - border-color: #d43f3a; -} -.btn-danger:hover, -.btn-danger:focus, -.btn-danger.focus, -.btn-danger:active, -.btn-danger.active, -.open > .dropdown-toggle.btn-danger { - color: #ffffff; - background-color: #c9302c; - border-color: #ac2925; -} -.btn-danger:active, -.btn-danger.active, -.open > .dropdown-toggle.btn-danger { - background-image: none; -} -.btn-danger.disabled, -.btn-danger[disabled], -fieldset[disabled] .btn-danger, -.btn-danger.disabled:hover, -.btn-danger[disabled]:hover, -fieldset[disabled] .btn-danger:hover, -.btn-danger.disabled:focus, -.btn-danger[disabled]:focus, -fieldset[disabled] .btn-danger:focus, -.btn-danger.disabled.focus, -.btn-danger[disabled].focus, -fieldset[disabled] .btn-danger.focus, -.btn-danger.disabled:active, -.btn-danger[disabled]:active, -fieldset[disabled] .btn-danger:active, -.btn-danger.disabled.active, -.btn-danger[disabled].active, -fieldset[disabled] .btn-danger.active { - background-color: #d9534f; - border-color: #d43f3a; -} -.btn-danger .badge { - color: #d9534f; - background-color: #ffffff; -} -.btn-link { - color: #337ab7; - font-weight: normal; - border-radius: 0; -} -.btn-link, -.btn-link:active, -.btn-link.active, -.btn-link[disabled], -fieldset[disabled] .btn-link { - background-color: transparent; - -webkit-box-shadow: none; - box-shadow: none; -} -.btn-link, -.btn-link:hover, -.btn-link:focus, -.btn-link:active { - border-color: transparent; -} -.btn-link:hover, -.btn-link:focus { - color: #23527c; - text-decoration: underline; - background-color: transparent; -} -.btn-link[disabled]:hover, -fieldset[disabled] .btn-link:hover, -.btn-link[disabled]:focus, -fieldset[disabled] .btn-link:focus { - color: #777777; - text-decoration: none; -} -.btn-lg { - padding: 10px 16px; - font-size: 18px; - line-height: 1.3333333; - border-radius: 6px; -} -.btn-sm { - padding: 5px 10px; - font-size: 12px; - line-height: 1.5; - border-radius: 3px; -} -.btn-xs { - padding: 1px 5px; - font-size: 12px; - line-height: 1.5; - border-radius: 3px; -} -.btn-block { - display: block; - width: 100%; -} -.btn-block + .btn-block { - margin-top: 5px; -} -input[type="submit"].btn-block, -input[type="reset"].btn-block, -input[type="button"].btn-block { - width: 100%; -} -.clearfix:before, -.clearfix:after, -.dl-horizontal dd:before, -.dl-horizontal dd:after, -.container:before, -.container:after, -.container-fluid:before, -.container-fluid:after, -.row:before, -.row:after { - content: " "; - display: table; -} -.clearfix:after, -.dl-horizontal dd:after, -.container:after, -.container-fluid:after, -.row:after { - clear: both; -} -.center-block { - display: block; - margin-left: auto; - margin-right: auto; -} -.pull-right { - float: right !important; -} -.pull-left { - float: left !important; -} -.hide { - display: none !important; -} -.show { - display: block !important; -} -.invisible { - visibility: hidden; -} -.text-hide { - font: 0/0 a; - color: transparent; - text-shadow: none; - background-color: transparent; - border: 0; -} -.hidden { - display: none !important; -} -.affix { - position: fixed; -} -@-ms-viewport { - width: device-width; -} -.visible-xs, -.visible-sm, -.visible-md, -.visible-lg { - display: none !important; -} -.visible-xs-block, -.visible-xs-inline, -.visible-xs-inline-block, -.visible-sm-block, -.visible-sm-inline, -.visible-sm-inline-block, -.visible-md-block, -.visible-md-inline, -.visible-md-inline-block, -.visible-lg-block, -.visible-lg-inline, -.visible-lg-inline-block { - display: none !important; -} -@media (max-width: 767px) { - .visible-xs { - display: block !important; - } - table.visible-xs { - display: table; - } - tr.visible-xs { - display: table-row !important; - } - th.visible-xs, - td.visible-xs { - display: table-cell !important; - } -} -@media (max-width: 767px) { - .visible-xs-block { - display: block !important; - } -} -@media (max-width: 767px) { - .visible-xs-inline { - display: inline !important; - } -} -@media (max-width: 767px) { - .visible-xs-inline-block { - display: inline-block !important; - } -} -@media (min-width: 768px) and (max-width: 991px) { - .visible-sm { - display: block !important; - } - table.visible-sm { - display: table; - } - tr.visible-sm { - display: table-row !important; - } - th.visible-sm, - td.visible-sm { - display: table-cell !important; - } -} -@media (min-width: 768px) and (max-width: 991px) { - .visible-sm-block { - display: block !important; - } -} -@media (min-width: 768px) and (max-width: 991px) { - .visible-sm-inline { - display: inline !important; - } -} -@media (min-width: 768px) and (max-width: 991px) { - .visible-sm-inline-block { - display: inline-block !important; - } -} -@media (min-width: 992px) and (max-width: 1199px) { - .visible-md { - display: block !important; - } - table.visible-md { - display: table; - } - tr.visible-md { - display: table-row !important; - } - th.visible-md, - td.visible-md { - display: table-cell !important; - } -} -@media (min-width: 992px) and (max-width: 1199px) { - .visible-md-block { - display: block !important; - } -} -@media (min-width: 992px) and (max-width: 1199px) { - .visible-md-inline { - display: inline !important; - } -} -@media (min-width: 992px) and (max-width: 1199px) { - .visible-md-inline-block { - display: inline-block !important; - } -} -@media (min-width: 1200px) { - .visible-lg { - display: block !important; - } - table.visible-lg { - display: table; - } - tr.visible-lg { - display: table-row !important; - } - th.visible-lg, - td.visible-lg { - display: table-cell !important; - } -} -@media (min-width: 1200px) { - .visible-lg-block { - display: block !important; - } -} -@media (min-width: 1200px) { - .visible-lg-inline { - display: inline !important; - } -} -@media (min-width: 1200px) { - .visible-lg-inline-block { - display: inline-block !important; - } -} -@media (max-width: 767px) { - .hidden-xs { - display: none !important; - } -} -@media (min-width: 768px) and (max-width: 991px) { - .hidden-sm { - display: none !important; - } -} -@media (min-width: 992px) and (max-width: 1199px) { - .hidden-md { - display: none !important; - } -} -@media (min-width: 1200px) { - .hidden-lg { - display: none !important; - } -} -.visible-print { - display: none !important; -} -@media print { - .visible-print { - display: block !important; - } - table.visible-print { - display: table; - } - tr.visible-print { - display: table-row !important; - } - th.visible-print, - td.visible-print { - display: table-cell !important; - } -} -.visible-print-block { - display: none !important; -} -@media print { - .visible-print-block { - display: block !important; - } -} -.visible-print-inline { - display: none !important; -} -@media print { - .visible-print-inline { - display: inline !important; - } -} -.visible-print-inline-block { - display: none !important; -} -@media print { - .visible-print-inline-block { - display: inline-block !important; - } -} -@media print { - .hidden-print { - display: none !important; - } -} diff --git a/src/Orchard.Web/Modules/Orchard.Dashboards/Styles/bootstrap.min.css b/src/Orchard.Web/Modules/Orchard.Dashboards/Styles/bootstrap.min.css deleted file mode 100644 index abd760a63..000000000 --- a/src/Orchard.Web/Modules/Orchard.Dashboards/Styles/bootstrap.min.css +++ /dev/null @@ -1,10 +0,0 @@ -/*! - * Bootstrap v3.3.4 (http://getbootstrap.com) - * Copyright 2011-2015 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - */ - -/*! - * Generated using the Bootstrap Customizer (http://getbootstrap.com/customize/?id=6737c6372ebd005d9906) - * Config saved to config.json and https://gist.github.com/6737c6372ebd005d9906 - *//*! normalize.css v3.0.2 | MIT License | git.io/normalize */html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:bold}dfn{font-style:italic}h1{font-size:2em;margin:0.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace, monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type="checkbox"],input[type="radio"]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:0}input[type="number"]::-webkit-inner-spin-button,input[type="number"]::-webkit-outer-spin-button{height:auto}input[type="search"]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:0.35em 0.625em 0.75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:bold}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}*:before,*:after{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:10px;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;color:#333;background-color:#fff}input,button,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#337ab7;text-decoration:none}a:hover,a:focus{color:#23527c;text-decoration:underline}a:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}figure{margin:0}img{vertical-align:middle}.img-responsive{display:block;max-width:100%;height:auto}.img-rounded{border-radius:6px}.img-thumbnail{padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out;display:inline-block;max-width:100%;height:auto}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}.sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}[role="button"]{cursor:pointer}h1,h2,h3,h4,h5,h6,.h1,.h2,.h3,.h4,.h5,.h6{font-family:inherit;font-weight:500;line-height:1.1;color:inherit}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small,.h1 small,.h2 small,.h3 small,.h4 small,.h5 small,.h6 small,h1 .small,h2 .small,h3 .small,h4 .small,h5 .small,h6 .small,.h1 .small,.h2 .small,.h3 .small,.h4 .small,.h5 .small,.h6 .small{font-weight:normal;line-height:1;color:#777}h1,.h1,h2,.h2,h3,.h3{margin-top:20px;margin-bottom:10px}h1 small,.h1 small,h2 small,.h2 small,h3 small,.h3 small,h1 .small,.h1 .small,h2 .small,.h2 .small,h3 .small,.h3 .small{font-size:65%}h4,.h4,h5,.h5,h6,.h6{margin-top:10px;margin-bottom:10px}h4 small,.h4 small,h5 small,.h5 small,h6 small,.h6 small,h4 .small,.h4 .small,h5 .small,.h5 .small,h6 .small,.h6 .small{font-size:75%}h1,.h1{font-size:36px}h2,.h2{font-size:30px}h3,.h3{font-size:24px}h4,.h4{font-size:18px}h5,.h5{font-size:14px}h6,.h6{font-size:12px}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16px;font-weight:300;line-height:1.4}@media (min-width:768px){.lead{font-size:21px}}small,.small{font-size:85%}mark,.mark{background-color:#fcf8e3;padding:.2em}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}.text-justify{text-align:justify}.text-nowrap{white-space:nowrap}.text-lowercase{text-transform:lowercase}.text-uppercase{text-transform:uppercase}.text-capitalize{text-transform:capitalize}.text-muted{color:#777}.text-primary{color:#337ab7}a.text-primary:hover{color:#286090}.text-success{color:#3c763d}a.text-success:hover{color:#2b542c}.text-info{color:#31708f}a.text-info:hover{color:#245269}.text-warning{color:#8a6d3b}a.text-warning:hover{color:#66512c}.text-danger{color:#a94442}a.text-danger:hover{color:#843534}.bg-primary{color:#fff;background-color:#337ab7}a.bg-primary:hover{background-color:#286090}.bg-success{background-color:#dff0d8}a.bg-success:hover{background-color:#c1e2b3}.bg-info{background-color:#d9edf7}a.bg-info:hover{background-color:#afd9ee}.bg-warning{background-color:#fcf8e3}a.bg-warning:hover{background-color:#f7ecb5}.bg-danger{background-color:#f2dede}a.bg-danger:hover{background-color:#e4b9b9}.page-header{padding-bottom:9px;margin:40px 0 20px;border-bottom:1px solid #eee}ul,ol{margin-top:0;margin-bottom:10px}ul ul,ol ul,ul ol,ol ol{margin-bottom:0}.list-unstyled{padding-left:0;list-style:none}.list-inline{padding-left:0;list-style:none;margin-left:-5px}.list-inline>li{display:inline-block;padding-left:5px;padding-right:5px}dl{margin-top:0;margin-bottom:20px}dt,dd{line-height:1.42857143}dt{font-weight:bold}dd{margin-left:0}@media (min-width:768px){.dl-horizontal dt{float:left;width:160px;clear:left;text-align:right;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}}abbr[title],abbr[data-original-title]{cursor:help;border-bottom:1px dotted #777}.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:10px 20px;margin:0 0 20px;font-size:17.5px;border-left:5px solid #eee}blockquote p:last-child,blockquote ul:last-child,blockquote ol:last-child{margin-bottom:0}blockquote footer,blockquote small,blockquote .small{display:block;font-size:80%;line-height:1.42857143;color:#777}blockquote footer:before,blockquote small:before,blockquote .small:before{content:'\2014 \00A0'}.blockquote-reverse,blockquote.pull-right{padding-right:15px;padding-left:0;border-right:5px solid #eee;border-left:0;text-align:right}.blockquote-reverse footer:before,blockquote.pull-right footer:before,.blockquote-reverse small:before,blockquote.pull-right small:before,.blockquote-reverse .small:before,blockquote.pull-right .small:before{content:''}.blockquote-reverse footer:after,blockquote.pull-right footer:after,.blockquote-reverse small:after,blockquote.pull-right small:after,.blockquote-reverse .small:after,blockquote.pull-right .small:after{content:'\00A0 \2014'}address{margin-bottom:20px;font-style:normal;line-height:1.42857143}.container{margin-right:auto;margin-left:auto;padding-left:15px;padding-right:15px}@media (min-width:768px){.container{width:750px}}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.container-fluid{margin-right:auto;margin-left:auto;padding-left:15px;padding-right:15px}.row{margin-left:-15px;margin-right:-15px}.col-xs-1, .col-sm-1, .col-md-1, .col-lg-1, .col-xs-2, .col-sm-2, .col-md-2, .col-lg-2, .col-xs-3, .col-sm-3, .col-md-3, .col-lg-3, .col-xs-4, .col-sm-4, .col-md-4, .col-lg-4, .col-xs-5, .col-sm-5, .col-md-5, .col-lg-5, .col-xs-6, .col-sm-6, .col-md-6, .col-lg-6, .col-xs-7, .col-sm-7, .col-md-7, .col-lg-7, .col-xs-8, .col-sm-8, .col-md-8, .col-lg-8, .col-xs-9, .col-sm-9, .col-md-9, .col-lg-9, .col-xs-10, .col-sm-10, .col-md-10, .col-lg-10, .col-xs-11, .col-sm-11, .col-md-11, .col-lg-11, .col-xs-12, .col-sm-12, .col-md-12, .col-lg-12{position:relative;min-height:1px;padding-left:15px;padding-right:15px}.col-xs-1, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6, .col-xs-7, .col-xs-8, .col-xs-9, .col-xs-10, .col-xs-11, .col-xs-12{float:left}.col-xs-12{width:100%}.col-xs-11{width:91.66666667%}.col-xs-10{width:83.33333333%}.col-xs-9{width:75%}.col-xs-8{width:66.66666667%}.col-xs-7{width:58.33333333%}.col-xs-6{width:50%}.col-xs-5{width:41.66666667%}.col-xs-4{width:33.33333333%}.col-xs-3{width:25%}.col-xs-2{width:16.66666667%}.col-xs-1{width:8.33333333%}.col-xs-pull-12{right:100%}.col-xs-pull-11{right:91.66666667%}.col-xs-pull-10{right:83.33333333%}.col-xs-pull-9{right:75%}.col-xs-pull-8{right:66.66666667%}.col-xs-pull-7{right:58.33333333%}.col-xs-pull-6{right:50%}.col-xs-pull-5{right:41.66666667%}.col-xs-pull-4{right:33.33333333%}.col-xs-pull-3{right:25%}.col-xs-pull-2{right:16.66666667%}.col-xs-pull-1{right:8.33333333%}.col-xs-pull-0{right:auto}.col-xs-push-12{left:100%}.col-xs-push-11{left:91.66666667%}.col-xs-push-10{left:83.33333333%}.col-xs-push-9{left:75%}.col-xs-push-8{left:66.66666667%}.col-xs-push-7{left:58.33333333%}.col-xs-push-6{left:50%}.col-xs-push-5{left:41.66666667%}.col-xs-push-4{left:33.33333333%}.col-xs-push-3{left:25%}.col-xs-push-2{left:16.66666667%}.col-xs-push-1{left:8.33333333%}.col-xs-push-0{left:auto}.col-xs-offset-12{margin-left:100%}.col-xs-offset-11{margin-left:91.66666667%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-0{margin-left:0}@media (min-width:768px){.col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12{float:left}.col-sm-12{width:100%}.col-sm-11{width:91.66666667%}.col-sm-10{width:83.33333333%}.col-sm-9{width:75%}.col-sm-8{width:66.66666667%}.col-sm-7{width:58.33333333%}.col-sm-6{width:50%}.col-sm-5{width:41.66666667%}.col-sm-4{width:33.33333333%}.col-sm-3{width:25%}.col-sm-2{width:16.66666667%}.col-sm-1{width:8.33333333%}.col-sm-pull-12{right:100%}.col-sm-pull-11{right:91.66666667%}.col-sm-pull-10{right:83.33333333%}.col-sm-pull-9{right:75%}.col-sm-pull-8{right:66.66666667%}.col-sm-pull-7{right:58.33333333%}.col-sm-pull-6{right:50%}.col-sm-pull-5{right:41.66666667%}.col-sm-pull-4{right:33.33333333%}.col-sm-pull-3{right:25%}.col-sm-pull-2{right:16.66666667%}.col-sm-pull-1{right:8.33333333%}.col-sm-pull-0{right:auto}.col-sm-push-12{left:100%}.col-sm-push-11{left:91.66666667%}.col-sm-push-10{left:83.33333333%}.col-sm-push-9{left:75%}.col-sm-push-8{left:66.66666667%}.col-sm-push-7{left:58.33333333%}.col-sm-push-6{left:50%}.col-sm-push-5{left:41.66666667%}.col-sm-push-4{left:33.33333333%}.col-sm-push-3{left:25%}.col-sm-push-2{left:16.66666667%}.col-sm-push-1{left:8.33333333%}.col-sm-push-0{left:auto}.col-sm-offset-12{margin-left:100%}.col-sm-offset-11{margin-left:91.66666667%}.col-sm-offset-10{margin-left:83.33333333%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-8{margin-left:66.66666667%}.col-sm-offset-7{margin-left:58.33333333%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-1{margin-left:8.33333333%}.col-sm-offset-0{margin-left:0}}@media (min-width:992px){.col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12{float:left}.col-md-12{width:100%}.col-md-11{width:91.66666667%}.col-md-10{width:83.33333333%}.col-md-9{width:75%}.col-md-8{width:66.66666667%}.col-md-7{width:58.33333333%}.col-md-6{width:50%}.col-md-5{width:41.66666667%}.col-md-4{width:33.33333333%}.col-md-3{width:25%}.col-md-2{width:16.66666667%}.col-md-1{width:8.33333333%}.col-md-pull-12{right:100%}.col-md-pull-11{right:91.66666667%}.col-md-pull-10{right:83.33333333%}.col-md-pull-9{right:75%}.col-md-pull-8{right:66.66666667%}.col-md-pull-7{right:58.33333333%}.col-md-pull-6{right:50%}.col-md-pull-5{right:41.66666667%}.col-md-pull-4{right:33.33333333%}.col-md-pull-3{right:25%}.col-md-pull-2{right:16.66666667%}.col-md-pull-1{right:8.33333333%}.col-md-pull-0{right:auto}.col-md-push-12{left:100%}.col-md-push-11{left:91.66666667%}.col-md-push-10{left:83.33333333%}.col-md-push-9{left:75%}.col-md-push-8{left:66.66666667%}.col-md-push-7{left:58.33333333%}.col-md-push-6{left:50%}.col-md-push-5{left:41.66666667%}.col-md-push-4{left:33.33333333%}.col-md-push-3{left:25%}.col-md-push-2{left:16.66666667%}.col-md-push-1{left:8.33333333%}.col-md-push-0{left:auto}.col-md-offset-12{margin-left:100%}.col-md-offset-11{margin-left:91.66666667%}.col-md-offset-10{margin-left:83.33333333%}.col-md-offset-9{margin-left:75%}.col-md-offset-8{margin-left:66.66666667%}.col-md-offset-7{margin-left:58.33333333%}.col-md-offset-6{margin-left:50%}.col-md-offset-5{margin-left:41.66666667%}.col-md-offset-4{margin-left:33.33333333%}.col-md-offset-3{margin-left:25%}.col-md-offset-2{margin-left:16.66666667%}.col-md-offset-1{margin-left:8.33333333%}.col-md-offset-0{margin-left:0}}@media (min-width:1200px){.col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12{float:left}.col-lg-12{width:100%}.col-lg-11{width:91.66666667%}.col-lg-10{width:83.33333333%}.col-lg-9{width:75%}.col-lg-8{width:66.66666667%}.col-lg-7{width:58.33333333%}.col-lg-6{width:50%}.col-lg-5{width:41.66666667%}.col-lg-4{width:33.33333333%}.col-lg-3{width:25%}.col-lg-2{width:16.66666667%}.col-lg-1{width:8.33333333%}.col-lg-pull-12{right:100%}.col-lg-pull-11{right:91.66666667%}.col-lg-pull-10{right:83.33333333%}.col-lg-pull-9{right:75%}.col-lg-pull-8{right:66.66666667%}.col-lg-pull-7{right:58.33333333%}.col-lg-pull-6{right:50%}.col-lg-pull-5{right:41.66666667%}.col-lg-pull-4{right:33.33333333%}.col-lg-pull-3{right:25%}.col-lg-pull-2{right:16.66666667%}.col-lg-pull-1{right:8.33333333%}.col-lg-pull-0{right:auto}.col-lg-push-12{left:100%}.col-lg-push-11{left:91.66666667%}.col-lg-push-10{left:83.33333333%}.col-lg-push-9{left:75%}.col-lg-push-8{left:66.66666667%}.col-lg-push-7{left:58.33333333%}.col-lg-push-6{left:50%}.col-lg-push-5{left:41.66666667%}.col-lg-push-4{left:33.33333333%}.col-lg-push-3{left:25%}.col-lg-push-2{left:16.66666667%}.col-lg-push-1{left:8.33333333%}.col-lg-push-0{left:auto}.col-lg-offset-12{margin-left:100%}.col-lg-offset-11{margin-left:91.66666667%}.col-lg-offset-10{margin-left:83.33333333%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-8{margin-left:66.66666667%}.col-lg-offset-7{margin-left:58.33333333%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-5{margin-left:41.66666667%}.col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-1{margin-left:8.33333333%}.col-lg-offset-0{margin-left:0}}table{background-color:transparent}caption{padding-top:8px;padding-bottom:8px;color:#777;text-align:left}th{text-align:left}.table{width:100%;max-width:100%;margin-bottom:20px}.table>thead>tr>th,.table>tbody>tr>th,.table>tfoot>tr>th,.table>thead>tr>td,.table>tbody>tr>td,.table>tfoot>tr>td{padding:8px;line-height:1.42857143;vertical-align:top;border-top:1px solid #ddd}.table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.table>caption+thead>tr:first-child>th,.table>colgroup+thead>tr:first-child>th,.table>thead:first-child>tr:first-child>th,.table>caption+thead>tr:first-child>td,.table>colgroup+thead>tr:first-child>td,.table>thead:first-child>tr:first-child>td{border-top:0}.table>tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed>thead>tr>th,.table-condensed>tbody>tr>th,.table-condensed>tfoot>tr>th,.table-condensed>thead>tr>td,.table-condensed>tbody>tr>td,.table-condensed>tfoot>tr>td{padding:5px}.table-bordered{border:1px solid #ddd}.table-bordered>thead>tr>th,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>tbody>tr>td,.table-bordered>tfoot>tr>td{border:1px solid #ddd}.table-bordered>thead>tr>th,.table-bordered>thead>tr>td{border-bottom-width:2px}.table-striped>tbody>tr:nth-of-type(odd){background-color:#f9f9f9}.table-hover>tbody>tr:hover{background-color:#f5f5f5}table col[class*="col-"]{position:static;float:none;display:table-column}table td[class*="col-"],table th[class*="col-"]{position:static;float:none;display:table-cell}.table>thead>tr>td.active,.table>tbody>tr>td.active,.table>tfoot>tr>td.active,.table>thead>tr>th.active,.table>tbody>tr>th.active,.table>tfoot>tr>th.active,.table>thead>tr.active>td,.table>tbody>tr.active>td,.table>tfoot>tr.active>td,.table>thead>tr.active>th,.table>tbody>tr.active>th,.table>tfoot>tr.active>th{background-color:#f5f5f5}.table-hover>tbody>tr>td.active:hover,.table-hover>tbody>tr>th.active:hover,.table-hover>tbody>tr.active:hover>td,.table-hover>tbody>tr:hover>.active,.table-hover>tbody>tr.active:hover>th{background-color:#e8e8e8}.table>thead>tr>td.success,.table>tbody>tr>td.success,.table>tfoot>tr>td.success,.table>thead>tr>th.success,.table>tbody>tr>th.success,.table>tfoot>tr>th.success,.table>thead>tr.success>td,.table>tbody>tr.success>td,.table>tfoot>tr.success>td,.table>thead>tr.success>th,.table>tbody>tr.success>th,.table>tfoot>tr.success>th{background-color:#dff0d8}.table-hover>tbody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover,.table-hover>tbody>tr.success:hover>td,.table-hover>tbody>tr:hover>.success,.table-hover>tbody>tr.success:hover>th{background-color:#d0e9c6}.table>thead>tr>td.info,.table>tbody>tr>td.info,.table>tfoot>tr>td.info,.table>thead>tr>th.info,.table>tbody>tr>th.info,.table>tfoot>tr>th.info,.table>thead>tr.info>td,.table>tbody>tr.info>td,.table>tfoot>tr.info>td,.table>thead>tr.info>th,.table>tbody>tr.info>th,.table>tfoot>tr.info>th{background-color:#d9edf7}.table-hover>tbody>tr>td.info:hover,.table-hover>tbody>tr>th.info:hover,.table-hover>tbody>tr.info:hover>td,.table-hover>tbody>tr:hover>.info,.table-hover>tbody>tr.info:hover>th{background-color:#c4e3f3}.table>thead>tr>td.warning,.table>tbody>tr>td.warning,.table>tfoot>tr>td.warning,.table>thead>tr>th.warning,.table>tbody>tr>th.warning,.table>tfoot>tr>th.warning,.table>thead>tr.warning>td,.table>tbody>tr.warning>td,.table>tfoot>tr.warning>td,.table>thead>tr.warning>th,.table>tbody>tr.warning>th,.table>tfoot>tr.warning>th{background-color:#fcf8e3}.table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover,.table-hover>tbody>tr.warning:hover>td,.table-hover>tbody>tr:hover>.warning,.table-hover>tbody>tr.warning:hover>th{background-color:#faf2cc}.table>thead>tr>td.danger,.table>tbody>tr>td.danger,.table>tfoot>tr>td.danger,.table>thead>tr>th.danger,.table>tbody>tr>th.danger,.table>tfoot>tr>th.danger,.table>thead>tr.danger>td,.table>tbody>tr.danger>td,.table>tfoot>tr.danger>td,.table>thead>tr.danger>th,.table>tbody>tr.danger>th,.table>tfoot>tr.danger>th{background-color:#f2dede}.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover,.table-hover>tbody>tr.danger:hover>td,.table-hover>tbody>tr:hover>.danger,.table-hover>tbody>tr.danger:hover>th{background-color:#ebcccc}.table-responsive{overflow-x:auto;min-height:0.01%}@media screen and (max-width:767px){.table-responsive{width:100%;margin-bottom:15px;overflow-y:hidden;-ms-overflow-style:-ms-autohiding-scrollbar;border:1px solid #ddd}.table-responsive>.table{margin-bottom:0}.table-responsive>.table>thead>tr>th,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tfoot>tr>td{white-space:nowrap}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered>thead>tr>th:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child{border-left:0}.table-responsive>.table-bordered>thead>tr>th:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child{border-right:0}.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>th,.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>td{border-bottom:0}}.btn{display:inline-block;margin-bottom:0;font-weight:normal;text-align:center;vertical-align:middle;-ms-touch-action:manipulation;touch-action:manipulation;cursor:pointer;background-image:none;border:1px solid transparent;white-space:nowrap;padding:6px 12px;font-size:14px;line-height:1.42857143;border-radius:4px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.btn:focus,.btn:active:focus,.btn.active:focus,.btn.focus,.btn:active.focus,.btn.active.focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn:hover,.btn:focus,.btn.focus{color:#333;text-decoration:none}.btn:active,.btn.active{outline:0;background-image:none;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,0.125);box-shadow:inset 0 3px 5px rgba(0,0,0,0.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{cursor:not-allowed;pointer-events:none;opacity:.65;filter:alpha(opacity=65);-webkit-box-shadow:none;box-shadow:none}.btn-default{color:#333;background-color:#fff;border-color:#ccc}.btn-default:hover,.btn-default:focus,.btn-default.focus,.btn-default:active,.btn-default.active,.open>.dropdown-toggle.btn-default{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default:active,.btn-default.active,.open>.dropdown-toggle.btn-default{background-image:none}.btn-default.disabled,.btn-default[disabled],fieldset[disabled] .btn-default,.btn-default.disabled:hover,.btn-default[disabled]:hover,fieldset[disabled] .btn-default:hover,.btn-default.disabled:focus,.btn-default[disabled]:focus,fieldset[disabled] .btn-default:focus,.btn-default.disabled.focus,.btn-default[disabled].focus,fieldset[disabled] .btn-default.focus,.btn-default.disabled:active,.btn-default[disabled]:active,fieldset[disabled] .btn-default:active,.btn-default.disabled.active,.btn-default[disabled].active,fieldset[disabled] .btn-default.active{background-color:#fff;border-color:#ccc}.btn-default .badge{color:#fff;background-color:#333}.btn-primary{color:#fff;background-color:#337ab7;border-color:#2e6da4}.btn-primary:hover,.btn-primary:focus,.btn-primary.focus,.btn-primary:active,.btn-primary.active,.open>.dropdown-toggle.btn-primary{color:#fff;background-color:#286090;border-color:#204d74}.btn-primary:active,.btn-primary.active,.open>.dropdown-toggle.btn-primary{background-image:none}.btn-primary.disabled,.btn-primary[disabled],fieldset[disabled] .btn-primary,.btn-primary.disabled:hover,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary:hover,.btn-primary.disabled:focus,.btn-primary[disabled]:focus,fieldset[disabled] .btn-primary:focus,.btn-primary.disabled.focus,.btn-primary[disabled].focus,fieldset[disabled] .btn-primary.focus,.btn-primary.disabled:active,.btn-primary[disabled]:active,fieldset[disabled] .btn-primary:active,.btn-primary.disabled.active,.btn-primary[disabled].active,fieldset[disabled] .btn-primary.active{background-color:#337ab7;border-color:#2e6da4}.btn-primary .badge{color:#337ab7;background-color:#fff}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-success:hover,.btn-success:focus,.btn-success.focus,.btn-success:active,.btn-success.active,.open>.dropdown-toggle.btn-success{color:#fff;background-color:#449d44;border-color:#398439}.btn-success:active,.btn-success.active,.open>.dropdown-toggle.btn-success{background-image:none}.btn-success.disabled,.btn-success[disabled],fieldset[disabled] .btn-success,.btn-success.disabled:hover,.btn-success[disabled]:hover,fieldset[disabled] .btn-success:hover,.btn-success.disabled:focus,.btn-success[disabled]:focus,fieldset[disabled] .btn-success:focus,.btn-success.disabled.focus,.btn-success[disabled].focus,fieldset[disabled] .btn-success.focus,.btn-success.disabled:active,.btn-success[disabled]:active,fieldset[disabled] .btn-success:active,.btn-success.disabled.active,.btn-success[disabled].active,fieldset[disabled] .btn-success.active{background-color:#5cb85c;border-color:#4cae4c}.btn-success .badge{color:#5cb85c;background-color:#fff}.btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.btn-info:hover,.btn-info:focus,.btn-info.focus,.btn-info:active,.btn-info.active,.open>.dropdown-toggle.btn-info{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info:active,.btn-info.active,.open>.dropdown-toggle.btn-info{background-image:none}.btn-info.disabled,.btn-info[disabled],fieldset[disabled] .btn-info,.btn-info.disabled:hover,.btn-info[disabled]:hover,fieldset[disabled] .btn-info:hover,.btn-info.disabled:focus,.btn-info[disabled]:focus,fieldset[disabled] .btn-info:focus,.btn-info.disabled.focus,.btn-info[disabled].focus,fieldset[disabled] .btn-info.focus,.btn-info.disabled:active,.btn-info[disabled]:active,fieldset[disabled] .btn-info:active,.btn-info.disabled.active,.btn-info[disabled].active,fieldset[disabled] .btn-info.active{background-color:#5bc0de;border-color:#46b8da}.btn-info .badge{color:#5bc0de;background-color:#fff}.btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.btn-warning:hover,.btn-warning:focus,.btn-warning.focus,.btn-warning:active,.btn-warning.active,.open>.dropdown-toggle.btn-warning{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning:active,.btn-warning.active,.open>.dropdown-toggle.btn-warning{background-image:none}.btn-warning.disabled,.btn-warning[disabled],fieldset[disabled] .btn-warning,.btn-warning.disabled:hover,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning:hover,.btn-warning.disabled:focus,.btn-warning[disabled]:focus,fieldset[disabled] .btn-warning:focus,.btn-warning.disabled.focus,.btn-warning[disabled].focus,fieldset[disabled] .btn-warning.focus,.btn-warning.disabled:active,.btn-warning[disabled]:active,fieldset[disabled] .btn-warning:active,.btn-warning.disabled.active,.btn-warning[disabled].active,fieldset[disabled] .btn-warning.active{background-color:#f0ad4e;border-color:#eea236}.btn-warning .badge{color:#f0ad4e;background-color:#fff}.btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.btn-danger:hover,.btn-danger:focus,.btn-danger.focus,.btn-danger:active,.btn-danger.active,.open>.dropdown-toggle.btn-danger{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger:active,.btn-danger.active,.open>.dropdown-toggle.btn-danger{background-image:none}.btn-danger.disabled,.btn-danger[disabled],fieldset[disabled] .btn-danger,.btn-danger.disabled:hover,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger:hover,.btn-danger.disabled:focus,.btn-danger[disabled]:focus,fieldset[disabled] .btn-danger:focus,.btn-danger.disabled.focus,.btn-danger[disabled].focus,fieldset[disabled] .btn-danger.focus,.btn-danger.disabled:active,.btn-danger[disabled]:active,fieldset[disabled] .btn-danger:active,.btn-danger.disabled.active,.btn-danger[disabled].active,fieldset[disabled] .btn-danger.active{background-color:#d9534f;border-color:#d43f3a}.btn-danger .badge{color:#d9534f;background-color:#fff}.btn-link{color:#337ab7;font-weight:normal;border-radius:0}.btn-link,.btn-link:active,.btn-link.active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;-webkit-box-shadow:none;box-shadow:none}.btn-link,.btn-link:hover,.btn-link:focus,.btn-link:active{border-color:transparent}.btn-link:hover,.btn-link:focus{color:#23527c;text-decoration:underline;background-color:transparent}.btn-link[disabled]:hover,fieldset[disabled] .btn-link:hover,.btn-link[disabled]:focus,fieldset[disabled] .btn-link:focus{color:#777;text-decoration:none}.btn-lg{padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.btn-sm{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-xs{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:5px}input[type="submit"].btn-block,input[type="reset"].btn-block,input[type="button"].btn-block{width:100%}.clearfix:before,.clearfix:after,.dl-horizontal dd:before,.dl-horizontal dd:after,.container:before,.container:after,.container-fluid:before,.container-fluid:after,.row:before,.row:after{content:" ";display:table}.clearfix:after,.dl-horizontal dd:after,.container:after,.container-fluid:after,.row:after{clear:both}.center-block{display:block;margin-left:auto;margin-right:auto}.pull-right{float:right !important}.pull-left{float:left !important}.hide{display:none !important}.show{display:block !important}.invisible{visibility:hidden}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.hidden{display:none !important}.affix{position:fixed}@-ms-viewport{width:device-width}.visible-xs,.visible-sm,.visible-md,.visible-lg{display:none !important}.visible-xs-block,.visible-xs-inline,.visible-xs-inline-block,.visible-sm-block,.visible-sm-inline,.visible-sm-inline-block,.visible-md-block,.visible-md-inline,.visible-md-inline-block,.visible-lg-block,.visible-lg-inline,.visible-lg-inline-block{display:none !important}@media (max-width:767px){.visible-xs{display:block !important}table.visible-xs{display:table}tr.visible-xs{display:table-row !important}th.visible-xs,td.visible-xs{display:table-cell !important}}@media (max-width:767px){.visible-xs-block{display:block !important}}@media (max-width:767px){.visible-xs-inline{display:inline !important}}@media (max-width:767px){.visible-xs-inline-block{display:inline-block !important}}@media (min-width:768px) and (max-width:991px){.visible-sm{display:block !important}table.visible-sm{display:table}tr.visible-sm{display:table-row !important}th.visible-sm,td.visible-sm{display:table-cell !important}}@media (min-width:768px) and (max-width:991px){.visible-sm-block{display:block !important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline{display:inline !important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline-block{display:inline-block !important}}@media (min-width:992px) and (max-width:1199px){.visible-md{display:block !important}table.visible-md{display:table}tr.visible-md{display:table-row !important}th.visible-md,td.visible-md{display:table-cell !important}}@media (min-width:992px) and (max-width:1199px){.visible-md-block{display:block !important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline{display:inline !important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline-block{display:inline-block !important}}@media (min-width:1200px){.visible-lg{display:block !important}table.visible-lg{display:table}tr.visible-lg{display:table-row !important}th.visible-lg,td.visible-lg{display:table-cell !important}}@media (min-width:1200px){.visible-lg-block{display:block !important}}@media (min-width:1200px){.visible-lg-inline{display:inline !important}}@media (min-width:1200px){.visible-lg-inline-block{display:inline-block !important}}@media (max-width:767px){.hidden-xs{display:none !important}}@media (min-width:768px) and (max-width:991px){.hidden-sm{display:none !important}}@media (min-width:992px) and (max-width:1199px){.hidden-md{display:none !important}}@media (min-width:1200px){.hidden-lg{display:none !important}}.visible-print{display:none !important}@media print{.visible-print{display:block !important}table.visible-print{display:table}tr.visible-print{display:table-row !important}th.visible-print,td.visible-print{display:table-cell !important}}.visible-print-block{display:none !important}@media print{.visible-print-block{display:block !important}}.visible-print-inline{display:none !important}@media print{.visible-print-inline{display:inline !important}}.visible-print-inline-block{display:none !important}@media print{.visible-print-inline-block{display:inline-block !important}}@media print{.hidden-print{display:none !important}} \ No newline at end of file diff --git a/src/Orchard.Web/Modules/Orchard.Dashboards/Views/Content.Dashboard.cshtml b/src/Orchard.Web/Modules/Orchard.Dashboards/Views/Content.Dashboard.cshtml index 0a2314036..acf2baa2f 100644 --- a/src/Orchard.Web/Modules/Orchard.Dashboards/Views/Content.Dashboard.cshtml +++ b/src/Orchard.Web/Modules/Orchard.Dashboards/Views/Content.Dashboard.cshtml @@ -1,6 +1,6 @@ @using Orchard.ContentManagement @{ - Style.Include("bootstrap.css", "bootstrap.min.css"); + Style.Require("Bootstrap"); Style.Require("FontAwesome"); Style.Include("dashboard.css"); } diff --git a/src/Orchard.Web/Modules/Orchard.Dashboards/Web.config b/src/Orchard.Web/Modules/Orchard.Dashboards/Web.config index 9b7caa13f..dbc0e9c46 100644 --- a/src/Orchard.Web/Modules/Orchard.Dashboards/Web.config +++ b/src/Orchard.Web/Modules/Orchard.Dashboards/Web.config @@ -21,6 +21,12 @@ + + + + + + diff --git a/src/Orchard.Web/Modules/Orchard.DesignerTools/Orchard.DesignerTools.csproj b/src/Orchard.Web/Modules/Orchard.DesignerTools/Orchard.DesignerTools.csproj index 7c401fd83..3c7f2f579 100644 --- a/src/Orchard.Web/Modules/Orchard.DesignerTools/Orchard.DesignerTools.csproj +++ b/src/Orchard.Web/Modules/Orchard.DesignerTools/Orchard.DesignerTools.csproj @@ -37,7 +37,7 @@ 4 ..\..\..\OrchardBasicCorrectness.ruleset false - 5 + 6 pdbonly @@ -48,7 +48,7 @@ 4 AllRules.ruleset false - 5 + 6 @@ -136,7 +136,7 @@ {2d1d92bb-4555-4cbe-8d0e-63563d6ce4c6} Orchard.Framework - false + $(MvcBuildViews) {194d3ccc-1153-474d-8176-fde8d7d0d0bd} @@ -173,7 +173,7 @@ --> - + diff --git a/src/Orchard.Web/Modules/Orchard.DesignerTools/Web.config b/src/Orchard.Web/Modules/Orchard.DesignerTools/Web.config index bfeea149d..c8e5ecc71 100644 --- a/src/Orchard.Web/Modules/Orchard.DesignerTools/Web.config +++ b/src/Orchard.Web/Modules/Orchard.DesignerTools/Web.config @@ -21,6 +21,12 @@ + + + + + + diff --git a/src/Orchard.Web/Modules/Orchard.DynamicForms/Handlers/FormSubmissionCoordinator.cs b/src/Orchard.Web/Modules/Orchard.DynamicForms/Handlers/FormSubmissionCoordinator.cs index 87bf0ba6a..361037b40 100644 --- a/src/Orchard.Web/Modules/Orchard.DynamicForms/Handlers/FormSubmissionCoordinator.cs +++ b/src/Orchard.Web/Modules/Orchard.DynamicForms/Handlers/FormSubmissionCoordinator.cs @@ -50,6 +50,7 @@ namespace Orchard.DynamicForms.Handlers { var contentItem = default(ContentItem); if (form.CreateContent == true && !String.IsNullOrWhiteSpace(form.FormBindingContentType)) { contentItem = formService.CreateContentItem(form, context.ValueProvider); + formTokenContext.CreatedContent = contentItem; } // Notifiy. @@ -60,4 +61,4 @@ namespace Orchard.DynamicForms.Handlers { _workflowManager.TriggerEvent(DynamicFormSubmittedActivity.EventName, contentItem, () => tokenData); } } -} \ No newline at end of file +} diff --git a/src/Orchard.Web/Modules/Orchard.DynamicForms/Orchard.DynamicForms.csproj b/src/Orchard.Web/Modules/Orchard.DynamicForms/Orchard.DynamicForms.csproj index c56fd5218..2ffd14d98 100644 --- a/src/Orchard.Web/Modules/Orchard.DynamicForms/Orchard.DynamicForms.csproj +++ b/src/Orchard.Web/Modules/Orchard.DynamicForms/Orchard.DynamicForms.csproj @@ -36,7 +36,7 @@ 4 ..\..\..\OrchardBasicCorrectness.ruleset false - 5 + 6 pdbonly @@ -47,7 +47,7 @@ 4 AllRules.ruleset false - 5 + 6 @@ -136,12 +136,12 @@ {2D1D92BB-4555-4CBE-8D0E-63563D6CE4C6} Orchard.Framework - false + $(MvcBuildViews) {9916839C-39FC-4CEB-A5AF-89CA7E87119F} Orchard.Core - false + $(MvcBuildViews) {91bc2e7f-da04-421c-98ef-76d37cec130c} @@ -586,7 +586,7 @@ --> - + diff --git a/src/Orchard.Web/Modules/Orchard.DynamicForms/Services/Models/FormSubmissionTokenContext.cs b/src/Orchard.Web/Modules/Orchard.DynamicForms/Services/Models/FormSubmissionTokenContext.cs index 870cdb833..a61cca42d 100644 --- a/src/Orchard.Web/Modules/Orchard.DynamicForms/Services/Models/FormSubmissionTokenContext.cs +++ b/src/Orchard.Web/Modules/Orchard.DynamicForms/Services/Models/FormSubmissionTokenContext.cs @@ -1,11 +1,13 @@ using System.Collections.Specialized; using System.Web.Mvc; using Orchard.DynamicForms.Elements; +using Orchard.ContentManagement; namespace Orchard.DynamicForms.Services.Models { public class FormSubmissionTokenContext { public Form Form { get; set; } public ModelStateDictionary ModelState { get; set; } public NameValueCollection PostedValues { get; set; } + public ContentItem CreatedContent { get; set; } } -} \ No newline at end of file +} diff --git a/src/Orchard.Web/Modules/Orchard.DynamicForms/Tokens/FormTokens.cs b/src/Orchard.Web/Modules/Orchard.DynamicForms/Tokens/FormTokens.cs index 68fbdb5c4..9da02aa62 100644 --- a/src/Orchard.Web/Modules/Orchard.DynamicForms/Tokens/FormTokens.cs +++ b/src/Orchard.Web/Modules/Orchard.DynamicForms/Tokens/FormTokens.cs @@ -9,6 +9,7 @@ namespace Orchard.DynamicForms.Tokens { context.For("FormSubmission", T("Dynamic Form submission"), T("Dynamic Form Submission tokens for use in workflows handling the Dynamic Form Submitted event.")) .Token("Field:*", T("Field:"), T("The posted field value to access."), "Text") .Token("IsValid:*", T("IsValid:"), T("The posted field validation status.")) + .Token("CreatedContent", T("CreatedContent"), T("Id of the Content Item created by the form.")) ; } @@ -16,7 +17,9 @@ namespace Orchard.DynamicForms.Tokens { context.For("FormSubmission") .Token(token => token.StartsWith("Field:", StringComparison.OrdinalIgnoreCase) ? token.Substring("Field:".Length) : null, GetFieldValue) .Chain(FilterChainParam, "Text", GetFieldValue) - .Token(token => token.StartsWith("IsValid:", StringComparison.OrdinalIgnoreCase) ? token.Substring("IsValid:".Length) : null, GetFieldValidationStatus); + .Token(token => token.StartsWith("IsValid:", StringComparison.OrdinalIgnoreCase) ? token.Substring("IsValid:".Length) : null, GetFieldValidationStatus) + .Token("CreatedContent", GetCreatedContent) + .Chain("CreatedContent", "Content", GetCreatedContent); } private static Tuple FilterChainParam(string token) { @@ -35,5 +38,10 @@ namespace Orchard.DynamicForms.Tokens { private object GetFieldValidationStatus(string fieldName, FormSubmissionTokenContext context) { return context.ModelState.IsValidField(fieldName); } + + private object GetCreatedContent(FormSubmissionTokenContext context) + { + return context.CreatedContent; + } } -} \ No newline at end of file +} diff --git a/src/Orchard.Web/Modules/Orchard.DynamicForms/Views/SubmissionAdmin/Index.cshtml b/src/Orchard.Web/Modules/Orchard.DynamicForms/Views/SubmissionAdmin/Index.cshtml index e13df3d4f..53e30dbb0 100644 --- a/src/Orchard.Web/Modules/Orchard.DynamicForms/Views/SubmissionAdmin/Index.cshtml +++ b/src/Orchard.Web/Modules/Orchard.DynamicForms/Views/SubmissionAdmin/Index.cshtml @@ -2,7 +2,6 @@ @using Orchard.Utility.Extensions @model Orchard.DynamicForms.ViewModels.SubmissionsIndexViewModel @{ - Style.Include("forms-admin.css", "forms-admin.min.css"); // TODO: Shouldn't this be a Style.Require()? Script.Require("ShapesBase"); Layout.Title = T("Submissions for {0}", Model.FormName); } diff --git a/src/Orchard.Web/Modules/Orchard.DynamicForms/Web.config b/src/Orchard.Web/Modules/Orchard.DynamicForms/Web.config index 3ea3828a3..aa966f812 100644 --- a/src/Orchard.Web/Modules/Orchard.DynamicForms/Web.config +++ b/src/Orchard.Web/Modules/Orchard.DynamicForms/Web.config @@ -21,6 +21,12 @@ + + + + + + diff --git a/src/Orchard.Web/Modules/Orchard.Email/Orchard.Email.csproj b/src/Orchard.Web/Modules/Orchard.Email/Orchard.Email.csproj index 0e891f1f8..7d3a33d52 100644 --- a/src/Orchard.Web/Modules/Orchard.Email/Orchard.Email.csproj +++ b/src/Orchard.Web/Modules/Orchard.Email/Orchard.Email.csproj @@ -37,7 +37,7 @@ 4 ..\..\..\OrchardBasicCorrectness.ruleset false - 5 + 6 pdbonly @@ -48,7 +48,7 @@ 4 AllRules.ruleset false - 5 + 6 @@ -128,12 +128,12 @@ {2D1D92BB-4555-4CBE-8D0E-63563D6CE4C6} Orchard.Framework - false + $(MvcBuildViews) {9916839C-39FC-4CEB-A5AF-89CA7E87119F} Orchard.Core - false + $(MvcBuildViews) {642a49d7-8752-4177-80d6-bfbbcfad3de0} @@ -193,7 +193,7 @@ --> - + diff --git a/src/Orchard.Web/Modules/Orchard.Email/Web.config b/src/Orchard.Web/Modules/Orchard.Email/Web.config index a3cb5df90..e30edbf7e 100644 --- a/src/Orchard.Web/Modules/Orchard.Email/Web.config +++ b/src/Orchard.Web/Modules/Orchard.Email/Web.config @@ -21,6 +21,12 @@ + + + + + + diff --git a/src/Orchard.Web/Modules/Orchard.Fields/Orchard.Fields.csproj b/src/Orchard.Web/Modules/Orchard.Fields/Orchard.Fields.csproj index 10ef91214..3d3ef2c05 100644 --- a/src/Orchard.Web/Modules/Orchard.Fields/Orchard.Fields.csproj +++ b/src/Orchard.Web/Modules/Orchard.Fields/Orchard.Fields.csproj @@ -37,7 +37,7 @@ 4 ..\..\..\OrchardBasicCorrectness.ruleset false - 5 + 6 pdbonly @@ -48,7 +48,7 @@ 4 AllRules.ruleset false - 5 + 6 @@ -109,12 +109,12 @@ {2D1D92BB-4555-4CBE-8D0E-63563D6CE4C6} Orchard.Framework - false + $(MvcBuildViews) {9916839C-39FC-4CEB-A5AF-89CA7E87119F} Orchard.Core - false + $(MvcBuildViews) {6f759635-13d7-4e94-bcc9-80445d63f117} @@ -203,7 +203,7 @@ --> - + diff --git a/src/Orchard.Web/Modules/Orchard.Fields/Web.config b/src/Orchard.Web/Modules/Orchard.Fields/Web.config index ab41a6ad3..1e0726e8e 100644 --- a/src/Orchard.Web/Modules/Orchard.Fields/Web.config +++ b/src/Orchard.Web/Modules/Orchard.Fields/Web.config @@ -22,6 +22,12 @@ + + + + + + diff --git a/src/Orchard.Web/Modules/Orchard.Forms/Orchard.Forms.csproj b/src/Orchard.Web/Modules/Orchard.Forms/Orchard.Forms.csproj index a2976b798..1a6c62485 100644 --- a/src/Orchard.Web/Modules/Orchard.Forms/Orchard.Forms.csproj +++ b/src/Orchard.Web/Modules/Orchard.Forms/Orchard.Forms.csproj @@ -37,7 +37,7 @@ 4 ..\..\..\OrchardBasicCorrectness.ruleset false - 5 + 6 pdbonly @@ -48,7 +48,7 @@ 4 AllRules.ruleset false - 5 + 6 @@ -113,12 +113,12 @@ {2D1D92BB-4555-4CBE-8D0E-63563D6CE4C6} Orchard.Framework - false + $(MvcBuildViews) {9916839C-39FC-4CEB-A5AF-89CA7E87119F} Orchard.Core - false + $(MvcBuildViews) @@ -159,7 +159,7 @@ --> - + diff --git a/src/Orchard.Web/Modules/Orchard.Forms/Web.config b/src/Orchard.Web/Modules/Orchard.Forms/Web.config index a3cb5df90..e30edbf7e 100644 --- a/src/Orchard.Web/Modules/Orchard.Forms/Web.config +++ b/src/Orchard.Web/Modules/Orchard.Forms/Web.config @@ -21,6 +21,12 @@ + + + + + + diff --git a/src/Orchard.Web/Modules/Orchard.ImageEditor/Controllers/AdminController.cs b/src/Orchard.Web/Modules/Orchard.ImageEditor/Controllers/AdminController.cs index 2ae820faa..c4fe4be8f 100644 --- a/src/Orchard.Web/Modules/Orchard.ImageEditor/Controllers/AdminController.cs +++ b/src/Orchard.Web/Modules/Orchard.ImageEditor/Controllers/AdminController.cs @@ -45,12 +45,12 @@ namespace Orchard.ImageEditor.Controllers { [Themed(false)] public ActionResult Edit(string folderPath, string filename) { - if (!Services.Authorizer.Authorize(Permissions.ManageOwnMedia)) + if (!_mediaLibraryService.CheckMediaFolderPermission(Permissions.EditMediaContent, folderPath)) return new HttpUnauthorizedResult(); // Check permission. var rootMediaFolder = _mediaLibraryService.GetRootMediaFolder(); - if (!Services.Authorizer.Authorize(Permissions.ManageMediaContent) && !_mediaLibraryService.CanManageMediaFolder(folderPath)) { + if (!_mediaLibraryService.CanManageMediaFolder(folderPath)) { return new HttpUnauthorizedResult(); } @@ -84,7 +84,7 @@ namespace Orchard.ImageEditor.Controllers { // Check permission. var rootMediaFolder = _mediaLibraryService.GetRootMediaFolder(); - if (!Services.Authorizer.Authorize(Permissions.ManageMediaContent) && !_mediaLibraryService.CanManageMediaFolder(media.FolderPath)) { + if (!Services.Authorizer.Authorize(Permissions.ImportMediaContent) && !_mediaLibraryService.CanManageMediaFolder(media.FolderPath)) { return new HttpUnauthorizedResult(); } diff --git a/src/Orchard.Web/Modules/Orchard.ImageEditor/Orchard.ImageEditor.csproj b/src/Orchard.Web/Modules/Orchard.ImageEditor/Orchard.ImageEditor.csproj index f3409489d..924e7354c 100644 --- a/src/Orchard.Web/Modules/Orchard.ImageEditor/Orchard.ImageEditor.csproj +++ b/src/Orchard.Web/Modules/Orchard.ImageEditor/Orchard.ImageEditor.csproj @@ -36,7 +36,7 @@ 4 ..\..\..\OrchardBasicCorrectness.ruleset false - 5 + 6 pdbonly @@ -47,7 +47,7 @@ 4 AllRules.ruleset false - 5 + 6 @@ -119,12 +119,12 @@ {2D1D92BB-4555-4CBE-8D0E-63563D6CE4C6} Orchard.Framework - false + $(MvcBuildViews) {9916839C-39FC-4CEB-A5AF-89CA7E87119F} Orchard.Core - false + $(MvcBuildViews) {73a7688a-5bd3-4f7e-adfa-ce36c5a10e3b} @@ -212,7 +212,7 @@ --> - + diff --git a/src/Orchard.Web/Modules/Orchard.ImageEditor/Web.config b/src/Orchard.Web/Modules/Orchard.ImageEditor/Web.config index 67d02d6a0..393db87e9 100644 --- a/src/Orchard.Web/Modules/Orchard.ImageEditor/Web.config +++ b/src/Orchard.Web/Modules/Orchard.ImageEditor/Web.config @@ -21,6 +21,12 @@ + + + + + + diff --git a/src/Orchard.Web/Modules/Orchard.ImportExport/Orchard.ImportExport.csproj b/src/Orchard.Web/Modules/Orchard.ImportExport/Orchard.ImportExport.csproj index 437748359..bd5fddc2c 100644 --- a/src/Orchard.Web/Modules/Orchard.ImportExport/Orchard.ImportExport.csproj +++ b/src/Orchard.Web/Modules/Orchard.ImportExport/Orchard.ImportExport.csproj @@ -37,7 +37,7 @@ 4 ..\..\..\OrchardBasicCorrectness.ruleset false - 5 + 6 pdbonly @@ -47,7 +47,7 @@ prompt 4 false - 5 + 6 @@ -147,16 +147,12 @@ {2D1D92BB-4555-4CBE-8D0E-63563D6CE4C6} Orchard.Framework - false + $(MvcBuildViews) {9916839C-39FC-4CEB-A5AF-89CA7E87119F} Orchard.Core - false - - - {72457126-e118-4171-a08f-9a709ee4b7fc} - Orchard.MultiTenancy + $(MvcBuildViews) {fc1d74e8-7a4d-48f4-83de-95c6173780c4} diff --git a/src/Orchard.Web/Modules/Orchard.ImportExport/Web.config b/src/Orchard.Web/Modules/Orchard.ImportExport/Web.config index a3cb5df90..e30edbf7e 100644 --- a/src/Orchard.Web/Modules/Orchard.ImportExport/Web.config +++ b/src/Orchard.Web/Modules/Orchard.ImportExport/Web.config @@ -21,6 +21,12 @@ + + + + + + diff --git a/src/Orchard.Web/Modules/Orchard.Indexing/Orchard.Indexing.csproj b/src/Orchard.Web/Modules/Orchard.Indexing/Orchard.Indexing.csproj index e7f25ce84..27e822e39 100644 --- a/src/Orchard.Web/Modules/Orchard.Indexing/Orchard.Indexing.csproj +++ b/src/Orchard.Web/Modules/Orchard.Indexing/Orchard.Indexing.csproj @@ -37,7 +37,7 @@ 4 ..\..\..\OrchardBasicCorrectness.ruleset false - 5 + 6 pdbonly @@ -48,7 +48,7 @@ 4 AllRules.ruleset false - 5 + 6 @@ -127,10 +127,12 @@ {2D1D92BB-4555-4CBE-8D0E-63563D6CE4C6} Orchard.Framework + $(MvcBuildViews) {9916839C-39FC-4CEB-A5AF-89CA7E87119F} Orchard.Core + $(MvcBuildViews) diff --git a/src/Orchard.Web/Modules/Orchard.Indexing/Web.config b/src/Orchard.Web/Modules/Orchard.Indexing/Web.config index a3cb5df90..e30edbf7e 100644 --- a/src/Orchard.Web/Modules/Orchard.Indexing/Web.config +++ b/src/Orchard.Web/Modules/Orchard.Indexing/Web.config @@ -21,6 +21,12 @@ + + + + + + diff --git a/src/Orchard.Web/Modules/Orchard.JobsQueue/Orchard.JobsQueue.csproj b/src/Orchard.Web/Modules/Orchard.JobsQueue/Orchard.JobsQueue.csproj index 634b6dedc..683b737a8 100644 --- a/src/Orchard.Web/Modules/Orchard.JobsQueue/Orchard.JobsQueue.csproj +++ b/src/Orchard.Web/Modules/Orchard.JobsQueue/Orchard.JobsQueue.csproj @@ -37,7 +37,7 @@ prompt 4 false - 5 + 6 ..\..\..\OrchardBasicCorrectness.ruleset @@ -49,7 +49,7 @@ 4 AllRules.ruleset false - 5 + 6 @@ -132,12 +132,12 @@ {2D1D92BB-4555-4CBE-8D0E-63563D6CE4C6} Orchard.Framework - false + $(MvcBuildViews) {9916839c-39fc-4ceb-a5af-89ca7e87119f} Orchard.Core - false + $(MvcBuildViews) {642a49d7-8752-4177-80d6-bfbbcfad3de0} diff --git a/src/Orchard.Web/Modules/Orchard.JobsQueue/Tests/Orchard.Messaging.Tests.csproj b/src/Orchard.Web/Modules/Orchard.JobsQueue/Tests/Orchard.Messaging.Tests.csproj index a230cf9e2..efcfc33e7 100644 --- a/src/Orchard.Web/Modules/Orchard.JobsQueue/Tests/Orchard.Messaging.Tests.csproj +++ b/src/Orchard.Web/Modules/Orchard.JobsQueue/Tests/Orchard.Messaging.Tests.csproj @@ -23,7 +23,7 @@ prompt 4 false - 5 + 6 pdbonly @@ -33,7 +33,7 @@ prompt 4 false - 5 + 6 diff --git a/src/Orchard.Web/Modules/Orchard.JobsQueue/Web.config b/src/Orchard.Web/Modules/Orchard.JobsQueue/Web.config index a3cb5df90..e30edbf7e 100644 --- a/src/Orchard.Web/Modules/Orchard.JobsQueue/Web.config +++ b/src/Orchard.Web/Modules/Orchard.JobsQueue/Web.config @@ -21,6 +21,12 @@ + + + + + + diff --git a/src/Orchard.Web/Modules/Orchard.Layouts/Orchard.Layouts.csproj b/src/Orchard.Web/Modules/Orchard.Layouts/Orchard.Layouts.csproj index 9fca99e57..8fae18832 100644 --- a/src/Orchard.Web/Modules/Orchard.Layouts/Orchard.Layouts.csproj +++ b/src/Orchard.Web/Modules/Orchard.Layouts/Orchard.Layouts.csproj @@ -36,7 +36,7 @@ 4 ..\..\..\OrchardBasicCorrectness.ruleset false - 5 + 6 pdbonly @@ -47,7 +47,7 @@ 4 AllRules.ruleset false - 5 + 6 @@ -265,10 +265,12 @@ {2D1D92BB-4555-4CBE-8D0E-63563D6CE4C6} Orchard.Framework + $(MvcBuildViews) {9916839C-39FC-4CEB-A5AF-89CA7E87119F} Orchard.Core + $(MvcBuildViews) {3158c928-888c-4a84-8bc1-4a8257489538} @@ -619,7 +621,7 @@ --> - + diff --git a/src/Orchard.Web/Modules/Orchard.Layouts/Web.config b/src/Orchard.Web/Modules/Orchard.Layouts/Web.config index 670c23e86..282aaa74d 100644 --- a/src/Orchard.Web/Modules/Orchard.Layouts/Web.config +++ b/src/Orchard.Web/Modules/Orchard.Layouts/Web.config @@ -21,6 +21,12 @@ + + + + + + diff --git a/src/Orchard.Web/Modules/Orchard.Lists/Orchard.Lists.csproj b/src/Orchard.Web/Modules/Orchard.Lists/Orchard.Lists.csproj index 7b9235565..bb5419bdb 100644 --- a/src/Orchard.Web/Modules/Orchard.Lists/Orchard.Lists.csproj +++ b/src/Orchard.Web/Modules/Orchard.Lists/Orchard.Lists.csproj @@ -37,7 +37,7 @@ 4 ..\..\..\OrchardBasicCorrectness.ruleset false - 5 + 6 pdbonly @@ -48,7 +48,7 @@ 4 AllRules.ruleset false - 5 + 6 @@ -129,12 +129,12 @@ {2D1D92BB-4555-4CBE-8D0E-63563D6CE4C6} Orchard.Framework - false + $(MvcBuildViews) {9916839C-39FC-4CEB-A5AF-89CA7E87119F} Orchard.Core - false + $(MvcBuildViews) @@ -254,7 +254,7 @@ --> - + diff --git a/src/Orchard.Web/Modules/Orchard.Lists/Web.config b/src/Orchard.Web/Modules/Orchard.Lists/Web.config index a3cb5df90..e30edbf7e 100644 --- a/src/Orchard.Web/Modules/Orchard.Lists/Web.config +++ b/src/Orchard.Web/Modules/Orchard.Lists/Web.config @@ -21,6 +21,12 @@ + + + + + + diff --git a/src/Orchard.Web/Modules/Orchard.Localization/Orchard.Localization.csproj b/src/Orchard.Web/Modules/Orchard.Localization/Orchard.Localization.csproj index d412dc084..ba945ddba 100644 --- a/src/Orchard.Web/Modules/Orchard.Localization/Orchard.Localization.csproj +++ b/src/Orchard.Web/Modules/Orchard.Localization/Orchard.Localization.csproj @@ -36,7 +36,7 @@ prompt 4 false - 5 + 6 ..\..\..\OrchardBasicCorrectness.ruleset @@ -48,7 +48,7 @@ 4 AllRules.ruleset false - 5 + 6 @@ -160,12 +160,12 @@ {2D1D92BB-4555-4CBE-8D0E-63563D6CE4C6} Orchard.Framework - false + $(MvcBuildViews) {9916839C-39FC-4CEB-A5AF-89CA7E87119F} Orchard.Core - false + $(MvcBuildViews) {475B6C45-B27C-438B-8966-908B9D6D1077} diff --git a/src/Orchard.Web/Modules/Orchard.Localization/Web.config b/src/Orchard.Web/Modules/Orchard.Localization/Web.config index a3cb5df90..e30edbf7e 100644 --- a/src/Orchard.Web/Modules/Orchard.Localization/Web.config +++ b/src/Orchard.Web/Modules/Orchard.Localization/Web.config @@ -21,6 +21,12 @@ + + + + + + diff --git a/src/Orchard.Web/Modules/Orchard.Media/Orchard.Media.csproj b/src/Orchard.Web/Modules/Orchard.Media/Orchard.Media.csproj index 0460988c7..eeaa7d2b0 100644 --- a/src/Orchard.Web/Modules/Orchard.Media/Orchard.Media.csproj +++ b/src/Orchard.Web/Modules/Orchard.Media/Orchard.Media.csproj @@ -37,7 +37,7 @@ 4 ..\..\..\OrchardBasicCorrectness.ruleset false - 5 + 6 pdbonly @@ -48,7 +48,7 @@ 4 AllRules.ruleset false - 5 + 6 @@ -131,12 +131,12 @@ {2D1D92BB-4555-4CBE-8D0E-63563D6CE4C6} Orchard.Framework - false + $(MvcBuildViews) {9916839C-39FC-4CEB-A5AF-89CA7E87119F} Orchard.Core - false + $(MvcBuildViews) @@ -188,7 +188,7 @@ --> - + diff --git a/src/Orchard.Web/Modules/Orchard.Media/Web.config b/src/Orchard.Web/Modules/Orchard.Media/Web.config index a3cb5df90..e30edbf7e 100644 --- a/src/Orchard.Web/Modules/Orchard.Media/Web.config +++ b/src/Orchard.Web/Modules/Orchard.Media/Web.config @@ -21,6 +21,12 @@ + + + + + + diff --git a/src/Orchard.Web/Modules/Orchard.MediaLibrary/AdminMenu.cs b/src/Orchard.Web/Modules/Orchard.MediaLibrary/AdminMenu.cs index 8d3d5f48d..1e28ed316 100644 --- a/src/Orchard.Web/Modules/Orchard.MediaLibrary/AdminMenu.cs +++ b/src/Orchard.Web/Modules/Orchard.MediaLibrary/AdminMenu.cs @@ -15,7 +15,8 @@ namespace Orchard.MediaLibrary { builder.AddImageSet("media-library") .Add(T("Media"), "6", menu => menu.Add(T("Media"), "0", item => item.Action("Index", "Admin", new { area = "Orchard.MediaLibrary" }) - .Permission(Permissions.ManageOwnMedia))); + .Permission(Permissions.ManageOwnMedia) + .Permission(Permissions.SelectMediaContent))); } } } \ No newline at end of file diff --git a/src/Orchard.Web/Modules/Orchard.MediaLibrary/Controllers/AdminController.cs b/src/Orchard.Web/Modules/Orchard.MediaLibrary/Controllers/AdminController.cs index 0d0fbaef4..b3e46c1ac 100644 --- a/src/Orchard.Web/Modules/Orchard.MediaLibrary/Controllers/AdminController.cs +++ b/src/Orchard.Web/Modules/Orchard.MediaLibrary/Controllers/AdminController.cs @@ -1,9 +1,11 @@ using System; -using System.IO; +using System.Collections.Generic; using System.Linq; using System.Web.Mvc; using Orchard.ContentManagement; +using Orchard.ContentManagement.MetaData; using Orchard.Core.Title.Models; +using Orchard.FileSystems.Media; using Orchard.Localization; using Orchard.Logging; using Orchard.MediaLibrary.Models; @@ -12,9 +14,7 @@ using Orchard.MediaLibrary.ViewModels; using Orchard.Mvc; using Orchard.Themes; using Orchard.UI.Navigation; -using Orchard.ContentManagement.MetaData; using Orchard.Validation; -using System.Collections.Generic; namespace Orchard.MediaLibrary.Controllers { [ValidateInput(false)] @@ -22,15 +22,18 @@ namespace Orchard.MediaLibrary.Controllers { private readonly IMediaLibraryService _mediaLibraryService; private readonly INavigationManager _navigationManager; private readonly IContentDefinitionManager _contentDefinitionManager; + private readonly IStorageProvider _storageProvider; public AdminController( IOrchardServices services, IMediaLibraryService mediaLibraryService, INavigationManager navigationManager, - IContentDefinitionManager contentDefinitionManager) { + IContentDefinitionManager contentDefinitionManager, + IStorageProvider storageProvider) { _mediaLibraryService = mediaLibraryService; _navigationManager = navigationManager; _contentDefinitionManager = contentDefinitionManager; + _storageProvider = storageProvider; Services = services; T = NullLocalizer.Instance; @@ -42,12 +45,18 @@ namespace Orchard.MediaLibrary.Controllers { public ILogger Logger { get; set; } public ActionResult Index(string folderPath = "", bool dialog = false) { - if (!Services.Authorizer.Authorize(Permissions.ManageOwnMedia, T("Cannot view media"))) + if (!_mediaLibraryService.CheckMediaFolderPermission(Permissions.SelectMediaContent, folderPath)) { + Services.Notifier.Add(UI.Notify.NotifyType.Error, T("Cannot select media")); return new HttpUnauthorizedResult(); + } + + var userMediaFolder = _mediaLibraryService.GetUserMediaFolder(); + if (Services.Authorizer.Authorize(Permissions.ManageOwnMedia) && !Services.Authorizer.Authorize(Permissions.ManageMediaContent)) + _storageProvider.TryCreateFolder(userMediaFolder.MediaPath); // If the user is trying to access a folder above his boundaries, redirect him to his home folder var rootMediaFolder = _mediaLibraryService.GetRootMediaFolder(); - if (!Services.Authorizer.Authorize(Permissions.ManageMediaContent) && !_mediaLibraryService.CanManageMediaFolder(folderPath)) { + if (!_mediaLibraryService.CheckMediaFolderPermission(Permissions.SelectMediaContent, folderPath) && !_mediaLibraryService.CanManageMediaFolder(folderPath)) { return RedirectToAction("Index", new { folderPath = rootMediaFolder.MediaPath, dialog }); } @@ -80,8 +89,10 @@ namespace Orchard.MediaLibrary.Controllers { } public ActionResult Import(string folderPath, int? replaceId = null) { - if (!Services.Authorizer.Authorize(Permissions.ManageOwnMedia, T("Cannot import media"))) - return new HttpUnauthorizedResult(); + if (!_mediaLibraryService.CheckMediaFolderPermission(Permissions.ImportMediaContent, folderPath)) { + Services.Notifier.Add(UI.Notify.NotifyType.Error, T("Cannot import media")); + return RedirectToAction("Index", new { folderPath = folderPath }); + } var mediaProviderMenu = _navigationManager.BuildMenu("mediaproviders"); var imageSets = _navigationManager.BuildImageSets("mediaproviders"); @@ -99,7 +110,7 @@ namespace Orchard.MediaLibrary.Controllers { return HttpNotFound(); // Check permission - if (!Services.Authorizer.Authorize(Permissions.ManageMediaContent) && !_mediaLibraryService.CanManageMediaFolder(replaceMedia.FolderPath)) { + if (!_mediaLibraryService.CheckMediaFolderPermission(Permissions.ImportMediaContent, folderPath) && !_mediaLibraryService.CanManageMediaFolder(replaceMedia.FolderPath)) { return new HttpUnauthorizedResult(); } @@ -107,7 +118,7 @@ namespace Orchard.MediaLibrary.Controllers { viewModel.FolderPath = replaceMedia.FolderPath; } else { // Check permission - if (!Services.Authorizer.Authorize(Permissions.ManageMediaContent) && !_mediaLibraryService.CanManageMediaFolder(folderPath)) { + if (!_mediaLibraryService.CheckMediaFolderPermission(Permissions.ImportMediaContent, folderPath) && !_mediaLibraryService.CanManageMediaFolder(folderPath)) { return new HttpUnauthorizedResult(); } } @@ -117,11 +128,19 @@ namespace Orchard.MediaLibrary.Controllers { [Themed(false)] public ActionResult MediaItems(string folderPath, int skip = 0, int count = 0, string order = "created", string mediaType = "") { - if (!Services.Authorizer.Authorize(Permissions.ManageOwnMedia, T("Cannot view media"))) - return new HttpUnauthorizedResult(); + if (!_mediaLibraryService.CheckMediaFolderPermission(Permissions.SelectMediaContent, folderPath)) { + Services.Notifier.Add(UI.Notify.NotifyType.Error, T("Cannot select media")); + var model = new MediaManagerMediaItemsViewModel { + MediaItems = new List(), + MediaItemsCount = 0, + FolderPath = folderPath + }; + + return View(model); + } // Check permission - if (!Services.Authorizer.Authorize(Permissions.ManageMediaContent) && !_mediaLibraryService.CanManageMediaFolder(folderPath)) { + if (!_mediaLibraryService.CheckMediaFolderPermission(Permissions.SelectMediaContent, folderPath) && !_mediaLibraryService.CanManageMediaFolder(folderPath)) { var model = new MediaManagerMediaItemsViewModel { MediaItems = new List(), MediaItemsCount = 0, @@ -150,12 +169,18 @@ namespace Orchard.MediaLibrary.Controllers { [Themed(false)] public ActionResult ChildFolders(string folderPath = null) { - if (!Services.Authorizer.Authorize(Permissions.ManageOwnMedia, T("Cannot get child folder listing"))) - return new HttpUnauthorizedResult(); + if (!_mediaLibraryService.CheckMediaFolderPermission(Permissions.SelectMediaContent, folderPath)) { + Services.Notifier.Add(UI.Notify.NotifyType.Error, T("Cannot get child folder listing")); + var model = new MediaManagerChildFoldersViewModel { + Children = new IMediaFolder[0] + }; + + return View(model); + } // Check permission var rootMediaFolder = _mediaLibraryService.GetRootMediaFolder(); - if (!Services.Authorizer.Authorize(Permissions.ManageMediaContent) && !_mediaLibraryService.CanManageMediaFolder(folderPath)) { + if (!_mediaLibraryService.CanManageMediaFolder(folderPath)) { var model = new MediaManagerChildFoldersViewModel { Children = new IMediaFolder[0] }; @@ -174,8 +199,10 @@ namespace Orchard.MediaLibrary.Controllers { [Themed(false)] public ActionResult RecentMediaItems(int skip = 0, int count = 0, string order = "created", string mediaType = "") { - if (!Services.Authorizer.Authorize(Permissions.ManageOwnMedia, T("Cannot view media"))) + if (!Services.Authorizer.Authorize(Permissions.ManageOwnMedia)) { + Services.Notifier.Add(UI.Notify.NotifyType.Error, T("Cannot view media")); return new HttpUnauthorizedResult(); + } var rootMediaFolder = _mediaLibraryService.GetRootMediaFolder(); var rootMediaFolderPath = rootMediaFolder == null ? null : rootMediaFolder.MediaPath; @@ -203,9 +230,10 @@ namespace Orchard.MediaLibrary.Controllers { if (contentItem == null) return HttpNotFound(); - if (!Services.Authorizer.Authorize(Permissions.ManageOwnMedia, contentItem, T("Cannot view media")) - || !_mediaLibraryService.CanManageMediaFolder(contentItem.FolderPath)) + if (!_mediaLibraryService.CheckMediaFolderPermission(Permissions.SelectMediaContent, contentItem.FolderPath)) { + Services.Notifier.Add(UI.Notify.NotifyType.Error, T("Cannot select media")); return new HttpUnauthorizedResult(); + } dynamic model = Services.ContentManager.BuildDisplay(contentItem, displayType); @@ -214,8 +242,10 @@ namespace Orchard.MediaLibrary.Controllers { [HttpPost] public ActionResult Delete(int[] mediaItemIds) { - if (!Services.Authorizer.Authorize(Permissions.ManageOwnMedia, T("Couldn't delete media items"))) + if (!Services.Authorizer.Authorize(Permissions.ManageOwnMedia)) { + Services.Notifier.Add(UI.Notify.NotifyType.Error, T("Couldn't delete media items")); return new HttpUnauthorizedResult(); + } var mediaItems = Services.ContentManager .Query(VersionOptions.Latest) @@ -226,9 +256,10 @@ namespace Orchard.MediaLibrary.Controllers { try { foreach (var media in mediaItems) { - if (_mediaLibraryService.CanManageMediaFolder(media.FolderPath)) { - Services.ContentManager.Remove(media.ContentItem); + if (!_mediaLibraryService.CheckMediaFolderPermission(Permissions.DeleteMediaContent, media.FolderPath)) { + return Json(false); } + Services.ContentManager.Remove(media.ContentItem); } return Json(true); @@ -241,14 +272,16 @@ namespace Orchard.MediaLibrary.Controllers { [HttpPost] public ActionResult Clone(int mediaItemId) { - if (!Services.Authorizer.Authorize(Permissions.ManageOwnMedia, T("Couldn't clone media items"))) + if (!Services.Authorizer.Authorize(Permissions.ManageOwnMedia)) { + Services.Notifier.Add(UI.Notify.NotifyType.Error, T("Couldn't clone media items")); return new HttpUnauthorizedResult(); + } try { var media = Services.ContentManager.Get(mediaItemId).As(); - if (!_mediaLibraryService.CanManageMediaFolder(media.FolderPath)) { - return new HttpUnauthorizedResult(); + if (!_mediaLibraryService.CheckMediaFolderPermission(Permissions.ImportMediaContent, media.FolderPath)) { + return Json(false); } var newFileName = _mediaLibraryService.GetUniqueFilename(media.FolderPath, media.FileName); diff --git a/src/Orchard.Web/Modules/Orchard.MediaLibrary/Controllers/ClientStorageController.cs b/src/Orchard.Web/Modules/Orchard.MediaLibrary/Controllers/ClientStorageController.cs index 9dba77cf3..946d7659f 100644 --- a/src/Orchard.Web/Modules/Orchard.MediaLibrary/Controllers/ClientStorageController.cs +++ b/src/Orchard.Web/Modules/Orchard.MediaLibrary/Controllers/ClientStorageController.cs @@ -39,12 +39,12 @@ namespace Orchard.MediaLibrary.Controllers { public ILogger Logger { get; set; } public ActionResult Index(string folderPath, string type, int? replaceId = null) { - if (!Services.Authorizer.Authorize(Permissions.ManageOwnMedia)) { + if (!_mediaLibraryService.CheckMediaFolderPermission(Permissions.SelectMediaContent, folderPath)) { return new HttpUnauthorizedResult(); } // Check permission - if (!Services.Authorizer.Authorize(Permissions.ManageMediaContent) && !_mediaLibraryService.CanManageMediaFolder(folderPath)) { + if (!_mediaLibraryService.CanManageMediaFolder(folderPath)) { return new HttpUnauthorizedResult(); } @@ -66,12 +66,12 @@ namespace Orchard.MediaLibrary.Controllers { [HttpPost] public ActionResult Upload(string folderPath, string type) { - if (!Services.Authorizer.Authorize(Permissions.ManageOwnMedia)) { + if (!_mediaLibraryService.CheckMediaFolderPermission(Permissions.ImportMediaContent, folderPath)) { return new HttpUnauthorizedResult(); } // Check permission - if (!Services.Authorizer.Authorize(Permissions.ManageMediaContent) && !_mediaLibraryService.CanManageMediaFolder(folderPath)) { + if (!_mediaLibraryService.CanManageMediaFolder(folderPath)) { return new HttpUnauthorizedResult(); } @@ -139,7 +139,8 @@ namespace Orchard.MediaLibrary.Controllers { return HttpNotFound(); // Check permission - if (!Services.Authorizer.Authorize(Permissions.ManageMediaContent) && !_mediaLibraryService.CanManageMediaFolder(replaceMedia.FolderPath)) { + if (!(_mediaLibraryService.CheckMediaFolderPermission(Permissions.EditMediaContent, replaceMedia.FolderPath) && _mediaLibraryService.CheckMediaFolderPermission(Permissions.ImportMediaContent, replaceMedia.FolderPath)) + && !_mediaLibraryService.CanManageMediaFolder(replaceMedia.FolderPath)) { return new HttpUnauthorizedResult(); } diff --git a/src/Orchard.Web/Modules/Orchard.MediaLibrary/Controllers/FolderController.cs b/src/Orchard.Web/Modules/Orchard.MediaLibrary/Controllers/FolderController.cs index 89d8fd9ca..08fda71ca 100644 --- a/src/Orchard.Web/Modules/Orchard.MediaLibrary/Controllers/FolderController.cs +++ b/src/Orchard.Web/Modules/Orchard.MediaLibrary/Controllers/FolderController.cs @@ -1,6 +1,7 @@ using System; using System.IO; using System.Linq; +using System.Text.RegularExpressions; using System.Web.Mvc; using Orchard.Localization; using Orchard.Logging; @@ -32,12 +33,14 @@ namespace Orchard.MediaLibrary.Controllers { public Localizer T { get; set; } public ActionResult Create(string folderPath) { - if (!Services.Authorizer.Authorize(Permissions.ManageOwnMedia, T("Couldn't create media folder"))) - return new HttpUnauthorizedResult(); + if (!(_mediaLibraryService.CheckMediaFolderPermission(Permissions.ImportMediaContent, folderPath) || _mediaLibraryService.CheckMediaFolderPermission(Permissions.EditMediaContent, folderPath))) { + Services.Notifier.Error(T("Couldn't create media folder")); + return RedirectToAction("Index", "Admin", new { area = "Orchard.MediaLibrary", folderPath = folderPath }); + } // If the user is trying to access a folder above his boundaries, redirect him to his home folder var rootMediaFolder = _mediaLibraryService.GetRootMediaFolder(); - if (!Services.Authorizer.Authorize(Permissions.ManageMediaContent) && !_mediaLibraryService.CanManageMediaFolder(folderPath)) { + if (!_mediaLibraryService.CanManageMediaFolder(folderPath)) { return RedirectToAction("Create", new { folderPath = rootMediaFolder.MediaPath }); } @@ -51,33 +54,42 @@ namespace Orchard.MediaLibrary.Controllers { [HttpPost, ActionName("Create")] public ActionResult Create() { - if (!Services.Authorizer.Authorize(Permissions.ManageOwnMedia, T("Couldn't create media folder"))) + if (!Services.Authorizer.Authorize(Permissions.ManageOwnMedia)) { + Services.Notifier.Error(T("Couldn't create media folder")); return new HttpUnauthorizedResult(); + } var viewModel = new MediaManagerFolderCreateViewModel(); UpdateModel(viewModel); - if (!_mediaLibraryService.CanManageMediaFolder(viewModel.FolderPath)) { + if (!(_mediaLibraryService.CheckMediaFolderPermission(Permissions.ImportMediaContent, viewModel.FolderPath) + || _mediaLibraryService.CheckMediaFolderPermission(Permissions.EditMediaContent, viewModel.FolderPath))) { return new HttpUnauthorizedResult(); } try { - _mediaLibraryService.CreateFolder(viewModel.FolderPath, viewModel.Name); - Services.Notifier.Success(T("Media folder created")); + bool valid = String.IsNullOrWhiteSpace(viewModel.Name) || Regex.IsMatch(viewModel.Name, @"^[^:?#\[\]@!$&'()*+,.;=\s\""\<\>\\\|%]+$"); + if (!valid) { + throw new ArgumentException(T("Folder contains invalid characters").ToString()); + } + else { + _mediaLibraryService.CreateFolder(viewModel.FolderPath, viewModel.Name); + Services.Notifier.Information(T("Media folder created")); + } } catch (ArgumentException argumentException) { Services.Notifier.Error(T("Creating Folder failed: {0}", argumentException.Message)); Services.TransactionManager.Cancel(); return View(viewModel); } - return RedirectToAction("Index", "Admin", new { area = "Orchard.MediaLibrary" }); - } public ActionResult Edit(string folderPath) { - if (!Services.Authorizer.Authorize(Permissions.ManageOwnMedia, T("Couldn't edit media folder"))) - return new HttpUnauthorizedResult(); + if (!(_mediaLibraryService.CheckMediaFolderPermission(Permissions.ImportMediaContent, folderPath) || _mediaLibraryService.CheckMediaFolderPermission(Permissions.EditMediaContent, folderPath))) { + Services.Notifier.Error(T("Couldn't edit media folder")); + return RedirectToAction("Index", "Admin", new { area = "Orchard.MediaLibrary", folderPath = folderPath }); + } if (!_mediaLibraryService.CanManageMediaFolder(folderPath)) { return new HttpUnauthorizedResult(); @@ -88,6 +100,10 @@ namespace Orchard.MediaLibrary.Controllers { return new HttpUnauthorizedResult(); } + // Shouldn't be able to rename Users folder + if (folderPath == "Users") { + return new HttpUnauthorizedResult(); + } var viewModel = new MediaManagerFolderEditViewModel { FolderPath = folderPath, @@ -100,13 +116,16 @@ namespace Orchard.MediaLibrary.Controllers { [HttpPost, ActionName("Edit")] [FormValueRequired("submit.Save")] public ActionResult Edit() { - if (!Services.Authorizer.Authorize(Permissions.ManageOwnMedia, T("Couldn't edit media folder"))) + if (!Services.Authorizer.Authorize(Permissions.ManageOwnMedia)) { + Services.Notifier.Error(T("Couldn't edit media folder")); return new HttpUnauthorizedResult(); + } var viewModel = new MediaManagerFolderEditViewModel(); UpdateModel(viewModel); - if (!_mediaLibraryService.CanManageMediaFolder(viewModel.FolderPath)) { + if (!(_mediaLibraryService.CheckMediaFolderPermission(Permissions.ImportMediaContent, viewModel.FolderPath) + || _mediaLibraryService.CheckMediaFolderPermission(Permissions.EditMediaContent, viewModel.FolderPath))) { return new HttpUnauthorizedResult(); } @@ -116,8 +135,14 @@ namespace Orchard.MediaLibrary.Controllers { } try { - _mediaLibraryService.RenameFolder(viewModel.FolderPath, viewModel.Name); - Services.Notifier.Success(T("Media folder renamed")); + bool valid = String.IsNullOrWhiteSpace(viewModel.Name) || Regex.IsMatch(viewModel.Name, @"^[^:?#\[\]@!$&'()*+,.;=\s\""\<\>\\\|%]+$"); + if (!valid) { + throw new ArgumentException(T("Folder contains invalid characters").ToString()); + } + else { + _mediaLibraryService.RenameFolder(viewModel.FolderPath, viewModel.Name); + Services.Notifier.Information(T("Media folder renamed")); + } } catch (Exception exception) { Services.Notifier.Error(T("Editing Folder failed: {0}", exception.Message)); @@ -130,16 +155,18 @@ namespace Orchard.MediaLibrary.Controllers { [HttpPost, ActionName("Edit")] [FormValueRequired("submit.Delete")] public ActionResult Delete() { - if (!Services.Authorizer.Authorize(Permissions.ManageOwnMedia, T("Couldn't delete media folder"))) + if (!Services.Authorizer.Authorize(Permissions.ManageOwnMedia)) { + Services.Notifier.Error(T("Couldn't delete media folder")); return new HttpUnauthorizedResult(); + } var viewModel = new MediaManagerFolderEditViewModel(); UpdateModel(viewModel); - if (!_mediaLibraryService.CanManageMediaFolder(viewModel.FolderPath)) { + if (!_mediaLibraryService.CheckMediaFolderPermission(Permissions.DeleteMediaContent, viewModel.FolderPath)) { return new HttpUnauthorizedResult(); - } + try { _mediaLibraryService.DeleteFolder(viewModel.FolderPath); Services.Notifier.Success(T("Media folder deleted")); @@ -155,8 +182,11 @@ namespace Orchard.MediaLibrary.Controllers { [HttpPost] public ActionResult Move(string folderPath, int[] mediaItemIds) { - if (!Services.Authorizer.Authorize(Permissions.ManageOwnMedia, T("Couldn't move media items"))) + // check permission on destination folder + if (!_mediaLibraryService.CheckMediaFolderPermission(Permissions.ImportMediaContent, folderPath)) { + Services.Notifier.Error(T("Couldn't move media items")); return new HttpUnauthorizedResult(); + } if (!_mediaLibraryService.CanManageMediaFolder(folderPath)) { return new HttpUnauthorizedResult(); @@ -166,6 +196,10 @@ namespace Orchard.MediaLibrary.Controllers { // don't try to rename the file if there is no associated media file if (!string.IsNullOrEmpty(media.FileName)) { + // check permission on source folder + if(!_mediaLibraryService.CheckMediaFolderPermission(Permissions.DeleteMediaContent, media.FolderPath)) { + return new HttpUnauthorizedResult(); + } var uniqueFilename = _mediaLibraryService.GetUniqueFilename(folderPath, media.FileName); _mediaLibraryService.MoveFile(media.FolderPath, media.FileName, folderPath, uniqueFilename); media.FileName = uniqueFilename; diff --git a/src/Orchard.Web/Modules/Orchard.MediaLibrary/Controllers/OEmbedController.cs b/src/Orchard.Web/Modules/Orchard.MediaLibrary/Controllers/OEmbedController.cs index e1b1c3241..2d42832ef 100644 --- a/src/Orchard.Web/Modules/Orchard.MediaLibrary/Controllers/OEmbedController.cs +++ b/src/Orchard.Web/Modules/Orchard.MediaLibrary/Controllers/OEmbedController.cs @@ -30,11 +30,11 @@ namespace Orchard.MediaLibrary.Controllers { public Localizer T { get; set; } public ActionResult Index(string folderPath, string type, int? replaceId) { - if (!Services.Authorizer.Authorize(Permissions.ManageOwnMedia)) + if (!_mediaLibraryService.CheckMediaFolderPermission(Permissions.SelectMediaContent, folderPath)) return new HttpUnauthorizedResult(); // Check permission - if (!Services.Authorizer.Authorize(Permissions.ManageMediaContent) && !_mediaLibraryService.CanManageMediaFolder(folderPath)) { + if (!_mediaLibraryService.CanManageMediaFolder(folderPath)) { return new HttpUnauthorizedResult(); } @@ -147,12 +147,12 @@ namespace Orchard.MediaLibrary.Controllers { [HttpPost, ValidateInput(false)] public ActionResult Import(string folderPath, string url, string document) { - if (!Services.Authorizer.Authorize(Permissions.ManageOwnMedia)) { + if (!_mediaLibraryService.CheckMediaFolderPermission(Permissions.ImportMediaContent, folderPath)) { return new HttpUnauthorizedResult(); } // Check permission - if (!Services.Authorizer.Authorize(Permissions.ManageMediaContent) && !_mediaLibraryService.CanManageMediaFolder(folderPath)) { + if (!_mediaLibraryService.CanManageMediaFolder(folderPath)) { return new HttpUnauthorizedResult(); } @@ -203,7 +203,8 @@ namespace Orchard.MediaLibrary.Controllers { return HttpNotFound(); // Check permission - if (!Services.Authorizer.Authorize(Permissions.ManageMediaContent) && !_mediaLibraryService.CanManageMediaFolder(replaceMedia.FolderPath)) { + if (!(_mediaLibraryService.CheckMediaFolderPermission(Permissions.EditMediaContent, replaceMedia.FolderPath) && _mediaLibraryService.CheckMediaFolderPermission(Permissions.ImportMediaContent, replaceMedia.FolderPath)) + && !_mediaLibraryService.CanManageMediaFolder(replaceMedia.FolderPath)) { return new HttpUnauthorizedResult(); } diff --git a/src/Orchard.Web/Modules/Orchard.MediaLibrary/Controllers/WebSearchController.cs b/src/Orchard.Web/Modules/Orchard.MediaLibrary/Controllers/WebSearchController.cs index 4cce84264..93d531298 100644 --- a/src/Orchard.Web/Modules/Orchard.MediaLibrary/Controllers/WebSearchController.cs +++ b/src/Orchard.Web/Modules/Orchard.MediaLibrary/Controllers/WebSearchController.cs @@ -35,12 +35,12 @@ namespace Orchard.MediaLibrary.Controllers { public Localizer T { get; set; } public ActionResult Index(string folderPath, string type, int? replaceId = null) { - if (!Services.Authorizer.Authorize(Permissions.ManageOwnMedia)) { + if (!_mediaLibraryService.CheckMediaFolderPermission(Permissions.SelectMediaContent, folderPath)) { return new HttpUnauthorizedResult(); } // Check permission - if (!Services.Authorizer.Authorize(Permissions.ManageMediaContent) && !_mediaLibraryService.CanManageMediaFolder(folderPath)) { + if (!_mediaLibraryService.CanManageMediaFolder(folderPath)) { return new HttpUnauthorizedResult(); } @@ -62,11 +62,11 @@ namespace Orchard.MediaLibrary.Controllers { [HttpPost] public ActionResult Import(string folderPath, string type, string url) { - if (!Services.Authorizer.Authorize(Permissions.ManageOwnMedia)) + if (!_mediaLibraryService.CheckMediaFolderPermission(Permissions.ImportMediaContent, folderPath)) return new HttpUnauthorizedResult(); // Check permission - if (!Services.Authorizer.Authorize(Permissions.ManageMediaContent) && !_mediaLibraryService.CanManageMediaFolder(folderPath)) { + if (!_mediaLibraryService.CanManageMediaFolder(folderPath)) { return new HttpUnauthorizedResult(); } @@ -109,7 +109,8 @@ namespace Orchard.MediaLibrary.Controllers { return HttpNotFound(); // Check permission - if (!Services.Authorizer.Authorize(Permissions.ManageMediaContent) && !_mediaLibraryService.CanManageMediaFolder(replaceMedia.FolderPath)) { + if (!(_mediaLibraryService.CheckMediaFolderPermission(Permissions.EditMediaContent, replaceMedia.FolderPath) && _mediaLibraryService.CheckMediaFolderPermission(Permissions.ImportMediaContent, replaceMedia.FolderPath)) + && !_mediaLibraryService.CanManageMediaFolder(replaceMedia.FolderPath)) { return new HttpUnauthorizedResult(); } diff --git a/src/Orchard.Web/Modules/Orchard.MediaLibrary/MediaFileName/MediaFileNameDriver.cs b/src/Orchard.Web/Modules/Orchard.MediaLibrary/MediaFileName/MediaFileNameDriver.cs index c42c18320..4aab2d815 100644 --- a/src/Orchard.Web/Modules/Orchard.MediaLibrary/MediaFileName/MediaFileNameDriver.cs +++ b/src/Orchard.Web/Modules/Orchard.MediaLibrary/MediaFileName/MediaFileNameDriver.cs @@ -39,7 +39,7 @@ namespace Orchard.MediaLibrary.MediaFileName "Parts_Media_Edit_FileName", () => { var currentUser = _authenticationService.GetAuthenticatedUser(); - if (!_authorizationService.TryCheckAccess(Permissions.ManageMediaContent, currentUser, part)) { + if (!_authorizationService.TryCheckAccess(Permissions.EditMediaContent, currentUser, part)) { return null; } diff --git a/src/Orchard.Web/Modules/Orchard.MediaLibrary/Orchard.MediaLibrary.csproj b/src/Orchard.Web/Modules/Orchard.MediaLibrary/Orchard.MediaLibrary.csproj index 969f9533e..ce77a161c 100644 --- a/src/Orchard.Web/Modules/Orchard.MediaLibrary/Orchard.MediaLibrary.csproj +++ b/src/Orchard.Web/Modules/Orchard.MediaLibrary/Orchard.MediaLibrary.csproj @@ -36,7 +36,7 @@ 4 ..\..\..\OrchardBasicCorrectness.ruleset false - 5 + 6 pdbonly @@ -47,7 +47,7 @@ 4 AllRules.ruleset false - 5 + 6 @@ -146,12 +146,12 @@ {2D1D92BB-4555-4CBE-8D0E-63563D6CE4C6} Orchard.Framework - false + $(MvcBuildViews) {9916839C-39FC-4CEB-A5AF-89CA7E87119F} Orchard.Core - false + $(MvcBuildViews) {0E7646E8-FE8F-43C1-8799-D97860925EC4} @@ -441,7 +441,7 @@ --> - + diff --git a/src/Orchard.Web/Modules/Orchard.MediaLibrary/Permissions.cs b/src/Orchard.Web/Modules/Orchard.MediaLibrary/Permissions.cs index c308153ec..a2f7a2e6b 100644 --- a/src/Orchard.Web/Modules/Orchard.MediaLibrary/Permissions.cs +++ b/src/Orchard.Web/Modules/Orchard.MediaLibrary/Permissions.cs @@ -5,13 +5,21 @@ using Orchard.Security.Permissions; namespace Orchard.MediaLibrary { public class Permissions : IPermissionProvider { public static readonly Permission ManageMediaContent = new Permission { Description = "Manage Media", Name = "ManageMediaContent" }; - public static readonly Permission ManageOwnMedia = new Permission { Description = "Manage Own Media", Name = "ManageOwnMedia", ImpliedBy = new[] { ManageMediaContent } }; + public static readonly Permission ImportMediaContent = new Permission { Description = "Import All Media", Name = "ImportMedia", ImpliedBy = new[] { ManageMediaContent } }; + public static readonly Permission EditMediaContent = new Permission { Description = "Edit All Media", Name = "EditMedia", ImpliedBy = new[] { ManageMediaContent } }; + public static readonly Permission DeleteMediaContent = new Permission { Description = "Delete All Media", Name = "DeleteMedia", ImpliedBy = new[] { ManageMediaContent } }; + public static readonly Permission SelectMediaContent = new Permission { Description = "Select All Media", Name = "SelectMedia", ImpliedBy = new[] { ManageMediaContent, ImportMediaContent, EditMediaContent, DeleteMediaContent } }; + public static readonly Permission ManageOwnMedia = new Permission { Description = "Manage Own Media", Name = "ManageOwnMedia", ImpliedBy = new[] { ManageMediaContent, SelectMediaContent, ImportMediaContent, EditMediaContent, DeleteMediaContent } }; public virtual Feature Feature { get; set; } public IEnumerable GetPermissions() { return new[] { ManageMediaContent, + ImportMediaContent, + EditMediaContent, + DeleteMediaContent, + SelectMediaContent, ManageOwnMedia, }; } diff --git a/src/Orchard.Web/Modules/Orchard.MediaLibrary/Providers/ClientStorageMenu.cs b/src/Orchard.Web/Modules/Orchard.MediaLibrary/Providers/ClientStorageMenu.cs index e648903ac..935708332 100644 --- a/src/Orchard.Web/Modules/Orchard.MediaLibrary/Providers/ClientStorageMenu.cs +++ b/src/Orchard.Web/Modules/Orchard.MediaLibrary/Providers/ClientStorageMenu.cs @@ -15,7 +15,8 @@ namespace Orchard.MediaLibrary.Providers { builder.AddImageSet("clientstorage") .Add(T("My Computer"), "5", menu => menu.Action("Index", "ClientStorage", new { area = "Orchard.MediaLibrary" }) - .Permission(Permissions.ManageOwnMedia)); + .Permission(Permissions.ManageOwnMedia) + .Permission(Permissions.ImportMediaContent)); } } } \ No newline at end of file diff --git a/src/Orchard.Web/Modules/Orchard.MediaLibrary/Providers/OEmbedMenu.cs b/src/Orchard.Web/Modules/Orchard.MediaLibrary/Providers/OEmbedMenu.cs index 8be665eaa..495699673 100644 --- a/src/Orchard.Web/Modules/Orchard.MediaLibrary/Providers/OEmbedMenu.cs +++ b/src/Orchard.Web/Modules/Orchard.MediaLibrary/Providers/OEmbedMenu.cs @@ -15,7 +15,8 @@ namespace Orchard.MediaLibrary.Providers { builder.AddImageSet("oembed") .Add(T("Media Url"), "10", menu => menu.Action("Index", "OEmbed", new { area = "Orchard.MediaLibrary" }) - .Permission(Permissions.ManageOwnMedia)); + .Permission(Permissions.ManageOwnMedia) + .Permission(Permissions.ImportMediaContent)); } } } \ No newline at end of file diff --git a/src/Orchard.Web/Modules/Orchard.MediaLibrary/Providers/WebSearchMenu.cs b/src/Orchard.Web/Modules/Orchard.MediaLibrary/Providers/WebSearchMenu.cs index e1adc3c07..ab0b04cf8 100644 --- a/src/Orchard.Web/Modules/Orchard.MediaLibrary/Providers/WebSearchMenu.cs +++ b/src/Orchard.Web/Modules/Orchard.MediaLibrary/Providers/WebSearchMenu.cs @@ -15,7 +15,8 @@ namespace Orchard.MediaLibrary.Providers { builder.AddImageSet("websearch") .Add(T("Web Search"), "7", menu => menu.Action("Index", "WebSearch", new { area = "Orchard.MediaLibrary" }) - .Permission(Permissions.ManageOwnMedia)); + .Permission(Permissions.ManageOwnMedia) + .Permission(Permissions.ImportMediaContent)); } } } \ No newline at end of file diff --git a/src/Orchard.Web/Modules/Orchard.MediaLibrary/Scripts/media-library.js b/src/Orchard.Web/Modules/Orchard.MediaLibrary/Scripts/media-library.js index fb1d5f342..d72741fa8 100644 --- a/src/Orchard.Web/Modules/Orchard.MediaLibrary/Scripts/media-library.js +++ b/src/Orchard.Web/Modules/Orchard.MediaLibrary/Scripts/media-library.js @@ -383,7 +383,8 @@ $(function () { $.ajax({ type: "GET", url: url, - cache: false + cache: false, + dataType: 'json' }).done(function (data) { var newChildFolders = data.childFolders; @@ -586,6 +587,7 @@ $(function () { viewModel.clearSelection(); } else { console.log('failed to delete media items'); + alert(settings.unauthorizedMessage); } return false; }); @@ -620,6 +622,7 @@ $(function () { viewModel.getMediaItems(viewModel.pageCount); } else { console.log('failed to clone media items'); + alert(settings.unauthorizedMessage); } return false; }); diff --git a/src/Orchard.Web/Modules/Orchard.MediaLibrary/Security/MediaAuthorizationEventHandler.cs b/src/Orchard.Web/Modules/Orchard.MediaLibrary/Security/MediaAuthorizationEventHandler.cs index 14bb48916..ba07735a0 100644 --- a/src/Orchard.Web/Modules/Orchard.MediaLibrary/Security/MediaAuthorizationEventHandler.cs +++ b/src/Orchard.Web/Modules/Orchard.MediaLibrary/Security/MediaAuthorizationEventHandler.cs @@ -21,14 +21,7 @@ namespace Orchard.MediaLibrary.Security { public void Adjust(CheckAccessContext context) { var mediaPart = context.Content.As(); if (mediaPart != null) { - if(_authorizer.Authorize(Permissions.ManageMediaContent)) { - context.Granted = true; - return; - } - - if(_authorizer.Authorize(Permissions.ManageOwnMedia)) { - context.Granted = _mediaLibraryService.CanManageMediaFolder(mediaPart.FolderPath); - } + context.Granted = _mediaLibraryService.CheckMediaFolderPermission(context.Permission, mediaPart.FolderPath); } } } diff --git a/src/Orchard.Web/Modules/Orchard.MediaLibrary/Services/IMediaLibraryService.cs b/src/Orchard.Web/Modules/Orchard.MediaLibrary/Services/IMediaLibraryService.cs index baec74c26..232192f49 100644 --- a/src/Orchard.Web/Modules/Orchard.MediaLibrary/Services/IMediaLibraryService.cs +++ b/src/Orchard.Web/Modules/Orchard.MediaLibrary/Services/IMediaLibraryService.cs @@ -22,7 +22,7 @@ namespace Orchard.MediaLibrary.Services { MediaPart ImportMedia(Stream stream, string relativePath, string filename); MediaPart ImportMedia(Stream stream, string relativePath, string filename, string contentType); IMediaFactory GetMediaFactory(Stream stream, string mimeType, string contentType); - + bool CheckMediaFolderPermission(Orchard.Security.Permissions.Permission permission, string folderPath); /// /// Creates a unique filename to prevent filename collisions. /// @@ -41,6 +41,8 @@ namespace Orchard.MediaLibrary.Services { IMediaFolder GetRootMediaFolder(); + IMediaFolder GetUserMediaFolder(); + /// /// Retrieves the media folders within a given relative path. /// diff --git a/src/Orchard.Web/Modules/Orchard.MediaLibrary/Services/MediaLibraryService.cs b/src/Orchard.Web/Modules/Orchard.MediaLibrary/Services/MediaLibraryService.cs index af39b97fd..5d888bdc9 100644 --- a/src/Orchard.Web/Modules/Orchard.MediaLibrary/Services/MediaLibraryService.cs +++ b/src/Orchard.Web/Modules/Orchard.MediaLibrary/Services/MediaLibraryService.cs @@ -226,7 +226,7 @@ namespace Orchard.MediaLibrary.Services { } public IMediaFolder GetRootMediaFolder() { - if (_orchardServices.Authorizer.Authorize(Permissions.ManageMediaContent)) { + if (_orchardServices.Authorizer.Authorize(Permissions.SelectMediaContent)) { return null; } @@ -242,6 +242,39 @@ namespace Orchard.MediaLibrary.Services { return null; } + public IMediaFolder GetUserMediaFolder() { + var currentUser = _orchardServices.WorkContext.CurrentUser; + var userPath = _storageProvider.Combine("Users", _mediaFolderProvider.GetFolderName(currentUser)); + return new MediaFolder() { + Name = currentUser.UserName, + MediaPath = userPath + }; + } + + public bool CheckMediaFolderPermission(Orchard.Security.Permissions.Permission permission, string folderPath) { + if (_orchardServices.Authorizer.Authorize(Permissions.ManageMediaContent)) { + return true; + } + if (_orchardServices.WorkContext.CurrentUser==null) + return _orchardServices.Authorizer.Authorize(permission); + // determines the folder type: public, user own folder (my), folder of another user (private) + var rootedFolderPath = this.GetRootedFolderPath(folderPath) ?? ""; + var userFolderPath = GetUserMediaFolder().MediaPath; + bool isMyfolder = false; + + if (rootedFolderPath.StartsWith(userFolderPath)) { + // the folder is the user's private path or one of its subfolders + isMyfolder = true; + } + + if(isMyfolder) { + return _orchardServices.Authorizer.Authorize(Permissions.ManageOwnMedia); + } + else { // other + return _orchardServices.Authorizer.Authorize(permission); + } + } + /// /// Retrieves the media folders within a given relative path. /// @@ -328,15 +361,16 @@ namespace Orchard.MediaLibrary.Services { Argument.ThrowIfNullOrEmpty(newFolderName, "newFolderName"); try { - var segments = folderPath.Split(new char[] { Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar }, StringSplitOptions.RemoveEmptyEntries).ToArray(); - var newFolderPath = String.Join(Path.DirectorySeparatorChar.ToString(), segments.Take(segments.Length - 1).Union(new[] { newFolderName })); + var parentIndex = folderPath.LastIndexOfAny(new char[] { Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar }); + var parentPath = parentIndex > 0 ? folderPath.Substring(0, parentIndex) : String.Empty; + var newFolderPath = _storageProvider.Combine(parentPath, newFolderName); var mediaParts = BuildGetMediaContentItemsQuery(_orchardServices.ContentManager, folderPath, true).List(); foreach (var mediaPart in mediaParts) { mediaPart.FolderPath = newFolderPath + mediaPart.FolderPath.Substring(folderPath.Length); } - _storageProvider.RenameFolder(folderPath, _storageProvider.Combine(Path.GetDirectoryName(folderPath), newFolderName)); + _storageProvider.RenameFolder(folderPath, newFolderPath); } catch (Exception) { _orchardServices.TransactionManager.Cancel(); diff --git a/src/Orchard.Web/Modules/Orchard.MediaLibrary/Services/XmlRpcHandler.cs b/src/Orchard.Web/Modules/Orchard.MediaLibrary/Services/XmlRpcHandler.cs index 03692b803..17f87af58 100644 --- a/src/Orchard.Web/Modules/Orchard.MediaLibrary/Services/XmlRpcHandler.cs +++ b/src/Orchard.Web/Modules/Orchard.MediaLibrary/Services/XmlRpcHandler.cs @@ -61,8 +61,8 @@ namespace Orchard.MediaLibrary.Services { UrlHelper url) { List validationErrors; - var user = _membershipService.ValidateUser(userName, password, out validationErrors); - if (!_authorizationService.TryCheckAccess(Permissions.ManageOwnMedia, user, null)) { + if (!_authorizationService.TryCheckAccess(Permissions.ManageOwnMedia, user, null) + && !_authorizationService.TryCheckAccess(Permissions.EditMediaContent, user, null)) { throw new OrchardCoreException(T("Access denied")); } @@ -75,7 +75,7 @@ namespace Orchard.MediaLibrary.Services { } // If the user only has access to his own folder, rewrite the folder name - if (!_authorizationService.TryCheckAccess(Permissions.ManageMediaContent, user, null)) { + if (!_authorizationService.TryCheckAccess(Permissions.EditMediaContent, user, null)) { directoryName = Path.Combine(_mediaLibraryService.GetRootedFolderPath(directoryName)); } diff --git a/src/Orchard.Web/Modules/Orchard.MediaLibrary/Views/Admin/Index.cshtml b/src/Orchard.Web/Modules/Orchard.MediaLibrary/Views/Admin/Index.cshtml index 159d6c119..4c3d56d4f 100644 --- a/src/Orchard.Web/Modules/Orchard.MediaLibrary/Views/Admin/Index.cshtml +++ b/src/Orchard.Web/Modules/Orchard.MediaLibrary/Views/Admin/Index.cshtml @@ -105,6 +105,7 @@ var mediaLibrarySettings = { cloneConfirmationMessage: '@HttpUtility.JavaScriptStringEncode(T("Are you sure you want to clone this media item ?").Text)', replaceConfirmationMessage: '@HttpUtility.JavaScriptStringEncode(T("Are you sure you want to replace this media item ?").Text)', errorMessage: '@HttpUtility.JavaScriptStringEncode(T("An unexpected error occured, please refresh the page and try again.").Text)', + unauthorizedMessage: '@HttpUtility.JavaScriptStringEncode(T("Access denied").Text)', antiForgeryToken: '@Html.AntiForgeryTokenValueOrchard()', childFolders: (@Display.Partial(TemplateName: "ChildFolders", Model: viewModel.ChildFoldersViewModel))['childFolders'] }; diff --git a/src/Orchard.Web/Modules/Orchard.MediaLibrary/Views/Parts/Media.Actions.cshtml b/src/Orchard.Web/Modules/Orchard.MediaLibrary/Views/Parts/Media.Actions.cshtml index e65370b4d..1bdc0f1e6 100644 --- a/src/Orchard.Web/Modules/Orchard.MediaLibrary/Views/Parts/Media.Actions.cshtml +++ b/src/Orchard.Web/Modules/Orchard.MediaLibrary/Views/Parts/Media.Actions.cshtml @@ -4,10 +4,12 @@ @{ ContentItem contentItem = Model.ContentItem; var draftable = contentItem.TypeDefinition.Settings.GetModel().Draftable; + var media = contentItem.As(); + var mediaService = WorkContext.Resolve(); }
- @if (Authorizer.Authorize(Permissions.EditContent, contentItem)) { + @if (mediaService.CheckMediaFolderPermission(Orchard.MediaLibrary.Permissions.EditMediaContent, media.FolderPath)) { @Html.Link(T("Edit").Text, Url.ItemEditUrl(contentItem), new { @class = "button", id = "edit-media-link" }) } @if (Authorizer.Authorize(Permissions.PublishContent, contentItem) && draftable) { diff --git a/src/Orchard.Web/Modules/Orchard.MediaLibrary/Web.config b/src/Orchard.Web/Modules/Orchard.MediaLibrary/Web.config index bfeea149d..c8e5ecc71 100644 --- a/src/Orchard.Web/Modules/Orchard.MediaLibrary/Web.config +++ b/src/Orchard.Web/Modules/Orchard.MediaLibrary/Web.config @@ -21,6 +21,12 @@ + + + + + + diff --git a/src/Orchard.Web/Modules/Orchard.MediaPicker/Orchard.MediaPicker.csproj b/src/Orchard.Web/Modules/Orchard.MediaPicker/Orchard.MediaPicker.csproj index 71770fdab..a1c4e6f0d 100644 --- a/src/Orchard.Web/Modules/Orchard.MediaPicker/Orchard.MediaPicker.csproj +++ b/src/Orchard.Web/Modules/Orchard.MediaPicker/Orchard.MediaPicker.csproj @@ -37,7 +37,7 @@ 4 ..\..\..\OrchardBasicCorrectness.ruleset false - 5 + 6 pdbonly @@ -48,7 +48,7 @@ 4 AllRules.ruleset false - 5 + 6 @@ -125,12 +125,12 @@ {2D1D92BB-4555-4CBE-8D0E-63563D6CE4C6} Orchard.Framework - false + $(MvcBuildViews) {9916839C-39FC-4CEB-A5AF-89CA7E87119F} Orchard.Core - false + $(MvcBuildViews) {D9A7B330-CD22-4DA1-A95A-8DE1982AD8EB} @@ -210,7 +210,7 @@ --> - + diff --git a/src/Orchard.Web/Modules/Orchard.MediaPicker/Web.config b/src/Orchard.Web/Modules/Orchard.MediaPicker/Web.config index a3cb5df90..e30edbf7e 100644 --- a/src/Orchard.Web/Modules/Orchard.MediaPicker/Web.config +++ b/src/Orchard.Web/Modules/Orchard.MediaPicker/Web.config @@ -21,6 +21,12 @@ + + + + + + diff --git a/src/Orchard.Web/Modules/Orchard.MediaProcessing/Orchard.MediaProcessing.csproj b/src/Orchard.Web/Modules/Orchard.MediaProcessing/Orchard.MediaProcessing.csproj index ae72c3d3b..0cfd14fbe 100644 --- a/src/Orchard.Web/Modules/Orchard.MediaProcessing/Orchard.MediaProcessing.csproj +++ b/src/Orchard.Web/Modules/Orchard.MediaProcessing/Orchard.MediaProcessing.csproj @@ -37,7 +37,7 @@ 4 ..\..\..\OrchardBasicCorrectness.ruleset false - 5 + 6 pdbonly @@ -48,7 +48,7 @@ 4 AllRules.ruleset false - 5 + 6 @@ -113,12 +113,12 @@ {2D1D92BB-4555-4CBE-8D0E-63563D6CE4C6} Orchard.Framework - false + $(MvcBuildViews) {9916839C-39FC-4CEB-A5AF-89CA7E87119F} Orchard.Core - false + $(MvcBuildViews) {642A49D7-8752-4177-80D6-BFBBCFAD3DE0} @@ -216,7 +216,7 @@ --> - + diff --git a/src/Orchard.Web/Modules/Orchard.MediaProcessing/Providers/Filters/ResizeFilter.cs b/src/Orchard.Web/Modules/Orchard.MediaProcessing/Providers/Filters/ResizeFilter.cs index 99db8060a..580a3a950 100644 --- a/src/Orchard.Web/Modules/Orchard.MediaProcessing/Providers/Filters/ResizeFilter.cs +++ b/src/Orchard.Web/Modules/Orchard.MediaProcessing/Providers/Filters/ResizeFilter.cs @@ -32,6 +32,7 @@ namespace Orchard.MediaProcessing.Providers.Filters { string mode = context.State.Mode; string alignment = context.State.Alignment; string padcolor = context.State.PadColor; + string scale = context.State.Scale; var settings = new ResizeSettings { Mode = FitMode.Max, @@ -70,6 +71,13 @@ namespace Orchard.MediaProcessing.Providers.Filters { } } + switch (scale) { + case "downscaleOnly": settings.Scale = ScaleMode.DownscaleOnly; break; + case "upscaleOnly": settings.Scale = ScaleMode.UpscaleOnly; break; + case "both": settings.Scale = ScaleMode.Both; break; + case "upscaleCanvas": settings.Scale = ScaleMode.UpscaleCanvas; break; + } + var result = new MemoryStream(); if (context.Media.CanSeek) { context.Media.Seek(0, SeekOrigin.Begin); @@ -82,10 +90,10 @@ namespace Orchard.MediaProcessing.Providers.Filters { string mode = context.State.Mode; switch (mode) { - case "pad": return T("Pad to {0}x{1}", context.State.Height, context.State.Width); - case "crop": return T("Crop to {0}x{1}", context.State.Height, context.State.Width); - case "stretch": return T("Stretch to {0}x{1}", context.State.Height, context.State.Width); - default: return T("Resize to {0}x{1}", context.State.Height, context.State.Width); + case "pad": return T("Pad to {0} x {1}", context.State.Width, context.State.Height); + case "crop": return T("Crop to {0} x {1}", context.State.Width, context.State.Height); + case "stretch": return T("Stretch to {0} x {1}", context.State.Width, context.State.Height); + default: return T("Resize to {0} x {1}", context.State.Width, context.State.Height); } } @@ -135,7 +143,13 @@ namespace Orchard.MediaProcessing.Providers.Filters { Title: T("Pad Color"), Value: "", Description: T("The background color to use to pad the image e.g., #ffffff, red. Leave empty to keep transparency."), - Classes: new[] {"text small"}) + Classes: new[] {"text small"}), + _Scale: Shape.SelectList( + Id: "scale", Name: "Scale", + Title: T("Scale"), + Description: T("Select the scale mode which defines whether the image is allowed to upscale, downscale, both, or if only the canvas gets to be upscaled."), + Size: 1, + Multiple: false) ); f._Mode.Add(new SelectListItem { Value = "max", Text = T("Max").Text }); @@ -153,6 +167,11 @@ namespace Orchard.MediaProcessing.Providers.Filters { f._Alignment.Add(new SelectListItem { Value = "bottomcenter", Text = T("Bottom Center").Text }); f._Alignment.Add(new SelectListItem { Value = "bottomright", Text = T("Bottom Right").Text }); + f._Scale.Add(new SelectListItem { Value = "downscaleOnly", Text = T("Downscale only").Text }); + f._Scale.Add(new SelectListItem { Value = "upscaleOnly", Text = T("Upscale only").Text }); + f._Scale.Add(new SelectListItem { Value = "both", Text = T("Both").Text }); + f._Scale.Add(new SelectListItem { Value = "upscaleCanvas", Text = T("Upscale canvas").Text }); + return f; }; diff --git a/src/Orchard.Web/Modules/Orchard.MediaProcessing/Web.config b/src/Orchard.Web/Modules/Orchard.MediaProcessing/Web.config index a3cb5df90..e30edbf7e 100644 --- a/src/Orchard.Web/Modules/Orchard.MediaProcessing/Web.config +++ b/src/Orchard.Web/Modules/Orchard.MediaProcessing/Web.config @@ -21,6 +21,12 @@ + + + + + + diff --git a/src/Orchard.Web/Modules/Orchard.MessageBus/Orchard.MessageBus.csproj b/src/Orchard.Web/Modules/Orchard.MessageBus/Orchard.MessageBus.csproj index 8cc81cab0..7cc47658a 100644 --- a/src/Orchard.Web/Modules/Orchard.MessageBus/Orchard.MessageBus.csproj +++ b/src/Orchard.Web/Modules/Orchard.MessageBus/Orchard.MessageBus.csproj @@ -36,7 +36,7 @@ 4 ..\..\..\OrchardBasicCorrectness.ruleset false - 5 + 6 pdbonly @@ -47,7 +47,7 @@ 4 AllRules.ruleset false - 5 + 6 @@ -112,12 +112,12 @@ {2D1D92BB-4555-4CBE-8D0E-63563D6CE4C6} Orchard.Framework - false + $(MvcBuildViews) {9916839C-39FC-4CEB-A5AF-89CA7E87119F} Orchard.Core - false + $(MvcBuildViews) @@ -163,7 +163,7 @@ --> - + diff --git a/src/Orchard.Web/Modules/Orchard.MessageBus/Web.config b/src/Orchard.Web/Modules/Orchard.MessageBus/Web.config index 314606a77..6499c3044 100644 --- a/src/Orchard.Web/Modules/Orchard.MessageBus/Web.config +++ b/src/Orchard.Web/Modules/Orchard.MessageBus/Web.config @@ -21,6 +21,12 @@ + + + + + + diff --git a/src/Orchard.Web/Modules/Orchard.Migrations/Orchard.Migrations.csproj b/src/Orchard.Web/Modules/Orchard.Migrations/Orchard.Migrations.csproj index 906d33635..1f2c1fd5b 100644 --- a/src/Orchard.Web/Modules/Orchard.Migrations/Orchard.Migrations.csproj +++ b/src/Orchard.Web/Modules/Orchard.Migrations/Orchard.Migrations.csproj @@ -38,7 +38,7 @@ 4 ..\..\..\OrchardBasicCorrectness.ruleset false - 5 + 6 pdbonly @@ -48,7 +48,7 @@ prompt 4 false - 5 + 6 @@ -104,12 +104,12 @@ {2D1D92BB-4555-4CBE-8D0E-63563D6CE4C6} Orchard.Framework - false + $(MvcBuildViews) {9916839C-39FC-4CEB-A5AF-89CA7E87119F} Orchard.Core - false + $(MvcBuildViews) diff --git a/src/Orchard.Web/Modules/Orchard.Migrations/Web.config b/src/Orchard.Web/Modules/Orchard.Migrations/Web.config index 314606a77..6499c3044 100644 --- a/src/Orchard.Web/Modules/Orchard.Migrations/Web.config +++ b/src/Orchard.Web/Modules/Orchard.Migrations/Web.config @@ -21,6 +21,12 @@ + + + + + + diff --git a/src/Orchard.Web/Modules/Orchard.Modules/Orchard.Modules.csproj b/src/Orchard.Web/Modules/Orchard.Modules/Orchard.Modules.csproj index 539293f82..a94119dca 100644 --- a/src/Orchard.Web/Modules/Orchard.Modules/Orchard.Modules.csproj +++ b/src/Orchard.Web/Modules/Orchard.Modules/Orchard.Modules.csproj @@ -37,7 +37,7 @@ 4 ..\..\..\OrchardBasicCorrectness.ruleset false - 5 + 6 pdbonly @@ -48,7 +48,7 @@ 4 AllRules.ruleset false - 5 + 6 @@ -131,7 +131,7 @@ {2D1D92BB-4555-4CBE-8D0E-63563D6CE4C6} Orchard.Framework - false + $(MvcBuildViews) diff --git a/src/Orchard.Web/Modules/Orchard.Modules/Views/Admin/Features.cshtml b/src/Orchard.Web/Modules/Orchard.Modules/Views/Admin/Features.cshtml index 54760cb2c..8c9db9489 100644 --- a/src/Orchard.Web/Modules/Orchard.Modules/Views/Admin/Features.cshtml +++ b/src/Orchard.Web/Modules/Orchard.Modules/Views/Admin/Features.cshtml @@ -71,7 +71,7 @@ continue; } //hmmm...I feel like I've done this before... - var lifecycleStatus = feature.Descriptor.Extension.LifecycleStatus; + var lifecycleStatus = feature.Descriptor.LifecycleStatus; var featureId = feature.Descriptor.Id.AsFeatureId(n => T(n)); var featureName = string.IsNullOrEmpty(feature.Descriptor.Name) ? feature.Descriptor.Id : feature.Descriptor.Name; var featureState = feature.IsEnabled ? "enabled" : "disabled"; diff --git a/src/Orchard.Web/Modules/Orchard.Modules/Web.config b/src/Orchard.Web/Modules/Orchard.Modules/Web.config index a3cb5df90..267e5a286 100644 --- a/src/Orchard.Web/Modules/Orchard.Modules/Web.config +++ b/src/Orchard.Web/Modules/Orchard.Modules/Web.config @@ -21,6 +21,12 @@ + + + + + + @@ -31,7 +37,6 @@ - diff --git a/src/Orchard.Web/Modules/Orchard.MultiTenancy/Orchard.MultiTenancy.csproj b/src/Orchard.Web/Modules/Orchard.MultiTenancy/Orchard.MultiTenancy.csproj index 563ed8b57..5d1e1edbc 100644 --- a/src/Orchard.Web/Modules/Orchard.MultiTenancy/Orchard.MultiTenancy.csproj +++ b/src/Orchard.Web/Modules/Orchard.MultiTenancy/Orchard.MultiTenancy.csproj @@ -37,7 +37,7 @@ 4 ..\..\..\OrchardBasicCorrectness.ruleset false - 5 + 6 pdbonly @@ -48,7 +48,7 @@ 4 AllRules.ruleset false - 5 + 6 @@ -141,7 +141,7 @@ {2D1D92BB-4555-4CBE-8D0E-63563D6CE4C6} Orchard.Framework - False + $(MvcBuildViews) diff --git a/src/Orchard.Web/Modules/Orchard.MultiTenancy/Web.config b/src/Orchard.Web/Modules/Orchard.MultiTenancy/Web.config index a3cb5df90..267e5a286 100644 --- a/src/Orchard.Web/Modules/Orchard.MultiTenancy/Web.config +++ b/src/Orchard.Web/Modules/Orchard.MultiTenancy/Web.config @@ -21,6 +21,12 @@ + + + + + + @@ -31,7 +37,6 @@ - diff --git a/src/Orchard.Web/Modules/Orchard.OutputCache/Orchard.OutputCache.csproj b/src/Orchard.Web/Modules/Orchard.OutputCache/Orchard.OutputCache.csproj index a37b05b31..f26c33221 100644 --- a/src/Orchard.Web/Modules/Orchard.OutputCache/Orchard.OutputCache.csproj +++ b/src/Orchard.Web/Modules/Orchard.OutputCache/Orchard.OutputCache.csproj @@ -37,7 +37,7 @@ 4 ..\..\..\OrchardBasicCorrectness.ruleset false - 5 + 6 pdbonly @@ -48,7 +48,7 @@ 4 AllRules.ruleset false - 5 + 6 @@ -113,12 +113,12 @@ {2D1D92BB-4555-4CBE-8D0E-63563D6CE4C6} Orchard.Framework - false + $(MvcBuildViews) {9916839C-39FC-4CEB-A5AF-89CA7E87119F} Orchard.Core - false + $(MvcBuildViews) @@ -187,7 +187,7 @@ --> - + diff --git a/src/Orchard.Web/Modules/Orchard.OutputCache/Web.config b/src/Orchard.Web/Modules/Orchard.OutputCache/Web.config index 6039ce684..34a0269bf 100644 --- a/src/Orchard.Web/Modules/Orchard.OutputCache/Web.config +++ b/src/Orchard.Web/Modules/Orchard.OutputCache/Web.config @@ -21,6 +21,12 @@ + + + + + + diff --git a/src/Orchard.Web/Modules/Orchard.Packaging/Orchard.Packaging.csproj b/src/Orchard.Web/Modules/Orchard.Packaging/Orchard.Packaging.csproj index 3d8d6a246..b7f45db76 100644 --- a/src/Orchard.Web/Modules/Orchard.Packaging/Orchard.Packaging.csproj +++ b/src/Orchard.Web/Modules/Orchard.Packaging/Orchard.Packaging.csproj @@ -38,7 +38,7 @@ 4 ..\..\..\OrchardBasicCorrectness.ruleset false - 5 + 6 pdbonly @@ -48,7 +48,7 @@ prompt 4 false - 5 + 6 @@ -170,7 +170,7 @@ {2D1D92BB-4555-4CBE-8D0E-63563D6CE4C6} Orchard.Framework - false + $(MvcBuildViews) {17F86780-9A1F-4AA1-86F1-875EEC2730C7} diff --git a/src/Orchard.Web/Modules/Orchard.Packaging/Web.config b/src/Orchard.Web/Modules/Orchard.Packaging/Web.config index 46a163541..049e89ec4 100644 --- a/src/Orchard.Web/Modules/Orchard.Packaging/Web.config +++ b/src/Orchard.Web/Modules/Orchard.Packaging/Web.config @@ -21,6 +21,12 @@ + + + + + + @@ -31,8 +37,8 @@ + - diff --git a/src/Orchard.Web/Modules/Orchard.Pages/Orchard.Pages.csproj b/src/Orchard.Web/Modules/Orchard.Pages/Orchard.Pages.csproj index c3ab8d4cf..7ada2d6a6 100644 --- a/src/Orchard.Web/Modules/Orchard.Pages/Orchard.Pages.csproj +++ b/src/Orchard.Web/Modules/Orchard.Pages/Orchard.Pages.csproj @@ -36,7 +36,7 @@ prompt 4 false - 5 + 6 ..\..\..\OrchardBasicCorrectness.ruleset @@ -47,7 +47,7 @@ prompt 4 false - 5 + 6 @@ -73,12 +73,12 @@ {2D1D92BB-4555-4CBE-8D0E-63563D6CE4C6} Orchard.Framework - false + $(MvcBuildViews) {9916839C-39FC-4CEB-A5AF-89CA7E87119F} Orchard.Core - false + $(MvcBuildViews) {66fccd76-2761-47e3-8d11-b45d0001ddaa} diff --git a/src/Orchard.Web/Modules/Orchard.Pages/Web.config b/src/Orchard.Web/Modules/Orchard.Pages/Web.config index a3cb5df90..e30edbf7e 100644 --- a/src/Orchard.Web/Modules/Orchard.Pages/Web.config +++ b/src/Orchard.Web/Modules/Orchard.Pages/Web.config @@ -21,6 +21,12 @@ + + + + + + diff --git a/src/Orchard.Web/Modules/Orchard.Projections/Orchard.Projections.csproj b/src/Orchard.Web/Modules/Orchard.Projections/Orchard.Projections.csproj index 78583ac8a..a37a7b0d1 100644 --- a/src/Orchard.Web/Modules/Orchard.Projections/Orchard.Projections.csproj +++ b/src/Orchard.Web/Modules/Orchard.Projections/Orchard.Projections.csproj @@ -37,7 +37,7 @@ 4 ..\..\..\OrchardBasicCorrectness.ruleset false - 5 + 6 pdbonly @@ -48,7 +48,7 @@ 4 AllRules.ruleset false - 5 + 6 @@ -134,12 +134,12 @@ {2D1D92BB-4555-4CBE-8D0E-63563D6CE4C6} Orchard.Framework - false + $(MvcBuildViews) {9916839C-39FC-4CEB-A5AF-89CA7E87119F} Orchard.Core - false + $(MvcBuildViews) {642A49D7-8752-4177-80D6-BFBBCFAD3DE0} @@ -347,7 +347,7 @@ --> - + diff --git a/src/Orchard.Web/Modules/Orchard.Projections/Tests/Orchard.Projections.Tests.csproj b/src/Orchard.Web/Modules/Orchard.Projections/Tests/Orchard.Projections.Tests.csproj index c3613ae16..76d05b86d 100644 --- a/src/Orchard.Web/Modules/Orchard.Projections/Tests/Orchard.Projections.Tests.csproj +++ b/src/Orchard.Web/Modules/Orchard.Projections/Tests/Orchard.Projections.Tests.csproj @@ -23,7 +23,7 @@ prompt 4 false - 5 + 6 ..\..\..\..\OrchardBasicCorrectness.ruleset @@ -34,7 +34,7 @@ prompt 4 false - 5 + 6 diff --git a/src/Orchard.Web/Modules/Orchard.Projections/Web.config b/src/Orchard.Web/Modules/Orchard.Projections/Web.config index a3cb5df90..e30edbf7e 100644 --- a/src/Orchard.Web/Modules/Orchard.Projections/Web.config +++ b/src/Orchard.Web/Modules/Orchard.Projections/Web.config @@ -21,6 +21,12 @@ + + + + + + diff --git a/src/Orchard.Web/Modules/Orchard.PublishLater/Orchard.PublishLater.csproj b/src/Orchard.Web/Modules/Orchard.PublishLater/Orchard.PublishLater.csproj index 7aa286c68..74e88a7d1 100644 --- a/src/Orchard.Web/Modules/Orchard.PublishLater/Orchard.PublishLater.csproj +++ b/src/Orchard.Web/Modules/Orchard.PublishLater/Orchard.PublishLater.csproj @@ -38,7 +38,7 @@ 4 ..\..\..\OrchardBasicCorrectness.ruleset false - 5 + 6 pdbonly @@ -48,7 +48,7 @@ prompt 4 false - 5 + 6 @@ -115,12 +115,12 @@ {2D1D92BB-4555-4CBE-8D0E-63563D6CE4C6} Orchard.Framework - false + $(MvcBuildViews) {9916839C-39FC-4CEB-A5AF-89CA7E87119F} Orchard.Core - false + $(MvcBuildViews) diff --git a/src/Orchard.Web/Modules/Orchard.PublishLater/Web.config b/src/Orchard.Web/Modules/Orchard.PublishLater/Web.config index 04411447d..0a7c27bd5 100644 --- a/src/Orchard.Web/Modules/Orchard.PublishLater/Web.config +++ b/src/Orchard.Web/Modules/Orchard.PublishLater/Web.config @@ -21,6 +21,12 @@ + + + + + + diff --git a/src/Orchard.Web/Modules/Orchard.Recipes/Orchard.Recipes.csproj b/src/Orchard.Web/Modules/Orchard.Recipes/Orchard.Recipes.csproj index 1288976da..c95733241 100644 --- a/src/Orchard.Web/Modules/Orchard.Recipes/Orchard.Recipes.csproj +++ b/src/Orchard.Web/Modules/Orchard.Recipes/Orchard.Recipes.csproj @@ -37,7 +37,7 @@ 4 ..\..\..\OrchardBasicCorrectness.ruleset false - 5 + 6 pdbonly @@ -47,7 +47,7 @@ prompt 4 false - 5 + 6 @@ -149,7 +149,7 @@ {2D1D92BB-4555-4CBE-8D0E-63563D6CE4C6} Orchard.Framework - false + $(MvcBuildViews) {0e7646e8-fe8f-43c1-8799-d97860925ec4} diff --git a/src/Orchard.Web/Modules/Orchard.Recipes/Web.config b/src/Orchard.Web/Modules/Orchard.Recipes/Web.config index 76352b6da..79850d91e 100644 --- a/src/Orchard.Web/Modules/Orchard.Recipes/Web.config +++ b/src/Orchard.Web/Modules/Orchard.Recipes/Web.config @@ -21,6 +21,12 @@ + + + + + + diff --git a/src/Orchard.Web/Modules/Orchard.Redis/Orchard.Redis.csproj b/src/Orchard.Web/Modules/Orchard.Redis/Orchard.Redis.csproj index e5b91bbed..4a39008c3 100644 --- a/src/Orchard.Web/Modules/Orchard.Redis/Orchard.Redis.csproj +++ b/src/Orchard.Web/Modules/Orchard.Redis/Orchard.Redis.csproj @@ -36,7 +36,7 @@ 4 ..\..\..\OrchardBasicCorrectness.ruleset false - 5 + 6 pdbonly @@ -47,7 +47,7 @@ 4 AllRules.ruleset false - 5 + 6 @@ -93,12 +93,12 @@ {2D1D92BB-4555-4CBE-8D0E-63563D6CE4C6} Orchard.Framework - false + $(MvcBuildViews) {9916839C-39FC-4CEB-A5AF-89CA7E87119F} Orchard.Core - false + $(MvcBuildViews) {7528BF74-25C7-4ABE-883A-443B4EEC4776} @@ -149,7 +149,7 @@ --> - + diff --git a/src/Orchard.Web/Modules/Orchard.Redis/Web.config b/src/Orchard.Web/Modules/Orchard.Redis/Web.config index 4c0b6467c..6499c3044 100644 --- a/src/Orchard.Web/Modules/Orchard.Redis/Web.config +++ b/src/Orchard.Web/Modules/Orchard.Redis/Web.config @@ -21,8 +21,14 @@ + + + + + + - + diff --git a/src/Orchard.Web/Modules/Orchard.Resources/Orchard.Resources.csproj b/src/Orchard.Web/Modules/Orchard.Resources/Orchard.Resources.csproj index 477550ab7..273fcc48d 100644 --- a/src/Orchard.Web/Modules/Orchard.Resources/Orchard.Resources.csproj +++ b/src/Orchard.Web/Modules/Orchard.Resources/Orchard.Resources.csproj @@ -36,7 +36,7 @@ 4 ..\..\..\OrchardBasicCorrectness.ruleset false - 5 + 6 pdbonly @@ -47,7 +47,7 @@ 4 AllRules.ruleset false - 5 + 6 @@ -836,12 +836,12 @@ {2D1D92BB-4555-4CBE-8D0E-63563D6CE4C6} Orchard.Framework - false + $(MvcBuildViews) {9916839C-39FC-4CEB-A5AF-89CA7E87119F} Orchard.Core - false + $(MvcBuildViews) @@ -1081,7 +1081,7 @@ --> - + diff --git a/src/Orchard.Web/Modules/Orchard.Resources/Web.config b/src/Orchard.Web/Modules/Orchard.Resources/Web.config index a48e1c34f..ebaf1ca75 100644 --- a/src/Orchard.Web/Modules/Orchard.Resources/Web.config +++ b/src/Orchard.Web/Modules/Orchard.Resources/Web.config @@ -21,6 +21,12 @@ + + + + + + diff --git a/src/Orchard.Web/Modules/Orchard.Roles/Orchard.Roles.csproj b/src/Orchard.Web/Modules/Orchard.Roles/Orchard.Roles.csproj index f062f86de..44dd0090e 100644 --- a/src/Orchard.Web/Modules/Orchard.Roles/Orchard.Roles.csproj +++ b/src/Orchard.Web/Modules/Orchard.Roles/Orchard.Roles.csproj @@ -37,7 +37,7 @@ 4 ..\..\..\OrchardBasicCorrectness.ruleset false - 5 + 6 pdbonly @@ -48,7 +48,7 @@ 4 AllRules.ruleset false - 5 + 6 @@ -154,12 +154,12 @@ {2D1D92BB-4555-4CBE-8D0E-63563D6CE4C6} Orchard.Framework - false + $(MvcBuildViews) {9916839C-39FC-4CEB-A5AF-89CA7E87119F} Orchard.Core - false + $(MvcBuildViews) {642a49d7-8752-4177-80d6-bfbbcfad3de0} @@ -226,7 +226,7 @@ --> - + diff --git a/src/Orchard.Web/Modules/Orchard.Roles/Web.config b/src/Orchard.Web/Modules/Orchard.Roles/Web.config index a3cb5df90..e30edbf7e 100644 --- a/src/Orchard.Web/Modules/Orchard.Roles/Web.config +++ b/src/Orchard.Web/Modules/Orchard.Roles/Web.config @@ -21,6 +21,12 @@ + + + + + + diff --git a/src/Orchard.Web/Modules/Orchard.Rules/Orchard.Rules.csproj b/src/Orchard.Web/Modules/Orchard.Rules/Orchard.Rules.csproj index f8f52333c..01f6dc501 100644 --- a/src/Orchard.Web/Modules/Orchard.Rules/Orchard.Rules.csproj +++ b/src/Orchard.Web/Modules/Orchard.Rules/Orchard.Rules.csproj @@ -37,7 +37,7 @@ 4 ..\..\..\OrchardBasicCorrectness.ruleset false - 5 + 6 pdbonly @@ -48,7 +48,7 @@ 4 AllRules.ruleset false - 5 + 6 @@ -130,12 +130,12 @@ {2D1D92BB-4555-4CBE-8D0E-63563D6CE4C6} Orchard.Framework - false + $(MvcBuildViews) {9916839C-39FC-4CEB-A5AF-89CA7E87119F} Orchard.Core - false + $(MvcBuildViews) {642A49D7-8752-4177-80D6-BFBBCFAD3DE0} @@ -221,7 +221,7 @@ --> - + diff --git a/src/Orchard.Web/Modules/Orchard.Rules/Web.config b/src/Orchard.Web/Modules/Orchard.Rules/Web.config index 0ae4052ca..a689bddb6 100644 --- a/src/Orchard.Web/Modules/Orchard.Rules/Web.config +++ b/src/Orchard.Web/Modules/Orchard.Rules/Web.config @@ -24,6 +24,12 @@ + + + + + + diff --git a/src/Orchard.Web/Modules/Orchard.Scripting.CSharp/Orchard.Scripting.CSharp.csproj b/src/Orchard.Web/Modules/Orchard.Scripting.CSharp/Orchard.Scripting.CSharp.csproj index 1d5ba5066..c99b9894c 100644 --- a/src/Orchard.Web/Modules/Orchard.Scripting.CSharp/Orchard.Scripting.CSharp.csproj +++ b/src/Orchard.Web/Modules/Orchard.Scripting.CSharp/Orchard.Scripting.CSharp.csproj @@ -36,7 +36,7 @@ 4 ..\..\..\OrchardBasicCorrectness.ruleset false - 5 + 6 pdbonly @@ -47,7 +47,7 @@ 4 AllRules.ruleset false - 5 + 6 @@ -110,12 +110,12 @@ {2D1D92BB-4555-4CBE-8D0E-63563D6CE4C6} Orchard.Framework - false + $(MvcBuildViews) {9916839C-39FC-4CEB-A5AF-89CA7E87119F} Orchard.Core - false + $(MvcBuildViews) {642a49d7-8752-4177-80d6-bfbbcfad3de0} @@ -178,7 +178,7 @@ --> - + diff --git a/src/Orchard.Web/Modules/Orchard.Scripting.CSharp/Web.config b/src/Orchard.Web/Modules/Orchard.Scripting.CSharp/Web.config index a3cb5df90..e30edbf7e 100644 --- a/src/Orchard.Web/Modules/Orchard.Scripting.CSharp/Web.config +++ b/src/Orchard.Web/Modules/Orchard.Scripting.CSharp/Web.config @@ -21,6 +21,12 @@ + + + + + + diff --git a/src/Orchard.Web/Modules/Orchard.Scripting.Dlr/Orchard.Scripting.Dlr.csproj b/src/Orchard.Web/Modules/Orchard.Scripting.Dlr/Orchard.Scripting.Dlr.csproj index c4181b98e..4c0b8ecd3 100644 --- a/src/Orchard.Web/Modules/Orchard.Scripting.Dlr/Orchard.Scripting.Dlr.csproj +++ b/src/Orchard.Web/Modules/Orchard.Scripting.Dlr/Orchard.Scripting.Dlr.csproj @@ -38,7 +38,7 @@ 4 ..\..\..\OrchardBasicCorrectness.ruleset false - 5 + 6 pdbonly @@ -48,7 +48,7 @@ prompt 4 false - 5 + 6 @@ -97,7 +97,7 @@ {2D1D92BB-4555-4CBE-8D0E-63563D6CE4C6} Orchard.Framework - True + $(MvcBuildViews) {99002B65-86F7-415E-BF4A-381AA8AB9CCC} diff --git a/src/Orchard.Web/Modules/Orchard.Scripting.Dlr/Web.config b/src/Orchard.Web/Modules/Orchard.Scripting.Dlr/Web.config index 314606a77..6499c3044 100644 --- a/src/Orchard.Web/Modules/Orchard.Scripting.Dlr/Web.config +++ b/src/Orchard.Web/Modules/Orchard.Scripting.Dlr/Web.config @@ -21,6 +21,12 @@ + + + + + + diff --git a/src/Orchard.Web/Modules/Orchard.Scripting/Orchard.Scripting.csproj b/src/Orchard.Web/Modules/Orchard.Scripting/Orchard.Scripting.csproj index c084b4fcb..8a6fa5f8c 100644 --- a/src/Orchard.Web/Modules/Orchard.Scripting/Orchard.Scripting.csproj +++ b/src/Orchard.Web/Modules/Orchard.Scripting/Orchard.Scripting.csproj @@ -37,7 +37,7 @@ 4 ..\..\..\OrchardBasicCorrectness.ruleset false - 5 + 6 pdbonly @@ -47,7 +47,7 @@ prompt 4 false - 5 + 6 @@ -90,7 +90,7 @@ {2D1D92BB-4555-4CBE-8D0E-63563D6CE4C6} Orchard.Framework - True + $(MvcBuildViews) diff --git a/src/Orchard.Web/Modules/Orchard.Scripting/Web.config b/src/Orchard.Web/Modules/Orchard.Scripting/Web.config index 314606a77..6499c3044 100644 --- a/src/Orchard.Web/Modules/Orchard.Scripting/Web.config +++ b/src/Orchard.Web/Modules/Orchard.Scripting/Web.config @@ -21,6 +21,12 @@ + + + + + + diff --git a/src/Orchard.Web/Modules/Orchard.Search/Orchard.Search.csproj b/src/Orchard.Web/Modules/Orchard.Search/Orchard.Search.csproj index 24224f41c..762f7d562 100644 --- a/src/Orchard.Web/Modules/Orchard.Search/Orchard.Search.csproj +++ b/src/Orchard.Web/Modules/Orchard.Search/Orchard.Search.csproj @@ -38,7 +38,7 @@ 4 ..\..\..\OrchardBasicCorrectness.ruleset false - 5 + 6 pdbonly @@ -48,7 +48,7 @@ prompt 4 false - 5 + 6 @@ -127,11 +127,12 @@ {2d1d92bb-4555-4cbe-8d0e-63563d6ce4c6} Orchard.Framework - false + $(MvcBuildViews) {9916839c-39fc-4ceb-a5af-89ca7e87119f} Orchard.Core + $(MvcBuildViews) {73a7688a-5bd3-4f7e-adfa-ce36c5a10e3b} diff --git a/src/Orchard.Web/Modules/Orchard.Search/Web.config b/src/Orchard.Web/Modules/Orchard.Search/Web.config index a3cb5df90..e30edbf7e 100644 --- a/src/Orchard.Web/Modules/Orchard.Search/Web.config +++ b/src/Orchard.Web/Modules/Orchard.Search/Web.config @@ -21,6 +21,12 @@ + + + + + + diff --git a/src/Orchard.Web/Modules/Orchard.SecureSocketsLayer/Orchard.SecureSocketsLayer.csproj b/src/Orchard.Web/Modules/Orchard.SecureSocketsLayer/Orchard.SecureSocketsLayer.csproj index 20ef69b28..4ae5c3c2b 100644 --- a/src/Orchard.Web/Modules/Orchard.SecureSocketsLayer/Orchard.SecureSocketsLayer.csproj +++ b/src/Orchard.Web/Modules/Orchard.SecureSocketsLayer/Orchard.SecureSocketsLayer.csproj @@ -36,7 +36,7 @@ 4 ..\..\..\OrchardBasicCorrectness.ruleset false - 5 + 6 pdbonly @@ -47,7 +47,7 @@ 4 AllRules.ruleset false - 5 + 6 @@ -113,12 +113,12 @@ {2D1D92BB-4555-4CBE-8D0E-63563D6CE4C6} Orchard.Framework - false + $(MvcBuildViews) {9916839C-39FC-4CEB-A5AF-89CA7E87119F} Orchard.Core - false + $(MvcBuildViews) @@ -168,7 +168,7 @@ --> - + diff --git a/src/Orchard.Web/Modules/Orchard.SecureSocketsLayer/Web.config b/src/Orchard.Web/Modules/Orchard.SecureSocketsLayer/Web.config index a3cb5df90..e30edbf7e 100644 --- a/src/Orchard.Web/Modules/Orchard.SecureSocketsLayer/Web.config +++ b/src/Orchard.Web/Modules/Orchard.SecureSocketsLayer/Web.config @@ -21,6 +21,12 @@ + + + + + + diff --git a/src/Orchard.Web/Modules/Orchard.Setup/Orchard.Setup.csproj b/src/Orchard.Web/Modules/Orchard.Setup/Orchard.Setup.csproj index faea03cd4..c898496e2 100644 --- a/src/Orchard.Web/Modules/Orchard.Setup/Orchard.Setup.csproj +++ b/src/Orchard.Web/Modules/Orchard.Setup/Orchard.Setup.csproj @@ -37,7 +37,7 @@ 4 ..\..\..\OrchardBasicCorrectness.ruleset false - 5 + 6 pdbonly @@ -48,7 +48,7 @@ 4 AllRules.ruleset false - 5 + 6 @@ -127,12 +127,12 @@ {2D1D92BB-4555-4CBE-8D0E-63563D6CE4C6} Orchard.Framework - false + $(MvcBuildViews) {9916839C-39FC-4CEB-A5AF-89CA7E87119F} Orchard.Core - false + $(MvcBuildViews) {fc1d74e8-7a4d-48f4-83de-95c6173780c4} @@ -189,7 +189,7 @@ --> - + diff --git a/src/Orchard.Web/Modules/Orchard.Setup/Web.config b/src/Orchard.Web/Modules/Orchard.Setup/Web.config index a3cb5df90..e30edbf7e 100644 --- a/src/Orchard.Web/Modules/Orchard.Setup/Web.config +++ b/src/Orchard.Web/Modules/Orchard.Setup/Web.config @@ -21,6 +21,12 @@ + + + + + + diff --git a/src/Orchard.Web/Modules/Orchard.Tags/Orchard.Tags.csproj b/src/Orchard.Web/Modules/Orchard.Tags/Orchard.Tags.csproj index aabc39e27..304dca18a 100644 --- a/src/Orchard.Web/Modules/Orchard.Tags/Orchard.Tags.csproj +++ b/src/Orchard.Web/Modules/Orchard.Tags/Orchard.Tags.csproj @@ -37,7 +37,7 @@ 4 ..\..\..\OrchardBasicCorrectness.ruleset false - 5 + 6 pdbonly @@ -48,7 +48,7 @@ 4 AllRules.ruleset false - 5 + 6 @@ -156,12 +156,12 @@ {2D1D92BB-4555-4CBE-8D0E-63563D6CE4C6} Orchard.Framework - false + $(MvcBuildViews) {9916839C-39FC-4CEB-A5AF-89CA7E87119F} Orchard.Core - false + $(MvcBuildViews) {66FCCD76-2761-47E3-8D11-B45D0001DDAA} @@ -223,7 +223,7 @@ --> - + diff --git a/src/Orchard.Web/Modules/Orchard.Tags/Services/TagService.cs b/src/Orchard.Web/Modules/Orchard.Tags/Services/TagService.cs index bd50820bd..662f0efb4 100644 --- a/src/Orchard.Web/Modules/Orchard.Tags/Services/TagService.cs +++ b/src/Orchard.Web/Modules/Orchard.Tags/Services/TagService.cs @@ -191,20 +191,22 @@ namespace Orchard.Tags.Services { } public void UpdateTagsForContentItem(ContentItem contentItem, IEnumerable tagNamesForContentItem) { - var tags = tagNamesForContentItem.Select(CreateTag); - var newTagsForContentItem = new List(tags); + var newTagsForContentItem = tagNamesForContentItem.Where(s => s != null).ToList(); var currentTagsForContentItem = contentItem.As().Record.Tags; foreach (var tagContentItem in currentTagsForContentItem) { - if (!newTagsForContentItem.Contains(tagContentItem.TagRecord)) { + var newTag = newTagsForContentItem.FirstOrDefault(t => t.Equals(tagContentItem.TagRecord.TagName, StringComparison.OrdinalIgnoreCase)); + + if (newTag == null) { _contentTagRepository.Delete(tagContentItem); } - - newTagsForContentItem.Remove(tagContentItem.TagRecord); + else { + newTagsForContentItem.Remove(newTag); + } } foreach (var newTagForContentItem in newTagsForContentItem) { - _contentTagRepository.Create(new ContentTagRecord { TagsPartRecord = contentItem.As().Record, TagRecord = newTagForContentItem }); + _contentTagRepository.Create(new ContentTagRecord { TagsPartRecord = contentItem.As().Record, TagRecord = CreateTag(newTagForContentItem) }); } contentItem.As().CurrentTags = tagNamesForContentItem; diff --git a/src/Orchard.Web/Modules/Orchard.Tags/Web.config b/src/Orchard.Web/Modules/Orchard.Tags/Web.config index a3cb5df90..e30edbf7e 100644 --- a/src/Orchard.Web/Modules/Orchard.Tags/Web.config +++ b/src/Orchard.Web/Modules/Orchard.Tags/Web.config @@ -21,6 +21,12 @@ + + + + + + diff --git a/src/Orchard.Web/Modules/Orchard.TaskLease/Orchard.TaskLease.csproj b/src/Orchard.Web/Modules/Orchard.TaskLease/Orchard.TaskLease.csproj index 49f955ef1..4c7cd4bc3 100644 --- a/src/Orchard.Web/Modules/Orchard.TaskLease/Orchard.TaskLease.csproj +++ b/src/Orchard.Web/Modules/Orchard.TaskLease/Orchard.TaskLease.csproj @@ -37,7 +37,7 @@ 4 ..\..\..\OrchardBasicCorrectness.ruleset false - 5 + 6 pdbonly @@ -48,7 +48,7 @@ 4 AllRules.ruleset false - 5 + 6 @@ -80,12 +80,12 @@ {2D1D92BB-4555-4CBE-8D0E-63563D6CE4C6} Orchard.Framework - false + $(MvcBuildViews) {9916839C-39FC-4CEB-A5AF-89CA7E87119F} Orchard.Core - false + $(MvcBuildViews) @@ -118,7 +118,7 @@ --> - + diff --git a/src/Orchard.Web/Modules/Orchard.TaskLease/Tests/Orchard.TaskLease.Tests/Orchard.TaskLease.Tests.csproj b/src/Orchard.Web/Modules/Orchard.TaskLease/Tests/Orchard.TaskLease.Tests/Orchard.TaskLease.Tests.csproj index fbf389bb0..b5a544223 100644 --- a/src/Orchard.Web/Modules/Orchard.TaskLease/Tests/Orchard.TaskLease.Tests/Orchard.TaskLease.Tests.csproj +++ b/src/Orchard.Web/Modules/Orchard.TaskLease/Tests/Orchard.TaskLease.Tests/Orchard.TaskLease.Tests.csproj @@ -24,7 +24,7 @@ DEBUG;TRACE prompt 4 - 5 + 6 x86 @@ -34,7 +34,7 @@ TRACE prompt 4 - 5 + 6 @@ -77,12 +77,12 @@ {2D1D92BB-4555-4CBE-8D0E-63563D6CE4C6} Orchard.Framework - false + $(MvcBuildViews) {9916839C-39FC-4CEB-A5AF-89CA7E87119F} Orchard.Core - false + $(MvcBuildViews) {3F72A4E9-7B72-4260-B010-C16EC54F9BAF} diff --git a/src/Orchard.Web/Modules/Orchard.TaskLease/Web.config b/src/Orchard.Web/Modules/Orchard.TaskLease/Web.config index f65725879..aca4b457a 100644 --- a/src/Orchard.Web/Modules/Orchard.TaskLease/Web.config +++ b/src/Orchard.Web/Modules/Orchard.TaskLease/Web.config @@ -21,6 +21,12 @@ + + + + + + diff --git a/src/Orchard.Web/Modules/Orchard.Taxonomies/Controllers/TagsController.cs b/src/Orchard.Web/Modules/Orchard.Taxonomies/Controllers/TagsController.cs index bc1d929f3..98b14f45b 100644 --- a/src/Orchard.Web/Modules/Orchard.Taxonomies/Controllers/TagsController.cs +++ b/src/Orchard.Web/Modules/Orchard.Taxonomies/Controllers/TagsController.cs @@ -36,19 +36,23 @@ namespace Orchard.Taxonomies.Controllers { if (!_authorizer.Authorize(StandardPermissions.AccessAdminPanel)) { throw new UnauthorizedAccessException("Can't access the admin"); } - if (string.IsNullOrEmpty(query)) return new List(); var allTerms = leavesOnly ? _taxonomyService.GetTerms(taxonomyId).ToList() : new List(); + var matchingTerms = _contentManager.Query() .Where(t => t.TaxonomyId == taxonomyId) - .Join() - .Where(r => r.Title.Contains(query)) - .List() - .Select(t => BuildTag(t, leavesOnly, allTerms)) - .OrderBy(t => t.Label) - .ToList(); - return matchingTerms; + .Join(); + + if (!string.IsNullOrEmpty(query)) + matchingTerms = matchingTerms.Where(r => r.Title.Contains(query)); + + var resultingTerms = matchingTerms.List() + .Select(t => BuildTag(t, leavesOnly, allTerms)) + .OrderBy(t => t.Label) + .ToList(); + + return resultingTerms; } private static Tag BuildTag(TermPart term, bool leavesOnly, IEnumerable terms) { diff --git a/src/Orchard.Web/Modules/Orchard.Taxonomies/Handlers/TaxonomyPartHandler.cs b/src/Orchard.Web/Modules/Orchard.Taxonomies/Handlers/TaxonomyPartHandler.cs index 23812f74a..c5e6c7c3f 100644 --- a/src/Orchard.Web/Modules/Orchard.Taxonomies/Handlers/TaxonomyPartHandler.cs +++ b/src/Orchard.Web/Modules/Orchard.Taxonomies/Handlers/TaxonomyPartHandler.cs @@ -1,21 +1,24 @@ -using Orchard.ContentManagement; +using System.Linq; +using System.Web.Routing; +using Orchard.ContentManagement; +using Orchard.ContentManagement.Handlers; using Orchard.ContentManagement.MetaData; using Orchard.Core.Title.Models; -using Orchard.Taxonomies.Fields; -using Orchard.Taxonomies.Services; -using Orchard.Taxonomies.Models; -using Orchard.ContentManagement.Handlers; using Orchard.Data; +using Orchard.Localization.Models; +using Orchard.Localization.Services; +using Orchard.Taxonomies.Fields; +using Orchard.Taxonomies.Models; +using Orchard.Taxonomies.Services; using Orchard.Taxonomies.Settings; -using System; -using System.Web.Routing; namespace Orchard.Taxonomies.Handlers { public class TaxonomyPartHandler : ContentHandler { public TaxonomyPartHandler( IRepository repository, ITaxonomyService taxonomyService, - IContentDefinitionManager contentDefinitionManager) { + IContentDefinitionManager contentDefinitionManager, + ILocalizationService localizationService = null) { //Localization feature may not be active string previousName = null; @@ -33,6 +36,21 @@ namespace Orchard.Taxonomies.Handlers { if (field.FieldDefinition.Name == typeof(TaxonomyField).Name) { if (field.Settings.GetModel().Taxonomy == previousName) { + //could either be a name change, or we could be publishing a translation + if (localizationService != null) { //Localization feature may not be active + var locPart = part.ContentItem.As(); + if (locPart != null) { + var localizedTaxonomies = localizationService + .GetLocalizations(part.ContentItem) //versions in all cultures + .Where(pa => pa.ContentItem.Id != part.ContentItem.Id) //but not the one we are publishing + .Select(pa => { + var tax = pa.ContentItem.As(); //the TaxonomyPart + return tax == null ? string.Empty : tax.Name; //get its name (with sanity check) + }); + if (localizedTaxonomies.Contains(previousName)) + continue; //this is a new localization, so move along + } + } contentDefinitionManager.AlterPartDefinition(partDefinition.Name, cfg => cfg.WithField(field.Name, builder => builder.WithSetting("TaxonomyFieldSettings.Taxonomy", part.Name))); diff --git a/src/Orchard.Web/Modules/Orchard.Taxonomies/Orchard.Taxonomies.csproj b/src/Orchard.Web/Modules/Orchard.Taxonomies/Orchard.Taxonomies.csproj index ed88ef7ae..c846782e5 100644 --- a/src/Orchard.Web/Modules/Orchard.Taxonomies/Orchard.Taxonomies.csproj +++ b/src/Orchard.Web/Modules/Orchard.Taxonomies/Orchard.Taxonomies.csproj @@ -37,7 +37,7 @@ prompt 4 false - 5 + 6 ..\..\..\OrchardBasicCorrectness.ruleset @@ -48,7 +48,7 @@ prompt 4 false - 5 + 6 @@ -244,12 +244,12 @@ {2d1d92bb-4555-4cbe-8d0e-63563d6ce4c6} Orchard.Framework - false + $(MvcBuildViews) {9916839c-39fc-4ceb-a5af-89ca7e87119f} Orchard.Core - false + $(MvcBuildViews) {475b6c45-b27c-438b-8966-908b9d6d1077} @@ -259,6 +259,10 @@ {66fccd76-2761-47e3-8d11-b45d0001ddaa} Orchard.Autoroute + + {FBC8B571-ED50-49D8-8D9D-64AB7454A0D6} + Orchard.Localization + {fbc8b571-ed50-49d8-8d9d-64ab7454a0d6} Orchard.Localization diff --git a/src/Orchard.Web/Modules/Orchard.Taxonomies/Web.config b/src/Orchard.Web/Modules/Orchard.Taxonomies/Web.config index 5b2ecbf27..b09952c74 100644 --- a/src/Orchard.Web/Modules/Orchard.Taxonomies/Web.config +++ b/src/Orchard.Web/Modules/Orchard.Taxonomies/Web.config @@ -20,6 +20,12 @@ + + + + + + diff --git a/src/Orchard.Web/Modules/Orchard.Templates/Orchard.Templates.csproj b/src/Orchard.Web/Modules/Orchard.Templates/Orchard.Templates.csproj index fcb9eee19..9c1dbeabe 100644 --- a/src/Orchard.Web/Modules/Orchard.Templates/Orchard.Templates.csproj +++ b/src/Orchard.Web/Modules/Orchard.Templates/Orchard.Templates.csproj @@ -36,7 +36,7 @@ 4 ..\..\..\OrchardBasicCorrectness.ruleset false - 5 + 6 pdbonly @@ -47,7 +47,7 @@ 4 AllRules.ruleset false - 5 + 6 @@ -163,12 +163,12 @@ {2D1D92BB-4555-4CBE-8D0E-63563D6CE4C6} Orchard.Framework - false + $(MvcBuildViews) {9916839C-39FC-4CEB-A5AF-89CA7E87119F} Orchard.Core - false + $(MvcBuildViews) {CDE24A24-01D3-403C-84B9-37722E18DFB7} @@ -255,7 +255,7 @@ --> - + diff --git a/src/Orchard.Web/Modules/Orchard.Templates/Web.config b/src/Orchard.Web/Modules/Orchard.Templates/Web.config index a3cb5df90..e30edbf7e 100644 --- a/src/Orchard.Web/Modules/Orchard.Templates/Web.config +++ b/src/Orchard.Web/Modules/Orchard.Templates/Web.config @@ -21,6 +21,12 @@ + + + + + + diff --git a/src/Orchard.Web/Modules/Orchard.Themes/Orchard.Themes.csproj b/src/Orchard.Web/Modules/Orchard.Themes/Orchard.Themes.csproj index 52d7b70ee..2ab03a4dc 100644 --- a/src/Orchard.Web/Modules/Orchard.Themes/Orchard.Themes.csproj +++ b/src/Orchard.Web/Modules/Orchard.Themes/Orchard.Themes.csproj @@ -37,7 +37,7 @@ 4 ..\..\..\OrchardBasicCorrectness.ruleset false - 5 + 6 pdbonly @@ -48,7 +48,7 @@ 4 AllRules.ruleset false - 5 + 6 @@ -136,12 +136,12 @@ {2D1D92BB-4555-4CBE-8D0E-63563D6CE4C6} Orchard.Framework - false + $(MvcBuildViews) {9916839c-39fc-4ceb-a5af-89ca7e87119f} Orchard.Core - false + $(MvcBuildViews) {dfd137a2-ddb5-4d22-be0d-fa9ad4c8b059} diff --git a/src/Orchard.Web/Modules/Orchard.Themes/Web.config b/src/Orchard.Web/Modules/Orchard.Themes/Web.config index a3cb5df90..e30edbf7e 100644 --- a/src/Orchard.Web/Modules/Orchard.Themes/Web.config +++ b/src/Orchard.Web/Modules/Orchard.Themes/Web.config @@ -21,6 +21,12 @@ + + + + + + diff --git a/src/Orchard.Web/Modules/Orchard.Tokens/Orchard.Tokens.csproj b/src/Orchard.Web/Modules/Orchard.Tokens/Orchard.Tokens.csproj index e2113d1b7..6da4acdf2 100644 --- a/src/Orchard.Web/Modules/Orchard.Tokens/Orchard.Tokens.csproj +++ b/src/Orchard.Web/Modules/Orchard.Tokens/Orchard.Tokens.csproj @@ -37,7 +37,7 @@ 4 ..\..\..\OrchardBasicCorrectness.ruleset false - 5 + 6 pdbonly @@ -48,7 +48,7 @@ 4 AllRules.ruleset false - 5 + 6 @@ -114,12 +114,12 @@ {2D1D92BB-4555-4CBE-8D0E-63563D6CE4C6} Orchard.Framework - false + $(MvcBuildViews) {9916839C-39FC-4CEB-A5AF-89CA7E87119F} Orchard.Core - false + $(MvcBuildViews) @@ -186,7 +186,7 @@ --> - + diff --git a/src/Orchard.Web/Modules/Orchard.Tokens/Providers/RequestTokens.cs b/src/Orchard.Web/Modules/Orchard.Tokens/Providers/RequestTokens.cs index 5f472b6d2..2c8971a69 100644 --- a/src/Orchard.Web/Modules/Orchard.Tokens/Providers/RequestTokens.cs +++ b/src/Orchard.Web/Modules/Orchard.Tokens/Providers/RequestTokens.cs @@ -152,7 +152,7 @@ namespace Orchard.Tokens.Providers { chainIndex = token.IndexOf(").") + 1; tokenLength = (tokenPrefix + ":").Length; if (chainIndex == 0) { // ")." has not be found - return new Tuple(token.Substring(tokenLength).Trim(new char[] { '(', ')' }), token.Length.ToString()); + return new Tuple(token.Substring(tokenLength).Trim(new char[] { '(', ')' }), ""); } if (!token.StartsWith((tokenPrefix + ":"), StringComparison.OrdinalIgnoreCase) || chainIndex <= tokenLength) { return null; diff --git a/src/Orchard.Web/Modules/Orchard.Tokens/Providers/TextTokens.cs b/src/Orchard.Web/Modules/Orchard.Tokens/Providers/TextTokens.cs index ab1141fc6..c19752c57 100644 --- a/src/Orchard.Web/Modules/Orchard.Tokens/Providers/TextTokens.cs +++ b/src/Orchard.Web/Modules/Orchard.Tokens/Providers/TextTokens.cs @@ -1,11 +1,15 @@ using System; +using System.Linq; using System.Web; using Orchard.Localization; namespace Orchard.Tokens.Providers { public class TextTokens : ITokenProvider { + private static string[] _textChainableTokens; public TextTokens() { T = NullLocalizer.Instance; + _textChainableTokens = new string[] { "Limit", "Format", "TrimEnd", "TrimStart" }; + } public Localizer T { get; set; } @@ -15,6 +19,7 @@ namespace Orchard.Tokens.Providers { .Token("Limit:*", T("Limit:[,]"), T("Limit text to specified length and append an optional ellipsis text.")) .Token("Format:*", T("Format:"), T("Optional format specifier (e.g. foo{0}bar).")) .Token("TrimEnd:*", T("TrimEnd:"), T("Trims the specified characters or number of them from the end of the string.")) + .Token("TrimStart:*", T("TrimStart:"), T("Trims the specified characters or number of them from the beginning of the string.")) .Token("UrlEncode", T("Url Encode"), T("Encodes a URL string."), "Text") .Token("HtmlEncode", T("Html Encode"), T("Encodes an HTML string."), "Text") .Token("JavaScriptEncode", T("JavaScript Encode"), T("Encodes a JavaScript string."), "Text") @@ -27,33 +32,131 @@ namespace Orchard.Tokens.Providers { // {Text} .Token( token => token == String.Empty ? String.Empty : null, - (token, d) => d.ToString()) + (token, d) => d) // {Text.Limit:[,]} .Token( token => FilterTokenParam("Limit:", token), (token, t) => Limit(t, token)) + .Chain(FilterChainLimitParam, "Text", (token, t) => Limit(t, token)) // {Text.Format:} .Token( token => FilterTokenParam("Format:", token), (token, d) => String.Format(token, d)) + .Chain(FilterChainFormatParam, "Text", (token, d) => String.Format(token, d)) // {Text.TrimEnd:} .Token(token => FilterTokenParam("TrimEnd:", token), TrimEnd) + .Chain(FilterChainTrimEndParam, "Text", TrimEnd) + // {Text.TrimStart:} + .Token(token => FilterTokenParam("TrimStart:", token), TrimStart) + .Chain(FilterChainTrimStartParam, "Text", TrimStart) .Token("UrlEncode", HttpUtility.UrlEncode) .Chain("UrlEncode", "Text", HttpUtility.UrlEncode) .Token("HtmlEncode", HttpUtility.HtmlEncode) .Chain("HtmlEncode", "Text", HttpUtility.HtmlEncode) .Token("JavaScriptEncode", HttpUtility.JavaScriptStringEncode) .Chain("JavaScriptEncode", "Text", HttpUtility.JavaScriptStringEncode) - .Token("LineEncode", text => text.Replace(System.Environment.NewLine, "
")) - .Chain("LineEncode", "Text", text => text.Replace(System.Environment.NewLine, "
")) + .Token("LineEncode", text => ReplaceNewLineCharacters(text)) + .Chain("LineEncode", "Text", text => ReplaceNewLineCharacters(text)) ; } - private static string FilterTokenParam(string tokenName, string token) { - return token.StartsWith(tokenName, StringComparison.OrdinalIgnoreCase) ? token.Substring(tokenName.Length) : null; + private static string ReplaceNewLineCharacters(string text) { + return text + .Replace("\r\n", "
") + .Replace("\r", "
") + .Replace("\n", "
"); } + private Tuple FilterChainLimitParam(string token) { + return FilterChainParam("Limit:", token); + } + + private Tuple FilterChainFormatParam(string token) { + return FilterChainParam("Format:", token); + } + + private Tuple FilterChainTrimEndParam(string token) { + return FilterChainParam("TrimEnd:", token); + } + + private Tuple FilterChainTrimStartParam(string token) { + return FilterChainParam("TrimStart:", token); + } + + private static string FilterTokenParam(string tokenName, string token) { + if (!token.StartsWith(tokenName, StringComparison.OrdinalIgnoreCase)) return null; + string tokenPrefix; + int chainIndex, tokenLength; + if (token.IndexOf(":") == -1) { + tokenPrefix = token; + } + else { + tokenPrefix = token.Substring(0, token.IndexOf(":")); + } + if (!_textChainableTokens.Contains(tokenPrefix, StringComparer.OrdinalIgnoreCase)) { + return token.StartsWith(tokenName, StringComparison.OrdinalIgnoreCase) ? token.Substring(tokenName.Length) : null; + } + + // use ")." as chars combination to discover the end of the parameter + chainIndex = token.IndexOf(").") + 1; + tokenLength = (tokenPrefix + ":").Length; + if (chainIndex == 0) {// ")." has not be found + return token.Substring(tokenLength).Trim(new char[] { '(', ')' }); + } + if (!token.StartsWith((tokenPrefix + ":"), StringComparison.OrdinalIgnoreCase) || chainIndex <= tokenLength) { + return null; + } + return token.Substring(tokenLength, chainIndex - tokenLength).Trim(new char[] { '(', ')' }); + } + + /// + /// + /// + /// The name of the Token (e.g. "Limit:") + /// The entire Token (e.g. "Limit:(3).TrimStart:4") + /// Tuple representing the token parameter and next tokens (e.g. for token "Limit:(3).TrimStart:4", first string have to be "3", second one have to be "TrimStart:4") + private static Tuple FilterChainParam(string tokenName, string token) { + if (!token.StartsWith(tokenName, StringComparison.OrdinalIgnoreCase)) return null; + string tokenPrefix; + int chainIndex, tokenLength; + + if (token.IndexOf(":") == -1) { + tokenPrefix = token; + } + else { + tokenPrefix = token.Substring(0, token.IndexOf(":")); + } + if (!_textChainableTokens.Contains(tokenPrefix, StringComparer.OrdinalIgnoreCase)) { + return new Tuple(token, token); + } + + // use ")." as chars combination to discover the end of the parameter + chainIndex = token.IndexOf(").") + 1; + tokenLength = (tokenPrefix + ":").Length; + if (chainIndex == 0) { // ")." has not be found + return new Tuple(token.Substring(tokenLength).Trim(new char[] { '(', ')' }), ""); + } + if (!token.StartsWith((tokenPrefix + ":"), StringComparison.OrdinalIgnoreCase) || chainIndex <= tokenLength) { + return null; + } + return new Tuple(token.Substring(tokenLength, chainIndex - tokenLength).Trim(new char[] { '(', ')' }), token.Substring(chainIndex + 1)); + + } + + private static string TrimStart(string param, string token) { + if (string.IsNullOrEmpty(param)) { + return token; + } + + int n; + if (!int.TryParse(param, out n)) { + return token.TrimStart(param.ToCharArray()); + } + + n = Math.Max(0, n); // prevent negative numbers + return token.Substring(n); + } private static string TrimEnd(string param, string token) { if (String.IsNullOrEmpty(param)) { return token; @@ -69,7 +172,7 @@ namespace Orchard.Tokens.Providers { } private static string Limit(string token, string param) { - if(String.IsNullOrEmpty(token)) { + if (String.IsNullOrEmpty(token)) { return String.Empty; } diff --git a/src/Orchard.Web/Modules/Orchard.Tokens/Tests/Orchard.Tokens.Tests.csproj b/src/Orchard.Web/Modules/Orchard.Tokens/Tests/Orchard.Tokens.Tests.csproj index 24a5c4970..107006b61 100644 --- a/src/Orchard.Web/Modules/Orchard.Tokens/Tests/Orchard.Tokens.Tests.csproj +++ b/src/Orchard.Web/Modules/Orchard.Tokens/Tests/Orchard.Tokens.Tests.csproj @@ -23,7 +23,7 @@ prompt 4 false - 5 + 6 ..\..\..\..\OrchardBasicCorrectness.ruleset @@ -34,7 +34,7 @@ prompt 4 false - 5 + 6 @@ -81,12 +81,12 @@ {2D1D92BB-4555-4CBE-8D0E-63563D6CE4C6} Orchard.Framework - True + $(MvcBuildViews) {9916839C-39FC-4CEB-A5AF-89CA7E87119F} Orchard.Core - True + $(MvcBuildViews) {6F759635-13D7-4E94-BCC9-80445D63F117} diff --git a/src/Orchard.Web/Modules/Orchard.Tokens/Tests/TextTokenTests.cs b/src/Orchard.Web/Modules/Orchard.Tokens/Tests/TextTokenTests.cs index 5643bb856..a66304a41 100644 --- a/src/Orchard.Web/Modules/Orchard.Tokens/Tests/TextTokenTests.cs +++ b/src/Orchard.Web/Modules/Orchard.Tokens/Tests/TextTokenTests.cs @@ -117,5 +117,13 @@ namespace Orchard.Tokens.Tests { var result = _tokenizer.Replace("{Text.LineEncode}", new { Text = str }, new ReplaceOptions { Encoding = ReplaceOptions.NoEncode }); Assert.That(result, Is.EqualTo("foo
bar
baz")); } + + [TestCase("foo\nbar", "foo
bar")] + [TestCase("foo\rbar", "foo
bar")] + [TestCase("foo\r\nbar", "foo
bar")] + public void TestLineEncodeWithNonWindowsStyleLineBreaks(string str, string expected) { + var result = _tokenizer.Replace("{Text.LineEncode}", new { Text = str }, new ReplaceOptions { Encoding = ReplaceOptions.NoEncode }); + Assert.That(result, Is.EqualTo(expected)); + } } } \ No newline at end of file diff --git a/src/Orchard.Web/Modules/Orchard.Tokens/Web.config b/src/Orchard.Web/Modules/Orchard.Tokens/Web.config index a3cb5df90..e30edbf7e 100644 --- a/src/Orchard.Web/Modules/Orchard.Tokens/Web.config +++ b/src/Orchard.Web/Modules/Orchard.Tokens/Web.config @@ -21,6 +21,12 @@ + + + + + + diff --git a/src/Orchard.Web/Modules/Orchard.Users/Orchard.Users.csproj b/src/Orchard.Web/Modules/Orchard.Users/Orchard.Users.csproj index 2938e522a..463ec865b 100644 --- a/src/Orchard.Web/Modules/Orchard.Users/Orchard.Users.csproj +++ b/src/Orchard.Web/Modules/Orchard.Users/Orchard.Users.csproj @@ -37,7 +37,7 @@ 4 ..\..\..\OrchardBasicCorrectness.ruleset false - 5 + 6 pdbonly @@ -48,7 +48,7 @@ 4 AllRules.ruleset false - 5 + 6 @@ -177,12 +177,12 @@ {2D1D92BB-4555-4CBE-8D0E-63563D6CE4C6} Orchard.Framework - false + $(MvcBuildViews) {9916839C-39FC-4CEB-A5AF-89CA7E87119F} Orchard.Core - false + $(MvcBuildViews) {642a49d7-8752-4177-80d6-bfbbcfad3de0} @@ -271,7 +271,7 @@ --> - + diff --git a/src/Orchard.Web/Modules/Orchard.Users/Web.config b/src/Orchard.Web/Modules/Orchard.Users/Web.config index 2dbaaf5fd..aeac77ab1 100644 --- a/src/Orchard.Web/Modules/Orchard.Users/Web.config +++ b/src/Orchard.Web/Modules/Orchard.Users/Web.config @@ -21,6 +21,12 @@ + + + + + + diff --git a/src/Orchard.Web/Modules/Orchard.Warmup/Orchard.Warmup.csproj b/src/Orchard.Web/Modules/Orchard.Warmup/Orchard.Warmup.csproj index 7eb6380c2..b76ef7f67 100644 --- a/src/Orchard.Web/Modules/Orchard.Warmup/Orchard.Warmup.csproj +++ b/src/Orchard.Web/Modules/Orchard.Warmup/Orchard.Warmup.csproj @@ -37,7 +37,7 @@ 4 ..\..\..\OrchardBasicCorrectness.ruleset false - 5 + 6 pdbonly @@ -48,7 +48,7 @@ 4 AllRules.ruleset false - 5 + 6 @@ -111,12 +111,12 @@ {2D1D92BB-4555-4CBE-8D0E-63563D6CE4C6} Orchard.Framework - false + $(MvcBuildViews) {9916839C-39FC-4CEB-A5AF-89CA7E87119F} Orchard.Core - false + $(MvcBuildViews) @@ -176,7 +176,7 @@ --> - + diff --git a/src/Orchard.Web/Modules/Orchard.Warmup/Web.config b/src/Orchard.Web/Modules/Orchard.Warmup/Web.config index a3cb5df90..e30edbf7e 100644 --- a/src/Orchard.Web/Modules/Orchard.Warmup/Web.config +++ b/src/Orchard.Web/Modules/Orchard.Warmup/Web.config @@ -21,6 +21,12 @@ + + + + + + diff --git a/src/Orchard.Web/Modules/Orchard.Widgets/Orchard.Widgets.csproj b/src/Orchard.Web/Modules/Orchard.Widgets/Orchard.Widgets.csproj index 69a5bf57d..d5c712426 100644 --- a/src/Orchard.Web/Modules/Orchard.Widgets/Orchard.Widgets.csproj +++ b/src/Orchard.Web/Modules/Orchard.Widgets/Orchard.Widgets.csproj @@ -38,7 +38,7 @@ 4 ..\..\..\OrchardBasicCorrectness.ruleset false - 5 + 6 pdbonly @@ -48,7 +48,7 @@ prompt 4 false - 5 + 6 @@ -157,12 +157,12 @@ {9916839C-39FC-4CEB-A5AF-89CA7E87119F} Orchard.Core - false + $(MvcBuildViews) {2D1D92BB-4555-4CBE-8D0E-63563D6CE4C6} Orchard.Framework - True + $(MvcBuildViews) {98251eae-a41b-47b2-aa91-e28b8482da70} diff --git a/src/Orchard.Web/Modules/Orchard.Widgets/Web.config b/src/Orchard.Web/Modules/Orchard.Widgets/Web.config index a3cb5df90..e30edbf7e 100644 --- a/src/Orchard.Web/Modules/Orchard.Widgets/Web.config +++ b/src/Orchard.Web/Modules/Orchard.Widgets/Web.config @@ -21,6 +21,12 @@ + + + + + + diff --git a/src/Orchard.Web/Modules/Orchard.Workflows/Forms/WebRequestForm.cs b/src/Orchard.Web/Modules/Orchard.Workflows/Forms/WebRequestForm.cs index e33cb4fcb..11532e8c3 100644 --- a/src/Orchard.Web/Modules/Orchard.Workflows/Forms/WebRequestForm.cs +++ b/src/Orchard.Web/Modules/Orchard.Workflows/Forms/WebRequestForm.cs @@ -39,7 +39,7 @@ namespace Orchard.Workflows.Forms { _FormValues: New.Textarea( Id: "FormValues", Name: "FormValues", Title: T("Form Values"), - Description: T("For KeyValue, enter one line per key=value pair to submit when using the POST verb. For JSon, enter a valid JSon string"), + Description: T("For KeyValue, enter one line per key=value pair to submit when using the POST verb. For JSON, enter a string where the curly braces are replaced by double brackets e.g. { test: 'test' } becomes (( test: 'test' ))."), Classes: new[] {"tokenized"}) ); @@ -56,4 +56,4 @@ namespace Orchard.Workflows.Forms { ); } } -} \ No newline at end of file +} diff --git a/src/Orchard.Web/Modules/Orchard.Workflows/Orchard.Workflows.csproj b/src/Orchard.Web/Modules/Orchard.Workflows/Orchard.Workflows.csproj index 046da4364..07fc9f952 100644 --- a/src/Orchard.Web/Modules/Orchard.Workflows/Orchard.Workflows.csproj +++ b/src/Orchard.Web/Modules/Orchard.Workflows/Orchard.Workflows.csproj @@ -36,7 +36,7 @@ 4 ..\..\..\OrchardBasicCorrectness.ruleset false - 5 + 6 pdbonly @@ -47,7 +47,7 @@ 4 AllRules.ruleset false - 5 + 6 @@ -140,12 +140,12 @@ {2D1D92BB-4555-4CBE-8D0E-63563D6CE4C6} Orchard.Framework - false + $(MvcBuildViews) {9916839C-39FC-4CEB-A5AF-89CA7E87119F} Orchard.Core - false + $(MvcBuildViews) {642a49d7-8752-4177-80d6-bfbbcfad3de0} @@ -290,7 +290,7 @@ --> - + diff --git a/src/Orchard.Web/Modules/Orchard.Workflows/Web.config b/src/Orchard.Web/Modules/Orchard.Workflows/Web.config index a3cb5df90..e30edbf7e 100644 --- a/src/Orchard.Web/Modules/Orchard.Workflows/Web.config +++ b/src/Orchard.Web/Modules/Orchard.Workflows/Web.config @@ -21,6 +21,12 @@ + + + + + + diff --git a/src/Orchard.Web/Modules/Orchard.jQuery/Orchard.jQuery.csproj b/src/Orchard.Web/Modules/Orchard.jQuery/Orchard.jQuery.csproj index 802d349d9..1e65f199c 100644 --- a/src/Orchard.Web/Modules/Orchard.jQuery/Orchard.jQuery.csproj +++ b/src/Orchard.Web/Modules/Orchard.jQuery/Orchard.jQuery.csproj @@ -37,7 +37,7 @@ 4 ..\..\..\OrchardBasicCorrectness.ruleset false - 5 + 6 pdbonly @@ -48,7 +48,7 @@ 4 AllRules.ruleset false - 5 + 6 @@ -568,12 +568,12 @@ {2D1D92BB-4555-4CBE-8D0E-63563D6CE4C6} Orchard.Framework - false + $(MvcBuildViews) {9916839C-39FC-4CEB-A5AF-89CA7E87119F} Orchard.Core - false + $(MvcBuildViews) @@ -640,7 +640,7 @@ --> - + diff --git a/src/Orchard.Web/Modules/Orchard.jQuery/Web.config b/src/Orchard.Web/Modules/Orchard.jQuery/Web.config index a3cb5df90..e30edbf7e 100644 --- a/src/Orchard.Web/Modules/Orchard.jQuery/Web.config +++ b/src/Orchard.Web/Modules/Orchard.jQuery/Web.config @@ -21,6 +21,12 @@ + + + + + + diff --git a/src/Orchard.Web/Modules/SysCache/SysCache.csproj b/src/Orchard.Web/Modules/SysCache/SysCache.csproj index 77497e049..d78f30ce7 100644 --- a/src/Orchard.Web/Modules/SysCache/SysCache.csproj +++ b/src/Orchard.Web/Modules/SysCache/SysCache.csproj @@ -37,7 +37,7 @@ 4 ..\..\..\OrchardBasicCorrectness.ruleset false - 5 + 6 pdbonly @@ -48,7 +48,7 @@ 4 AllRules.ruleset false - 5 + 6 @@ -80,12 +80,12 @@ {2D1D92BB-4555-4CBE-8D0E-63563D6CE4C6} Orchard.Framework - false + $(MvcBuildViews) {9916839C-39FC-4CEB-A5AF-89CA7E87119F} Orchard.Core - false + $(MvcBuildViews) @@ -122,7 +122,7 @@ --> - + diff --git a/src/Orchard.Web/Modules/SysCache/Web.config b/src/Orchard.Web/Modules/SysCache/Web.config index f65725879..aca4b457a 100644 --- a/src/Orchard.Web/Modules/SysCache/Web.config +++ b/src/Orchard.Web/Modules/SysCache/Web.config @@ -21,6 +21,12 @@ + + + + + + diff --git a/src/Orchard.Web/Modules/TinyMce/TinyMce.csproj b/src/Orchard.Web/Modules/TinyMce/TinyMce.csproj index a32116086..b3252287a 100644 --- a/src/Orchard.Web/Modules/TinyMce/TinyMce.csproj +++ b/src/Orchard.Web/Modules/TinyMce/TinyMce.csproj @@ -37,7 +37,7 @@ 4 ..\..\..\OrchardBasicCorrectness.ruleset false - 5 + 6 pdbonly @@ -48,7 +48,7 @@ 4 AllRules.ruleset false - 5 + 6 @@ -273,7 +273,7 @@ {2D1D92BB-4555-4CBE-8D0E-63563D6CE4C6} Orchard.Framework - false + $(MvcBuildViews) @@ -347,7 +347,7 @@ --> - + diff --git a/src/Orchard.Web/Modules/TinyMce/Web.config b/src/Orchard.Web/Modules/TinyMce/Web.config index ec733ed96..f47dc42db 100644 --- a/src/Orchard.Web/Modules/TinyMce/Web.config +++ b/src/Orchard.Web/Modules/TinyMce/Web.config @@ -21,6 +21,12 @@ + + + + + + @@ -31,7 +37,6 @@ - diff --git a/src/Orchard.Web/Modules/Upgrade/Upgrade.csproj b/src/Orchard.Web/Modules/Upgrade/Upgrade.csproj index a2d206c66..310742256 100644 --- a/src/Orchard.Web/Modules/Upgrade/Upgrade.csproj +++ b/src/Orchard.Web/Modules/Upgrade/Upgrade.csproj @@ -36,7 +36,7 @@ 4 ..\..\..\OrchardBasicCorrectness.ruleset false - 5 + 6 pdbonly @@ -47,7 +47,7 @@ 4 AllRules.ruleset false - 5 + 6 @@ -127,12 +127,12 @@ {2D1D92BB-4555-4CBE-8D0E-63563D6CE4C6} Orchard.Framework - false + $(MvcBuildViews) {9916839C-39FC-4CEB-A5AF-89CA7E87119F} Orchard.Core - false + $(MvcBuildViews) {66fccd76-2761-47e3-8d11-b45d0001ddaa} @@ -210,7 +210,7 @@ --> - + diff --git a/src/Orchard.Web/Modules/Upgrade/Web.config b/src/Orchard.Web/Modules/Upgrade/Web.config index c9542450f..e857a2bb7 100644 --- a/src/Orchard.Web/Modules/Upgrade/Web.config +++ b/src/Orchard.Web/Modules/Upgrade/Web.config @@ -21,6 +21,12 @@ + + + + + + diff --git a/src/Orchard.Web/Orchard.Web.csproj b/src/Orchard.Web/Orchard.Web.csproj index 9466650ee..d88803deb 100644 --- a/src/Orchard.Web/Orchard.Web.csproj +++ b/src/Orchard.Web/Orchard.Web.csproj @@ -37,7 +37,7 @@ false false false - 5 + 6 pdbonly @@ -49,7 +49,7 @@ AllRules.ruleset AllFilesInProjectFolder false - 5 + 6 @@ -72,6 +72,10 @@ ..\packages\log4net.2.0.3\lib\net40-full\log4net.dll True + + ..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.8\lib\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.dll + True + ..\packages\Microsoft.Owin.3.0.1\lib\net45\Microsoft.Owin.dll True @@ -254,7 +258,7 @@ - + @@ -305,4 +309,11 @@ --> + + + + + + + \ No newline at end of file diff --git a/src/Orchard.Web/Themes/Themes.csproj b/src/Orchard.Web/Themes/Themes.csproj index 04b253ab1..6fd25c3ee 100644 --- a/src/Orchard.Web/Themes/Themes.csproj +++ b/src/Orchard.Web/Themes/Themes.csproj @@ -37,7 +37,7 @@ 4 ..\..\OrchardBasicCorrectness.ruleset false - 5 + 6 pdbonly @@ -48,7 +48,7 @@ 4 AllRules.ruleset false - 5 + 6 @@ -188,7 +188,7 @@ {2D1D92BB-4555-4CBE-8D0E-63563D6CE4C6} Orchard.Framework - False + $(MvcBuildViews) {6bd8b2fa-f2e3-4ac8-a4c3-2925a653889a} @@ -226,7 +226,7 @@ - + diff --git a/src/Orchard.Web/Themes/Web.config b/src/Orchard.Web/Themes/Web.config index 946a1c3f1..f62efd0fa 100644 --- a/src/Orchard.Web/Themes/Web.config +++ b/src/Orchard.Web/Themes/Web.config @@ -24,6 +24,12 @@ + + + + + + + + + + + + diff --git a/src/Orchard.Web/packages.config b/src/Orchard.Web/packages.config index 1a806c3a7..eadc5ea6f 100644 --- a/src/Orchard.Web/packages.config +++ b/src/Orchard.Web/packages.config @@ -8,6 +8,8 @@ + + diff --git a/src/Orchard/DisplayManagement/Descriptors/ShapePlacementStrategy/DefaultPlacementParseMatchProviders.cs b/src/Orchard/DisplayManagement/Descriptors/ShapePlacementStrategy/DefaultPlacementParseMatchProviders.cs new file mode 100644 index 000000000..e3b5257ba --- /dev/null +++ b/src/Orchard/DisplayManagement/Descriptors/ShapePlacementStrategy/DefaultPlacementParseMatchProviders.cs @@ -0,0 +1,57 @@ +using System; +using System.Linq; +using System.Web; + +namespace Orchard.DisplayManagement.Descriptors.ShapePlacementStrategy { + public class ContentPartPlacementParseMatchProvider : IPlacementParseMatchProvider { + public string Key { get { return "ContentPart"; } } + + public bool Match(ShapePlacementContext context, string expression) { + return context.Content != null && context.Content.ContentItem.Parts.Any(part => part.PartDefinition.Name == expression); + } + } + + public class ContentTypePlacementParseMatchProvider : IPlacementParseMatchProvider { + public string Key { get { return "ContentType"; } } + + public bool Match(ShapePlacementContext context, string expression) { + if (expression.EndsWith("*")) { + var prefix = expression.Substring(0, expression.Length - 1); + return (context.ContentType ?? "").StartsWith(prefix) || (context.Stereotype ?? "").StartsWith(prefix); + } + + return context.ContentType == expression || context.Stereotype == expression; + } + } + + public class DisplayTypePlacementParseMatchProvider : IPlacementParseMatchProvider { + public string Key { get { return "DisplayType"; } } + + public bool Match(ShapePlacementContext context, string expression) { + if (expression.EndsWith("*")) { + var prefix = expression.Substring(0, expression.Length - 1); + return (context.DisplayType ?? "").StartsWith(prefix); + } + + return context.DisplayType == expression; + } + } + + public class PathPlacementParseMatchProvider : IPlacementParseMatchProvider { + public string Key { get { return "Path"; } } + + public bool Match(ShapePlacementContext context, string expression) { + var normalizedPath = VirtualPathUtility.IsAbsolute(expression) + ? VirtualPathUtility.ToAppRelative(expression) + : VirtualPathUtility.Combine("~/", expression); + + if (normalizedPath.EndsWith("*")) { + var prefix = normalizedPath.Substring(0, normalizedPath.Length - 1); + return VirtualPathUtility.ToAppRelative(string.IsNullOrEmpty(context.Path) ? "/" : context.Path).StartsWith(prefix, StringComparison.OrdinalIgnoreCase); + } + + normalizedPath = VirtualPathUtility.AppendTrailingSlash(normalizedPath); + return context.Path.Equals(normalizedPath, StringComparison.OrdinalIgnoreCase); + } + } +} diff --git a/src/Orchard/DisplayManagement/Descriptors/ShapePlacementStrategy/IPlacementParseMatchProvider.cs b/src/Orchard/DisplayManagement/Descriptors/ShapePlacementStrategy/IPlacementParseMatchProvider.cs new file mode 100644 index 000000000..e1e14c87a --- /dev/null +++ b/src/Orchard/DisplayManagement/Descriptors/ShapePlacementStrategy/IPlacementParseMatchProvider.cs @@ -0,0 +1,6 @@ +namespace Orchard.DisplayManagement.Descriptors.ShapePlacementStrategy { + public interface IPlacementParseMatchProvider : IDependency { + string Key { get; } + bool Match(ShapePlacementContext context, string expression); + } +} diff --git a/src/Orchard/DisplayManagement/Descriptors/ShapePlacementStrategy/ShapePlacementParsingStrategy.cs b/src/Orchard/DisplayManagement/Descriptors/ShapePlacementStrategy/ShapePlacementParsingStrategy.cs index 5b27a8ad2..9aa489de4 100644 --- a/src/Orchard/DisplayManagement/Descriptors/ShapePlacementStrategy/ShapePlacementParsingStrategy.cs +++ b/src/Orchard/DisplayManagement/Descriptors/ShapePlacementStrategy/ShapePlacementParsingStrategy.cs @@ -2,7 +2,6 @@ using System.Collections.Concurrent; using System.Collections.Generic; using System.Linq; -using System.Web; using Orchard.Environment.Descriptor.Models; using Orchard.Environment.Extensions; using Orchard.Environment.Extensions.Models; @@ -15,14 +14,17 @@ namespace Orchard.DisplayManagement.Descriptors.ShapePlacementStrategy { private readonly IExtensionManager _extensionManager; private readonly ShellDescriptor _shellDescriptor; private readonly IPlacementFileParser _placementFileParser; + private readonly IEnumerable _placementParseMatchProviders; public ShapePlacementParsingStrategy( IExtensionManager extensionManager, ShellDescriptor shellDescriptor, - IPlacementFileParser placementFileParser) { + IPlacementFileParser placementFileParser, + IEnumerable placementParseMatchProviders) { _extensionManager = extensionManager; _shellDescriptor = shellDescriptor; _placementFileParser = placementFileParser; + _placementParseMatchProviders = placementParseMatchProviders; } public void Discover(ShapeTableBuilder builder) { @@ -125,37 +127,20 @@ namespace Orchard.DisplayManagement.Descriptors.ShapePlacementStrategy { } } - public static Func BuildPredicate(Func predicate, KeyValuePair term) { - var expression = term.Value; - switch (term.Key) { - case "ContentPart": - return ctx => ctx.Content != null - && ctx.Content.ContentItem.Parts.Any(part => part.PartDefinition.Name == expression) - && predicate(ctx); - case "ContentType": - if (expression.EndsWith("*")) { - var prefix = expression.Substring(0, expression.Length - 1); - return ctx => ((ctx.ContentType ?? "").StartsWith(prefix) || (ctx.Stereotype ?? "").StartsWith(prefix)) && predicate(ctx); - } - return ctx => ((ctx.ContentType == expression) || (ctx.Stereotype == expression)) && predicate(ctx); - case "DisplayType": - if (expression.EndsWith("*")) { - var prefix = expression.Substring(0, expression.Length - 1); - return ctx => (ctx.DisplayType ?? "").StartsWith(prefix) && predicate(ctx); - } - return ctx => (ctx.DisplayType == expression) && predicate(ctx); - case "Path": - var normalizedPath = VirtualPathUtility.IsAbsolute(expression) - ? VirtualPathUtility.ToAppRelative(expression) - : VirtualPathUtility.Combine("~/", expression); + private Func BuildPredicate(Func predicate, + KeyValuePair term) { + return BuildPredicate(predicate, term, _placementParseMatchProviders); + } - if (normalizedPath.EndsWith("*")) { - var prefix = normalizedPath.Substring(0, normalizedPath.Length - 1); - return ctx => VirtualPathUtility.ToAppRelative(String.IsNullOrEmpty(ctx.Path) ? "/" : ctx.Path).StartsWith(prefix, StringComparison.OrdinalIgnoreCase) && predicate(ctx); - } + public static Func BuildPredicate(Func predicate, + KeyValuePair term, IEnumerable placementMatchProviders) { - normalizedPath = VirtualPathUtility.AppendTrailingSlash(normalizedPath); - return ctx => (ctx.Path.Equals(normalizedPath, StringComparison.OrdinalIgnoreCase)) && predicate(ctx); + if (placementMatchProviders != null) { + var providersForTerm = placementMatchProviders.Where(x => x.Key.Equals(term.Key)); + if (providersForTerm.Any()) { + var expression = term.Value; + return ctx => providersForTerm.Any(x => x.Match(ctx, expression)) && predicate(ctx); + } } return predicate; } diff --git a/src/Orchard/Environment/Extensions/Compilers/CSharpExtensionBuildProviderShim.cs b/src/Orchard/Environment/Extensions/Compilers/CSharpExtensionBuildProviderShim.cs index 8540a9926..50c3400e1 100644 --- a/src/Orchard/Environment/Extensions/Compilers/CSharpExtensionBuildProviderShim.cs +++ b/src/Orchard/Environment/Extensions/Compilers/CSharpExtensionBuildProviderShim.cs @@ -10,10 +10,9 @@ namespace Orchard.Environment.Extensions.Compilers { _codeCompilerType = GetDefaultCompilerTypeForLanguage("C#"); - // NOTE: This code could be used to define a compilation flag with the current Orchard version - // but it's not compatible with Medium Trust var orchardVersion = new AssemblyName(typeof(IDependency).Assembly.FullName).Version; - _codeCompilerType.CompilerParameters.CompilerOptions += string.Format("/define:ORCHARD_{0}_{1}", orchardVersion.Major, orchardVersion.Minor); + // Additional options after the ones defined in web.config require to be separated by a leading space character. + _codeCompilerType.CompilerParameters.CompilerOptions += $" /define:ORCHARD_{orchardVersion.Major}_{orchardVersion.Minor}"; } public IOrchardHostContainer HostContainer { get; set; } @@ -27,7 +26,7 @@ namespace Orchard.Environment.Extensions.Compilers { public override void GenerateCode(AssemblyBuilder assemblyBuilder) { var context = new CompileExtensionContext { VirtualPath = this.VirtualPath, - AssemblyBuilder = new AspNetAssemblyBuilder(assemblyBuilder, this) + AssemblyBuilder = new AspNetAssemblyBuilder(assemblyBuilder, this) }; HostContainer.Resolve().Compile(context); } diff --git a/src/Orchard/Environment/Extensions/Folders/ExtensionHarvester.cs b/src/Orchard/Environment/Extensions/Folders/ExtensionHarvester.cs index 92b4b0091..111f52ecc 100644 --- a/src/Orchard/Environment/Extensions/Folders/ExtensionHarvester.cs +++ b/src/Orchard/Environment/Extensions/Folders/ExtensionHarvester.cs @@ -247,7 +247,8 @@ namespace Orchard.Environment.Extensions.Folders { Description = GetValue(manifest, FeatureDescriptionSection) ?? GetValue(manifest, DescriptionSection) ?? string.Empty, Dependencies = ParseFeatureDependenciesEntry(GetValue(manifest, DependenciesSection)), Extension = extensionDescriptor, - Category = GetValue(manifest, CategorySection) + Category = GetValue(manifest, CategorySection), + LifecycleStatus = GetValue(manifest, LifecycleStatusSection, extensionDescriptor.LifecycleStatus) }; featureDescriptors.Add(defaultFeature); @@ -307,6 +308,12 @@ namespace Orchard.Environment.Extensions.Folders { case DependenciesSection: featureDescriptor.Dependencies = ParseFeatureDependenciesEntry(featureField[1]); break; + case LifecycleStatusSection: + LifecycleStatus lifecycleStatus; + featureDescriptor.LifecycleStatus = Enum.TryParse(featureField[1], out lifecycleStatus) + ? lifecycleStatus + : extensionDescriptor.LifecycleStatus; + break; } } else { diff --git a/src/Orchard/Environment/Extensions/Models/FeatureDescriptor.cs b/src/Orchard/Environment/Extensions/Models/FeatureDescriptor.cs index 933acd0e2..638f681ee 100644 --- a/src/Orchard/Environment/Extensions/Models/FeatureDescriptor.cs +++ b/src/Orchard/Environment/Extensions/Models/FeatureDescriptor.cs @@ -5,6 +5,7 @@ namespace Orchard.Environment.Extensions.Models { public class FeatureDescriptor { public FeatureDescriptor() { Dependencies = Enumerable.Empty(); + LifecycleStatus = LifecycleStatus.Production; } public ExtensionDescriptor Extension { get; set; } @@ -14,6 +15,7 @@ namespace Orchard.Environment.Extensions.Models { public string Description { get; set; } public string Category { get; set; } public int Priority { get; set; } + public LifecycleStatus LifecycleStatus { get; set; } public IEnumerable Dependencies { get; set; } } } \ No newline at end of file diff --git a/src/Orchard/Localization/Services/LocalizationStreamParser.cs b/src/Orchard/Localization/Services/LocalizationStreamParser.cs index ad824bc58..e4a8e7e4d 100644 --- a/src/Orchard/Localization/Services/LocalizationStreamParser.cs +++ b/src/Orchard/Localization/Services/LocalizationStreamParser.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.IO; using System.Text; @@ -8,6 +8,11 @@ namespace Orchard.Localization.Services { public class LocalizationStreamParser : ILocalizationStreamParser { + private const string HashtagScope = "#:"; + private const string MsgctxtScope = "msgctxt"; + private const string MsgidScope = "msgid"; + private const string MsgstrScope = "msgstr"; + private static readonly Dictionary _escapeTranslations = new Dictionary { { 'n', '\n' }, { 'r', '\r' }, @@ -22,51 +27,81 @@ namespace Orchard.Localization.Services { public void ParseLocalizationStream(string text, IDictionary translations, bool merge) { var reader = new StringReader(text); - string poLine; var scopes = new List(); var id = string.Empty; + var activeScope = string.Empty; - while ((poLine = reader.ReadLine()) != null) { - if (poLine.StartsWith("#:")) { - scopes.Add(ParseScope(poLine)); - continue; + string currentPoLine = reader.ReadLine() ?? ""; + + do + { + if (currentPoLine.StartsWith(HashtagScope)) + { + currentPoLine = Parse(HashtagScope, currentPoLine); + activeScope = HashtagScope; + } + else if (currentPoLine.StartsWith(MsgctxtScope)) + { + currentPoLine = Parse(MsgctxtScope, currentPoLine); + activeScope = MsgctxtScope; + } + else if (currentPoLine.StartsWith(MsgidScope)) + { + currentPoLine = Parse(MsgidScope, currentPoLine); + activeScope = MsgidScope; + } + else if (currentPoLine.StartsWith(MsgstrScope)) + { + currentPoLine = Parse(MsgstrScope, currentPoLine); + activeScope = MsgstrScope; } - if (poLine.StartsWith("msgctxt")) { - scopes.Add(ParseContext(poLine)); - continue; + string nextPoLine = reader.ReadLine() ?? ""; + + while (nextPoLine != null && (!nextPoLine.StartsWith("#") && !nextPoLine.StartsWith(MsgctxtScope) && + !nextPoLine.StartsWith(MsgidScope) && !nextPoLine.StartsWith(MsgstrScope))) + { + currentPoLine = string.Concat(currentPoLine, TrimQuote(nextPoLine)); + nextPoLine = reader.ReadLine(); } - if (poLine.StartsWith("msgid")) { - id = ParseId(poLine); - continue; - } + switch (activeScope) + { + case HashtagScope: + case MsgctxtScope: + scopes.Add(currentPoLine); + break; - if (poLine.StartsWith("msgstr")) { - var translation = ParseTranslation(poLine); - // ignore incomplete localizations (empty msgid or msgstr) - if (!string.IsNullOrWhiteSpace(id) && !string.IsNullOrWhiteSpace(translation)) { - if(scopes.Count == 0) { - scopes.Add(string.Empty); - } - foreach (var scope in scopes) { - var scopedKey = (scope + "|" + id).ToLowerInvariant(); - if (!translations.ContainsKey(scopedKey)) { - translations.Add(scopedKey, translation); + case MsgidScope: + id = currentPoLine; + break; + + case MsgstrScope: + if (!string.IsNullOrWhiteSpace(id) && !string.IsNullOrWhiteSpace(currentPoLine)) { + if (scopes.Count == 0) { + scopes.Add(string.Empty); } - else { - if (merge) { - translations[scopedKey] = translation; + foreach (var scope in scopes) { + var scopedKey = (scope + "|" + id).ToLowerInvariant(); + if (!translations.ContainsKey(scopedKey)) { + translations.Add(scopedKey, currentPoLine); + } + else { + if (merge) { + translations[scopedKey] = currentPoLine; + } } } } - } - id = string.Empty; - scopes = new List(); + id = string.Empty; + scopes = new List(); + break; } - } + currentPoLine = nextPoLine; + activeScope = string.Empty; + } while (currentPoLine != null); } private static string Unescape(string str) { @@ -117,20 +152,9 @@ namespace Orchard.Localization.Services { return str; } - private string ParseTranslation(string poLine) { - return Unescape(TrimQuote(poLine.Substring(6).Trim())); - } - - private string ParseId(string poLine) { - return Unescape(TrimQuote(poLine.Substring(5).Trim())); - } - - private string ParseScope(string poLine) { - return Unescape(TrimQuote(poLine.Substring(2).Trim())); - } - - private string ParseContext(string poLine) { - return Unescape(TrimQuote(poLine.Substring(7).Trim())); + private string Parse(string str, string poLine) + { + return Unescape(TrimQuote(poLine.Substring(str.Length).Trim())); } } -} \ No newline at end of file +} diff --git a/src/Orchard/Mvc/MvcModule.cs b/src/Orchard/Mvc/MvcModule.cs index 9bf425361..6b3e390cc 100644 --- a/src/Orchard/Mvc/MvcModule.cs +++ b/src/Orchard/Mvc/MvcModule.cs @@ -41,9 +41,10 @@ namespace Orchard.Mvc { // thus preventing a StackOverflowException. var baseUrl = new Func(() => { - var url = siteService.GetSiteSettings().BaseUrl; - return !String.IsNullOrWhiteSpace(url) ? url : "http://localhost" - + HostingEnvironment.ApplicationVirtualPath.TrimEnd('/'); + var s = siteService.GetSiteSettings().BaseUrl; + + // When Setup is running from the command line, no BaseUrl exists yet. + return string.IsNullOrEmpty(s) ? "http://localhost" : s; }); return new HttpContextPlaceholder(baseUrl); diff --git a/src/Orchard/Orchard.Framework.csproj b/src/Orchard/Orchard.Framework.csproj index 488f9bc11..d63418a4a 100644 --- a/src/Orchard/Orchard.Framework.csproj +++ b/src/Orchard/Orchard.Framework.csproj @@ -43,7 +43,7 @@ 4 ..\OrchardBasicCorrectness.ruleset false - 5 + 6 false @@ -57,7 +57,7 @@ 4 AllRules.ruleset false - 5 + 6 0436 @@ -178,6 +178,8 @@ + + diff --git a/src/Tools/MSBuild.Orchard.Tasks/MSBuild.Orchard.Tasks.csproj b/src/Tools/MSBuild.Orchard.Tasks/MSBuild.Orchard.Tasks.csproj index b54516a93..3c0d953d7 100644 --- a/src/Tools/MSBuild.Orchard.Tasks/MSBuild.Orchard.Tasks.csproj +++ b/src/Tools/MSBuild.Orchard.Tasks/MSBuild.Orchard.Tasks.csproj @@ -43,7 +43,7 @@ 4 ..\..\OrchardBasicCorrectness.ruleset false - 5 + 6 pdbonly @@ -54,7 +54,7 @@ 4 AllRules.ruleset false - 5 + 6 diff --git a/src/Tools/Orchard.Tests/Orchard.Tests.csproj b/src/Tools/Orchard.Tests/Orchard.Tests.csproj index ddd7b66fe..bd7784d2c 100644 --- a/src/Tools/Orchard.Tests/Orchard.Tests.csproj +++ b/src/Tools/Orchard.Tests/Orchard.Tests.csproj @@ -44,7 +44,7 @@ x86 ..\..\OrchardBasicCorrectness.ruleset false - 5 + 6 pdbonly @@ -55,7 +55,7 @@ 4 AllRules.ruleset false - 5 + 6 diff --git a/src/Tools/Orchard/Orchard.csproj b/src/Tools/Orchard/Orchard.csproj index 4f3b9f5e6..0f6e09de4 100644 --- a/src/Tools/Orchard/Orchard.csproj +++ b/src/Tools/Orchard/Orchard.csproj @@ -46,7 +46,7 @@ AnyCPU ..\..\OrchardBasicCorrectness.ruleset false - 5 + 6 pdbonly @@ -58,7 +58,7 @@ AnyCPU AllRules.ruleset false - 5 + 6