Add permissions for downloading LeafInput
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
@using LeafWeb.WebCms.Utility
|
||||
@model LeafInputDetails
|
||||
@{
|
||||
var username = HttpContext.Current.User.Identity.Name;
|
||||
}
|
||||
|
||||
<div class="row pb-3">
|
||||
|
||||
@@ -10,6 +13,8 @@
|
||||
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
<span class="fa fa-download"></span> Download
|
||||
</button>
|
||||
@if (string.Equals(Model.Email, username, StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
<div class="dropdown-menu" aria-labelledby="downloadButton">
|
||||
<a href="@Url.Action("Input", "Download", new {id = Model.LeafInputId})"
|
||||
class="dropdown-item">
|
||||
@@ -17,9 +22,10 @@
|
||||
</a>
|
||||
<a href="@Url.Action("OutputToUser", "Download", new {id = Model.LeafInputId})"
|
||||
class="dropdown-item @if (!Model.HasOutputFiles) {<text> disabled</text>}">
|
||||
ToUser
|
||||
Output
|
||||
</a>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -40,15 +46,3 @@
|
||||
}
|
||||
@Html.Partial("DisplayTemplates/_ChartLink", (int)item.LeafInputId, cssClass)
|
||||
}
|
||||
|
||||
|
||||
@helper CancelLink(LeafInputDetails_Admin item)
|
||||
{
|
||||
var cssClass
|
||||
= CssClassUtil.CreateCssClassDataDictionary("btn", "btn-outline-secondary");
|
||||
if (!item.IsCancellable)
|
||||
{
|
||||
cssClass.SetCssDisabled();
|
||||
}
|
||||
@Html.Partial("DisplayTemplates/_CancelForm", Tuple.Create(item.LeafInputId, item.Identifier), cssClass)
|
||||
}
|
||||
@@ -35,10 +35,10 @@
|
||||
</div>
|
||||
<div class="row justify-content-end">
|
||||
<div class="col-sm">@grid.PagerList()</div>
|
||||
<div class="col-sm col-lg-5 pl-4 pt-3 pt-sm-0">
|
||||
@*<div class="col-sm col-lg-5 pl-4 pt-3 pt-sm-0">
|
||||
<span class="pr-2">Download Results</span>
|
||||
@DownloadResults()
|
||||
</div>
|
||||
</div>*@
|
||||
</div>
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user