Files
LeafWeb/WebCms/Views/Queue/Details.cshtml
T
2017-01-13 09:15:15 -05:00

58 lines
2.4 KiB
Plaintext

@using LeafWeb.WebCms.Controllers
@model LeafInputDetails
<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>
@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>
}
}