Charts, login, manage queue, styling

This commit is contained in:
2016-12-08 12:15:47 -05:00
parent 6fd7e46f5d
commit a29de1ecb8
30 changed files with 808 additions and 90 deletions
+15 -9
View File
@@ -1,4 +1,4 @@
@inherits Umbraco.Web.Mvc.UmbracoTemplatePage
@inherits UmbracoTemplatePage
@{ var home = CurrentPage.Site(); }
@if (home.Children.Any())
@@ -9,10 +9,10 @@
@* Add in level for a CSS hook *@
<ul class="level-@naviLevel">
@* For each child page under the home node *@
@foreach (var childPage in home.Children)
{
if (childPage.Children.Any())
{
@foreach (var childPage in home.Children.Where("Visible"))
{
if (childPage.Children.Where("Visible").Any())
{
<li class="has-child @(childPage.IsAncestorOrSelf(CurrentPage) ? "selected" : null)">
@if(childPage.DocumentTypeAlias == "LandingPage")
{
@@ -36,20 +36,26 @@
@helper childPages(dynamic pages)
{
@* Ensure that we have a collection of pages *@
if (pages.Any())
if (pages.Where("Visible").Any())
{
@* Get the first page in pages and get the level *@
var naviLevel = pages.First().Level;
@* Add in level for a CSS hook *@
<ul class="sublevel level-@(naviLevel)">
@foreach (var page in pages)
@foreach (var page in pages.Where("Visible"))
{
if (library.IsProtected(page.id, page.path)
&& !library.HasAccess(page.id, page.path))
{
continue;
}
<li>
<a href="@page.Url">@page.Name</a>
@* if the current page has any children *@
@if (page.Children.Any())
@if (page.Children.Where("Visible").Any())
{
@* Call our helper to display the children *@
@childPages(page.Children)
@@ -58,4 +64,4 @@
}
</ul>
}
}
}