Fixed views
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
<div class="umb-grid">
|
||||
@if (oneColumn)
|
||||
{
|
||||
@@ -19,8 +19,8 @@
|
||||
@renderRow(row, true);
|
||||
}
|
||||
</div>
|
||||
}
|
||||
}else {
|
||||
}
|
||||
}else {
|
||||
<div class="container-fluid">
|
||||
<div class="row-fluid clearfix">
|
||||
@foreach (var s in Model.sections) {
|
||||
@@ -33,14 +33,14 @@
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
|
||||
@helper renderRow(dynamic row, bool singleColumn){
|
||||
<div @RenderElementAttributes(row)>
|
||||
@Umbraco.If(singleColumn, "<div class='container-fluid'>")
|
||||
@Html.If(singleColumn, "<div class='container-fluid'>")
|
||||
<div class="row-fluid clearfix">
|
||||
@foreach ( var area in row.areas ) {
|
||||
<div class="@("span" + area.grid) column">
|
||||
@@ -53,7 +53,7 @@
|
||||
</div>
|
||||
</div>}
|
||||
</div>
|
||||
@Umbraco.If(singleColumn, "</div>")
|
||||
@Html.If(singleColumn, "</div>")
|
||||
</div>
|
||||
}
|
||||
|
||||
@@ -89,4 +89,4 @@
|
||||
|
||||
return new MvcHtmlString(string.Join(" ", attrs));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
@if (Model != null && Model.sections != null)
|
||||
{
|
||||
var oneColumn = ((System.Collections.ICollection)Model.sections).Count == 1;
|
||||
|
||||
|
||||
<div class="umb-grid">
|
||||
@if (oneColumn)
|
||||
{
|
||||
@@ -15,8 +15,8 @@
|
||||
@renderRow(row, true);
|
||||
}
|
||||
</div>
|
||||
}
|
||||
}else {
|
||||
}
|
||||
}else {
|
||||
<div class="container">
|
||||
<div class="row clearfix">
|
||||
@foreach (var s in Model.sections) {
|
||||
@@ -29,14 +29,14 @@
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
|
||||
@helper renderRow(dynamic row, bool singleColumn){
|
||||
<div @RenderElementAttributes(row)>
|
||||
@Umbraco.If(singleColumn, "<div class='container'>")
|
||||
@Html.If(singleColumn, "<div class='container'>")
|
||||
<div class="row clearfix">
|
||||
@foreach ( var area in row.areas ) {
|
||||
<div class="@("span" + area.grid) column">
|
||||
@@ -49,7 +49,7 @@
|
||||
</div>
|
||||
</div>}
|
||||
</div>
|
||||
@Umbraco.If(singleColumn, "</div>")
|
||||
@Html.If(singleColumn, "</div>")
|
||||
</div>
|
||||
}
|
||||
|
||||
@@ -85,4 +85,4 @@
|
||||
|
||||
return new MvcHtmlString(string.Join(" ", attrs));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
@if (Model != null && Model.sections != null)
|
||||
{
|
||||
var oneColumn = ((System.Collections.ICollection)Model.sections).Count == 1;
|
||||
|
||||
|
||||
<div class="umb-grid">
|
||||
@if (oneColumn)
|
||||
{
|
||||
@@ -15,8 +15,8 @@
|
||||
@renderRow(row, true);
|
||||
}
|
||||
</div>
|
||||
}
|
||||
}else {
|
||||
}
|
||||
}else {
|
||||
<div class="container">
|
||||
<div class="row clearfix">
|
||||
@foreach (var s in Model.sections) {
|
||||
@@ -29,14 +29,14 @@
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
|
||||
@helper renderRow(dynamic row, bool singleColumn){
|
||||
<div @RenderElementAttributes(row)>
|
||||
@Umbraco.If(singleColumn, "<div class='container'>")
|
||||
@Html.If(singleColumn, "<div class='container'>")
|
||||
<div class="row clearfix">
|
||||
@foreach ( var area in row.areas ) {
|
||||
<div class="col-md-@area.grid column">
|
||||
@@ -49,7 +49,7 @@
|
||||
</div>
|
||||
</div>}
|
||||
</div>
|
||||
@Umbraco.If(singleColumn, "</div>")
|
||||
@Html.If(singleColumn, "</div>")
|
||||
</div>
|
||||
}
|
||||
|
||||
@@ -85,4 +85,4 @@
|
||||
|
||||
return new MvcHtmlString(string.Join(" ", attrs));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user