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
+13 -18
View File
@@ -1,11 +1,20 @@
@inherits Umbraco.Web.Mvc.UmbracoTemplatePage
@inherits UmbracoTemplatePage
@{
var home = CurrentPage.Site();
}
@if (home.Children.Where("Visible").Any())
<div class="col-xs-6 col-sm-3">
<strong>User</strong>
<ul>
<li>
@Html.Partial("LoginStatus")
</li>
</ul>
</div>
@*@if (home.Children.Where("Visible").Any())
{
@* For each child page under the home node, where the property umbracoNaviHide is not True *@
foreach (var childPage in home.Children.Where("Visible"))
{
<div class="col-xs-6 col-sm-3">
@@ -16,22 +25,8 @@
}
</div>
}
}
}*@
<div class="col-xs-6 col-sm-3">
<strong>Find us</strong>
<ul>
<li>
<a href="https://twitter.com/umbracoproject" target="_blank">Twitter</a>
</li>
<li>
<a href="https://www.facebook.com/Umbraco" target="_blank">Facebook</a>
</li>
<li>
<a href="http://umbraco.com/?utm_source=core&utm_medium=starterkit&utm_content=topic-link&utm_campaign=fanoe" target="_blank">Umbraco.com</a>
</li>
</ul>
</div>
@helper childPages(dynamic pages)
{
+35
View File
@@ -0,0 +1,35 @@
@inherits UmbracoTemplatePage
@using System.Web.Mvc.Html
@using ClientDependency.Core.Mvc
@using Umbraco.Web
@using Umbraco.Web.Models
@using Umbraco.Web.Controllers
@{
var loginStatusModel = Members.GetCurrentLoginStatus();
Html.EnableClientValidation();
Html.EnableUnobtrusiveJavaScript();
Html.RequiresJs("/umbraco_client/ui/jquery.js");
Html.RequiresJs("/umbraco_client/Application/JQuery/jquery.validate.min.js");
Html.RequiresJs("/umbraco_client/Application/JQuery/jquery.validate.unobtrusive.min.js");
var logoutModel = new PostRedirectModel { RedirectUrl = "/" };
}
@if (loginStatusModel.IsLoggedIn)
{
<div class="row">
<div class="">@loginStatusModel.Name</div>
<div class="">
@using (Html.BeginUmbracoForm<UmbLoginStatusController>("HandleLogout"))
{
<button href="#" class="btn btn-primary btn-xs">Logout</button>
@Html.HiddenFor(m => logoutModel.RedirectUrl)
}
</div>
</div>
}
else
{
<a href="/membership/login">Login</a>
}
+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>
}
}
}