Improvments for dropdown menus

This commit is contained in:
2020-06-25 13:18:43 -04:00
parent 04d582c8e4
commit 7e88de5041
6 changed files with 81 additions and 59 deletions
+52 -46
View File
@@ -1,56 +1,62 @@
@using LeafWeb.WebCms.Controllers
@model LeafInputDetails
<div class="row">
@Html.Partial("DisplayTemplates/_ChartButton", Model.LeafInputId, new ViewDataDictionary {{"Disabled", !Model.HasLeafChart}})
<div class="dropdown">
<button class="btn btn-outline-secondary dropdown-toggle" id="downloadButton"
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Download
</button>
<div class="dropdown-menu" aria-labelledby="downloadButton">
<a href="@Url.Action("DownloadInput", "Queue", new {id = Model.LeafInputId})"
class="dropdown-item">
<span class="fa fa-download"></span> Input
</a>
<a href="@Url.Action("DownloadOutputToUser", "Queue", new {id = Model.LeafInputId})"
class="dropdown-item @if (!Model.HasOutputFiles) {<text> disabled</text>}" >
<span class="fa fa-download"></span> ToUser
</a>
<a href="@Url.Action("DownloadOutputNotToUser", "Queue", new {id = Model.LeafInputId})"
class="dropdown-item @if (!Model.HasOutputFiles) {<text> disabled</text>}" >
<span class="fa fa-download"></span> NotToUser
</a>
<div class="row pb-3">
@Html.Partial("DisplayTemplates/_ChartButton", Model.LeafInputId, new ViewDataDictionary {{"Disabled", !Model.HasLeafChart}})
<div class="dropdown pl-3">
<button class="btn btn-outline-secondary dropdown-toggle" id="downloadButton"
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<span class="fa fa-download"></span> Download
</button>
<div class="dropdown-menu" aria-labelledby="downloadButton">
<a href="@Url.Action("DownloadInput", "Queue", new {id = Model.LeafInputId})"
class="dropdown-item">
Input
</a>
<a href="@Url.Action("DownloadOutputToUser", "Queue", new {id = Model.LeafInputId})"
class="dropdown-item @if (!Model.HasOutputFiles) {<text> disabled</text>}">
ToUser
</a>
<a href="@Url.Action("DownloadOutputNotToUser", "Queue", new {id = Model.LeafInputId})"
class="dropdown-item @if (!Model.HasOutputFiles) {<text> disabled</text>}">
NotToUser
</a>
</div>
</div>
</div>
<div class="dropdown">
<button class="btn btn-outline-secondary dropdown-toggle" id="utilityButton"
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Utility
</button>
<div class="dropdown-menu" aria-labelledby="utilityButton">
@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="dropdown-item text-left"
@{if (!Model.HasOutputFiles) { <text> disabled="disabled" </text> }}>
<span class="fa fa-send"></span> Email User Download link
</button>
}
<div class="dropdown pl-3">
<button class="btn btn-outline-secondary dropdown-toggle" id="utilityButton"
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Utility
</button>
<div class="dropdown-menu" aria-labelledby="utilityButton">
@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="dropdown-item text-left"
@{if (!Model.HasOutputFiles)
{
<text> disabled="disabled" </text>
}}>
<span class="fa fa-send"></span> Email User Download link
</button>
}
</div>
</div>
</div>
@if (Model.IsCancellable)
{
@CancelLink(Model)
}
@DeleteLink(Model)
@if (Model.IsCancellable)
{
<div class="pl-3">
@CancelLink(Model)
</div>
}
<div class="pl-3">
@DeleteLink(Model)
</div>
</div>
<div class="row">
<div class="container">