Details improvements

This commit is contained in:
2017-01-13 09:15:15 -05:00
parent 9d0524dd72
commit 3ee9c11666
75 changed files with 21884 additions and 112 deletions
+1 -1
View File
@@ -53,7 +53,7 @@
<table role="presentation" class="table table-striped panel panel-default"><tbody class="files"></tbody></table>
</form>
@using (Html.BeginUmbracoForm<LeafInputController>("Submit", null, FormMethod.Post))
@using (Html.BeginUmbracoForm<LeafInputController>("Submit", null, new {id = "create"}))
{
@Html.EditorFor(m => m.PhotosynthesisType)
@Html.EditorFor(m => m.Identifier)
+3 -1
View File
@@ -15,12 +15,14 @@
}
Html.RequiresCss("~/Content/bootstrap_leafweb.css");
Html.RequiresCss("~/Content/font-awesome.css");
Html.RequiresCss("~/Content/themes/base/jquery-ui.css");
Html.RequiresCss("~/Content/site.css");
Html.RequiresCss("~/Content/style.css");
Html.RequiresCss("~/css/rte.css");
Html.RequiresJs("~/scripts/jquery-1.12.4.js", 0);
Html.RequiresJs("~/scripts/bootstrap.js", 0);
Html.RequiresJs("~/scripts/site.js");
Html.RequiresJs("~/scripts/jquery-ui-1.12.1.js", 1);
Html.RequiresJs("~/scripts/site.js", 2);
}
<!DOCTYPE html>
+9 -4
View File
@@ -50,13 +50,18 @@
{
continue;
}
<li>
<a href="@page.Url">@page.Name</a>
<a href="@page.Url">
@page.Name
@if (library.IsProtected(page.id, page.path)) {
<i class="fa fa-minus-circle fa-fw text-danger" aria-hidden="true"></i>
}
</a>
@* if the current page has any children *@
@if (page.Children.Where("Visible").Any())
{
{
@* Call our helper to display the children *@
@childPages(page.Children)
}
+52 -30
View File
@@ -1,35 +1,57 @@
@model LeafWeb.WebCms.Models.LeafInputDetails
@using LeafWeb.WebCms.Controllers
@model LeafInputDetails
<div class="btn-group" role="group">
@Html.Partial("DisplayTemplates/_ChartButton", Model.LeafInputId, new ViewDataDictionary { { "Disabled", !Model.HasLeafChart } })
<div class="row">
<div class="col-sm-3 divider-right detail-actions">
<h3>Actions</h3>
@Html.Partial("DisplayTemplates/_ChartButton", Model.LeafInputId, new ViewDataDictionary { { "Disabled", !Model.HasLeafChart } })
<a href="@Url.Action("DownloadInput", "Queue", new {id = Model.LeafInputId})"
class="btn btn-default" role="button">
<span class="glyphicon glyphicon-download"></span> Download Input
</a>
<a href="@Url.Action("DownloadOutputToUser", "Queue", new {id = Model.LeafInputId})"
class="btn btn-default@{if (!Model.IsComplete)
{<text> disabled</text>}}" role="button">
<span class="glyphicon glyphicon-download"></span> Download ToUser
</a>
@using (Html.BeginUmbracoForm<QueueController>(
"SendUserDownloadLink", null, new { @class = "confirm", confirm_msg = "Confirm sending email to user" }))
{
<input type="hidden" name="id" value="@Model.LeafInputId" />
<button type="submit" class="btn btn-default" @{if (!Model.IsComplete) { <text> disabled="disabled" </text> }}>
<span class="glyphicon glyphicon-send"></span> Email User Download link
</button>
}
@using (Html.BeginUmbracoForm<QueueController>(
"SendUserChartLink", null, new { @class = "confirm", confirm_msg = "Confirm sending email to user" }))
{
<input type="hidden" name="id" value="@Model.LeafInputId" />
<button type="submit" class="btn btn-default" @{if (!Model.HasLeafChart) { <text> disabled="disabled" </text> }}>
<span class="glyphicon glyphicon-send"></span> Email User Chart link
</button>
}
@DeleteLink(Model.LeafInputId, Model.IsDeletable)
</div>
<div class="col-sm-9">
@Html.DisplayForModel()
</div>
<div class="btn-group" role="group">
<a href="@Url.Action("DownloadInput", "Queue", new {id = Model.LeafInputId})"
class="btn btn-default" role="button">
<span class="glyphicon glyphicon-download"></span> Download Input
</a>
<a href="@Url.Action("DownloadOutputToUser", "Queue", new {id = Model.LeafInputId})"
class="btn btn-default@{if (!Model.IsComplete){<text> disabled</text>}}" role="button">
<span class="glyphicon glyphicon-download"></span> Download ToUser
</a>
</div>
<div class="btn-group" role="group">
<a href="@Url.Action("SendUserDownloadLink", "Queue", new {id = Model.LeafInputId})"
class="btn btn-default@{if (!Model.IsComplete){<text> disabled</text>}}" role="button">
<span class="glyphicon glyphicon-send"></span> Send download link to User
</a>
<a href="@Url.Action("SendUserChartLink", "Queue", new {id = Model.LeafInputId})"
class="btn btn-default@{if (!Model.HasLeafChart){<text> disabled</text>}}" role="button">
<span class="glyphicon glyphicon-send"></span> Send chart link to User
</a>
</div>
<div class="btn-group" role="group">
<a href="@Url.Action("Delete", "Queue", new {id = Model.LeafInputId})"
class="btn btn-default@{if (!Model.IsDeletable){<text> disabled</text>}}" role="button">
<span class="glyphicon glyphicon-remove"></span> Delete
</a>
</div>
@Html.DisplayForModel()
@helper DeleteLink(int id, bool deletable)
{
using (Html.BeginUmbracoForm<QueueController>(
"Delete", null, new { @class = "confirm", confirm_msg = "Deletion cannot be undone!" }))
{
<input type="hidden" name="id" value="@id" />
<button type="submit" class="btn btn-default" @{if (!deletable) { <text> disabled="disabled" </text> }}>
<span class="glyphicon glyphicon-remove"></span> Delete
</button>
}
}
+3 -4
View File
@@ -1,4 +1,4 @@
@model IEnumerable<LeafWeb.WebCms.Models.ResultStatusViewModel>
@model IEnumerable<ResultStatusViewModel>
@{
var grid = new WebGrid(Model, rowsPerPage: 45);
@@ -78,10 +78,9 @@
}
@helper DeleteLink(dynamic item)
{
<a href="@Url.Action("Delete", "Queue", new {id = item.LeafInputId})">
<span class="glyphicon glyphicon-remove"></span> Delete
</a>
@Html.Partial("DisplayTemplates/_DeleteForm", (Tuple<int, bool>)Tuple.Create(item.LeafInputId, item.IsDeletable))
}
@helper DisableItem(bool disabled)
{
if (disabled) {<text>class="disabled"</text>}
+1 -1
View File
@@ -8,7 +8,7 @@
grid.Columns(
grid.Column("LeafInputIdentifier", "Identifier"),
grid.Column("LeafInputSiteId", "Site Id"),
grid.Column("LeafInputName", "Submitted By"),
//grid.Column("LeafInputName", "Submitted By"),
grid.Column("CurrentStatus", "Status", item => Html.Partial("DisplayTemplates/_LeafInputStatus", (string)item.CurrentStatus)),
grid.Column("", "", item => ChartLink(item))
),
@@ -10,8 +10,8 @@
@grid.GetHtml(columns:
grid.Columns(
grid.Column("DateTime", "Time"),
grid.Column("Status", format: item => Html.Partial("DisplayTemplates/_LeafInputStatus", (string)item.Status)),
grid.Column("DateTime", "Time"),
grid.Column("Description"),
grid.Column("Details")
),
@@ -1,6 +1,7 @@
@model int
@using LeafWeb.WebCms.Controllers
@model int
@{
var url = UmbracoContext.Current.UrlProvider.GetUrl(1100);
var url = UmbracoContext.Current.UrlProvider.GetUrl(LeafWebPageIds.Chart);
var disabled = ViewData.ContainsKey("Disabled") && (bool) ViewData["Disabled"];
var xs = ViewData.ContainsKey("xs") && (bool) ViewData["xs"];
}
@@ -1,6 +1,7 @@
@model int
@using LeafWeb.WebCms.Controllers
@model int
@{
var url = UmbracoContext.Current.UrlProvider.GetUrl(1100);
var url = UmbracoContext.Current.UrlProvider.GetUrl(LeafWebPageIds.Chart);
}
<a href="@url?leafInputId=@Model">
<span class="glyphicon glyphicon-stats"></span>
@@ -0,0 +1,13 @@
@using LeafWeb.WebCms.Controllers
@model Tuple<int, bool>
@{
var leafInputId = Model.Item1;
var isDeletable = Model.Item2;
}
@using (Html.BeginUmbracoForm<QueueController>("Delete", null, new { @class = "confirm", confirm_msg = "Deletion cannot be undone!" }))
{
<input type="hidden" name="id" value="@leafInputId"/>
<button type="submit" class="btn btn-link" @{if (!isDeletable) { <text> disabled="disabled" </text> }}>
<span class="glyphicon glyphicon-remove"></span> Delete
</button>
}
@@ -1,17 +1,15 @@
@using LeafWeb.WebCms.Utility
@model bool?
@model bool
@{
var propertyName = ViewData.ModelMetadata.PropertyName;
var isChecked = Model.HasValue && Model.Value;
//var isChecked = Model.HasValue && Model.Value;
}
<div class="@(Html.ValidationErrorFor(m => m, " has-error"))">
<div class="checkbox">
<label>
@Html.CheckBox(
name: "",
isChecked: isChecked)
@Html.CheckBoxFor(m=> m)
I agree to the
<a href="@UmbracoContext.Current.UrlProvider.GetUrl(1115)" target="_blank">
Terms of Service
+1
View File
@@ -22,6 +22,7 @@
<add namespace="umbraco" />
<add namespace="Examine" />
<add namespace="WebGridBootstrapPager" />
<add namespace="LeafWeb.WebCms.Models" />
<add namespace="Umbraco.Web.PublishedContentModels" />
</namespaces>
</pages>