Charts, login, manage queue, styling
This commit is contained in:
@@ -8,20 +8,24 @@
|
||||
<section class="light blogarchive equalizer">
|
||||
<div class="container">
|
||||
|
||||
<div class="row">
|
||||
@foreach(var post in CurrentPage.Children)
|
||||
{
|
||||
<div class="col-sm-6">
|
||||
<div class="content equal">
|
||||
<a href="@post.Url">
|
||||
<div class="date">@post.CreateDate.ToLongDateString()</div>
|
||||
<h2>@post.Name</h2>
|
||||
<p>@Umbraco.Truncate(post.Introduction, 240, true)</p>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
<div class="row">
|
||||
@if (!CurrentPage.Children.Any())
|
||||
{
|
||||
<div>No news items to display.</div>
|
||||
}
|
||||
@foreach (var post in CurrentPage.Children)
|
||||
{
|
||||
<div class="col-sm-6">
|
||||
<div class="content equal">
|
||||
<a href="@post.Url">
|
||||
<div class="date">@post.CreateDate.ToLongDateString()</div>
|
||||
<h2>@post.Name</h2>
|
||||
<p>@Umbraco.Truncate(post.Introduction, 240, true)</p>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
@model string
|
||||
|
||||
<p><strong>There was an issue generating a chart for the selected data.</strong></p>
|
||||
<p><strong>Details:</strong> @Model</p>
|
||||
@@ -0,0 +1,20 @@
|
||||
@model LeafWeb.WebCms.Models.ChartViewModel
|
||||
@{
|
||||
var selectText = "Select CurveId";
|
||||
}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-4">
|
||||
<div>Identifier: <strong>@Model.LeafInputIdentifier</strong>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<span>CurveId:</span>
|
||||
@Html.DropDownList("CurveId", new SelectList(Model.AvailableCurveId, Model.CurveId), selectText)
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<img id="chart"/>
|
||||
<span class="help-block">
|
||||
<span id="chart-error"></span>
|
||||
</span>
|
||||
@@ -4,30 +4,4 @@
|
||||
}
|
||||
<div class="home">
|
||||
@CurrentPage.GetGridHtml("content", "fanoe")
|
||||
</div>
|
||||
@{
|
||||
var blogSelection = CurrentPage.Site().FirstChild("BlogPostRepository").Children("BlogPost").Where("Visible");
|
||||
}
|
||||
<div role="content">
|
||||
|
||||
<section class="light blogarchive equalizer">
|
||||
<div class="container">
|
||||
|
||||
<div class="row">
|
||||
@foreach(var post in blogSelection)
|
||||
{
|
||||
<div class="col-sm-6">
|
||||
<div class="content equal">
|
||||
<a href="@post.Url">
|
||||
<div class="date">@post.CreateDate.ToLongDateString()</div>
|
||||
<h2>@post.Name</h2>
|
||||
<p>@Umbraco.Truncate(post.Introduction, 240, true)</p>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
</div>
|
||||
@@ -21,7 +21,7 @@
|
||||
<span class="fileupload-process"></span>
|
||||
</div>
|
||||
<div class="col-lg-6 pull-right">
|
||||
<span class="pull-right"> Select all <input type="checkbox" class="toggle"></span>
|
||||
<span class="pull-right" style="margin-left: 10px;"> Select all <input type="checkbox" class="toggle"></span>
|
||||
<button type="button" class="btn btn-default delete pull-right">
|
||||
<i class="glyphicon glyphicon-trash"></i>
|
||||
<span>Delete</span>
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
@inherits Umbraco.Web.Macros.PartialViewMacroPage
|
||||
@{
|
||||
var link = Model.MacroParameters["Link"];
|
||||
var title = Model.MacroParameters["Title"];
|
||||
var description = Model.MacroParameters["Description"];
|
||||
var glyphicon = Model.MacroParameters["Glyphicon"];
|
||||
}
|
||||
<a class="banner-link" href="@link">
|
||||
<h2>@title <span class="glyphicon @glyphicon"></span></h2>
|
||||
<p>@description</p>
|
||||
</a>
|
||||
@@ -0,0 +1,28 @@
|
||||
@inherits Umbraco.Web.Macros.PartialViewMacroPage
|
||||
@{
|
||||
var blogSelection = CurrentPage.Site().FirstChild("BlogPostRepository").Children("BlogPost").Where("Visible");
|
||||
}
|
||||
<div role="content">
|
||||
<section class="light blogarchive equalizer">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
@if (!blogSelection.Any())
|
||||
{
|
||||
<div>No news items to display.</div>
|
||||
}
|
||||
@foreach (var post in blogSelection)
|
||||
{
|
||||
<div class="col-sm-6">
|
||||
<div class="content equal">
|
||||
<a href="@post.Url">
|
||||
<div class="date">@post.CreateDate.ToLongDateString()</div>
|
||||
<h2>@post.Name</h2>
|
||||
<p>@Umbraco.Truncate(post.Introduction, 240, true)</p>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
@@ -0,0 +1,5 @@
|
||||
@inherits Umbraco.Web.Macros.PartialViewMacroPage
|
||||
|
||||
@{
|
||||
Html.RenderAction("Index", "Chart");
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
@inherits Umbraco.Web.Macros.PartialViewMacroPage
|
||||
@using System.Web.Mvc.Html
|
||||
@using ClientDependency.Core.Mvc
|
||||
@using Umbraco.Web
|
||||
@using Umbraco.Web.Models
|
||||
@using Umbraco.Web.Controllers
|
||||
@{
|
||||
var loginModel = new LoginModel { RedirectUrl = "/leaf-data/manage-queue/" };
|
||||
|
||||
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");
|
||||
}
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-7 well">
|
||||
@using (Html.BeginUmbracoForm<UmbLoginController>("HandleLogin"))
|
||||
{
|
||||
<fieldset>
|
||||
@Html.ValidationSummary("loginModel", true)
|
||||
<div class="form-group">
|
||||
@Html.LabelFor(m => loginModel.Username, new { @class = "control-label" })
|
||||
@Html.TextBoxFor(m => loginModel.Username)
|
||||
@Html.ValidationMessageFor(m => loginModel.Username)
|
||||
</div>
|
||||
<div class="form-group">
|
||||
@Html.LabelFor(m => loginModel.Password, new { @class = "control-label" })
|
||||
@Html.PasswordFor(m => loginModel.Password)
|
||||
@Html.ValidationMessageFor(m => loginModel.Password)
|
||||
</div>
|
||||
|
||||
<button class="btn btn-primary pull-right">Login</button>
|
||||
@Html.HiddenFor(m => loginModel.RedirectUrl)
|
||||
</fieldset>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,5 @@
|
||||
@inherits Umbraco.Web.Macros.PartialViewMacroPage
|
||||
|
||||
@{
|
||||
Html.RenderAction("Index", "Queue");
|
||||
}
|
||||
@@ -1,7 +1,18 @@
|
||||
@inherits UmbracoTemplatePage
|
||||
@using ClientDependency.Core.Mvc
|
||||
@inherits UmbracoTemplatePage
|
||||
@{
|
||||
Layout = null;
|
||||
var home = CurrentPage.Site();
|
||||
var home = CurrentPage.Site();
|
||||
if (TempData.ContainsKey("LoginSuccess") && (bool)TempData["LoginSuccess"])
|
||||
{
|
||||
TempData["StatusMessage"] = "Welcome " + Members.GetCurrentLoginStatus().Name;
|
||||
TempData["StatusMessage-Type"] = "alert-success";
|
||||
}
|
||||
else if (TempData.ContainsKey("LogoutSuccess") && (bool)TempData["LogoutSuccess"])
|
||||
{
|
||||
TempData["StatusMessage"] = "Logout sucessful";
|
||||
TempData["StatusMessage-Type"] = "alert-success";
|
||||
}
|
||||
}
|
||||
|
||||
<!DOCTYPE html>
|
||||
@@ -23,7 +34,8 @@
|
||||
<!-- CSS -->
|
||||
<link href="~/Content/bootstrap.min.css" type="text/css" rel="stylesheet" />
|
||||
<link href="~/Content/site.css" type="text/css" rel="stylesheet" />
|
||||
<link href="~/Content/style.css" type="text/css" rel="stylesheet" />
|
||||
<link href="~/Content/style.css" type="text/css" rel="stylesheet"/>
|
||||
@Html.RenderJsHere()
|
||||
@RenderSection("Styles", false)
|
||||
|
||||
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
|
||||
@@ -66,7 +78,7 @@
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
|
||||
@*@{ Html.RenderPartial("BottomNavigation"); }*@
|
||||
@{ Html.RenderPartial("BottomNavigation"); }
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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>
|
||||
}
|
||||
@@ -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>
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
@model LeafWeb.WebCms.Models.LeafInputCreate
|
||||
|
||||
@Html.DisplayForModel()
|
||||
@@ -0,0 +1,10 @@
|
||||
@{
|
||||
ViewBag.Title = "Not Found";
|
||||
}
|
||||
|
||||
<h1>
|
||||
@ViewBag.Title
|
||||
</h1>
|
||||
|
||||
<p>The given download link was not found. Please contact administrator, referencing the following url:</p>
|
||||
<code>@Html.Raw(Request.Url)</code>
|
||||
@@ -0,0 +1,49 @@
|
||||
@model IEnumerable<LeafWeb.WebCms.Models.ResultStatusViewModel>
|
||||
|
||||
@{
|
||||
var grid = new WebGrid(Model, rowsPerPage: 45);
|
||||
}
|
||||
|
||||
@grid.GetHtml(columns:
|
||||
grid.Columns(
|
||||
grid.Column("LeafInputIdentifier", "Identifier"),
|
||||
grid.Column("LeafInputSiteId", "Site Id"),
|
||||
grid.Column("LeafInputName", "Submitted By"),
|
||||
grid.Column("CurrentStatus", "Status", item => statusFormat(item)),
|
||||
grid.Column("Chart", "Chart", item => chartLink(item)),
|
||||
grid.Column("Total Results: " + Model.Count(), format: item => btns(item))),
|
||||
htmlAttributes: new { @class = "table table-striped table-bordered table-hover table-condensed" }
|
||||
)
|
||||
|
||||
@helper btns(dynamic item)
|
||||
{
|
||||
<div class="btn-group" role="group">
|
||||
@Html.ActionLink("Details", "Details", new { id = item.LeafInputId }, new { @class = "btn btn-default btn-xs", role = "button" })
|
||||
<div class="btn-group" role="group">
|
||||
<button type="button" class="btn btn-default btn-xs dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
Download
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
<li>@Html.ActionLink("ToUser", "DownloadOutputToUser", new { id = item.LeafInputId })</li>
|
||||
<li>@Html.ActionLink("Input", "DownloadInput", new { id = item.LeafInputId })</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@Html.ActionLink("Delete", "Delete", new { id = item.LeafInputId }, new { @class = "btn btn-default btn-xs", role = "button" })
|
||||
</div>
|
||||
}
|
||||
|
||||
|
||||
@helper chartLink(dynamic item)
|
||||
{
|
||||
if (item.HasLeafChart)
|
||||
{
|
||||
<a href="@UmbracoContext.Current.UrlProvider.GetUrl(1100)?leafInputId=@item.LeafInputId">Chart</a>
|
||||
}
|
||||
}
|
||||
|
||||
@helper statusFormat(dynamic item)
|
||||
{
|
||||
<span class="status status-@item.CurrentStatus.ToLower()">@item.CurrentStatus</span>
|
||||
}
|
||||
@@ -9,11 +9,21 @@
|
||||
grid.Column("LeafInputIdentifier", "Identifier"),
|
||||
grid.Column("LeafInputSiteId", "Site Id"),
|
||||
grid.Column("LeafInputName", "Submitted By"),
|
||||
grid.Column("CurrentStatus", "Status"),
|
||||
grid.Column("Chart", "Chart", item =>
|
||||
item.HasLeafChart
|
||||
? Html.ActionLink("Chart", "Index", "Chart", new {leafInputId = item.LeafInputId}, new {})
|
||||
: Html.Raw(""))
|
||||
grid.Column("CurrentStatus", "Status", item => statusFormat(item)),
|
||||
grid.Column("Chart", "Chart", item => chartLink(item))
|
||||
),
|
||||
htmlAttributes: new { @class = "table table-striped table-bordered table-hover table-condensed" }
|
||||
)
|
||||
|
||||
@helper chartLink(dynamic item)
|
||||
{
|
||||
if (item.HasLeafChart)
|
||||
{
|
||||
<a href="@UmbracoContext.Current.UrlProvider.GetUrl(1100)?leafInputId=@item.LeafInputId">Chart</a>
|
||||
}
|
||||
}
|
||||
|
||||
@helper statusFormat(dynamic item)
|
||||
{
|
||||
<span class="status status-@item.CurrentStatus.ToLower()">@item.CurrentStatus</span>
|
||||
}
|
||||
@@ -11,4 +11,4 @@ else if (ViewBag.StatusMessage != null)
|
||||
<button type="button" class="close" data-dismiss="alert">×</button>
|
||||
@ViewBag.StatusMessage
|
||||
</p>
|
||||
}
|
||||
}
|
||||
@@ -3,6 +3,7 @@
|
||||
Layout = "Master.cshtml";
|
||||
|
||||
var leafInputBackload = GetBoolProperty(Model.Content.Properties, "leafInputBackload");
|
||||
var chart = GetBoolProperty(Model.Content.Properties, "chart");
|
||||
}
|
||||
|
||||
@section Styles
|
||||
@@ -10,7 +11,9 @@
|
||||
@if (leafInputBackload) { @Styles.Render("~/backload/blueimp/bootstrap/BasicPlusUI/css") }
|
||||
}
|
||||
|
||||
@CurrentPage.GetGridHtml("content", "fanoe")
|
||||
<div role="content">
|
||||
@CurrentPage.GetGridHtml("content", "fanoe")
|
||||
</div>
|
||||
|
||||
@section Scripts
|
||||
{
|
||||
@@ -18,6 +21,7 @@
|
||||
@if (leafInputBackload) { @Scripts.Render("~/backload/blueimp/bootstrap/BasicPlusUI") }
|
||||
<!-- jQuery autocomplete* -->
|
||||
@if (leafInputBackload) { <script src="~/scripts/jquery.autocomplete.min.js"></script> }
|
||||
@if (chart) { <script src="~/scripts/Chart.js"></script> }
|
||||
|
||||
@if (leafInputBackload)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user