From dbb82cb3f8c791870ba6bd127863a57be43ee7b4 Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Mon, 18 Feb 2019 11:32:09 +0100 Subject: [PATCH] Fixed views --- .../Views/Partials/Grid/Bootstrap2-Fluid.cshtml | 16 ++++++++-------- .../Views/Partials/Grid/Bootstrap2.cshtml | 14 +++++++------- .../Views/Partials/Grid/Bootstrap3.cshtml | 14 +++++++------- .../Partials/Grid/Editors/TextString.cshtml | 3 +-- 4 files changed, 23 insertions(+), 24 deletions(-) diff --git a/src/Umbraco.Web.UI/Views/Partials/Grid/Bootstrap2-Fluid.cshtml b/src/Umbraco.Web.UI/Views/Partials/Grid/Bootstrap2-Fluid.cshtml index d8e9f40e15..aa707c8adf 100644 --- a/src/Umbraco.Web.UI/Views/Partials/Grid/Bootstrap2-Fluid.cshtml +++ b/src/Umbraco.Web.UI/Views/Partials/Grid/Bootstrap2-Fluid.cshtml @@ -2,14 +2,14 @@ @using Umbraco.Web.Templates @using Newtonsoft.Json.Linq -@* +@* Razor helpers located at the bottom of this file *@ @if (Model != null && Model.sections != null) { var oneColumn = ((System.Collections.ICollection)Model.sections).Count == 1; - +
@if (oneColumn) { @@ -19,8 +19,8 @@ @renderRow(row, true); }
- } - }else { + } + }else {
@foreach (var s in Model.sections) { @@ -33,14 +33,14 @@
}
- + } } @helper renderRow(dynamic row, bool singleColumn){
- @Umbraco.If(singleColumn, "
") + @Html.If(singleColumn, "
")
@foreach ( var area in row.areas ) {
@@ -53,7 +53,7 @@
}
- @Umbraco.If(singleColumn, "
") + @Html.If(singleColumn, "
") } @@ -89,4 +89,4 @@ return new MvcHtmlString(string.Join(" ", attrs)); } -} \ No newline at end of file +} diff --git a/src/Umbraco.Web.UI/Views/Partials/Grid/Bootstrap2.cshtml b/src/Umbraco.Web.UI/Views/Partials/Grid/Bootstrap2.cshtml index 1437d4f14b..5ab18577b1 100644 --- a/src/Umbraco.Web.UI/Views/Partials/Grid/Bootstrap2.cshtml +++ b/src/Umbraco.Web.UI/Views/Partials/Grid/Bootstrap2.cshtml @@ -5,7 +5,7 @@ @if (Model != null && Model.sections != null) { var oneColumn = ((System.Collections.ICollection)Model.sections).Count == 1; - +
@if (oneColumn) { @@ -15,8 +15,8 @@ @renderRow(row, true); }
- } - }else { + } + }else {
@foreach (var s in Model.sections) { @@ -29,14 +29,14 @@
}
- + } } @helper renderRow(dynamic row, bool singleColumn){
- @Umbraco.If(singleColumn, "
") + @Html.If(singleColumn, "
")
@foreach ( var area in row.areas ) {
@@ -49,7 +49,7 @@
}
- @Umbraco.If(singleColumn, "
") + @Html.If(singleColumn, "
") } @@ -85,4 +85,4 @@ return new MvcHtmlString(string.Join(" ", attrs)); } -} \ No newline at end of file +} diff --git a/src/Umbraco.Web.UI/Views/Partials/Grid/Bootstrap3.cshtml b/src/Umbraco.Web.UI/Views/Partials/Grid/Bootstrap3.cshtml index 7b4f602b26..9333628ed6 100644 --- a/src/Umbraco.Web.UI/Views/Partials/Grid/Bootstrap3.cshtml +++ b/src/Umbraco.Web.UI/Views/Partials/Grid/Bootstrap3.cshtml @@ -5,7 +5,7 @@ @if (Model != null && Model.sections != null) { var oneColumn = ((System.Collections.ICollection)Model.sections).Count == 1; - +
@if (oneColumn) { @@ -15,8 +15,8 @@ @renderRow(row, true); }
- } - }else { + } + }else {
@foreach (var s in Model.sections) { @@ -29,14 +29,14 @@
}
- + } } @helper renderRow(dynamic row, bool singleColumn){
- @Umbraco.If(singleColumn, "
") + @Html.If(singleColumn, "
")
@foreach ( var area in row.areas ) {
@@ -49,7 +49,7 @@
}
- @Umbraco.If(singleColumn, "
") + @Html.If(singleColumn, "
") } @@ -85,4 +85,4 @@ return new MvcHtmlString(string.Join(" ", attrs)); } -} \ No newline at end of file +} diff --git a/src/Umbraco.Web.UI/Views/Partials/Grid/Editors/TextString.cshtml b/src/Umbraco.Web.UI/Views/Partials/Grid/Editors/TextString.cshtml index 2a1d63ffda..1001d10ec6 100644 --- a/src/Umbraco.Web.UI/Views/Partials/Grid/Editors/TextString.cshtml +++ b/src/Umbraco.Web.UI/Views/Partials/Grid/Editors/TextString.cshtml @@ -5,8 +5,7 @@ @if (Model.editor.config.markup != null) { string markup = Model.editor.config.markup.ToString(); - var umbracoHelper = Current.UmbracoHelper; - markup = markup.Replace("#value#", umbracoHelper.ReplaceLineBreaksForHtml(HttpUtility.HtmlEncode(Model.value.ToString())).ToString()); + markup = markup.Replace("#value#", Html.ReplaceLineBreaksForHtml(HttpUtility.HtmlEncode((string)Model.value.ToString())).ToString()); if (Model.editor.config.style != null) {