V14: Remove old backoffice project. (#15752)
* Move magical route to management api * Move auth around * Remove "New" cookies, as they are no longer needed * Move all installer related * Remove BackOfficeServerVariables.cs and trees * Move webhooks to management api * Remove remainting controllers * Remove last services * Move preview to management api * Remove mroe extensions * Remove tours * Remove old Auth handlers * Remove server variables entirely * Remove old backoffice controller * Remove controllers namespace entirely * Move rest of preview * move last services * Move language file extension * Remove old backoffice entirely (Backoffice and Web.UI projects) * Clean up unused security classes * Fix up installer route * Remove obsolete tests * Fix up DI in integration test * Add missing property mapping * Move core mapping into core * Add composers to integration test * remove identity * Fix up DI * Outcomment failing test :) * Fix up remaining test * Update mapper * Remove the actual project files * Remove backoffice cs proj * Remove old backoffice from yml * Run belissima before login * Remove caching * Refactor file paths * Remove belle from static assets * Dont refer to old project in templates * update gitignore * Add missing files * Remove install view as its no longer used * Fix up failing test * Remove outcommented code * Update submodule to latest * fix build --------- Co-authored-by: Bjarke Berg <mail@bergmania.dk>
This commit is contained in:
@@ -1,10 +0,0 @@
|
||||
@using Umbraco.Extensions
|
||||
@inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage<Umbraco.Cms.Core.Models.Blocks.BlockGridArea>
|
||||
|
||||
<div class="umb-block-grid__area"
|
||||
data-area-col-span="@Model.ColumnSpan"
|
||||
data-area-row-span="@Model.RowSpan"
|
||||
data-area-alias="@Model.Alias"
|
||||
style="--umb-block-grid--grid-columns: @Model.ColumnSpan;--umb-block-grid--area-column-span: @Model.ColumnSpan; --umb-block-grid--area-row-span: @Model.RowSpan;">
|
||||
@await Html.GetBlockGridItemsHtmlAsync(Model)
|
||||
</div>
|
||||
@@ -1,13 +0,0 @@
|
||||
@using Umbraco.Extensions
|
||||
@inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage<Umbraco.Cms.Core.Models.Blocks.BlockGridItem>
|
||||
@{
|
||||
if (Model?.Areas.Any() != true) { return; }
|
||||
}
|
||||
|
||||
<div class="umb-block-grid__area-container"
|
||||
style="--umb-block-grid--area-grid-columns: @(Model.AreaGridColumns?.ToString() ?? Model.GridColumns?.ToString() ?? "12");">
|
||||
@foreach (var area in Model.Areas)
|
||||
{
|
||||
@await Html.GetBlockGridItemAreaHtmlAsync(area)
|
||||
}
|
||||
</div>
|
||||
@@ -1,11 +0,0 @@
|
||||
@using Umbraco.Extensions
|
||||
@inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage<Umbraco.Cms.Core.Models.Blocks.BlockGridModel>
|
||||
@{
|
||||
if (Model?.Any() != true) { return; }
|
||||
}
|
||||
|
||||
<div class="umb-block-grid"
|
||||
data-grid-columns="@(Model.GridColumns?.ToString() ?? "12");"
|
||||
style="--umb-block-grid--grid-columns: @(Model.GridColumns?.ToString() ?? "12");">
|
||||
@await Html.GetBlockGridItemsHtmlAsync(Model)
|
||||
</div>
|
||||
@@ -1,36 +0,0 @@
|
||||
@using Umbraco.Cms.Core.Models.Blocks
|
||||
@inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage<IEnumerable<BlockGridItem>>
|
||||
@{
|
||||
if (Model?.Any() != true) { return; }
|
||||
}
|
||||
|
||||
<div class="umb-block-grid__layout-container">
|
||||
@foreach (var item in Model)
|
||||
{
|
||||
|
||||
<div
|
||||
class="umb-block-grid__layout-item"
|
||||
data-content-element-type-alias="@item.Content.ContentType.Alias"
|
||||
data-content-element-type-key="@item.Content.ContentType.Key"
|
||||
data-element-udi="@item.ContentUdi"
|
||||
data-col-span="@item.ColumnSpan"
|
||||
data-row-span="@item.RowSpan"
|
||||
style=" --umb-block-grid--item-column-span: @item.ColumnSpan; --umb-block-grid--item-row-span: @item.RowSpan; ">
|
||||
@{
|
||||
var partialViewName = "blockgrid/Components/" + item.Content.ContentType.Alias;
|
||||
try
|
||||
{
|
||||
@await Html.PartialAsync(partialViewName, item)
|
||||
}
|
||||
catch (InvalidOperationException)
|
||||
{
|
||||
<p>
|
||||
<strong>Could not render component of type: @(item.Content.ContentType.Alias)</strong>
|
||||
<br/>
|
||||
This likely happened because the partial view <em>@partialViewName</em> could not be found.
|
||||
</p>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
@@ -1,13 +0,0 @@
|
||||
@inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage<Umbraco.Cms.Core.Models.Blocks.BlockListModel>
|
||||
@{
|
||||
if (Model?.Any() != true) { return; }
|
||||
}
|
||||
<div class="umb-block-list">
|
||||
@foreach (var block in Model)
|
||||
{
|
||||
if (block?.ContentUdi == null) { continue; }
|
||||
var data = block.Content;
|
||||
|
||||
@await Html.PartialAsync("blocklist/Components/" + data.ContentType.Alias, block)
|
||||
}
|
||||
</div>
|
||||
@@ -1,106 +0,0 @@
|
||||
@using System.Web
|
||||
@using Microsoft.AspNetCore.Html
|
||||
@using Newtonsoft.Json.Linq
|
||||
@inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage<dynamic>
|
||||
|
||||
@*
|
||||
Razor helpers located at the bottom of this file
|
||||
*@
|
||||
|
||||
@if (Model is JObject && Model?.sections is not null)
|
||||
{
|
||||
var oneColumn = ((System.Collections.ICollection)Model.sections).Count == 1;
|
||||
|
||||
<div class="umb-grid">
|
||||
@if (oneColumn)
|
||||
{
|
||||
foreach (var section in Model.sections)
|
||||
{
|
||||
<div class="grid-section">
|
||||
@foreach (var row in section.rows)
|
||||
{
|
||||
renderRow(row);
|
||||
}
|
||||
</div>
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="row clearfix">
|
||||
@foreach (var sec in Model.sections)
|
||||
{
|
||||
<div class="grid-section">
|
||||
<div class="col-md-@sec.grid column">
|
||||
@foreach (var row in sec.rows)
|
||||
{
|
||||
renderRow(row);
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
|
||||
@functions{
|
||||
|
||||
private async Task renderRow(dynamic row)
|
||||
{
|
||||
<div @RenderElementAttributes(row)>
|
||||
<div class="row clearfix">
|
||||
@foreach (var area in row.areas)
|
||||
{
|
||||
<div class="col-md-@area.grid column">
|
||||
<div @RenderElementAttributes(area)>
|
||||
@foreach (var control in area.controls)
|
||||
{
|
||||
if (control?.editor?.view != null)
|
||||
{
|
||||
<text>@await Html.PartialAsync("grid/editors/base", (object)control)</text>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
|
||||
@functions{
|
||||
|
||||
public static HtmlString RenderElementAttributes(dynamic contentItem)
|
||||
{
|
||||
var attrs = new List<string>();
|
||||
JObject cfg = contentItem.config;
|
||||
|
||||
if (cfg != null)
|
||||
{
|
||||
foreach (JProperty property in cfg.Properties())
|
||||
{
|
||||
var propertyValue = HttpUtility.HtmlAttributeEncode(property.Value.ToString());
|
||||
attrs.Add(property.Name + "=\"" + propertyValue + "\"");
|
||||
}
|
||||
}
|
||||
|
||||
JObject style = contentItem.styles;
|
||||
|
||||
if (style != null) {
|
||||
var cssVals = new List<string>();
|
||||
foreach (JProperty property in style.Properties())
|
||||
{
|
||||
var propertyValue = property.Value.ToString();
|
||||
if (string.IsNullOrWhiteSpace(propertyValue) == false)
|
||||
{
|
||||
cssVals.Add(property.Name + ":" + propertyValue + ";");
|
||||
}
|
||||
}
|
||||
|
||||
if (cssVals.Any())
|
||||
attrs.Add("style='" + HttpUtility.HtmlAttributeEncode(string.Join(" ", cssVals)) + "'");
|
||||
}
|
||||
|
||||
return new HtmlString(string.Join(" ", attrs));
|
||||
}
|
||||
}
|
||||
@@ -1,112 +0,0 @@
|
||||
@using System.Web
|
||||
@using Microsoft.AspNetCore.Html
|
||||
@using Newtonsoft.Json.Linq
|
||||
@inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage<dynamic>
|
||||
|
||||
@if (Model is JObject && Model?.sections is not null)
|
||||
{
|
||||
var oneColumn = ((System.Collections.ICollection)Model.sections).Count == 1;
|
||||
|
||||
<div class="umb-grid">
|
||||
@if (oneColumn)
|
||||
{
|
||||
foreach (var section in Model.sections)
|
||||
{
|
||||
<div class="grid-section">
|
||||
@foreach (var row in section.rows)
|
||||
{
|
||||
renderRow(row, true);
|
||||
}
|
||||
</div>
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="container">
|
||||
<div class="row clearfix">
|
||||
@foreach (var sec in Model.sections)
|
||||
{
|
||||
<div class="grid-section">
|
||||
<div class="col-md-@sec.grid column">
|
||||
@foreach (var row in sec.rows)
|
||||
{
|
||||
renderRow(row, false);
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
|
||||
@functions{
|
||||
|
||||
private async Task renderRow(dynamic row, bool singleColumn)
|
||||
{
|
||||
<div @RenderElementAttributes(row)>
|
||||
@if (singleColumn) {
|
||||
@:<div class="container">
|
||||
}
|
||||
<div class="row clearfix">
|
||||
@foreach (var area in row.areas)
|
||||
{
|
||||
<div class="col-md-@area.grid column">
|
||||
<div @RenderElementAttributes(area)>
|
||||
@foreach (var control in area.controls)
|
||||
{
|
||||
if (control?.editor?.view != null)
|
||||
{
|
||||
<text>@await Html.PartialAsync("grid/editors/base", (object)control)</text>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
@if (singleColumn) {
|
||||
@:</div>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@functions{
|
||||
|
||||
public static HtmlString RenderElementAttributes(dynamic contentItem)
|
||||
{
|
||||
var attrs = new List<string>();
|
||||
JObject cfg = contentItem.config;
|
||||
|
||||
if (cfg != null)
|
||||
{
|
||||
foreach (JProperty property in cfg.Properties())
|
||||
{
|
||||
var propertyValue = HttpUtility.HtmlAttributeEncode(property.Value.ToString());
|
||||
attrs.Add(property.Name + "=\"" + propertyValue + "\"");
|
||||
}
|
||||
}
|
||||
|
||||
JObject style = contentItem.styles;
|
||||
|
||||
if (style != null)
|
||||
{
|
||||
var cssVals = new List<string>();
|
||||
foreach (JProperty property in style.Properties())
|
||||
{
|
||||
var propertyValue = property.Value.ToString();
|
||||
if (string.IsNullOrWhiteSpace(propertyValue) == false)
|
||||
{
|
||||
cssVals.Add(property.Name + ":" + propertyValue + ";");
|
||||
}
|
||||
}
|
||||
|
||||
if (cssVals.Any())
|
||||
attrs.Add("style=\"" + HttpUtility.HtmlAttributeEncode(string.Join(" ", cssVals)) + "\"");
|
||||
}
|
||||
|
||||
return new HtmlString(string.Join(" ", attrs));
|
||||
}
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
@model dynamic
|
||||
|
||||
@try
|
||||
{
|
||||
string editor = EditorView(Model);
|
||||
<text>@await Html.PartialAsync(editor, Model as object)</text>
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
<pre>@ex.ToString()</pre>
|
||||
}
|
||||
|
||||
@functions{
|
||||
|
||||
public static string EditorView(dynamic contentItem)
|
||||
{
|
||||
string view = contentItem.editor.render != null ? contentItem.editor.render.ToString() : contentItem.editor.view.ToString();
|
||||
view = view.Replace(".html", ".cshtml");
|
||||
|
||||
if (!view.Contains("/"))
|
||||
{
|
||||
view = "grid/editors/" + view;
|
||||
}
|
||||
|
||||
return view;
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
@inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage<dynamic>
|
||||
|
||||
@if (Model is not null)
|
||||
{
|
||||
string embedValue = Convert.ToString(Model.value);
|
||||
embedValue = embedValue.DetectIsJson() ? Model.value.preview : Model.value;
|
||||
|
||||
<div class="video-wrapper">
|
||||
@Html.Raw(embedValue)
|
||||
</div>
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
@inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage<dynamic>
|
||||
|
||||
@if (Model?.value is not null)
|
||||
{
|
||||
string macroAlias = Model.value.macroAlias.ToString();
|
||||
var parameters = new Dictionary<string,object>();
|
||||
foreach (var mpd in Model.value.macroParamsDictionary)
|
||||
{
|
||||
parameters.Add(mpd.Name, mpd.Value);
|
||||
}
|
||||
|
||||
<text>
|
||||
@await Umbraco.RenderMacroAsync(macroAlias, parameters)
|
||||
</text>
|
||||
}
|
||||
@@ -1,64 +0,0 @@
|
||||
@model dynamic
|
||||
@using Umbraco.Cms.Core.Media
|
||||
@using Umbraco.Cms.Core.PropertyEditors.ValueConverters
|
||||
@inject IImageUrlGenerator ImageUrlGenerator
|
||||
|
||||
@if (Model?.value is not null)
|
||||
{
|
||||
var url = Model.value.image;
|
||||
|
||||
if (Model.editor.config != null && Model.editor.config.size != null)
|
||||
{
|
||||
if (Model.value.coordinates != null)
|
||||
{
|
||||
url = ImageCropperTemplateCoreExtensions.GetCropUrl(
|
||||
(string)url,
|
||||
ImageUrlGenerator,
|
||||
width: (int)Model.editor.config.size.width,
|
||||
height: (int)Model.editor.config.size.height,
|
||||
cropAlias: "default",
|
||||
cropDataSet: new ImageCropperValue
|
||||
{
|
||||
Crops = new[]
|
||||
{
|
||||
new ImageCropperValue.ImageCropperCrop
|
||||
{
|
||||
Alias = "default",
|
||||
Coordinates = new ImageCropperValue.ImageCropperCropCoordinates
|
||||
{
|
||||
X1 = (decimal)Model.value.coordinates.x1,
|
||||
Y1 = (decimal)Model.value.coordinates.y1,
|
||||
X2 = (decimal)Model.value.coordinates.x2,
|
||||
Y2 = (decimal)Model.value.coordinates.y2
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
url = ImageCropperTemplateCoreExtensions.GetCropUrl(
|
||||
(string)url,
|
||||
ImageUrlGenerator,
|
||||
width: (int)Model.editor.config.size.width,
|
||||
height: (int)Model.editor.config.size.height,
|
||||
cropDataSet: new ImageCropperValue
|
||||
{
|
||||
FocalPoint = new ImageCropperValue.ImageCropperFocalPoint
|
||||
{
|
||||
Top = Model.value.focalPoint == null ? 0.5m : Model.value.focalPoint.top,
|
||||
Left = Model.value.focalPoint == null ? 0.5m : Model.value.focalPoint.left
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
var altText = Model.value.altText ?? Model.value.caption ?? string.Empty;
|
||||
|
||||
<img src="@url" alt="@altText">
|
||||
|
||||
if (Model.value.caption != null)
|
||||
{
|
||||
<p class="caption">@Model.value.caption</p>
|
||||
}
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
@using Umbraco.Cms.Core.Templates
|
||||
@model dynamic
|
||||
@inject HtmlLocalLinkParser HtmlLocalLinkParser;
|
||||
@inject HtmlUrlParser HtmlUrlParser;
|
||||
@inject HtmlImageSourceParser HtmlImageSourceParser;
|
||||
|
||||
@{
|
||||
var value = HtmlLocalLinkParser.EnsureInternalLinks(Model?.value.ToString());
|
||||
value = HtmlUrlParser.EnsureUrls(value);
|
||||
value = HtmlImageSourceParser.EnsureImageSources(value);
|
||||
}
|
||||
|
||||
@Html.Raw(value)
|
||||
@@ -1,22 +0,0 @@
|
||||
@model dynamic
|
||||
|
||||
@if (Model?.editor.config.markup is not null)
|
||||
{
|
||||
string markup = Model.editor.config.markup.ToString();
|
||||
markup = markup.Replace("#value#", Html.ReplaceLineBreaks((string)Model.value.ToString()).ToString());
|
||||
|
||||
if (Model.editor.config.style != null)
|
||||
{
|
||||
markup = markup.Replace("#style#", Model.editor.config.style.ToString());
|
||||
}
|
||||
|
||||
<text>
|
||||
@Html.Raw(markup)
|
||||
</text>
|
||||
}
|
||||
else
|
||||
{
|
||||
<text>
|
||||
<div style="@Model?.editor.config.style">@Model?.value</div>
|
||||
</text>
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
@using Umbraco.Extensions
|
||||
@using Umbraco.Cms.Web.Common.PublishedModels
|
||||
@using Umbraco.Cms.Web.Common.Views
|
||||
@using Umbraco.Cms.Core.Models.PublishedContent
|
||||
@using Microsoft.AspNetCore.Html
|
||||
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
|
||||
@addTagHelper *, Smidge
|
||||
@inject Smidge.SmidgeHelper SmidgeHelper
|
||||
Reference in New Issue
Block a user