6 |
x.CurrentPage.PageName)>@Model.CurrentPage.PageName
7 |
x.CurrentPage.MetaDescription)>@Model.CurrentPage.MetaDescription
8 |
9 | @Html.PropertyFor(m => m.CurrentPage.MainBody)
10 |
11 | @Html.PropertyFor(x => x.CurrentPage.NewsList)
12 |
13 |
14 | @Html.PropertyFor(x => x.CurrentPage.MainContentArea, new { CssClass = "row" })
15 |
--------------------------------------------------------------------------------
/tests/DeveloperTools.AlloySandbox/Views/Preview/Index.cshtml:
--------------------------------------------------------------------------------
1 | @model PreviewModel
2 |
3 | @foreach (var area in Model.Areas)
4 | {
5 | if (area.Supported)
6 | {
7 | @await Html.PartialAsync("TemplateHint", string.Format(System.Globalization.CultureInfo.CurrentUICulture, LocalizationService.Current.GetString("/preview/heading"), Model.PreviewContent.Name, LocalizationService.Current.GetString(area.AreaName)))
8 |
9 |
10 | @Html.DisplayFor(x => area.ContentArea, new { Tag = area.AreaTag })
11 |
12 | }
13 | else
14 | {
15 | @await Html.PartialAsync("TemplateHint", string.Format(System.Globalization.CultureInfo.CurrentUICulture, LocalizationService.Current.GetString("/preview/norenderer"), Model.PreviewContent.Name, LocalizationService.Current.GetString(area.AreaName)))}
16 | }
17 |
18 | @if (!Model.Areas.Any())
19 | {
20 | @await Html.PartialAsync("TemplateHint", string.Format(System.Globalization.CultureInfo.CurrentUICulture, LocalizationService.Current.GetString("/preview/norendereratall"), Model.PreviewContent.Name))
21 | }
22 |
--------------------------------------------------------------------------------
/tests/DeveloperTools.AlloySandbox/Views/ProductPage/Index.cshtml:
--------------------------------------------------------------------------------
1 | @model PageViewModel
2 |
3 | @{ Layout = "~/Views/Shared/Layouts/_TwoPlusOne.cshtml"; }
4 |
5 |
6 |
x.CurrentPage.PageName)>@Model.CurrentPage.PageName
7 |
x.CurrentPage.MetaDescription)>@Model.CurrentPage.MetaDescription
8 |
9 | @Html.PropertyFor(m => m.CurrentPage.MainBody)
10 |
11 |
12 |
13 | @Html.PropertyFor(x => x.CurrentPage.MainContentArea, new { CssClass = "row" })
14 |
15 | @section RelatedContent
16 | {
17 | x.CurrentPage.PageImage)>
18 |
19 |
20 |
21 |
22 |
x.CurrentPage.PageName)>@Model.CurrentPage.PageName
23 | @Html.PropertyFor(x => x.CurrentPage.UniqueSellingPoints)
24 |
25 |
26 | @Html.PropertyFor(x => x.CurrentPage.RelatedContentArea, new { Aside = true })
27 | }
28 |
--------------------------------------------------------------------------------
/tests/DeveloperTools.AlloySandbox/Views/SearchPage/Index.cshtml:
--------------------------------------------------------------------------------
1 | @model SearchContentModel
2 |
3 | @{
4 | Layout = "~/Views/Shared/Layouts/_TwoPlusOne.cshtml";
5 | }
6 |
7 |
18 |
19 | @if (Model.Hits != null)
20 | {
21 |
22 |
23 |
@Html.Translate("/searchpagetemplate/result")
24 |
25 | @Html.Translate("/searchpagetemplate/searchfor") @Model.SearchedQuery
26 | @Html.Translate("/searchpagetemplate/resultedin")
27 | @if (Model.NumberOfHits > 0)
28 | {
29 | @Model.NumberOfHits
30 | }
31 | else
32 | {
33 | @Html.Translate("/searchpagetemplate/zero")
34 | }
35 | @Html.Translate("/searchpagetemplate/hits")
36 |
37 |
38 |
39 |
40 |
41 |
42 | @foreach (var hit in Model.Hits)
43 | {
44 |
45 |
46 |
@hit.Excerpt
47 |
48 |
49 | }
50 |
51 |
52 |
53 | }
54 |
55 | @if (Model.SearchServiceDisabled && Html.ViewContext.IsInEditMode())
56 | {
57 | @await Html.PartialAsync("TemplateHint", Html.Translate("/searchpagetemplate/disabled").ToString())
58 | }
59 |
--------------------------------------------------------------------------------
/tests/DeveloperTools.AlloySandbox/Views/Shared/Blocks/ButtonBlock.cshtml:
--------------------------------------------------------------------------------
1 | @model ButtonBlock
2 |
3 | m.ButtonText)>
4 | @{
5 | var buttonText = string.IsNullOrWhiteSpace(Model.ButtonText)
6 | ? LocalizationService.Current.GetString("/blocks/buttonblockcontrol/buttondefaulttext")
7 | : Model.ButtonText;
8 | }
9 | @buttonText
10 |
11 |
--------------------------------------------------------------------------------
/tests/DeveloperTools.AlloySandbox/Views/Shared/Blocks/EditorialBlock.cshtml:
--------------------------------------------------------------------------------
1 | @model EditorialBlock
2 |
3 | x.MainBody)>
4 | @Html.DisplayFor(x => Model.MainBody)
5 |
6 |
--------------------------------------------------------------------------------
/tests/DeveloperTools.AlloySandbox/Views/Shared/Blocks/JumbotronBlock.cshtml:
--------------------------------------------------------------------------------
1 | @model JumbotronBlock
2 |
3 |
11 |
--------------------------------------------------------------------------------
/tests/DeveloperTools.AlloySandbox/Views/Shared/Blocks/NoRenderer.cshtml:
--------------------------------------------------------------------------------
1 | @await Html.PartialAsync("TemplateHint", Html.Translate("/blocks/norenderer/message").ToString())
2 |
--------------------------------------------------------------------------------
/tests/DeveloperTools.AlloySandbox/Views/Shared/Blocks/SiteLogotypeBlock.cshtml:
--------------------------------------------------------------------------------
1 | @model SiteLogotypeBlock
2 |
3 |
--------------------------------------------------------------------------------
/tests/DeveloperTools.AlloySandbox/Views/Shared/Blocks/TeaserBlock.cshtml:
--------------------------------------------------------------------------------
1 | @using EPiServer.Core
2 |
3 | @model TeaserBlock
4 |
5 |
6 | @*Link the teaser block only if a link has been set and not displayed in preview*@
7 | @using (Html.BeginConditionalLink(
8 | !ContentReference.IsNullOrEmpty(Model.Link) && !(Html.ViewContext.IsPreviewMode()),
9 | Url.PageLinkUrl(Model.Link),
10 | Model.Heading))
11 | {
12 |
x.Image)>
13 |
14 |
15 |
16 |
x.Heading)>@Model.Heading
17 |
x.Text)>@Model.Text
18 | }
19 |
20 |
--------------------------------------------------------------------------------
/tests/DeveloperTools.AlloySandbox/Views/Shared/Blocks/TeaserBlockWide.cshtml:
--------------------------------------------------------------------------------
1 | @model TeaserBlock
2 |
3 |
4 |
x.Image)>
5 |
6 |
7 |
8 | @*Link the teaser block only if a link has been set and not displayed in preview*@
9 | @using (Html.BeginConditionalLink(
10 | !ContentReference.IsNullOrEmpty(Model.Link) && !(Html.ViewContext.IsPreviewMode()),
11 | Url.PageLinkUrl(Model.Link),
12 | Model.Heading))
13 | {
14 |
x.Heading)>@Model.Heading
15 |
x.Text)>@Model.Text
16 | }
17 |
18 |
19 |
--------------------------------------------------------------------------------
/tests/DeveloperTools.AlloySandbox/Views/Shared/Breadcrumbs.cshtml:
--------------------------------------------------------------------------------
1 | @using EPiServer.Core
2 | @using EPiServer.Web
3 |
4 | @*Helper used as template for a page in the bread crumb, recursively triggering the rendering of the next page*@
5 |
6 | @{
7 | HelperResult ItemTemplate(HtmlHelpers.MenuItem breadCrumbItem)
8 | {
9 | if (breadCrumbItem.Selected)
10 | {
11 | if (breadCrumbItem.Page.HasTemplate() && !breadCrumbItem.Page.ContentLink.CompareToIgnoreWorkID(Model.CurrentPage.ContentLink))
12 | {
13 |
14 | @Html.PageLink(breadCrumbItem.Page)
15 |
16 | }
17 | else
18 | {
19 |
20 | @breadCrumbItem.Page.PageName
21 |
22 | }
23 |
24 | if (!breadCrumbItem.Page.ContentLink.CompareToIgnoreWorkID(Model.CurrentPage.ContentLink))
25 | {
26 | @Html.MenuList(breadCrumbItem.Page.ContentLink, ItemTemplate)
27 | }
28 | }
29 |
30 | return new HelperResult(w => Task.CompletedTask);
31 | }
32 | }
33 |
34 |
35 |
36 |
37 | @Html.ContentLink(SiteDefinition.Current.StartPage)
38 |
39 | @Html.MenuList(SiteDefinition.Current.StartPage, ItemTemplate, requireVisibleInMenu: false, requirePageTemplate: false)
40 |
41 |
42 |
--------------------------------------------------------------------------------
/tests/DeveloperTools.AlloySandbox/Views/Shared/Components/ContactBlock/Default.cshtml:
--------------------------------------------------------------------------------
1 | @model ContactBlockModel
2 |
3 |
14 |
--------------------------------------------------------------------------------
/tests/DeveloperTools.AlloySandbox/Views/Shared/Components/ImageFile/Default.cshtml:
--------------------------------------------------------------------------------
1 | @model ImageViewModel
2 |
3 |
4 |
--------------------------------------------------------------------------------
/tests/DeveloperTools.AlloySandbox/Views/Shared/Components/PageListBlock/Default.cshtml:
--------------------------------------------------------------------------------
1 | @model PageListModel
2 | @{
3 | var isAside = ViewData["Aside"] != null && (bool)ViewData["Aside"];
4 | }
5 |
6 | @Html.FullRefreshPropertiesMetaData(new[] { "IncludePublishDate", "IncludeIntroduction", "Count", "SortOrder", "Root", "PageTypeFilter", "CategoryFilter", "Recursive" })
7 |
8 | x.Heading)>@Model.Heading
9 |
10 | @foreach (var page in Model.Pages)
11 | {
12 | if (isAside)
13 | {
14 |
15 |
@Html.PageLink(page)
16 |
17 | @if (Model.ShowPublishDate && page.StartPublish.HasValue)
18 | {
19 |
@Html.DisplayFor(x => page.StartPublish)
20 | }
21 |
22 | @if (Model.ShowIntroduction && page is SitePageData teaserPage)
23 | {
24 |
@teaserPage.TeaserText
25 | }
26 |
27 | }
28 | else
29 | {
30 |
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/tests/DeveloperTools.AlloySandbox/Views/Shared/Components/VideoFile/Default.cshtml:
--------------------------------------------------------------------------------
1 | @model VideoViewModel
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/tests/DeveloperTools.AlloySandbox/Views/Shared/DisplayTemplates/ContactPage.cshtml:
--------------------------------------------------------------------------------
1 | @model ContactPage
2 |
3 |
4 | @if(Model != null)
5 | {
6 | @Model.PageName
7 | @Html.Translate("/contact/phone")@: : @Model.Phone
8 | @Html.Translate("/contact/email")@: : @Html.DisplayFor(m => m.Email)
9 | }
10 | else
11 | {
12 | @Html.Translate("/contact/noneselected")
13 | }
14 |
15 |
--------------------------------------------------------------------------------
/tests/DeveloperTools.AlloySandbox/Views/Shared/DisplayTemplates/DateTime.cshtml:
--------------------------------------------------------------------------------
1 | @model DateTime
2 |
3 | @Model.ToString("d MMMM yyyy")
4 |
--------------------------------------------------------------------------------
/tests/DeveloperTools.AlloySandbox/Views/Shared/DisplayTemplates/Image.cshtml:
--------------------------------------------------------------------------------
1 | @model EPiServer.Core.ContentReference
2 |
3 | @if (Model != null)
4 | {
5 |
6 | }
7 |
--------------------------------------------------------------------------------
/tests/DeveloperTools.AlloySandbox/Views/Shared/DisplayTemplates/StringsCollection.cshtml:
--------------------------------------------------------------------------------
1 | @model IEnumerable
2 |
3 | @if(Model != null && Model.Any())
4 | {
5 |
6 | @foreach(var stringValue in Model)
7 | {
8 | @stringValue
9 | }
10 |
11 | }
12 |
--------------------------------------------------------------------------------
/tests/DeveloperTools.AlloySandbox/Views/Shared/DisplayTemplates/_ReadMe.txt:
--------------------------------------------------------------------------------
1 | The views in this folder are used when rendering properties using Html.DisplayFor and Html.PropertyFor.
2 | Display templates are selected based on the type name of the property and, optionally, by UIHint and DataType attributes added to the property.
3 | Note that the CMS adds a number of view templates which do not exist in this folder but found through a view engine which the CMS adds at start up.
4 | Those view templates can be found in \Application\Util\Views\Shared\DisplayTemplates. Views in this folder takes precedence meaning
5 | that we can override those templates, which is currently done for content areas.
--------------------------------------------------------------------------------
/tests/DeveloperTools.AlloySandbox/Views/Shared/Footer.cshtml:
--------------------------------------------------------------------------------
1 | @model IPageViewModel
2 |
3 |
4 |
5 |
6 |
7 |
@Html.Translate("/footer/products")
8 | @Html.PropertyFor(x => x.Layout.ProductPages)
9 |
10 |
11 |
@Html.Translate("/footer/company")
12 | @Html.PropertyFor(x => x.Layout.CompanyInformationPages)
13 |
14 |
15 |
@Html.Translate("/footer/news")
16 | @Html.PropertyFor(x => x.Layout.NewsPages)
17 |
18 |
19 |
@Html.Translate("/footer/customerzone")
20 | @Html.PropertyFor(x => x.Layout.CustomerZonePages)
21 |
22 |
23 | @if (Model.Layout.LoggedIn)
24 | {
25 | @Html.ContentLink(LocalizationService.Current.GetString("/footer/logout"), "Logout") }
26 | else
27 | {
28 | if (!Model.Layout.IsInReadonlyMode)
29 | {
30 | @Html.Translate("/footer/login")
31 | }
32 | }
33 |
34 |
35 |
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/tests/DeveloperTools.AlloySandbox/Views/Shared/Header.cshtml:
--------------------------------------------------------------------------------
1 | @using EPiServer.Web
2 |
3 | @model IPageViewModel
4 |
5 | @{
6 | HelperResult ItemTemplate(HtmlHelpers.MenuItem item)
7 | {
8 |
9 | @Html.PageLink(item.Page, null, new { @class = "nav-link" + (item.Selected ? " active" : null) })
10 |
11 | return new HelperResult(w => Task.CompletedTask);
12 | }
13 | }
14 |
15 |
34 |
35 | @*@{ using (Html.BeginForm(null, null, Html.ViewContext.IsInEditMode() ? FormMethod.Post : FormMethod.Get, new { @action = Model.Layout.SearchActionUrl }))
36 | {
37 |
38 |
39 | }
40 | }*@
41 |
--------------------------------------------------------------------------------
/tests/DeveloperTools.AlloySandbox/Views/Shared/Layouts/_LeftNavigation.cshtml:
--------------------------------------------------------------------------------
1 | @model IPageViewModel
2 |
3 | @{ Layout = "~/Views/Shared/Layouts/_Root.cshtml"; }
4 |
5 | @{await Html.RenderPartialAsync("Breadcrumbs", Model);}
6 |
7 |
8 |
9 | @{await Html.RenderPartialAsync("SubNavigation", Model);}
10 | @RenderSection("RelatedContent", false)
11 |
12 |
13 |
14 | @RenderBody()
15 |
16 |
17 |
--------------------------------------------------------------------------------
/tests/DeveloperTools.AlloySandbox/Views/Shared/Layouts/_Root.cshtml:
--------------------------------------------------------------------------------
1 | @using EPiServer.Framework.Web.Mvc.Html
2 |
3 | @model IPageViewModel
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 | @Model.CurrentPage.MetaTitle
12 | @if (Model.CurrentPage.MetaKeywords != null && Model.CurrentPage.MetaKeywords.Count > 0)
13 | {
14 |
15 | }
16 | @if (!string.IsNullOrWhiteSpace(Model.CurrentPage.MetaDescription))
17 | {
18 |
19 | }
20 | @Html.CanonicalLink()
21 | @Html.AlternateLinks()
22 |
23 |
24 |
25 |
26 | @Html.RequiredClientResources("Header")
27 |
28 |
29 |
30 | @if (Model.Layout.IsInReadonlyMode)
31 | {
32 | await Html.RenderPartialAsync("Readonly", Model);
33 | }
34 |
35 | @await Html.RenderEPiServerQuickNavigatorAsync()
36 |
37 | @Html.FullRefreshPropertiesMetaData()
38 |
39 | @if (!Model.Layout.HideHeader)
40 | {
41 | await Html.RenderPartialAsync("Header", Model);
42 | }
43 |
44 |
45 | @RenderBody()
46 |
47 |
48 | @if (!Model.Layout.HideFooter)
49 | {
50 | await Html.RenderPartialAsync("Footer", Model);
51 | }
52 |
53 | @Html.RequiredClientResources("Footer")
54 |
55 |
56 |
57 |
--------------------------------------------------------------------------------
/tests/DeveloperTools.AlloySandbox/Views/Shared/Layouts/_TwoPlusOne.cshtml:
--------------------------------------------------------------------------------
1 | @model IPageViewModel
2 |
3 | @{
4 | Layout = "~/Views/Shared/Layouts/_Root.cshtml";
5 | }
6 |
7 | @{await Html.RenderPartialAsync("Breadcrumbs");}
8 |
9 |
10 |
11 | @RenderBody()
12 |
13 |
14 |
15 | @if (IsSectionDefined("RelatedContent"))
16 | {
17 | @RenderSection("RelatedContent")
18 | }
19 | else if (Model.CurrentPage is IHasRelatedContent)
20 | {
21 | @Html.PropertyFor(x => ((IHasRelatedContent)x.CurrentPage).RelatedContentArea, new { Aside = true })
22 | }
23 |
24 |
25 |
--------------------------------------------------------------------------------
/tests/DeveloperTools.AlloySandbox/Views/Shared/PagePartials/ContactPage.cshtml:
--------------------------------------------------------------------------------
1 | @model ContactPage
2 |
3 |
12 |
--------------------------------------------------------------------------------
/tests/DeveloperTools.AlloySandbox/Views/Shared/PagePartials/Page.cshtml:
--------------------------------------------------------------------------------
1 | @using EPiServer.Core
2 |
3 | @model SitePageData
4 |
5 |
6 | @using (Html.BeginConditionalLink(Model.HasTemplate(), Url.PageLinkUrl(Model), Model.PageName))
7 | {
8 |
9 | @Html.DisplayFor(m => m.PageImage)
10 |
11 |
@Model.PageName
12 |
@Model.TeaserText
13 | }
14 |
15 |
--------------------------------------------------------------------------------
/tests/DeveloperTools.AlloySandbox/Views/Shared/PagePartials/PageWide.cshtml:
--------------------------------------------------------------------------------
1 | @using EPiServer.Core
2 |
3 | @model SitePageData
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 | @using (Html.BeginConditionalLink(Model.HasTemplate(), Url.PageLinkUrl(Model), Model.PageName))
12 | {
13 |
@Model.PageName
14 |
@Model.TeaserText
15 | }
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/tests/DeveloperTools.AlloySandbox/Views/Shared/Readonly.cshtml:
--------------------------------------------------------------------------------
1 | @model IPageViewModel
2 |
3 | @Html.Translate("/Readonly/Message")
4 |
--------------------------------------------------------------------------------
/tests/DeveloperTools.AlloySandbox/Views/Shared/SubNavigation.cshtml:
--------------------------------------------------------------------------------
1 | @model IPageViewModel
2 |
3 | @{
4 | HelperResult ItemTemplate(HtmlHelpers.MenuItem item)
5 | {
6 |
7 |
8 | @item.Page.PageName
9 |
10 | @if (item.Selected)
11 | {
12 |
13 | @Html.MenuList(item.Page.ContentLink, ItemTemplate)
14 |
15 | }
16 |
17 | return new HelperResult(w => Task.CompletedTask);
18 | }
19 | }
20 |
21 |
22 | @Html.MenuList(Model.Section.ContentLink, ItemTemplate)
23 |
24 |
--------------------------------------------------------------------------------
/tests/DeveloperTools.AlloySandbox/Views/Shared/TemplateError.cshtml:
--------------------------------------------------------------------------------
1 | @model ContentRenderingErrorModel
2 |
3 |
@string.Format(System.Globalization.CultureInfo.CurrentUICulture, LocalizationService.Current.GetString("/renderingerror/heading"), Model.ContentTypeName, Model.ContentName)
4 |
5 | @Model.Exception.Message
6 | @Model.Exception.StackTrace
7 |
8 |
9 |
--------------------------------------------------------------------------------
/tests/DeveloperTools.AlloySandbox/Views/Shared/TemplateHint.cshtml:
--------------------------------------------------------------------------------
1 | @model string
2 | @Model
3 |
--------------------------------------------------------------------------------
/tests/DeveloperTools.AlloySandbox/Views/StandardPage/Index.cshtml:
--------------------------------------------------------------------------------
1 | @model PageViewModel
2 |
3 | @{ Layout = "~/Views/Shared/Layouts/_LeftNavigation.cshtml"; }
4 |
5 |
6 |
x.CurrentPage.PageName)>@Model.CurrentPage.PageName
7 |
x.CurrentPage.MetaDescription)>@Model.CurrentPage.MetaDescription
8 |
9 | @Html.PropertyFor(m => m.CurrentPage.MainBody)
10 |
11 |
12 |
13 | @Html.PropertyFor(x => x.CurrentPage.MainContentArea, new { CssClass = "row" })
14 |
--------------------------------------------------------------------------------
/tests/DeveloperTools.AlloySandbox/Views/StartPage/Index.cshtml:
--------------------------------------------------------------------------------
1 | @model PageViewModel
2 |
3 |
4 | @Html.PropertyFor(x => x.CurrentPage.MainContentArea, new { CssClass = "row" })
5 |
6 |
--------------------------------------------------------------------------------
/tests/DeveloperTools.AlloySandbox/Views/_ReadMe.txt:
--------------------------------------------------------------------------------
1 | View locations in Alloy follows a number of conventions in addition to the default ASP.NET MVC conventions:
2 | * Views for pages and blocks with their own controllers use standard ASP.NET MVC conventions - /.cshtml
3 | * Page types which don't have their own controller are mapped to /Index.cshtml by DefaultPageController
4 | * Views for block types which don't have their own controllers are found in Shared/Blocks
5 | * Partial views for page types which don't have their own controllers for partial requests are found in Shared/PagePartials
--------------------------------------------------------------------------------
/tests/DeveloperTools.AlloySandbox/Views/_ViewImports.cshtml:
--------------------------------------------------------------------------------
1 | @using DeveloperTools.AlloySandbox
2 | @using DeveloperTools.AlloySandbox.Extensions
3 | @using DeveloperTools.AlloySandbox.Helpers
4 | @using DeveloperTools.AlloySandbox.Models.Blocks
5 | @using DeveloperTools.AlloySandbox.Models.Media
6 | @using DeveloperTools.AlloySandbox.Models.Pages
7 | @using DeveloperTools.AlloySandbox.Models.ViewModels
8 | @using EPiServer.Framework.Localization
9 | @using EPiServer.Web.Mvc.Html
10 | @using EPiServer.Shell.Web.Mvc.Html
11 | @using EPiServer.Core
12 | @using EPiServer.Web
13 | @using EPiServer.Web.Mvc
14 | @using EPiServer.Web.Routing
15 |
16 | @using Microsoft.AspNetCore.Mvc.Razor
17 | @using Microsoft.AspNetCore.Html
18 |
19 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
20 |
--------------------------------------------------------------------------------
/tests/DeveloperTools.AlloySandbox/Views/_viewstart.cshtml:
--------------------------------------------------------------------------------
1 | @{
2 | Layout = "~/Views/Shared/Layouts/_Root.cshtml";
3 | }
4 |
--------------------------------------------------------------------------------
/tests/DeveloperTools.AlloySandbox/appsettings.Development.json:
--------------------------------------------------------------------------------
1 | {
2 | "Logging": {
3 | "LogLevel": {
4 | "Default": "Information",
5 | "Microsoft": "Warning",
6 | "EPiServer": "Information",
7 | "Microsoft.Hosting.Lifetime": "Information"
8 | }
9 | },
10 | "ConnectionStrings": {
11 | "EPiServerDB": "Server=.\\sqlexpress;Initial Catalog=DeveloperTools.AlloySandbox;Integrated Security=True;Connect Timeout=30;Encrypt=True;TrustServerCertificate=True;"
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/tests/DeveloperTools.AlloySandbox/appsettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "Logging": {
3 | "LogLevel": {
4 | "Default": "Warning",
5 | "Microsoft": "Warning",
6 | "EPiServer": "Warning",
7 | "Microsoft.Hosting.Lifetime": "Information"
8 | }
9 | },
10 | "AllowedHosts": "*",
11 | "EPiServer": {
12 | "Cms": {
13 | "MappedRoles": {
14 | "Items": {
15 | "CmsEditors": {
16 | "MappedRoles": [ "WebEditors", "WebAdmins" ]
17 | },
18 | "CmsAdmins": {
19 | "MappedRoles": [ "WebAdmins" ]
20 | }
21 | }
22 | }
23 | },
24 | "DeveloperToolsOptions": {}
25 | }
26 | }
--------------------------------------------------------------------------------
/tests/DeveloperTools.AlloySandbox/compilerconfig.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "inputFile": "Assets/scss/style.scss",
4 | "outputFile": "wwwroot/css/style.css"
5 | },
6 | {
7 | "inputFile": "Assets/scss/theme.scss",
8 | "outputFile": "wwwroot/css/theme.css"
9 | }
10 | ]
11 |
--------------------------------------------------------------------------------
/tests/DeveloperTools.AlloySandbox/compilerconfig.json.defaults:
--------------------------------------------------------------------------------
1 | {
2 | "compilers": {
3 | "less": {
4 | "autoPrefix": "",
5 | "cssComb": "none",
6 | "ieCompat": true,
7 | "strictMath": false,
8 | "strictUnits": false,
9 | "relativeUrls": true,
10 | "rootPath": "",
11 | "sourceMapRoot": "",
12 | "sourceMapBasePath": "",
13 | "sourceMap": false
14 | },
15 | "sass": {
16 | "autoPrefix": "",
17 | "includePath": "",
18 | "indentType": "space",
19 | "indentWidth": 2,
20 | "outputStyle": "nested",
21 | "Precision": 5,
22 | "relativeUrls": true,
23 | "sourceMapRoot": "",
24 | "lineFeed": "",
25 | "sourceMap": false
26 | },
27 | "stylus": {
28 | "sourceMap": false
29 | },
30 | "babel": {
31 | "sourceMap": false
32 | },
33 | "coffeescript": {
34 | "bare": false,
35 | "runtimeMode": "node",
36 | "sourceMap": false
37 | },
38 | "handlebars": {
39 | "root": "",
40 | "noBOM": false,
41 | "name": "",
42 | "namespace": "",
43 | "knownHelpersOnly": false,
44 | "forcePartial": false,
45 | "knownHelpers": [],
46 | "commonjs": "",
47 | "amd": false,
48 | "sourceMap": false
49 | }
50 | },
51 | "minifiers": {
52 | "css": {
53 | "enabled": true,
54 | "termSemicolons": true,
55 | "gzip": false
56 | },
57 | "javascript": {
58 | "enabled": true,
59 | "termSemicolons": true,
60 | "gzip": false
61 | }
62 | }
63 | }
--------------------------------------------------------------------------------
/tests/DeveloperTools.AlloySandbox/nuget.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/tests/DeveloperTools.AlloySandbox/wwwroot/css/images/ui-bg_flat_0_aaaaaa_40x100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/episerver/DeveloperTools/9bcc6ec6c7be5f5f5e98debd7344913bf0739449/tests/DeveloperTools.AlloySandbox/wwwroot/css/images/ui-bg_flat_0_aaaaaa_40x100.png
--------------------------------------------------------------------------------
/tests/DeveloperTools.AlloySandbox/wwwroot/css/images/ui-bg_flat_75_ffffff_40x100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/episerver/DeveloperTools/9bcc6ec6c7be5f5f5e98debd7344913bf0739449/tests/DeveloperTools.AlloySandbox/wwwroot/css/images/ui-bg_flat_75_ffffff_40x100.png
--------------------------------------------------------------------------------
/tests/DeveloperTools.AlloySandbox/wwwroot/css/images/ui-bg_glass_55_fbf9ee_1x400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/episerver/DeveloperTools/9bcc6ec6c7be5f5f5e98debd7344913bf0739449/tests/DeveloperTools.AlloySandbox/wwwroot/css/images/ui-bg_glass_55_fbf9ee_1x400.png
--------------------------------------------------------------------------------
/tests/DeveloperTools.AlloySandbox/wwwroot/css/images/ui-bg_glass_65_ffffff_1x400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/episerver/DeveloperTools/9bcc6ec6c7be5f5f5e98debd7344913bf0739449/tests/DeveloperTools.AlloySandbox/wwwroot/css/images/ui-bg_glass_65_ffffff_1x400.png
--------------------------------------------------------------------------------
/tests/DeveloperTools.AlloySandbox/wwwroot/css/images/ui-bg_glass_75_dadada_1x400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/episerver/DeveloperTools/9bcc6ec6c7be5f5f5e98debd7344913bf0739449/tests/DeveloperTools.AlloySandbox/wwwroot/css/images/ui-bg_glass_75_dadada_1x400.png
--------------------------------------------------------------------------------
/tests/DeveloperTools.AlloySandbox/wwwroot/css/images/ui-bg_glass_75_e6e6e6_1x400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/episerver/DeveloperTools/9bcc6ec6c7be5f5f5e98debd7344913bf0739449/tests/DeveloperTools.AlloySandbox/wwwroot/css/images/ui-bg_glass_75_e6e6e6_1x400.png
--------------------------------------------------------------------------------
/tests/DeveloperTools.AlloySandbox/wwwroot/css/images/ui-bg_highlight-soft_75_cccccc_1x100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/episerver/DeveloperTools/9bcc6ec6c7be5f5f5e98debd7344913bf0739449/tests/DeveloperTools.AlloySandbox/wwwroot/css/images/ui-bg_highlight-soft_75_cccccc_1x100.png
--------------------------------------------------------------------------------
/tests/DeveloperTools.AlloySandbox/wwwroot/css/images/ui-icons_222222_256x240.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/episerver/DeveloperTools/9bcc6ec6c7be5f5f5e98debd7344913bf0739449/tests/DeveloperTools.AlloySandbox/wwwroot/css/images/ui-icons_222222_256x240.png
--------------------------------------------------------------------------------
/tests/DeveloperTools.AlloySandbox/wwwroot/css/images/ui-icons_2e83ff_256x240.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/episerver/DeveloperTools/9bcc6ec6c7be5f5f5e98debd7344913bf0739449/tests/DeveloperTools.AlloySandbox/wwwroot/css/images/ui-icons_2e83ff_256x240.png
--------------------------------------------------------------------------------
/tests/DeveloperTools.AlloySandbox/wwwroot/css/images/ui-icons_454545_256x240.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/episerver/DeveloperTools/9bcc6ec6c7be5f5f5e98debd7344913bf0739449/tests/DeveloperTools.AlloySandbox/wwwroot/css/images/ui-icons_454545_256x240.png
--------------------------------------------------------------------------------
/tests/DeveloperTools.AlloySandbox/wwwroot/css/images/ui-icons_888888_256x240.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/episerver/DeveloperTools/9bcc6ec6c7be5f5f5e98debd7344913bf0739449/tests/DeveloperTools.AlloySandbox/wwwroot/css/images/ui-icons_888888_256x240.png
--------------------------------------------------------------------------------
/tests/DeveloperTools.AlloySandbox/wwwroot/css/images/ui-icons_cd0a0a_256x240.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/episerver/DeveloperTools/9bcc6ec6c7be5f5f5e98debd7344913bf0739449/tests/DeveloperTools.AlloySandbox/wwwroot/css/images/ui-icons_cd0a0a_256x240.png
--------------------------------------------------------------------------------
/tests/DeveloperTools.AlloySandbox/wwwroot/css/style.css:
--------------------------------------------------------------------------------
1 | @import url("https://cdn.jsdelivr.net/npm/bootstrap-icons@1.5.0/font/bootstrap-icons.css");
2 | img, video {
3 | max-width: 100%; }
4 |
5 | .teaserblock > div {
6 | height: 100%; }
7 |
8 | header {
9 | padding: 1.5rem;
10 | margin-bottom: 1.5rem; }
11 | header .logo {
12 | padding-right: 1rem; }
13 | header .logo img {
14 | max-height: 100px; }
15 |
16 | footer {
17 | padding: 1.5rem;
18 | margin-top: 1.5rem; }
19 |
20 | .content {
21 | margin-bottom: 1.5rem; }
22 |
23 | .block {
24 | margin-bottom: 1.5rem; }
25 |
26 | .jumbotronblock {
27 | color: #fff;
28 | position: relative; }
29 | .jumbotronblock > div {
30 | background-size: cover;
31 | background-position: 50% 50%;
32 | position: relative; }
33 | .jumbotronblock .jumbotron-dimmer {
34 | background: #000;
35 | position: absolute;
36 | width: 100%;
37 | height: 100%;
38 | top: 0;
39 | left: 0;
40 | opacity: .4; }
41 | .jumbotronblock .jumbotron-inner {
42 | position: relative; }
43 |
--------------------------------------------------------------------------------
/tests/DeveloperTools.AlloySandbox/wwwroot/css/style.min.css:
--------------------------------------------------------------------------------
1 | @import url("https://cdn.jsdelivr.net/npm/bootstrap-icons@1.5.0/font/bootstrap-icons.css");img,video{max-width:100%;}.teaserblock>div{height:100%;}header{padding:1.5rem;margin-bottom:1.5rem;}header .logo{padding-right:1rem;}header .logo img{max-height:100px;}footer{padding:1.5rem;margin-top:1.5rem;}.content{margin-bottom:1.5rem;}.block{margin-bottom:1.5rem;}.jumbotronblock{color:#fff;position:relative;}.jumbotronblock>div{background-size:cover;background-position:50% 50%;position:relative;}.jumbotronblock .jumbotron-dimmer{background:#000;position:absolute;width:100%;height:100%;top:0;left:0;opacity:.4;}.jumbotronblock .jumbotron-inner{position:relative;}
--------------------------------------------------------------------------------
/tests/DeveloperTools.AlloySandbox/wwwroot/favicon.ico:
--------------------------------------------------------------------------------
1 | h ( ... >>> Ɋ9 777 000 $$$ 666 !!! ###
--------------------------------------------------------------------------------
/tests/DeveloperTools.AlloySandbox/wwwroot/gfx/logotype.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/episerver/DeveloperTools/9bcc6ec6c7be5f5f5e98debd7344913bf0739449/tests/DeveloperTools.AlloySandbox/wwwroot/gfx/logotype.png
--------------------------------------------------------------------------------
/tests/DeveloperTools.AlloySandbox/wwwroot/gfx/page-type-thumbnail-article.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/episerver/DeveloperTools/9bcc6ec6c7be5f5f5e98debd7344913bf0739449/tests/DeveloperTools.AlloySandbox/wwwroot/gfx/page-type-thumbnail-article.png
--------------------------------------------------------------------------------
/tests/DeveloperTools.AlloySandbox/wwwroot/gfx/page-type-thumbnail-contact.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/episerver/DeveloperTools/9bcc6ec6c7be5f5f5e98debd7344913bf0739449/tests/DeveloperTools.AlloySandbox/wwwroot/gfx/page-type-thumbnail-contact.png
--------------------------------------------------------------------------------
/tests/DeveloperTools.AlloySandbox/wwwroot/gfx/page-type-thumbnail-product.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/episerver/DeveloperTools/9bcc6ec6c7be5f5f5e98debd7344913bf0739449/tests/DeveloperTools.AlloySandbox/wwwroot/gfx/page-type-thumbnail-product.png
--------------------------------------------------------------------------------
/tests/DeveloperTools.AlloySandbox/wwwroot/gfx/page-type-thumbnail-standard.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/episerver/DeveloperTools/9bcc6ec6c7be5f5f5e98debd7344913bf0739449/tests/DeveloperTools.AlloySandbox/wwwroot/gfx/page-type-thumbnail-standard.png
--------------------------------------------------------------------------------
/tests/DeveloperTools.AlloySandbox/wwwroot/gfx/page-type-thumbnail.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/episerver/DeveloperTools/9bcc6ec6c7be5f5f5e98debd7344913bf0739449/tests/DeveloperTools.AlloySandbox/wwwroot/gfx/page-type-thumbnail.png
--------------------------------------------------------------------------------
/tests/DeveloperTools.Tests/DeveloperTools.Tests.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | net6.0
5 | false
6 |
7 |
8 |
9 |
10 |
11 |
12 | all
13 | runtime; build; native; contentfiles; analyzers; buildtransitive
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/tests/DeveloperTools.Tests/ListTests.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.Linq;
3 | using EPiServer.DeveloperTools.Features.ModuleDependencies;
4 | using Xunit;
5 |
6 | namespace DeveloperTools.Tests;
7 |
8 | public class ListTests
9 | {
10 | [Fact]
11 | public void UnionTest()
12 | {
13 | var l1 = new List { new() { Id = "KEY1" }, new() { Id = "KEY2" } };
14 | var l2 = new List { new() { Id = "KEY2" }, new() { Id = "KEY3" } };
15 |
16 | var result = l1.Union(l2).DistinctBy(_ => _.Id);
17 |
18 | Assert.Equal(3, result.Count());
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/tests/DeveloperTools.Tests/app.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/tests/DeveloperTools.Tests/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------