Merge remote-tracking branch 'origin/netcore/netcore' into netcore/feature/better-linux-support

# Conflicts:
#	src/Umbraco.Web.UI.NetCore/umbraco/config/lang/en.xml
This commit is contained in:
Bjarke Berg
2020-08-11 08:30:18 +02:00
345 changed files with 28462 additions and 3102 deletions

View File

@@ -2,7 +2,7 @@ using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Hosting;
using Umbraco.Core.Composing;
namespace Umbraco.Web.UI.BackOffice
namespace Umbraco.Web.UI.NetCore
{
public class Program
{

View File

@@ -6,9 +6,8 @@ using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Umbraco.Extensions;
using Umbraco.Web.Common.Middleware;
namespace Umbraco.Web.UI.BackOffice
namespace Umbraco.Web.UI.NetCore
{
public class Startup
{
@@ -80,6 +79,7 @@ namespace Umbraco.Web.UI.BackOffice
app.UseUmbracoCore();
app.UseUmbracoRouting();
app.UseRequestLocalization();
app.UseUmbracoRequestLogging();
app.UseUmbracoWebsite();
app.UseUmbracoBackOffice();

View File

@@ -17,12 +17,6 @@
<ProjectReference Include="..\Umbraco.Web.Website\Umbraco.Web.Website.csproj" />
</ItemGroup>
<ItemGroup>
<Folder Include="Views" />
<Folder Include="Views\" />
<Folder Include="wwwroot\Media" />
</ItemGroup>
<ItemGroup>
<Compile Remove="App_Data\**" />
</ItemGroup>
@@ -31,58 +25,6 @@
<EmbeddedResource Remove="App_Data\**" />
</ItemGroup>
<ItemGroup>
<None Remove="App_Data\**" />
<None Include="config\tinyMceConfig.Release.config">
<DependentUpon>tinyMceConfig.config</DependentUpon>
<SubType>Designer</SubType>
</None>
<None Include="config\umbracoSettings.Release.config">
<DependentUpon>umbracoSettings.config</DependentUpon>
<SubType>Designer</SubType>
</None>
</ItemGroup>
<ItemGroup>
<Content Remove="App_Data\**" />
<Content Remove="wwwroot\Umbraco\views\install\machinekey.html" />
<Content Remove="wwwroot\Umbraco\views\install\permissionsreport.html" />
<Content Remove="wwwroot\Umbraco\views\install\starterkit.html" />
<Content Remove="wwwroot\Umbraco\views\install\upgrade.html" />
<Content Remove="wwwroot\Umbraco\views\install\user.html" />
<Content Remove="wwwroot\Umbraco\views\install\version7upgradereport.html" />
<Content Remove="wwwroot\Umbraco\views\install\continueinstall.html" />
<Content Remove="wwwroot\Umbraco\views\install\database.html" />
<Content Remove="wwwroot\Umbraco\views\install\error.html" />
<Content Update="Areas\UmbracoInstall\Views\Install\Index.cshtml">
<ExcludeFromSingleFile>true</ExcludeFromSingleFile>
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
</Content>
<Content Update="config\tinyMceConfig.config">
<SubType>Designer</SubType>
</Content>
<Content Update="config\umbracoSettings.config">
<SubType>Designer</SubType>
</Content>
<Content Remove="wwwroot\Web.config" />
<Content Remove="Umbraco\PartialViewMacros\Templates\Gallery.cshtml" />
<Content Remove="Umbraco\PartialViewMacros\Templates\ListAncestorsFromCurrentPage.cshtml" />
<Content Remove="Umbraco\PartialViewMacros\Templates\ListChildPagesFromChangeableSource.cshtml" />
<Content Remove="Umbraco\PartialViewMacros\Templates\ListChildPagesFromCurrentPage.cshtml" />
<Content Remove="Umbraco\PartialViewMacros\Templates\ListChildPagesOrderedByDate.cshtml" />
<Content Remove="Umbraco\PartialViewMacros\Templates\ListChildPagesOrderedByName.cshtml" />
<Content Remove="Umbraco\PartialViewMacros\Templates\ListChildPagesOrderedByProperty.cshtml" />
<Content Remove="Umbraco\PartialViewMacros\Templates\ListChildPagesWithDoctype.cshtml" />
<Content Remove="Umbraco\PartialViewMacros\Templates\ListDescendantsFromCurrentPage.cshtml" />
<Content Remove="Umbraco\PartialViewMacros\Templates\ListImagesFromMediaFolder.cshtml" />
<Content Remove="Umbraco\PartialViewMacros\Templates\Login.cshtml" />
<Content Remove="Umbraco\PartialViewMacros\Templates\LoginStatus.cshtml" />
<Content Remove="Umbraco\PartialViewMacros\Templates\MultinodeTree-picker.cshtml" />
<Content Remove="Umbraco\PartialViewMacros\Templates\Navigation.cshtml" />
<Content Remove="Umbraco\PartialViewMacros\Templates\RegisterMember.cshtml" />
<Content Remove="Umbraco\PartialViewMacros\Templates\SiteMap.cshtml" />
<Content Remove="Umbraco\PartialViewMacros\Templates\EditProfile.cshtml" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="3.1.3" />
@@ -90,38 +32,4 @@
<PackageReference Include="System.Configuration.ConfigurationManager" Version="4.7.0" />
</ItemGroup>
<ItemGroup>
<Content Remove="config\serilog.Release.config" />
<Content Remove="config\serilog.user.Release.config" />
</ItemGroup>
<ItemGroup>
<None Remove="config\logviewer.searches.config.js" />
</ItemGroup>
<ItemGroup>
<Content Include="config\grid.editors.config.js" />
<Content Include="config\logviewer.searches.config.js" />
</ItemGroup>
<ItemGroup>
<None Include="config\serilog.Release.config">
<SubType>Designer</SubType>
<DependentUpon>serilog.config</DependentUpon>
</None>
<None Include="config\serilog.user.Release.config">
<SubType>Designer</SubType>
<DependentUpon>serilog.user.config</DependentUpon>
</None>
</ItemGroup>
<ItemGroup>
<Content Update="config\serilog.config">
<SubType>Designer</SubType>
</Content>
<Content Update="config\serilog.user.config">
<SubType>Designer</SubType>
</Content>
</ItemGroup>
</Project>

View File

@@ -1,123 +1,5 @@
{
"ConnectionStrings": {
"umbracoDbDSN": ""
},
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information"
}
},
"AllowedHosts": "*",
"Umbraco": {
"CMS": {
"Hosting": {
"Debug": true
},
"RuntimeMinification": {
"dataFolder": "App_Data/TEMP/Smidge",
"version": "637212411755687059"
},
"Imaging": {
"Resize": {
"MaxWidth": 5000,
"MaxHeight": 5000
},
"Cache": {
"Folder": "../App_Data/Cache",
"MaxBrowserCacheDays": 7,
"MaxCacheDays": 365,
"CachedNameLength": 8
}
},
"HealthChecks": {
"DisabledChecks": [
{
"id": "1B5D221B-CE99-4193-97CB-5F3261EC73DF",
"disabledBy": 1,
"disabledOn": "2020-03-15 19:19:10"
}
],
"NotificationSettings": {
"Enabled": true,
"FirstRunTime": "",
"PeriodInHours": 24,
"NotificationMethods": {
"Email": {
"Enabled": true,
"Verbosity": "Summary",
"Settings": {
"RecipientEmail": ""
}
}
},
"DisabledChecks": [
{
"id": "1B5D221B-CE99-4193-97CB-5F3261EC73DF",
"disabledBy": 1,
"disabledOn": "2020-03-15 19:19:10"
}
]
}
},
"Tours": {
"EnableTours": true
},
"Core": {
"Debug": {}
},
"Content": {
"Errors": {
"Error404": {
"default": "1047",
"en-US": "$site/error [@name = 'error']",
"en-UK": "8560867F-B88F-4C74-A9A4-679D8E5B3BFC"
}
},
"LoginBackgroundImage": "assets/img/login.jpg"
},
"RequestHandler": {
"AddTrailingSlash": true,
"CharCollection": [
{
"Char": " ",
"Replacement": "-"
},
{
"Char": "\"",
"Replacement": ""
},
{
"Char": "'",
"Replacement": ""
},
{
"Char": "%",
"Replacement": ""
},
{
"Char": ".",
"Replacement": ""
},
{
"Char": ";",
"Replacement": ""
},
{
"Char": "/",
"Replacement": ""
},
{
"Char": "\\",
"Replacement": ""
},
{
"Char": ":",
"Replacement": ""
}
]
}
}
}
}

View File

@@ -0,0 +1,58 @@
@using Umbraco.Core.Models.PublishedContent
@using Umbraco.Web
@using Umbraco.Core
@using Umbraco.Core.Media
@using Umbraco.Extensions
@using Umbraco.Web.Routing
@inherits Umbraco.Web.Common.Macros.PartialViewMacroPage
@inject IPublishedValueFallback PublishedValueFallback
@inject IPublishedContentQuery PublishedContentQuery
@inject IVariationContextAccessor VariationContextAccessor
@inject IPublishedUrlProvider PublishedUrlProvider
@inject IImageUrlGenerator ImageUrlGenerator
@*
Macro to display a gallery of images from the Media section.
Works with either a 'Single Media Picker' or a 'Multiple Media Picker' macro parameter (see below).
How it works:
- Confirm the macro parameter has been passed in with a value
- Loop through all the media Ids passed in (might be a single item, might be many)
- Display any individual images, as well as any folders of images
Macro Parameters To Create, for this macro to work:
Alias:mediaIds Name:Select folders and/or images Type: Multiple Media Picker
Type: (note: You can use a Single Media Picker if that's more appropriate to your needs)
*@
@{ var mediaIds = Model.MacroParameters["mediaIds"] as string; }
@if (mediaIds != null)
{
<div class="row">
@foreach (var mediaId in mediaIds.Split(','))
{
var media = PublishedContentQuery.Media(mediaId);
@* a single image *@
if (media.IsDocumentType("Image"))
{
<div class="col-xs-6 col-md-3">
<a href="@media.Url(PublishedUrlProvider)" class="thumbnail">
<img src="@media.GetCropUrl(ImageUrlGenerator, PublishedValueFallback, PublishedUrlProvider, width: 200, height: 200)" alt="@media.Name"/>
</a>
</div>
}
@* a folder with images under it *@
foreach (var image in media.Children(VariationContextAccessor))
{
<div class="col-xs-6 col-md-3">
<a href="@image.Url(PublishedUrlProvider)" class="thumbnail">
<img src="@image.GetCropUrl(ImageUrlGenerator, PublishedValueFallback, PublishedUrlProvider, width: 200, height: 200)" alt="@image.Name"/>
</a>
</div>
}
}
</div>
}

View File

@@ -0,0 +1,27 @@
@using Umbraco.Core
@using Umbraco.Web.Routing
@inherits Umbraco.Web.Common.Macros.PartialViewMacroPage
@inject IPublishedUrlProvider PublishedUrlProvider
@*
This snippet makes a list of links to the of parents of the current page using an unordered HTML list.
How it works:
- It uses the Ancestors() method to get all parents and then generates links so the visitor can go back
- Finally it outputs the name of the current page (without a link)
*@
@{ var selection = Model.Content.Ancestors().ToArray(); }
@if (selection.Length > 0)
{
<ul>
@* For each page in the ancestors collection which have been ordered by Level (so we start with the highest top node first) *@
@foreach (var item in selection.OrderBy(x => x.Level))
{
<li><a href="@item.Url(PublishedUrlProvider)">@item.Name</a> &raquo;</li>
}
@* Display the current page as the last item in the list *@
<li>@Model.Content.Name</li>
</ul>
}

View File

@@ -0,0 +1,38 @@
@using Umbraco.Core
@using Umbraco.Core.Models.PublishedContent
@using Umbraco.Web
@using Umbraco.Web.Routing
@inherits Umbraco.Web.Common.Macros.PartialViewMacroPage
@inject IPublishedContentQuery PublishedContentQuery
@inject IPublishedValueFallback PublishedValueFallback
@inject IPublishedUrlProvider PublishedUrlProvider
@*
Macro to list all child pages under a specific page in the content tree.
How it works:
- Confirm the startNodeId macro parameter has been passed in with a value
- Loop through all child pages
- Display a list of link to those pages, sorted by the value of the propertyAlias
Macro Parameters To Create, for this macro to work:
Alias:startNodeId Name:Select starting page Type:Content Picker
*@
@{ var startNodeId = Model.MacroParameters["startNodeId"]; }
@if (startNodeId != null)
{
@* Get the starting page *@
var startNode = PublishedContentQuery.Content(startNodeId);
var selection = startNode.Children.Where(x => x.IsVisible(PublishedValueFallback)).ToArray();
if (selection.Length > 0)
{
<ul>
@foreach (var item in selection)
{
<li><a href="@item.Url(PublishedUrlProvider)">@item.Name</a></li>
}
</ul>
}
}

View File

@@ -0,0 +1,27 @@
@using Umbraco.Core
@using Umbraco.Core.Models.PublishedContent
@using Umbraco.Web.Routing
@inherits Umbraco.Web.Common.Macros.PartialViewMacroPage
@inject IPublishedValueFallback PublishedValueFallback
@inject IPublishedUrlProvider PublishedUrlProvider
@*
This snippet makes a list of links to the of children of the current page using an unordered HTML list.
How it works:
- It uses the Children method to get all child pages
- It then generates links so the visitor can go to each page
*@
@{ var selection = Model.Content.Children.Where(x => x.IsVisible(PublishedValueFallback)).ToArray(); }
@if (selection.Length > 0)
{
<ul>
@foreach (var item in selection)
{
<li>
<a href="@item.Url(PublishedUrlProvider)">@item.Name</a>
</li>
}
</ul>
}

View File

@@ -0,0 +1,26 @@
@using Umbraco.Core
@using Umbraco.Core.Models.PublishedContent
@using Umbraco.Web.Routing
@inherits Umbraco.Web.Common.Macros.PartialViewMacroPage
@inject IPublishedValueFallback PublishedValueFallback
@inject IPublishedUrlProvider PublishedUrlProvider
@*
This snippet makes a list of links to the of children of the current page using an unordered HTML list.
How it works:
- It uses the Children method to get all child pages
- It then uses the OrderByDescending() method, which takes the property to sort. In this case the page's creation date.
- It then generates links so the visitor can go to each page
*@
@{ var selection = Model.Content.Children.Where(x => x.IsVisible(PublishedValueFallback)).OrderByDescending(x => x.CreateDate).ToArray(); }
@if (selection.Length > 0)
{
<ul>
@foreach (var item in selection)
{
<li><a href="@item.Url(PublishedUrlProvider)">@item.Name</a></li>
}
</ul>
}

View File

@@ -0,0 +1,26 @@
@using Umbraco.Core
@using Umbraco.Core.Models.PublishedContent
@using Umbraco.Web.Routing
@inherits Umbraco.Web.Common.Macros.PartialViewMacroPage
@inject IPublishedValueFallback PublishedValueFallback
@inject IPublishedUrlProvider PublishedUrlProvider
@*
This snippet makes a list of links to the of children of the current page using an unordered HTML list.
How it works:
- It uses the Children method to get all child pages
- It then uses the OrderBy() method, which takes the property to sort. In this case, the page's name.
- It then generates links so the visitor can go to each page
*@
@{ var selection = Model.Content.Children.Where(x => x.IsVisible(PublishedValueFallback)).OrderBy(x => x.Name).ToArray(); }
@if (selection.Length > 0)
{
<ul>
@foreach (var item in selection)
{
<li><a href="@item.Url(PublishedUrlProvider))">@item.Name</a></li>
}
</ul>
}

View File

@@ -0,0 +1,34 @@
@using Umbraco.Core
@using Umbraco.Core.Models.PublishedContent
@using Umbraco.Web.Routing
@inherits Umbraco.Web.Common.Macros.PartialViewMacroPage
@inject IPublishedValueFallback PublishedValueFallback
@inject IPublishedUrlProvider PublishedUrlProvider
@*
Macro to list all child pages with a specific property, sorted by the value of that property.
How it works:
- Confirm the propertyAlias macro parameter has been passed in with a value
- Loop through all child pages that have the propertyAlias
- Display a list of link to those pages, sorted by the value of the propertyAlias
Macro Parameters To Create, for this macro to work:
Alias:propertyAlias Name:Property Alias Type:Textbox
*@
@{ var propertyAlias = Model.MacroParameters["propertyAlias"]; }
@if (propertyAlias != null)
{
var selection = Model.Content.Children.Where(x => x.IsVisible(PublishedValueFallback)).OrderBy(x => x.Value(PublishedValueFallback, propertyAlias.ToString())).ToArray();
if (selection.Length > 0)
{
<ul>
@foreach (var item in selection)
{
<li><a href="@item.Url(PublishedUrlProvider)">@item.Name</a></li>
}
</ul>
}
}

View File

@@ -0,0 +1,25 @@
@using Umbraco.Core
@using Umbraco.Core.Models.PublishedContent
@using Umbraco.Web.Routing
@inherits Umbraco.Web.Common.Macros.PartialViewMacroPage
@inject IVariationContextAccessor VariationContextAccessor
@inject IPublishedValueFallback PublishedValueFallback
@inject IPublishedUrlProvider PublishedUrlProvider
@*
This snippet shows how simple it is to fetch only children of a certain Document Type.
Be sure to change "IPublishedContent" below to match your needs, such as "TextPage" or "NewsItem".
(You can find the alias of your Document Type by editing it in the Settings section)
*@
@{ var selection = Model.Content.Children<IPublishedContent>(VariationContextAccessor).Where(x => x.IsVisible(PublishedValueFallback)).ToArray(); }
@if (selection.Length > 0)
{
<ul>
@foreach (var item in selection)
{
<li><a href="@item.Url(PublishedUrlProvider)">@item.Name</a></li>
}
</ul>
}

View File

@@ -0,0 +1,72 @@
@using Umbraco.Core
@using Umbraco.Core.Models.PublishedContent
@using Umbraco.Web.Routing
@inherits Umbraco.Web.Common.Macros.PartialViewMacroPage
@inject IPublishedValueFallback PublishedValueFallback
@inject IPublishedUrlProvider PublishedUrlProvider
@*
This snippet creates links for every single page (no matter how deep) below
the page currently being viewed by the website visitor, displayed as nested unordered HTML lists.
*@
@{ var selection = Model.Content.Children.Where(x => x.IsVisible(PublishedValueFallback)).ToArray(); }
@* Ensure that the Current Page has children *@
@if (selection.Length > 0)
{
@* Get the first page in the children, where the property umbracoNaviHide is not True *@
var naviLevel = selection[0].Level;
@* Add in level for a CSS hook *@
<ul class="level-@(naviLevel)">
@* Loop through the selection *@
@foreach (var item in selection)
{
<li>
<a href="@item.Url(PublishedUrlProvider)">@item.Name</a>
@* if this child page has any children, where the property umbracoNaviHide is not True *@
@{
var children = item.Children.Where(x => x.IsVisible(PublishedValueFallback)).ToArray();
if (children.Length > 0)
{
@* Call a local method to display the children *@
ChildPages(children);
}
}
</li>
}
</ul>
}
@{
void ChildPages(IPublishedContent[] selection)
{
//Ensure that we have a collection of pages
if (selection.Length > 0)
{
// Get the first page in pages and get the level
var naviLevel = selection[0].Level;
// Add in level for a CSS hook
<ul class="level-@(naviLevel)">
@foreach (var item in selection)
{
<li>
<a href="@item.Url(PublishedUrlProvider)">@item.Name</a>
@* if the page has any children, where the property umbracoNaviHide is not True *@
@{
var children = item.Children.Where(x => x.IsVisible(PublishedValueFallback)).ToArray();
if (children.Length > 0)
{
@* Recurse and call the ChildPages method to display the children *@
ChildPages(children);
}
}
</li>
}
</ul>
}
}
}

View File

@@ -0,0 +1,38 @@
@using Umbraco.Core
@using Umbraco.Web
@using Umbraco.Web.Routing
@inherits Umbraco.Web.Common.Macros.PartialViewMacroPage
@inject IPublishedContentQuery PublishedContentQuery
@inject IPublishedUrlProvider PublishedUrlProvider
@*
Macro to display a series of images from a media folder.
How it works:
- Confirm the macro parameter has been passed in with a value
- Loop through all the media Ids passed in (might be a single item, might be many)
- Display any individual images, as well as any folders of images
Macro Parameters To Create, for this macro to work:
Alias:mediaId Name:Select folder with images Type:Single Media Picker
*@
@{ var mediaId = Model.MacroParameters["mediaId"]; }
@if (mediaId != null)
{
@* Get the media item associated with the id passed in *@
var media = PublishedContentQuery.Media(mediaId);
var selection = media.Children.ToArray();
if (selection.Length > 0)
{
<ul>
@foreach (var item in selection)
{
<li>
<img src="@item.Url(PublishedUrlProvider)" alt="@item.Name" />
</li>
}
</ul>
}
}

View File

@@ -0,0 +1,27 @@
@using Umbraco.Core
@using Umbraco.Core.Models.PublishedContent
@using Umbraco.Web.Routing
@inherits Umbraco.Web.Common.Macros.PartialViewMacroPage
@inject IPublishedValueFallback PublishedValueFallback
@inject IPublishedUrlProvider PublishedUrlProvider
@*
This snippet lists the items from a Multinode tree picker, using the picker's default settings.
Content Values stored as XML.
To get it working with any site's data structure, set the selection equal to the property which has the
multinode treepicker (so: replace "PropertyWithPicker" with the alias of your property).
*@
@{ var selection = Model.Content.Value<IEnumerable<IPublishedContent>>(PublishedValueFallback, "PropertyWithPicker").ToArray(); }
@if (selection.Length > 0)
{
<ul>
@foreach (var item in selection)
{
<li>
<a href="@item.Url(PublishedUrlProvider)">@item.Name</a>
</li>
}
</ul>
}

View File

@@ -0,0 +1,25 @@
@using Umbraco.Core
@using Umbraco.Core.Models.PublishedContent
@using Umbraco.Web.Routing
@inherits Umbraco.Web.Common.Macros.PartialViewMacroPage
@inject IPublishedValueFallback PublishedValueFallback
@inject IPublishedUrlProvider PublishedUrlProvider
@*
This snippet displays a list of links of the pages immediately under the top-most page in the content tree.
This is the home page for a standard website.
It also highlights the current active page/section in the navigation with the CSS class "current".
*@
@{ var selection = Model.Content.Root().Children.Where(x => x.IsVisible(PublishedValueFallback)).ToArray(); }
@if (selection.Length > 0)
{
<ul>
@foreach (var item in selection)
{
<li class="@(item.IsAncestorOrSelf(Model.Content) ? "current" : null)">
<a href="@item.Url(PublishedUrlProvider)">@item.Name</a>
</li>
}
</ul>
}

View File

@@ -0,0 +1,47 @@
@using Umbraco.Core
@using Umbraco.Core.Models.PublishedContent
@using Umbraco.Web.Routing
@inherits Umbraco.Web.Common.Macros.PartialViewMacroPage
@inject IPublishedValueFallback PublishedValueFallback
@inject IPublishedUrlProvider PublishedUrlProvider
@*
This snippet makes a list of links of all visible pages of the site, as nested unordered HTML lists.
How it works:
- It uses a local method called Traverse() to select and display the markup and links.
*@
@{ var selection = Model.Content.Root(); }
<div class="sitemap">
@* Render the sitemap by passing the root node to the traverse method, below *@
@{ Traverse(selection); }
</div>
@* Helper method to traverse through all descendants *@
@{
void Traverse(IPublishedContent node)
{
//Update the level to reflect how deep you want the sitemap to go
const int maxLevelForSitemap = 4;
@* Select visible children *@
var selection = node.Children.Where(x => x.IsVisible(PublishedValueFallback) && x.Level <= maxLevelForSitemap).ToArray();
@* If any items are returned, render a list *@
if (selection.Length > 0)
{
<ul>
@foreach (var item in selection)
{
<li class="level-@item.Level">
<a href="@item.Url(PublishedUrlProvider)">@item.Name</a>
@* Run the traverse method again for any child pages *@
@{ Traverse(item); }
</li>
}
</ul>
}
}
}

View File

@@ -0,0 +1,89 @@
@using Umbraco.Core
@using Umbraco.Web.WebAssets
@using Umbraco.Web.Common.Security
@using Umbraco.Core.WebAssets
@using Umbraco.Core.Configuration
@using Umbraco.Core.Hosting
@using Umbraco.Extensions
@using Umbraco.Core.Logging
@using Umbraco.Web.BackOffice.Controllers
@inject BackOfficeSignInManager signInManager
@inject BackOfficeServerVariables backOfficeServerVariables
@inject IUmbracoVersion umbracoVersion
@inject IHostingEnvironment hostingEnvironment
@inject IGlobalSettings globalSettings
@inject IRuntimeMinifier runtimeMinifier
@inject IProfilerHtml profilerHtml
@model Umbraco.Web.Editors.BackOfficePreviewModel
@{
var disableDevicePreview = Model.DisableDevicePreview.ToString().ToLowerInvariant();
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Umbraco Preview</title>
<meta name="robots" content="noindex, nofollow">
<meta name="pinterest" content="nopin" />
@Html.Raw(await runtimeMinifier.RenderCssHereAsync(BackOfficeWebAssets.UmbracoPreviewCssBundleName))
</head>
<body id="canvasdesignerPanel" ng-mouseover="outlinePositionHide()" ng-controller="previewController" ng-class="{'tabbing-active': tabbingActive === true}" ng-click="windowClickHandler($event)">
<div class="wait" ng-show="!frameLoaded"></div>
@if (!string.IsNullOrWhiteSpace(Model.PreviewExtendedHeaderView))
{
@await Html.PartialAsync(Model.PreviewExtendedHeaderView)
}
<div id="demo-iframe-wrapper" class="{{previewDevice.css}}">
<preview-i-frame src="pageUrl" on-loaded="onFrameLoaded(iframe)"></preview-i-frame>
</div>
<div class="canvasdesigner" ng-init="showDevicesPreview = true; showDevices = !@(disableDevicePreview);" ng-mouseenter="positionSelectedHide()">
<div class="menu-bar selected">
<div class="menu-bar__title">Preview Mode</div>
<div class="menu-bar__right-part">
<div class="preview-menu-option" ng-class="{'--open': sizeOpen === true}" ng-click="$event.stopPropagation()">
<button class="menu-bar__button umb-outline" ng-click="toggleSizeOpen()"><i class="icon {{previewDevice.icon}}"></i><span>{{previewDevice.title}}</span></button>
<div class="dropdown-menu">
<button ng-repeat="device in devices" class="menu-bar__button umb-outline" ng-class="{ '--active':previewDevice === device }" ng-click="updatePreviewDevice(device)">
<i class="icon {{device.icon}}"></i><span>{{device.title}}</span>
</button>
</div>
</div>
@if (Model.Languages != null && Model.Languages.Count() > 1)
{
<div class="preview-menu-option" ng-class="{'--open': cultureOpen === true}" ng-click="$event.stopPropagation()">
<button class="menu-bar__button umb-outline" ng-click="toggleCultureOpen()"><i class="icon icon-globe-europe---africa"></i><span>{{currentCulture.title}}</span></button>
<div class="dropdown-menu">
@foreach (var language in Model.Languages)
{
<button class="menu-bar__button umb-outline" ng-class="{ '--active': currentCultureIso === '@language.IsoCode' || (@language.IsDefault.ToString().ToLower() && currentCultureIso === null) }" ng-click="changeCulture('@language.IsoCode')" ng-init="registerCulture('@language.IsoCode', '@language.CultureName', @language.IsDefault.ToString().ToLower())">
<i class="icon icon-globe-europe---africa"></i><span>@language.CultureName</span>
</button>
}
</div>
</div>
}
<button ng-click="exitPreview()" title="Exit Preview" class="menu-bar__button umb-outline">
<i class="icon icon-power"></i><span>Exit</span>
</button>
</div>
</div>
</div>
<script src="../lib/lazyload-js/lazyload.min.js"></script>
<script src="@Url.GetUrlWithCacheBust("Application", "Preview", null, hostingEnvironment, umbracoVersion, runtimeMinifier)"></script>
</body>
</html>

View File

@@ -17,6 +17,7 @@
<key alias="createGroup">Opret gruppe</key>
<key alias="delete">Slet</key>
<key alias="disable">Deaktivér</key>
<key alias="editSettings">Edit settings</key>
<key alias="emptyRecycleBin">Tøm papirkurv</key>
<key alias="enable">Aktivér</key>
<key alias="exportDocumentType">Eksportér dokumenttype</key>
@@ -152,6 +153,8 @@
<key alias="confirmActionCancel">Fortryd</key>
<key alias="confirmActionConfirm">Bekræft</key>
<key alias="morePublishingOptions">Flere publiseringsmuligheder</key>
<key alias="submitChanges">Indsæt</key>
<key alias="submitChangesAndClose">Indsæt og luk</key>
</area>
<area alias="auditTrails">
<key alias="atViewingFor">For</key>
@@ -607,6 +610,7 @@
<key alias="tableColMergeLeft">Du skal stå til venstre for de 2 celler du ønsker at samle!</key>
<key alias="tableSplitNotSplittable">Du kan ikke opdele en celle, som ikke allerede er delt.</key>
<key alias="propertyHasErrors">Denne egenskab er ugyldig</key>
<key alias="errorPropertyEditorNotSupportedInElementTypes">Feltet %0% bruger editor %1% som ikke er supporteret for ElementTyper.</key>
</area>
<area alias="general">
<key alias="about">Om</key>
@@ -1809,8 +1813,43 @@ Mange hilsner fra Umbraco robotten
<key alias="labelForCopyAllEntries">Kopier %0%</key>
<key alias="labelForArrayOfItemsFrom">%0% fra %1%</key>
<key alias="labelForRemoveAllEntries">Fjern alle elementer</key>
<key alias="labelForClearClipboard">Ryd udklipsholder</key>
</area>
<area alias="propertyActions">
<key alias="tooltipForPropertyActionsMenu">Åben egenskabshandlinger</key>
</area>
<area alias="blockEditor">
<key alias="headlineCreateBlock">Opret ny blok</key>
<key alias="headlineAddSettingsElementType">Tilføj en indstillings afsnit</key>
<key alias="headlineAddCustomView">Tilføj visning</key>
<key alias="headlineAddCustomStylesheet">Tilføj stylesheet</key>
<key alias="headlineAddThumbnail">Vælg billede</key>
<key alias="labelcreateNewElementType">Opret ny</key>
<key alias="labelCustomStylesheet">Overskriv stylesheet</key>
<key alias="addCustomStylesheet">Tilføj stylesheet</key>
<key alias="headlineEditorAppearance">Redigerings udseende</key>
<key alias="headlineDataModels">Data modeller</key>
<key alias="headlineCatalogueAppearance">katalog udseende</key>
<key alias="labelBackgroundColor">Baggrunds farve</key>
<key alias="labelIconColor">Ikon farve</key>
<key alias="labelContentElementType">Indholds model</key>
<key alias="labelLabelTemplate">Label</key>
<key alias="labelCustomView">Speciel visning</key>
<key alias="labelSettingsElementType">Indstillings model</key>
<key alias="labelEditorSize">Rederings lagets størrelse</key>
<key alias="addCustomView">Tilføj speciel visning</key>
<key alias="addSettingsElementType">Tilføj instillinger</key>
<key alias="labelTemplatePlaceholder">Overskriv label form</key>
<key alias="confirmDeleteBlockMessage"><![CDATA[Er du sikker på at du vil slette denne blok: <strong>%0%</strong>.]]></key>
<key alias="confirmDeleteBlockNotice">Indhold der benytter sig af denne blok vil gå bort.</key>
<key alias="blockConfigurationOverlayTitle"><![CDATA[Konfiguration af '%0%']]></key>
<key alias="thumbnail">Billede</key>
<key alias="addThumbnail">Tilføj billede</key>
<key alias="tabCreateEmpty">Opret ny</key>
<key alias="tabClipboard">Udklipsholder</key>
<key alias="tabBlockSettings">Indstillinger</key>
<key alias="headlineAdvanced">Avanceret</key>
<key alias="forceHideContentEditor">Skjuld indholds editoren</key>
</area>
</language>

View File

@@ -16,6 +16,7 @@
<key alias="createGroup">Create group</key>
<key alias="delete">Delete</key>
<key alias="disable">Disable</key>
<key alias="editSettings">Edit settings</key>
<key alias="emptyRecycleBin">Empty recycle bin</key>
<key alias="enable">Enable</key>
<key alias="exportDocumentType">Export Document Type</key>
@@ -30,6 +31,7 @@
<key alias="unpublish">Unpublish</key>
<key alias="refreshNode">Reload</key>
<key alias="republish">Republish entire site</key>
<key alias="remove">Remove</key>
<key alias="rename" version="7.3.0">Rename</key>
<key alias="restore" version="7.3.0">Restore</key>
<key alias="SetPermissionsForThePage">Set permissions for the page %0%</key>
@@ -154,6 +156,8 @@
<key alias="confirmActionCancel">Cancel</key>
<key alias="confirmActionConfirm">Confirm</key>
<key alias="morePublishingOptions">More publishing options</key>
<key alias="submitChanges">Submit</key>
<key alias="submitChangesAndClose">Submit and close</key>
</area>
<area alias="auditTrails">
<key alias="atViewingFor">Viewing for</key>
@@ -427,7 +431,11 @@
<key alias="assignDomain">Manage hostnames</key>
<key alias="closeThisWindow">Close this window</key>
<key alias="confirmdelete">Are you sure you want to delete</key>
<key alias="confirmdeleteXofX">Are you sure you want to delete %0% based on %1%</key>
<key alias="confirmdisable">Are you sure you want to disable</key>
<key alias="confirmremove">Are you sure you want to remove</key>
<key alias="confirmremoveusageof"><![CDATA[Are you sure you want to remove the usage of <b>%0%</b>]]></key>
<key alias="confirmremovereferenceto"><![CDATA[Are you sure you want to remove the reference to <b>%0%</b>]]></key>
<key alias="confirmlogout">Are you sure?</key>
<key alias="confirmSure">Are you sure?</key>
<key alias="cut">Cut</key>
@@ -613,6 +621,7 @@
<key alias="errorMandatoryWithoutTab">%0% is a mandatory field</key>
<key alias="errorRegExp">%0% at %1% is not in a correct format</key>
<key alias="errorRegExpWithoutTab">%0% is not in a correct format</key>
<key alias="errorPropertyEditorNotSupportedInElementTypes">Property '%0%' uses editor '%1%' which is not supported in Element Types.</key>
</area>
<area alias="errors">
<key alias="receivedErrorFromServer">Received an error from the server</key>
@@ -2302,6 +2311,7 @@ To manage your website, simply open the Umbraco back office and start adding con
<key alias="labelForCopyAllEntries">Copy %0%</key>
<key alias="labelForArrayOfItemsFrom">%0% from %1%</key>
<key alias="labelForRemoveAllEntries">Remove all items</key>
<key alias="labelForClearClipboard">Clear clipboard</key>
</area>
<area alias="propertyActions">
<key alias="tooltipForPropertyActionsMenu">Open Property Actions</key>
@@ -2425,6 +2435,39 @@ To manage your website, simply open the Umbraco back office and start adding con
<key alias="formsHeadline">Umbraco Forms</key>
<key alias="formsDescription">Create forms using an intuitive drag and drop interface. From simple contact forms that sends e-mails to advanced questionaires that integrate with CRM systems. Your clients will love it!</key>
</area>
<area alias="blockEditor">
<key alias="headlineCreateBlock">Create new block</key>
<key alias="headlineAddSettingsElementType">Attach a settings section</key>
<key alias="headlineAddCustomView">Select view</key>
<key alias="headlineAddCustomStylesheet">Select stylesheet</key>
<key alias="headlineAddThumbnail">Choose thumbnail</key>
<key alias="labelcreateNewElementType">Create new</key>
<key alias="labelCustomStylesheet">Custom stylesheet</key>
<key alias="addCustomStylesheet">Add stylesheet</key>
<key alias="headlineEditorAppearance">Editor apperance</key>
<key alias="headlineDataModels">Data models</key>
<key alias="headlineCatalogueAppearance">Catalogue appearance</key>
<key alias="labelBackgroundColor">Background color</key>
<key alias="labelIconColor">Icon color</key>
<key alias="labelContentElementType">Content model</key>
<key alias="labelLabelTemplate">Label</key>
<key alias="labelCustomView">Custom view</key>
<key alias="labelSettingsElementType">Settings model</key>
<key alias="labelEditorSize">Overlay editor size</key>
<key alias="addCustomView">Add custom view</key>
<key alias="addSettingsElementType">Add settings</key>
<key alias="labelTemplatePlaceholder">Overwrite label template</key>
<key alias="confirmDeleteBlockMessage"><![CDATA[Are you sure you want to delete block of <strong>%0%</strong>.]]></key>
<key alias="confirmDeleteBlockNotice">Content using this block will be lost.</key>
<key alias="blockConfigurationOverlayTitle"><![CDATA[Configuration of '%0%']]></key>
<key alias="thumbnail">Thumbnail</key>
<key alias="addThumbnail">Add thumbnail</key>
<key alias="tabCreateEmpty">Create empty</key>
<key alias="tabClipboard">Clipboard</key>
<key alias="tabBlockSettings">Settings</key>
<key alias="headlineAdvanced">Advanced</key>
<key alias="forceHideContentEditor">Force hide content editor</key>
</area>
<area alias="contentTemplatesDashboard">
<key alias="whatHeadline">What are Content Templates?</key>
<key alias="whatDescription">Content Templates are pre-defined content that can be selected when creating a new content node.</key>

View File

@@ -17,6 +17,7 @@
<key alias="createGroup">Create group</key>
<key alias="delete">Delete</key>
<key alias="disable">Disable</key>
<key alias="editSettings">Edit settings</key>
<key alias="emptyRecycleBin">Empty recycle bin</key>
<key alias="enable">Enable</key>
<key alias="exportDocumentType">Export Document Type</key>
@@ -31,6 +32,7 @@
<key alias="unpublish">Unpublish</key>
<key alias="refreshNode">Reload</key>
<key alias="republish">Republish entire site</key>
<key alias="remove">Remove</key>
<key alias="rename" version="7.3.0">Rename</key>
<key alias="restore" version="7.3.0">Restore</key>
<key alias="SetPermissionsForThePage">Set permissions for the page %0%</key>
@@ -155,6 +157,8 @@
<key alias="confirmActionCancel">Cancel</key>
<key alias="confirmActionConfirm">Confirm</key>
<key alias="morePublishingOptions">More publishing options</key>
<key alias="submitChanges">Submit</key>
<key alias="submitChangesAndClose">Submit and close</key>
</area>
<area alias="auditTrails">
<key alias="atViewingFor">Viewing for</key>
@@ -433,6 +437,9 @@
<key alias="closeThisWindow">Close this window</key>
<key alias="confirmdelete">Are you sure you want to delete</key>
<key alias="confirmdisable">Are you sure you want to disable</key>
<key alias="confirmremove">Are you sure you want to remove</key>
<key alias="confirmremoveusageof"><![CDATA[Are you sure you want to remove the usage of <b>%0%</b>]]></key>
<key alias="confirmremovereferenceto"><![CDATA[Are you sure you want to remove the reference to <b>%0%</b>]]></key>
<key alias="confirmlogout">Are you sure?</key>
<key alias="confirmSure">Are you sure?</key>
<key alias="cut">Cut</key>
@@ -637,6 +644,7 @@
<key alias="tableColMergeLeft">Please place cursor at the left of the two cells you wish to merge</key>
<key alias="tableSplitNotSplittable">You cannot split a cell that hasn't been merged.</key>
<key alias="propertyHasErrors">This property is invalid</key>
<key alias="errorPropertyEditorNotSupportedInElementTypes">Property '%0%' uses editor '%1%' which is not supported in Element Types.</key>
</area>
<area alias="general">
<key alias="options">Options</key>
@@ -2323,6 +2331,7 @@ To manage your website, simply open the Umbraco back office and start adding con
<key alias="labelForCopyAllEntries">Copy %0%</key>
<key alias="labelForArrayOfItemsFrom">%0% from %1%</key>
<key alias="labelForRemoveAllEntries">Remove all items</key>
<key alias="labelForClearClipboard">Clear clipboard</key>
</area>
<area alias="propertyActions">
<key alias="tooltipForPropertyActionsMenu">Open Property Actions</key>
@@ -2446,6 +2455,39 @@ To manage your website, simply open the Umbraco back office and start adding con
<key alias="formsHeadline">Umbraco Forms</key>
<key alias="formsDescription">Create forms using an intuitive drag and drop interface. From simple contact forms that sends e-mails to advanced questionaires that integrate with CRM systems. Your clients will love it!</key>
</area>
<area alias="blockEditor">
<key alias="headlineCreateBlock">Create new block</key>
<key alias="headlineAddSettingsElementType">Attach a settings section</key>
<key alias="headlineAddCustomView">Select view</key>
<key alias="headlineAddCustomStylesheet">Select stylesheet</key>
<key alias="headlineAddThumbnail">Choose thumbnail</key>
<key alias="labelcreateNewElementType">Create new</key>
<key alias="labelCustomStylesheet">Custom stylesheet</key>
<key alias="addCustomStylesheet">Add stylesheet</key>
<key alias="headlineEditorAppearance">Editor apperance</key>
<key alias="headlineDataModels">Data models</key>
<key alias="headlineCatalogueAppearance">Catalogue appearance</key>
<key alias="labelBackgroundColor">Background color</key>
<key alias="labelIconColor">Icon color</key>
<key alias="labelContentElementType">Content model</key>
<key alias="labelLabelTemplate">Label</key>
<key alias="labelCustomView">Custom view</key>
<key alias="labelSettingsElementType">Settings model</key>
<key alias="labelEditorSize">Overlay editor size</key>
<key alias="addCustomView">Add custom view</key>
<key alias="addSettingsElementType">Add settings</key>
<key alias="labelTemplatePlaceholder">Overwrite label template</key>
<key alias="confirmDeleteBlockMessage"><![CDATA[Are you sure you want to delete block of <strong>%0%</strong>.]]></key>
<key alias="confirmDeleteBlockNotice">Content using this block will be lost.</key>
<key alias="blockConfigurationOverlayTitle"><![CDATA[Configuration of '%0%']]></key>
<key alias="thumbnail">Thumbnail</key>
<key alias="addThumbnail">Add thumbnail</key>
<key alias="tabCreateEmpty">Create empty</key>
<key alias="tabClipboard">Clipboard</key>
<key alias="tabBlockSettings">Settings</key>
<key alias="headlineAdvanced">Advanced</key>
<key alias="forceHideContentEditor">Force hide content editor</key>
</area>
<area alias="contentTemplatesDashboard">
<key alias="whatHeadline">What are Content Templates?</key>
<key alias="whatDescription">Content Templates are pre-defined content that can be selected when creating a new content node.</key>