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
+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>}