refactor: make exporting consistent
This commit is contained in:
@@ -1017,7 +1017,7 @@
|
||||
{
|
||||
if (Authorization.Has(Claims.Device.Actions.Export))
|
||||
{
|
||||
@Html.ActionLinkButton("Export Devices", MVC.Device.Export(null, Disco.Models.Services.Devices.Exporting.DeviceExportTypes.Batch, Model.DeviceBatch.Id))
|
||||
@Html.ActionLinkButton("Export Devices", MVC.Device.Export(null, Disco.Models.Services.Devices.DeviceExportTypes.Batch, Model.DeviceBatch.Id))
|
||||
}
|
||||
if (Authorization.Has(Claims.Device.Search) && Model.DeviceCount > 0)
|
||||
{
|
||||
|
||||
@@ -2778,14 +2778,14 @@ WriteLiteral(" ");
|
||||
#line hidden
|
||||
|
||||
#line 1020 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
||||
Write(Html.ActionLinkButton("Export Devices", MVC.Device.Export(null, Disco.Models.Services.Devices.Exporting.DeviceExportTypes.Batch, Model.DeviceBatch.Id)));
|
||||
Write(Html.ActionLinkButton("Export Devices", MVC.Device.Export(null, Disco.Models.Services.Devices.DeviceExportTypes.Batch, Model.DeviceBatch.Id)));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 1020 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
||||
|
||||
|
||||
}
|
||||
if (Authorization.Has(Claims.Device.Search) && Model.DeviceCount > 0)
|
||||
{
|
||||
|
||||
@@ -161,17 +161,17 @@
|
||||
</script>
|
||||
}
|
||||
</div>
|
||||
@if (Model.ExportSessionId != null)
|
||||
@if (Model.ExportId.HasValue)
|
||||
{
|
||||
<div id="DeviceFlag_Export_Download_Dialog" class="dialog" title="Export Device Flags">
|
||||
@if (Model.ExportSessionResult.RecordCount == 0)
|
||||
@if (Model.ExportResult.RecordCount == 0)
|
||||
{
|
||||
<h4>No records matched the filter criteria</h4>
|
||||
}
|
||||
else
|
||||
{
|
||||
<h4>@Model.ExportSessionResult.RecordCount record@(Model.ExportSessionResult.RecordCount != 1 ? "s" : null) were successfully exported.</h4>
|
||||
<a href="@Url.Action(MVC.API.DeviceFlag.ExportRetrieve(Model.ExportSessionId))" class="button"><i class="fa fa-download fa-lg"></i>Download Device Flag Export</a>
|
||||
<h4>@Model.ExportResult.RecordCount record@(Model.ExportResult.RecordCount != 1 ? "s" : null) were successfully exported.</h4>
|
||||
<a href="@Url.Action(MVC.API.DeviceFlag.ExportRetrieve(Model.ExportId.Value))" class="button"><i class="fa fa-download fa-lg"></i>Download Device Flag Export</a>
|
||||
}
|
||||
</div>
|
||||
<script>
|
||||
|
||||
@@ -601,7 +601,7 @@ WriteLiteral("</div>\r\n");
|
||||
|
||||
|
||||
#line 164 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||
if (Model.ExportSessionId != null)
|
||||
if (Model.ExportId.HasValue)
|
||||
{
|
||||
|
||||
|
||||
@@ -625,7 +625,7 @@ WriteLiteral(">\r\n");
|
||||
#line hidden
|
||||
|
||||
#line 167 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||
if (Model.ExportSessionResult.RecordCount == 0)
|
||||
if (Model.ExportResult.RecordCount == 0)
|
||||
{
|
||||
|
||||
|
||||
@@ -646,7 +646,7 @@ WriteLiteral(" <h4>");
|
||||
|
||||
|
||||
#line 173 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||
Write(Model.ExportSessionResult.RecordCount);
|
||||
Write(Model.ExportResult.RecordCount);
|
||||
|
||||
|
||||
#line default
|
||||
@@ -655,7 +655,7 @@ WriteLiteral(" record");
|
||||
|
||||
|
||||
#line 173 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||
Write(Model.ExportSessionResult.RecordCount != 1 ? "s" : null);
|
||||
Write(Model.ExportResult.RecordCount != 1 ? "s" : null);
|
||||
|
||||
|
||||
#line default
|
||||
@@ -664,14 +664,14 @@ WriteLiteral(" were successfully exported.</h4>\r\n");
|
||||
|
||||
WriteLiteral(" <a");
|
||||
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 8524), Tuple.Create("\"", 8600)
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 8497), Tuple.Create("\"", 8572)
|
||||
|
||||
#line 174 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 8531), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.DeviceFlag.ExportRetrieve(Model.ExportSessionId))
|
||||
, Tuple.Create(Tuple.Create("", 8504), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.DeviceFlag.ExportRetrieve(Model.ExportId.Value))
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 8531), false)
|
||||
, 8504), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" class=\"button\"");
|
||||
|
||||
@@ -255,7 +255,7 @@
|
||||
{
|
||||
if (Authorization.Has(Claims.Device.Actions.Export))
|
||||
{
|
||||
@Html.ActionLinkButton("Export Devices", MVC.Device.Export(null, Disco.Models.Services.Devices.Exporting.DeviceExportTypes.Model, Model.DeviceModel.Id))
|
||||
@Html.ActionLinkButton("Export Devices", MVC.Device.Export(null, Disco.Models.Services.Devices.DeviceExportTypes.Model, Model.DeviceModel.Id))
|
||||
}
|
||||
if (Authorization.Has(Claims.Device.Search) && Model.DeviceCount > 0)
|
||||
{
|
||||
|
||||
@@ -859,14 +859,14 @@ WriteLiteral(" ");
|
||||
#line hidden
|
||||
|
||||
#line 258 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
|
||||
Write(Html.ActionLinkButton("Export Devices", MVC.Device.Export(null, Disco.Models.Services.Devices.Exporting.DeviceExportTypes.Model, Model.DeviceModel.Id)));
|
||||
Write(Html.ActionLinkButton("Export Devices", MVC.Device.Export(null, Disco.Models.Services.Devices.DeviceExportTypes.Model, Model.DeviceModel.Id)));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 258 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
|
||||
|
||||
|
||||
}
|
||||
if (Authorization.Has(Claims.Device.Search) && Model.DeviceCount > 0)
|
||||
{
|
||||
|
||||
@@ -1012,7 +1012,7 @@
|
||||
}
|
||||
@if (Authorization.Has(Claims.Device.Actions.Export))
|
||||
{
|
||||
@Html.ActionLinkButton("Export Devices", MVC.Device.Export(null, Disco.Models.Services.Devices.Exporting.DeviceExportTypes.Profile, Model.DeviceProfile.Id))
|
||||
@Html.ActionLinkButton("Export Devices", MVC.Device.Export(null, Disco.Models.Services.Devices.DeviceExportTypes.Profile, Model.DeviceProfile.Id))
|
||||
}
|
||||
@if (Authorization.Has(Claims.Device.Search) && Model.DeviceCount > 0)
|
||||
{
|
||||
|
||||
@@ -3022,14 +3022,14 @@ WriteLiteral(" ");
|
||||
#line hidden
|
||||
|
||||
#line 1015 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
||||
Write(Html.ActionLinkButton("Export Devices", MVC.Device.Export(null, Disco.Models.Services.Devices.Exporting.DeviceExportTypes.Profile, Model.DeviceProfile.Id)));
|
||||
Write(Html.ActionLinkButton("Export Devices", MVC.Device.Export(null, Disco.Models.Services.Devices.DeviceExportTypes.Profile, Model.DeviceProfile.Id)));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 1015 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -161,17 +161,17 @@
|
||||
</script>
|
||||
}
|
||||
</div>
|
||||
@if (Model.ExportSessionId != null)
|
||||
@if (Model.ExportId.HasValue)
|
||||
{
|
||||
<div id="UserFlag_Export_Download_Dialog" class="dialog" title="Export User Flags">
|
||||
@if (Model.ExportSessionResult.RecordCount == 0)
|
||||
@if (Model.ExportResult.RecordCount == 0)
|
||||
{
|
||||
<h4>No records matched the filter criteria</h4>
|
||||
}
|
||||
else
|
||||
{
|
||||
<h4>@Model.ExportSessionResult.RecordCount record@(Model.ExportSessionResult.RecordCount != 1 ? "s" : null) were successfully exported.</h4>
|
||||
<a href="@Url.Action(MVC.API.UserFlag.ExportRetrieve(Model.ExportSessionId))" class="button"><i class="fa fa-download fa-lg"></i>Download User Flag Export</a>
|
||||
<h4>@Model.ExportResult.RecordCount record@(Model.ExportResult.RecordCount != 1 ? "s" : null) were successfully exported.</h4>
|
||||
<a href="@Url.Action(MVC.API.UserFlag.ExportRetrieve(Model.ExportId.Value))" class="button"><i class="fa fa-download fa-lg"></i>Download User Flag Export</a>
|
||||
}
|
||||
</div>
|
||||
<script>
|
||||
|
||||
@@ -601,7 +601,7 @@ WriteLiteral("</div>\r\n");
|
||||
|
||||
|
||||
#line 164 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||
if (Model.ExportSessionId != null)
|
||||
if (Model.ExportId.HasValue)
|
||||
{
|
||||
|
||||
|
||||
@@ -625,7 +625,7 @@ WriteLiteral(">\r\n");
|
||||
#line hidden
|
||||
|
||||
#line 167 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||
if (Model.ExportSessionResult.RecordCount == 0)
|
||||
if (Model.ExportResult.RecordCount == 0)
|
||||
{
|
||||
|
||||
|
||||
@@ -646,7 +646,7 @@ WriteLiteral(" <h4>");
|
||||
|
||||
|
||||
#line 173 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||
Write(Model.ExportSessionResult.RecordCount);
|
||||
Write(Model.ExportResult.RecordCount);
|
||||
|
||||
|
||||
#line default
|
||||
@@ -655,7 +655,7 @@ WriteLiteral(" record");
|
||||
|
||||
|
||||
#line 173 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||
Write(Model.ExportSessionResult.RecordCount != 1 ? "s" : null);
|
||||
Write(Model.ExportResult.RecordCount != 1 ? "s" : null);
|
||||
|
||||
|
||||
#line default
|
||||
@@ -664,14 +664,14 @@ WriteLiteral(" were successfully exported.</h4>\r\n");
|
||||
|
||||
WriteLiteral(" <a");
|
||||
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 8500), Tuple.Create("\"", 8574)
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 8473), Tuple.Create("\"", 8546)
|
||||
|
||||
#line 174 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 8507), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.UserFlag.ExportRetrieve(Model.ExportSessionId))
|
||||
, Tuple.Create(Tuple.Create("", 8480), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.UserFlag.ExportRetrieve(Model.ExportId.Value))
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 8507), false)
|
||||
, 8480), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" class=\"button\"");
|
||||
|
||||
Reference in New Issue
Block a user