]*>\s*Themes"
And the status should be 200 "OK"
Scenario: Features of installed modules are listed
diff --git a/src/Orchard.Specs/Modules.feature.cs b/src/Orchard.Specs/Modules.feature.cs
index 1daad6ee7..a774c8e80 100644
--- a/src/Orchard.Specs/Modules.feature.cs
+++ b/src/Orchard.Specs/Modules.feature.cs
@@ -3,7 +3,7 @@
// This code was generated by SpecFlow (http://www.specflow.org/).
// SpecFlow Version:1.9.0.77
// SpecFlow Generator Version:1.9.0.0
-// Runtime Version:4.0.30319.34014
+// Runtime Version:4.0.30319.0
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@@ -92,7 +92,7 @@ this.ScenarioSetup(scenarioInfo);
#line 14
testRunner.Then("I should see \"
Modules
\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
#line 15
- testRunner.And("I should see \"
]*>Themes\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
+ testRunner.And("I should see \"
]*>\\s*Themes\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
#line 16
testRunner.And("the status should be 200 \"OK\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
#line hidden
diff --git a/src/Orchard.Specs/Orchard.Specs.csproj b/src/Orchard.Specs/Orchard.Specs.csproj
index 8199edda6..2415be3b0 100644
--- a/src/Orchard.Specs/Orchard.Specs.csproj
+++ b/src/Orchard.Specs/Orchard.Specs.csproj
@@ -426,7 +426,7 @@
{9916839C-39FC-4CEB-A5AF-89CA7E87119F}Orchard.Core
- false
+ True{D10AD48F-407D-4DB5-A328-173EC7CB010F}
@@ -447,7 +447,7 @@
{2D1D92BB-4555-4CBE-8D0E-63563D6CE4C6}Orchard.Framework
- false
+ True{33B1BC8D-E292-4972-A363-22056B207156}
diff --git a/src/Orchard.Specs/Pages.feature b/src/Orchard.Specs/Pages.feature
index 8a93401f2..5352b3df9 100644
--- a/src/Orchard.Specs/Pages.feature
+++ b/src/Orchard.Specs/Pages.feature
@@ -14,7 +14,7 @@ Scenario: In the admin (menu) there is a link to create a Page
And I fill in
| name | value |
| Title.Title | Super Duper |
- | LayoutPart.State | { "elements": [ { "typeName": "Orchard.Layouts.Elements.Text", "state": "Content=This+is+super."} ] } |
+ | LayoutPart.LayoutEditor.Data | { "type": "Content", "data": "TypeName=Orchard.Layouts.Elements.Text&Content=This+is+super", "isTemplated": false, "contentType": "Orchard.Layouts.Elements.Text", "contentTypeLabel": "Text", "contentTypeClass": "text", "html": "This is super", "hasEditor": true } |
And I hit "Publish Now"
And I go to "super-duper"
Then I should see "
]*>.*?Super Duper.*?
"
@@ -25,7 +25,7 @@ Scenario: In the admin (menu) there is a link to create a Page
And I fill in
| name | value |
| Title.Title | Super Duper |
- | LayoutPart.State | { "elements": [ { "typeName": "Orchard.Layouts.Elements.Text", "state": "Content=This+is+super+number+two."} ] } |
+ | LayoutPart.LayoutEditor.Data | { "type": "Content", "data": "TypeName=Orchard.Layouts.Elements.Text&Content=This+is+super+number+two", "isTemplated": false, "contentType": "Orchard.Layouts.Elements.Text", "contentTypeLabel": "Text", "contentTypeClass": "text", "html": "This is super number two", "hasEditor": true } |
And I hit "Publish Now"
And I go to "super-duper-2"
Then I should see "
]*>.*?Super Duper.*?
"
@@ -36,7 +36,6 @@ Scenario: In the admin (menu) there is a link to create a Page
And I fill in
| name | value |
| Title.Title | Another |
- | LayoutPart.State | { "elements": [ { "typeName": "Orchard.Layouts.Elements.Text", "state": "Content=This+is+the+draft+of+a+new+homepage."} ] } |
| Autoroute.PromoteToHomePage | true |
And I hit "Publish Now"
And I go to "/"
@@ -49,7 +48,6 @@ Scenario: In the admin (menu) there is a link to create a Page
And I fill in
| name | value |
| Title.Title | Drafty |
- | LayoutPart.State | { "elements": [ { "typeName": "Orchard.Layouts.Elements.Text", "state": "Content=This+is+the+draft+of+a+new+homepage."} ] } |
| Autoroute.PromoteToHomePage | true |
And I hit "Save"
And I go to "/"
diff --git a/src/Orchard.Specs/Pages.feature.cs b/src/Orchard.Specs/Pages.feature.cs
index 86b0972c2..7ea3cf7d5 100644
--- a/src/Orchard.Specs/Pages.feature.cs
+++ b/src/Orchard.Specs/Pages.feature.cs
@@ -3,7 +3,7 @@
// This code was generated by SpecFlow (http://www.specflow.org/).
// SpecFlow Version:1.9.0.77
// SpecFlow Generator Version:1.9.0.0
-// Runtime Version:4.0.30319.34014
+// Runtime Version:4.0.30319.0
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@@ -88,9 +88,8 @@ this.ScenarioSetup(scenarioInfo);
"Title.Title",
"Super Duper"});
table1.AddRow(new string[] {
- "LayoutPart.State",
- "{ \"elements\": [ { \"typeName\": \"Orchard.Layouts.Elements.Text\", \"state\": \"Content=" +
- "This+is+super.\"} ] }"});
+ "LayoutPart.LayoutEditor.Data",
+ @"{ ""type"": ""Content"", ""data"": ""TypeName=Orchard.Layouts.Elements.Text&Content=This+is+super"", ""isTemplated"": false, ""contentType"": ""Orchard.Layouts.Elements.Text"", ""contentTypeLabel"": ""Text"", ""contentTypeClass"": ""text"", ""html"": ""This is super"", ""hasEditor"": true }"});
#line 14
testRunner.And("I fill in", ((string)(null)), table1, "And ");
#line 18
@@ -111,9 +110,8 @@ this.ScenarioSetup(scenarioInfo);
"Title.Title",
"Super Duper"});
table2.AddRow(new string[] {
- "LayoutPart.State",
- "{ \"elements\": [ { \"typeName\": \"Orchard.Layouts.Elements.Text\", \"state\": \"Content=" +
- "This+is+super+number+two.\"} ] }"});
+ "LayoutPart.LayoutEditor.Data",
+ @"{ ""type"": ""Content"", ""data"": ""TypeName=Orchard.Layouts.Elements.Text&Content=This+is+super+number+two"", ""isTemplated"": false, ""contentType"": ""Orchard.Layouts.Elements.Text"", ""contentTypeLabel"": ""Text"", ""contentTypeClass"": ""text"", ""html"": ""This is super number two"", ""hasEditor"": true }"});
#line 25
testRunner.And("I fill in", ((string)(null)), table2, "And ");
#line 29
@@ -133,26 +131,22 @@ this.ScenarioSetup(scenarioInfo);
table3.AddRow(new string[] {
"Title.Title",
"Another"});
- table3.AddRow(new string[] {
- "LayoutPart.State",
- "{ \"elements\": [ { \"typeName\": \"Orchard.Layouts.Elements.Text\", \"state\": \"Content=" +
- "This+is+the+draft+of+a+new+homepage.\"} ] }"});
table3.AddRow(new string[] {
"Autoroute.PromoteToHomePage",
"true"});
#line 36
testRunner.And("I fill in", ((string)(null)), table3, "And ");
-#line 41
+#line 40
testRunner.And("I hit \"Publish Now\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
-#line 42
+#line 41
testRunner.And("I go to \"/\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
-#line 43
+#line 42
testRunner.Then("I should see \"
Another
\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
-#line 44
+#line 43
testRunner.When("I go to \"another\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
-#line 45
+#line 44
testRunner.Then("the status should be 404 \"Not Found\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
-#line 48
+#line 47
testRunner.When("I go to \"Admin/Contents/Create/Page\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
#line hidden
TechTalk.SpecFlow.Table table4 = new TechTalk.SpecFlow.Table(new string[] {
@@ -161,20 +155,16 @@ this.ScenarioSetup(scenarioInfo);
table4.AddRow(new string[] {
"Title.Title",
"Drafty"});
- table4.AddRow(new string[] {
- "LayoutPart.State",
- "{ \"elements\": [ { \"typeName\": \"Orchard.Layouts.Elements.Text\", \"state\": \"Content=" +
- "This+is+the+draft+of+a+new+homepage.\"} ] }"});
table4.AddRow(new string[] {
"Autoroute.PromoteToHomePage",
"true"});
-#line 49
+#line 48
testRunner.And("I fill in", ((string)(null)), table4, "And ");
-#line 54
+#line 52
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
-#line 55
+#line 53
testRunner.And("I go to \"/\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
-#line 56
+#line 54
testRunner.Then("I should see \"
"
- And I should see "]*>Foo"
- And I should not see "]*>I <3 Orchard"
+ And I am redirected
+ Then I should see "forbidden chars"
diff --git a/src/Orchard.Specs/Tags.feature.cs b/src/Orchard.Specs/Tags.feature.cs
index 0b408c607..ef767cd61 100644
--- a/src/Orchard.Specs/Tags.feature.cs
+++ b/src/Orchard.Specs/Tags.feature.cs
@@ -3,7 +3,7 @@
// This code was generated by SpecFlow (http://www.specflow.org/).
// SpecFlow Version:1.9.0.77
// SpecFlow Generator Version:1.9.0.0
-// Runtime Version:4.0.30319.34014
+// Runtime Version:4.0.30319.0
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@@ -84,7 +84,7 @@ this.ScenarioSetup(scenarioInfo);
"Title.Title",
"Super Duper"});
table1.AddRow(new string[] {
- "LayoutPart.State",
+ "LayoutPart.LayoutEditor.Data",
"{ \"elements\": [ { \"typeName\": \"Orchard.Layouts.Elements.Text\", \"state\": \"Content=" +
"This+is+super.\"} ] }"});
table1.AddRow(new string[] {
@@ -125,7 +125,7 @@ this.ScenarioSetup(scenarioInfo);
"Title.Title",
"Super Duper"});
table2.AddRow(new string[] {
- "LayoutPart.State",
+ "LayoutPart.LayoutEditor.Data",
"{ \"elements\": [ { \"typeName\": \"Orchard.Layouts.Elements.Text\", \"state\": \"Content=" +
"This+is+super.\"} ] }"});
table2.AddRow(new string[] {
@@ -136,13 +136,9 @@ this.ScenarioSetup(scenarioInfo);
#line 28
testRunner.And("I hit \"Publish Now\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
#line 29
- testRunner.And("I go to \"super-duper\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
+ testRunner.And("I am redirected", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
#line 30
- testRunner.Then("I should see \"
@Html.ActionLink(T("Add a new Query").ToString(), "Create", new { Area = "Contents", id = "Query", returnurl = HttpContext.Current.Request.RawUrl }, new { @class = "button primaryAction" })
-
+
@T("One term per line, followed by a semi-colon and the slug")@T("Hierarchies are defined using tabs (handled in this editor zone)")
@@ -21,47 +21,47 @@
}
-@using(Script.Foot()){
-
+ //]]>
+
}
\ No newline at end of file
diff --git a/src/Orchard.Web/Modules/Orchard.Taxonomies/Views/Admin/Index.cshtml b/src/Orchard.Web/Modules/Orchard.Taxonomies/Views/Admin/Index.cshtml
index e7cb0b0fa..6eaebdffa 100644
--- a/src/Orchard.Web/Modules/Orchard.Taxonomies/Views/Admin/Index.cshtml
+++ b/src/Orchard.Web/Modules/Orchard.Taxonomies/Views/Admin/Index.cshtml
@@ -7,58 +7,59 @@
}
@using (Html.BeginFormAntiForgeryPost()) {
- @Html.ValidationSummary()
-
@Html.ActionLink(T("Add a taxonomy").Text, "Create", new { Area = "Contents", Id = "Taxonomy", ReturnUrl = Request.RawUrl }, new { @class = "button primaryAction" })
-
-
-
-
-
-
-
-
-
-
-
@T("Name")
-
-
-
- @foreach (var taxonomyEntry in Model.Taxonomies) {
- ti = taxonomyIndex;
-
@Html.ActionLink(T("Add a taxonomy").Text, "Create", new { Area = "Contents", Id = "Taxonomy", ReturnUrl = Request.RawUrl }, new { @class = "button primaryAction" })
+
+
+
+
+
+
+
+
+
+
+
@T("Name")
+
+
+
+ @foreach (var taxonomyEntry in Model.Taxonomies) {
+ ti = taxonomyIndex;
+
+ @if (!taxonomyEntry.IsInternal || Authorizer.Authorize(Orchard.Security.StandardPermissions.SiteOwner)) {
+ @Html.ItemEditLink(T("Edit").Text, taxonomyEntry.ContentItem) |
+ @Html.ActionLink(T("Terms").Text, "Index", "TermAdmin", new { taxonomyId = taxonomyEntry.Id }, new object { }) |
+ @Html.ActionLink(T("Delete").Text, "Delete", new { id = taxonomyEntry.Id }, new object { }) |
+ @Html.ActionLink(T("Import").Text, "Import", new { id = taxonomyEntry.Id }, new object { })
+ }
+
+
+ taxonomyIndex++;
+ }
+
+ @Display(Model.Pager)
+
}
\ No newline at end of file
diff --git a/src/Orchard.Web/Modules/Orchard.Taxonomies/Views/DefinitionTemplates/TaxonomyFieldSettings.cshtml b/src/Orchard.Web/Modules/Orchard.Taxonomies/Views/DefinitionTemplates/TaxonomyFieldSettings.cshtml
index 33e8d0c8a..bb79ef4f6 100644
--- a/src/Orchard.Web/Modules/Orchard.Taxonomies/Views/DefinitionTemplates/TaxonomyFieldSettings.cshtml
+++ b/src/Orchard.Web/Modules/Orchard.Taxonomies/Views/DefinitionTemplates/TaxonomyFieldSettings.cshtml
@@ -3,10 +3,10 @@
Script.Include("admin-taxonomy-field-settings.js").AtFoot();
}
-
+
@Html.SelectOption(-1, false, T("Choose a taxonomy ...").ToString())
- @foreach ( var taxonomy in Model.Taxonomies.OrderBy(t => t.Name) ) {
+ @foreach (var taxonomy in Model.Taxonomies.OrderBy(t => t.Name)) {
@Html.SelectOption(taxonomy.Name, Model.Taxonomy == taxonomy.Name, taxonomy.Name)
}
@@ -14,10 +14,10 @@
- @Html.TextAreaFor(m => m.Hint, new { @class = "text medium", rows = "5" } )
+ @Html.TextAreaFor(m => m.Hint, new { @class = "text medium", rows = "5" })
@T("The help text is written under the field when authors are editing the content item.")
@Html.ValidationMessageFor(m => m.Hint)
\ No newline at end of file
diff --git a/src/Orchard.Web/Modules/Orchard.Taxonomies/Views/EditorTemplates/Fields/TaxonomyField.Autocomplete.cshtml b/src/Orchard.Web/Modules/Orchard.Taxonomies/Views/EditorTemplates/Fields/TaxonomyField.Autocomplete.cshtml
index 58c11b444..71caa17ad 100644
--- a/src/Orchard.Web/Modules/Orchard.Taxonomies/Views/EditorTemplates/Fields/TaxonomyField.Autocomplete.cshtml
+++ b/src/Orchard.Web/Modules/Orchard.Taxonomies/Views/EditorTemplates/Fields/TaxonomyField.Autocomplete.cshtml
@@ -26,52 +26,52 @@
}
}
@{
- var allTerms = Newtonsoft.Json.JsonConvert.SerializeObject(Model.Terms.Select(x => new { label = x.Name, value = x.Id, levels = x.GetLevels(), disabled = IsTermDisabled(x)}));
+ var allTerms = Newtonsoft.Json.JsonConvert.SerializeObject(Model.Terms.Select(x => new { label = x.Name, value = x.Id, levels = x.GetLevels(), disabled = IsTermDisabled(x) }));
var selectedTerms = Newtonsoft.Json.JsonConvert.SerializeObject(Model.Terms.Where(x => x.IsChecked).Select(x => new { label = x.Name, value = x.Id, levels = 0, disabled = true }));
}
-
+
@if (Model.Settings.Autocomplete) {
-
-
- @if (Model.Settings.SingleChoice) {
-
@T("Enter a single term. Hit tab or enter to apply the term.") @if (!Model.Settings.AllowCustomTerms) { @T("This taxonomy does not allow you to create new terms.") }
- }
- else {
-
@T("Enter multiple terms. Hit tab, enter or , to add multiple terms.") @if (!Model.Settings.AllowCustomTerms) { @T("This taxonomy does not allow you to create new terms.") }
- }
-
+
+
+ @if (Model.Settings.SingleChoice) {
+
@T("Enter a single term. Hit tab or enter to apply the term.") @if (!Model.Settings.AllowCustomTerms) { @T("This taxonomy does not allow you to create new terms.") }
+ }
+ else {
+
@T("Enter multiple terms. Hit tab, enter or , to add multiple terms.") @if (!Model.Settings.AllowCustomTerms) { @T("This taxonomy does not allow you to create new terms.") }
- @Html.LabelFor(m => m.SelectedTaxonomyId, T("Taxonomy"))
- @Html.DropDownListFor(m => m.SelectedTaxonomyId, Model.AvailableTaxonomies)
+ @Html.LabelFor(m => m.SelectedTaxonomyId, T("Taxonomy"))
+ @Html.DropDownListFor(m => m.SelectedTaxonomyId, Model.AvailableTaxonomies)
@T("Select the taxonomy whose terms will be rendered in the menu.")
- @Html.LabelFor(m => m.SelectedTermId, T("Root Term"))
-
- @Html.SelectOption(-1, false, T("- Parent Taxonomy -").ToString())
- @{Html.RenderAction("RenderTermSelect", "TermAdmin", new { area = "Orchard.Taxonomies", taxonomyId = Model.SelectedTaxonomyId, selectedTermId = Model.SelectedTermId });}
+ @Html.LabelFor(m => m.SelectedTermId, T("Root Term"))
+
+ @Html.SelectOption(-1, false, T("- Parent Taxonomy -").ToString())
+ @{Html.RenderAction("RenderTermSelect", "TermAdmin", new { area = "Orchard.Taxonomies", taxonomyId = Model.SelectedTaxonomyId, selectedTermId = Model.SelectedTermId });}
- @T("Select the root term to display")
+ @T("Select the root term to display")
- @Html.CheckBoxFor(m => m.DisplayTopMenuItem)
-
- @T("When checked, the selected term to display will be rendered as a root element in the menu.")
+ @Html.CheckBoxFor(m => m.DisplayTopMenuItem)
+
+ @T("When checked, the selected term to display will be rendered as a root element in the menu.")
- @Html.TextBoxFor(m => m.LevelsToDisplay, new { @class = "text small" } )
+ @Html.TextBoxFor(m => m.LevelsToDisplay, new { @class = "text small" })
@Html.ValidationMessage("LevelsToDisplay", "*")
@T("The number of levels to display in the hierarchy. 0 to display all levels.")
- @Html.CheckBoxFor(m => m.HideEmptyTerms)
-
- @T("When checked, any term which has no content item associated to it won't be rendered.")
+ @Html.CheckBoxFor(m => m.HideEmptyTerms)
+
+ @T("When checked, any term which has no content item associated to it won't be rendered.")
- @Html.CheckBoxFor(m => m.DisplayContentCount)
-
- @T("When checked, the number of content items is rendered following the term name.")
+ @Html.CheckBoxFor(m => m.DisplayContentCount)
+
+ @T("When checked, the number of content items is rendered following the term name.")
@using (Script.Foot()) {
-
+ $.get(
+ "@Url.Action("RenderTermSelect", "TermAdmin", new { area = "Orchard.Taxonomies" })", { taxonomyId: id }, function (data) {
+ $('#@Html.FieldIdFor(m => m.SelectedTermId) option[value != -1]').remove();
+ $('#@Html.FieldIdFor(m => m.SelectedTermId)').append(data);
+ });
+ });
+ })
+ //]]>
+
}
\ No newline at end of file
diff --git a/src/Orchard.Web/Modules/Orchard.Taxonomies/Views/Fields/TaxonomyField.cshtml b/src/Orchard.Web/Modules/Orchard.Taxonomies/Views/Fields/TaxonomyField.cshtml
index 00824b29a..c6f81466a 100644
--- a/src/Orchard.Web/Modules/Orchard.Taxonomies/Views/Fields/TaxonomyField.cshtml
+++ b/src/Orchard.Web/Modules/Orchard.Taxonomies/Views/Fields/TaxonomyField.cshtml
@@ -4,8 +4,8 @@
string name = @Model.ContentField.DisplayName;
}
@if (Model.Terms.Count > 0) {
-
}
\ No newline at end of file
diff --git a/src/Orchard.Web/Modules/Orchard.Taxonomies/Views/Taxonomy.cshtml b/src/Orchard.Web/Modules/Orchard.Taxonomies/Views/Taxonomy.cshtml
index c62354436..5090f9868 100644
--- a/src/Orchard.Web/Modules/Orchard.Taxonomies/Views/Taxonomy.cshtml
+++ b/src/Orchard.Web/Modules/Orchard.Taxonomies/Views/Taxonomy.cshtml
@@ -11,7 +11,7 @@
if (items.Any()) {
items[0].Classes.Add("first");
items[items.Count - 1].Classes.Add("last");
- }
+ }
}
@tag.StartElement
diff --git a/src/Orchard.Web/Modules/Orchard.Taxonomies/Views/TaxonomyItem.cshtml b/src/Orchard.Web/Modules/Orchard.Taxonomies/Views/TaxonomyItem.cshtml
index 948924868..3be467fcc 100644
--- a/src/Orchard.Web/Modules/Orchard.Taxonomies/Views/TaxonomyItem.cshtml
+++ b/src/Orchard.Web/Modules/Orchard.Taxonomies/Views/TaxonomyItem.cshtml
@@ -1,4 +1,4 @@
-@*
+@*
This shape is displayed for a TermPart when in a Taxonomy details page
Its children are the element shapes in the list.
Alternates:
@@ -16,21 +16,21 @@
var tag = Tag(Model, "li");
@tag.StartElement
- @*
- - morphing the shape to keep Model untouched and
- - provide a simple way to customize the shape
- *@
-
- Model.Metadata.Alternates.Clear();
- Model.Metadata.Type = "TaxonomyItemLink";
- @Display(Model)
+ @*
+ - morphing the shape to keep Model untouched and
+ - provide a simple way to customize the shape
+ *@
- @* render child elements *@
-
- if (items.Any()) {
-