V14: Rename new projects (#15836)
* Rename Web.UI.New back to Web.UI * Delete new backoffiec folder * Rename client project * Add new submodule * Update template csproj * Remove more mentions of new * Add missing views * Moving up the "Umbraco.Web.UI" proj reference, so that it is the first project listed in solution file (.sln) since it will be selected as startup one in VS by default. * don't include grid * Update with section of how to get started with backoffice * Update .github/BUILD.md Co-authored-by: Elitsa Marinovska <21998037+elit0451@users.noreply.github.com> * Add line about white page --------- Co-authored-by: Elitsa <elm@umbraco.dk> Co-authored-by: Elitsa Marinovska <21998037+elit0451@users.noreply.github.com>
This commit is contained in:
10
src/Umbraco.Web.UI/Views/Partials/blockgrid/area.cshtml
Normal file
10
src/Umbraco.Web.UI/Views/Partials/blockgrid/area.cshtml
Normal file
@@ -0,0 +1,10 @@
|
||||
@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>
|
||||
13
src/Umbraco.Web.UI/Views/Partials/blockgrid/areas.cshtml
Normal file
13
src/Umbraco.Web.UI/Views/Partials/blockgrid/areas.cshtml
Normal file
@@ -0,0 +1,13 @@
|
||||
@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>
|
||||
11
src/Umbraco.Web.UI/Views/Partials/blockgrid/default.cshtml
Normal file
11
src/Umbraco.Web.UI/Views/Partials/blockgrid/default.cshtml
Normal file
@@ -0,0 +1,11 @@
|
||||
@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>
|
||||
36
src/Umbraco.Web.UI/Views/Partials/blockgrid/items.cshtml
Normal file
36
src/Umbraco.Web.UI/Views/Partials/blockgrid/items.cshtml
Normal file
@@ -0,0 +1,36 @@
|
||||
@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>
|
||||
13
src/Umbraco.Web.UI/Views/Partials/blocklist/default.cshtml
Normal file
13
src/Umbraco.Web.UI/Views/Partials/blocklist/default.cshtml
Normal file
@@ -0,0 +1,13 @@
|
||||
@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>
|
||||
6
src/Umbraco.Web.UI/Views/_ViewImports.cshtml
Normal file
6
src/Umbraco.Web.UI/Views/_ViewImports.cshtml
Normal file
@@ -0,0 +1,6 @@
|
||||
@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
|
||||
Reference in New Issue
Block a user