Details and queue management
This commit is contained in:
@@ -61,7 +61,7 @@
|
||||
@Html.EditorFor(m => m.Name)
|
||||
@Html.EditorFor(m => m.Email)
|
||||
@Html.EditorFor(m => m.EmailConfirm)
|
||||
<a href="@UmbracoContext.Current.UrlProvider.GetUrl(1115)" target="_blank">Terms of Service</a>
|
||||
@Html.EditorFor(m => m.TermsOfService)
|
||||
<input type="submit" id="submit-form" class="hidden"/>
|
||||
}
|
||||
<label for="submit-form" class="btn btn-primary pull-right">Submit...</label>
|
||||
|
||||
@@ -1,3 +1,35 @@
|
||||
@model LeafWeb.WebCms.Models.LeafInputDetails
|
||||
|
||||
<div class="btn-group" role="group">
|
||||
@Html.Partial("DisplayTemplates/_ChartButton", Model.LeafInputId, new ViewDataDictionary { { "Disabled", !Model.HasLeafChart } })
|
||||
</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()
|
||||
|
||||
@@ -24,17 +24,17 @@
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
<li class="dropdown-header">Priority</li>
|
||||
<li>Set High</li>
|
||||
<li>Set Low</li>
|
||||
<li>@DetailsLink(item)</li>
|
||||
<li @if (!item.HasLeafChart)
|
||||
{
|
||||
<text>class="disabled"</text>
|
||||
}>@ChartLink(item)</li>
|
||||
<li @DisableItem(!item.HasLeafChart)>@ChartLink(item)</li>
|
||||
<li role="separator" class="divider"></li>
|
||||
<li class="dropdown-header">Download</li>
|
||||
<li><a href="@Url.Action("DownloadOutputToUser", "Queue", new {id = item.LeafInputId})"><span class="glyphicon glyphicon-download"></span> ToUser</a></li>
|
||||
<li><a href="@Url.Action("DownloadInput", "Queue", new {id = item.LeafInputId})"><span class="glyphicon glyphicon-download"></span> Input</a></li>
|
||||
<li>@DownloadInput(item)</li>
|
||||
<li @DisableItem(!item.IsComplete)>@DownloadOutputToUser(item)</li>
|
||||
<li role="separator" class="divider"></li>
|
||||
<li><a href="@Url.Action("Delete", "Queue", new {id = item.LeafInputId})"><span class="glyphicon glyphicon-remove"></span> Delete</a></li>
|
||||
<li @DisableItem(!item.IsDeletable)>@DeleteLink(item)</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
@@ -48,4 +48,27 @@
|
||||
@helper ChartLink(dynamic item)
|
||||
{
|
||||
@Html.Partial("DisplayTemplates/_ChartLink", (int)item.LeafInputId)
|
||||
}
|
||||
|
||||
@helper DownloadInput(dynamic item)
|
||||
{
|
||||
<a href="@Url.Action("DownloadInput", "Queue", new {id = item.LeafInputId})">
|
||||
<span class="glyphicon glyphicon-download"></span> Input
|
||||
</a>
|
||||
}
|
||||
@helper DownloadOutputToUser(dynamic item)
|
||||
{
|
||||
<a href="@Url.Action("DownloadOutputToUser", "Queue", new {id = item.LeafInputId})">
|
||||
<span class="glyphicon glyphicon-download"></span> ToUser
|
||||
</a>
|
||||
}
|
||||
@helper DeleteLink(dynamic item)
|
||||
{
|
||||
<a href="@Url.Action("Delete", "Queue", new {id = item.LeafInputId})">
|
||||
<span class="glyphicon glyphicon-remove"></span> Delete
|
||||
</a>
|
||||
}
|
||||
@helper DisableItem(bool disabled)
|
||||
{
|
||||
if (disabled) {<text>class="disabled"</text>}
|
||||
}
|
||||
@@ -18,8 +18,5 @@
|
||||
|
||||
@helper ChartLink(dynamic item)
|
||||
{
|
||||
if (item.HasLeafChart)
|
||||
{
|
||||
@Html.Partial("DisplayTemplates/_ChartButton", (int)item.LeafInputId)
|
||||
}
|
||||
@Html.Partial("DisplayTemplates/_ChartButton", (int)item.LeafInputId, new ViewDataDictionary { { "Disabled", !item.HasLeafChart }, {"xs", true} })
|
||||
}
|
||||
@@ -1,6 +1,13 @@
|
||||
@model int
|
||||
<a href="@UmbracoContext.Current.UrlProvider.GetUrl(1100)?leafInputId=@Model" class="btn btn-default btn-xs" role="button">
|
||||
@{
|
||||
var url = UmbracoContext.Current.UrlProvider.GetUrl(1100);
|
||||
var disabled = ViewData.ContainsKey("Disabled") && (bool) ViewData["Disabled"];
|
||||
var xs = ViewData.ContainsKey("xs") && (bool) ViewData["xs"];
|
||||
}
|
||||
<a href="@url?leafInputId=@Model"
|
||||
class="btn btn-default @{if (xs) {<text>btn-xs</text>}} @{if (disabled) {<text>disabled</text>}}"
|
||||
role="button"
|
||||
@{if (disabled) {<text>title="No chart has been generated"</text>}} />
|
||||
<span class="glyphicon glyphicon-stats"></span>
|
||||
Chart
|
||||
</a>
|
||||
|
||||
</a>
|
||||
@@ -1,6 +1,8 @@
|
||||
@model int
|
||||
<a href="@UmbracoContext.Current.UrlProvider.GetUrl(1100)?leafInputId=@Model">
|
||||
@{
|
||||
var url = UmbracoContext.Current.UrlProvider.GetUrl(1100);
|
||||
}
|
||||
<a href="@url?leafInputId=@Model">
|
||||
<span class="glyphicon glyphicon-stats"></span>
|
||||
Chart
|
||||
</a>
|
||||
|
||||
</a>
|
||||
@@ -1,4 +1,7 @@
|
||||
@model int
|
||||
<a href="@UmbracoContext.Current.UrlProvider.GetUrl(1111)?id=@Model">
|
||||
@{
|
||||
var url = UmbracoContext.Current.UrlProvider.GetUrl(1111);
|
||||
}
|
||||
<a href="@url?id=@Model">
|
||||
<span class="glyphicon glyphicon-edit"></span> Details
|
||||
</a>
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
@using LeafWeb.WebCms.Utility
|
||||
@model bool?
|
||||
|
||||
@{
|
||||
var propertyName = ViewData.ModelMetadata.PropertyName;
|
||||
var isChecked = Model.HasValue && Model.Value;
|
||||
}
|
||||
|
||||
<div class="@(Html.ValidationErrorFor(m => m, " has-error"))">
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
@Html.CheckBox(
|
||||
name: "",
|
||||
isChecked: isChecked)
|
||||
I agree to the
|
||||
<a href="@UmbracoContext.Current.UrlProvider.GetUrl(1115)" target="_blank">
|
||||
Terms of Service
|
||||
<span class="glyphicon glyphicon-new-window" aria-hidden="true"></span>
|
||||
</a>
|
||||
</label>
|
||||
</div>
|
||||
@Html.ValidationMessageFor(m => m, null, new { @class = "help-block" })
|
||||
</div>
|
||||
Reference in New Issue
Block a user