2836 lines
108 KiB
C#
2836 lines
108 KiB
C#
#pragma warning disable 1591
|
|
//------------------------------------------------------------------------------
|
|
// <auto-generated>
|
|
// This code was generated by a tool.
|
|
// Runtime Version:4.0.30319.42000
|
|
//
|
|
// Changes to this file may cause incorrect behavior and will be lost if
|
|
// the code is regenerated.
|
|
// </auto-generated>
|
|
//------------------------------------------------------------------------------
|
|
|
|
namespace Disco.Web.Areas.Config.Views.DeviceBatch
|
|
{
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.IO;
|
|
using System.Linq;
|
|
using System.Net;
|
|
using System.Text;
|
|
using System.Web;
|
|
using System.Web.Helpers;
|
|
using System.Web.Mvc;
|
|
using System.Web.Mvc.Ajax;
|
|
using System.Web.Mvc.Html;
|
|
using System.Web.Routing;
|
|
using System.Web.Security;
|
|
using System.Web.UI;
|
|
using System.Web.WebPages;
|
|
using Disco;
|
|
using Disco.Models.Repository;
|
|
using Disco.Services;
|
|
using Disco.Services.Authorization;
|
|
|
|
#line 2 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
using Disco.Services.Devices.ManagedGroups;
|
|
|
|
#line default
|
|
#line hidden
|
|
using Disco.Services.Web;
|
|
using Disco.Web;
|
|
|
|
#line 3 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
using Disco.Web.Areas.Config.Models.Shared;
|
|
|
|
#line default
|
|
#line hidden
|
|
using Disco.Web.Extensions;
|
|
|
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "2.0.0.0")]
|
|
[System.Web.WebPages.PageVirtualPathAttribute("~/Areas/Config/Views/DeviceBatch/Show.cshtml")]
|
|
public partial class Show : Disco.Services.Web.WebViewPage<Disco.Web.Areas.Config.Models.DeviceBatch.ShowModel>
|
|
{
|
|
public Show()
|
|
{
|
|
}
|
|
public override void Execute()
|
|
{
|
|
|
|
#line 4 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
|
|
Authorization.Require(Claims.Config.DeviceBatch.Show);
|
|
|
|
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Device Batches", MVC.Config.DeviceBatch.Index(null), Model.DeviceBatch.ToString());
|
|
|
|
var canConfig = Authorization.Has(Claims.Config.DeviceBatch.Configure);
|
|
var canDeviceModelShow = Authorization.Has(Claims.Config.DeviceModel.Show);
|
|
|
|
var hideAdvanced =
|
|
Model.DeviceBatch.AssignedUsersLinkedGroup == null &&
|
|
Model.DeviceBatch.DevicesLinkedGroup == null;
|
|
|
|
Html.BundleDeferred("~/Style/Shadowbox");
|
|
Html.BundleDeferred("~/ClientScripts/Modules/Shadowbox");
|
|
Html.BundleDeferred("~/ClientScripts/Modules/jQuery-SignalR");
|
|
|
|
if (canConfig)
|
|
{
|
|
Html.BundleDeferred("~/ClientScripts/Modules/Disco-PropertyChangeHelpers");
|
|
Html.BundleDeferred("~/ClientScripts/Modules/Disco-AjaxHelperIcons");
|
|
Html.BundleDeferred("~/ClientScripts/Modules/tinymce");
|
|
Html.BundleDeferred("~/ClientScripts/Modules/Disco-AttachmentUploader");
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n<div");
|
|
|
|
WriteAttribute("class", Tuple.Create(" class=\"", 1224), Tuple.Create("\"", 1297)
|
|
, Tuple.Create(Tuple.Create("", 1232), Tuple.Create("form", 1232), true)
|
|
, Tuple.Create(Tuple.Create(" ", 1236), Tuple.Create("deviceBatches", 1237), true)
|
|
|
|
#line 28 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
, Tuple.Create(Tuple.Create("", 1250), Tuple.Create<System.Object, System.Int32>(hideAdvanced ? " Config_HideAdvanced" : null
|
|
|
|
#line default
|
|
#line hidden
|
|
, 1250), false)
|
|
);
|
|
|
|
WriteLiteral(" style=\"width: 730px\"");
|
|
|
|
WriteLiteral(">\r\n <table>\r\n <tr>\r\n <th");
|
|
|
|
WriteLiteral(" style=\"width: 150px\"");
|
|
|
|
WriteLiteral(">Id:\r\n </th>\r\n <td>\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 34 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Html.DisplayFor(model => model.DeviceBatch.Id));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th>Name:\r\n " +
|
|
" </th>\r\n <td>\r\n");
|
|
|
|
|
|
#line 41 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 41 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
if (canConfig)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 43 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Html.EditorFor(model => model.DeviceBatch.Name));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 43 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 44 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(AjaxHelpers.AjaxSave());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 44 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 45 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(AjaxHelpers.AjaxLoader());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 45 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <script");
|
|
|
|
WriteLiteral(" type=\"text/javascript\"");
|
|
|
|
WriteLiteral(@">
|
|
$(function () {
|
|
document.DiscoFunctions.PropertyChangeHelper(
|
|
$('#DeviceBatch_Name'),
|
|
'Invalid Name',
|
|
'");
|
|
|
|
|
|
#line 51 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Url.Action(MVC.API.DeviceBatch.UpdateName(Model.DeviceBatch.Id)));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\',\r\n \'BatchName\'\r\n );\r\n " +
|
|
" });\r\n </script>\r\n");
|
|
|
|
|
|
#line 56 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
}
|
|
else
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 59 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Model.DeviceBatch.Name);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 59 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </td>\r\n </tr>\r\n <tr>\r\n <th>Default Device Mo" +
|
|
"del:\r\n </th>\r\n <td>");
|
|
|
|
|
|
#line 66 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
if (canConfig)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 68 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Html.DropDownListFor(model => model.DeviceBatch.DefaultDeviceModelId, Model.DeviceModels.ToSelectListItems(null, true)));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 68 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 69 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(AjaxHelpers.AjaxSave());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 69 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 70 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(AjaxHelpers.AjaxLoader());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 70 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <script");
|
|
|
|
WriteLiteral(" type=\"text/javascript\"");
|
|
|
|
WriteLiteral(">\r\n $(function () {\r\n document.DiscoFun" +
|
|
"ctions.PropertyChangeHelper(\r\n $(\'#DeviceBatch_Defaul" +
|
|
"tDeviceModelId\'),\r\n null,\r\n " +
|
|
" \'");
|
|
|
|
|
|
#line 76 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Url.Action(MVC.API.DeviceBatch.UpdateDefaultDeviceModelId(Model.DeviceBatch.Id)));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\',\r\n \'DefaultDeviceModelId\'\r\n )" +
|
|
";\r\n });\r\n </script>\r\n");
|
|
|
|
|
|
#line 81 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
}
|
|
else
|
|
{
|
|
if (Model.DefaultDeviceModel == null)
|
|
{
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("<span");
|
|
|
|
WriteLiteral(" class=\"smallMessage\"");
|
|
|
|
WriteLiteral("><None Specified></span>");
|
|
|
|
|
|
#line 85 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
}
|
|
else
|
|
{
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 87 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Model.DefaultDeviceModel.ToString());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 87 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
;
|
|
}
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <br />\r\n <span");
|
|
|
|
WriteLiteral(" class=\"smallMessage\"");
|
|
|
|
WriteLiteral(">Devices added offline will default to this Device Model.\r\n On" +
|
|
"ce a device enrols the Device Model will be accurately represented.</span>\r\n " +
|
|
" </td>\r\n </tr>\r\n <tr>\r\n <th>Devices</th>\r\n " +
|
|
" <td>\r\n");
|
|
|
|
|
|
#line 98 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 98 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
if (Model.DeviceModelMembers.Count > 0)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <table");
|
|
|
|
WriteLiteral(" class=\"tableData smallTable\"");
|
|
|
|
WriteLiteral(@">
|
|
<thead>
|
|
<tr>
|
|
<th>Model</th>
|
|
<th>Device Count</th>
|
|
<th>Decommissioned</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
");
|
|
|
|
|
|
#line 109 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 109 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
foreach (var membership in Model.DeviceModelMembers.OrderByDescending(dmm => dmm.DeviceCount))
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <tr>\r\n <td>\r\n");
|
|
|
|
|
|
#line 113 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 113 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
if (canDeviceModelShow)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 115 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Html.ActionLink(membership.DeviceModel.ToString(), MVC.Config.DeviceModel.Index(membership.DeviceModel.Id)));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 115 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
|
|
}
|
|
else
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 119 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(membership.DeviceModel.ToString());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 119 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </td>\r\n <t" +
|
|
"d>\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 123 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(membership.DeviceCount.ToString("n0"));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n </td>\r\n " +
|
|
"<td>\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 126 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(membership.DeviceDecommissionedCount.ToString("n0"));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n </td>\r\n </tr" +
|
|
">\r\n");
|
|
|
|
|
|
#line 129 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </tbody>\r\n <tfoot>\r\n " +
|
|
" <tr>\r\n <th>Total Models: ");
|
|
|
|
|
|
#line 133 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Model.DeviceModelMembers.Count.ToString("n0"));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("</th>\r\n <th>");
|
|
|
|
|
|
#line 134 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Model.DeviceCount.ToString("n0"));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("</th>\r\n <th>");
|
|
|
|
|
|
#line 135 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Model.DeviceDecommissionedCount.ToString("n0"));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("</th>\r\n </tr>\r\n </tfoot>\r\n " +
|
|
" </table>\r\n");
|
|
|
|
|
|
#line 139 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
}
|
|
else
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <div");
|
|
|
|
WriteLiteral(" class=\"smallMessage\"");
|
|
|
|
WriteLiteral(">No device models are referenced in this batch.</div>\r\n");
|
|
|
|
|
|
#line 143 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 144 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
if (Model.DeviceBatch.UnitQuantity.HasValue && Model.DeviceBatch.UnitQuantity.Value > Model.DeviceCount)
|
|
{
|
|
var missingCount = Model.DeviceBatch.UnitQuantity.Value - Model.DeviceCount;
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <div");
|
|
|
|
WriteLiteral(" class=\"info-box\"");
|
|
|
|
WriteLiteral(">\r\n <p");
|
|
|
|
WriteLiteral(" class=\"fa-p\"");
|
|
|
|
WriteLiteral(">\r\n <i");
|
|
|
|
WriteLiteral(" class=\"fa fa-info-circle information\"");
|
|
|
|
WriteLiteral("></i>\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 150 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Model.DeviceCount.ToString("n0"));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" of ");
|
|
|
|
|
|
#line 150 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Model.DeviceBatch.UnitQuantity.Value.ToString("n0"));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" purchased devices are managed by Disco. <strong>");
|
|
|
|
|
|
#line 150 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(missingCount.ToString("n0"));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 150 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(missingCount == 1 ? "is" : "are");
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" not managed</strong>.\r\n </p>\r\n </div>\r" +
|
|
"\n");
|
|
|
|
|
|
#line 153 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </td>\r\n </tr>\r\n <tr>\r\n <th>Purchase:\r\n " +
|
|
" </th>\r\n <td");
|
|
|
|
WriteLiteral(" class=\"details\"");
|
|
|
|
WriteLiteral(">\r\n <table");
|
|
|
|
WriteLiteral(" class=\"sub\"");
|
|
|
|
WriteLiteral(">\r\n <tr>\r\n <th");
|
|
|
|
WriteLiteral(" class=\"name\"");
|
|
|
|
WriteLiteral(" style=\"width: 100px\"");
|
|
|
|
WriteLiteral(">Purchase Date:\r\n </th>\r\n <td>\r\n");
|
|
|
|
|
|
#line 165 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 165 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
if (canConfig)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 167 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Html.EditorFor(model => model.DeviceBatch.PurchaseDate));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 167 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 168 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(AjaxHelpers.AjaxLoader());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 168 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(@" <script>
|
|
$(function () {
|
|
var dateField = $('#DeviceBatch_PurchaseDate');
|
|
document.DiscoFunctions.DateChangeHelper(
|
|
dateField,
|
|
'Invalid Date',
|
|
'");
|
|
|
|
|
|
#line 175 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Url.Action(MVC.API.DeviceBatch.UpdatePurchaseDate(Model.DeviceBatch.Id)));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(@"',
|
|
'PurchaseDate',
|
|
null,
|
|
true
|
|
);
|
|
});
|
|
</script>
|
|
");
|
|
|
|
|
|
#line 182 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
}
|
|
else
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 185 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(CommonHelpers.FriendlyDate(Model.DeviceBatch.PurchaseDate));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 185 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </td>\r\n </tr>\r\n <tr" +
|
|
">\r\n <th>Supplier:\r\n </th>\r\n " +
|
|
" <td>");
|
|
|
|
|
|
#line 192 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
if (canConfig)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 194 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Html.EditorFor(model => model.DeviceBatch.Supplier));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 194 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 195 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(AjaxHelpers.AjaxSave());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 195 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 196 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(AjaxHelpers.AjaxLoader());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 196 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <script");
|
|
|
|
WriteLiteral(" type=\"text/javascript\"");
|
|
|
|
WriteLiteral(@">
|
|
$(function () {
|
|
document.DiscoFunctions.PropertyChangeHelper(
|
|
$('#DeviceBatch_Supplier'),
|
|
'Batch Supplier',
|
|
'");
|
|
|
|
|
|
#line 202 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Url.Action(MVC.API.DeviceBatch.UpdateSupplier(Model.DeviceBatch.Id)));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\',\r\n \'Supplier\'\r\n " +
|
|
" );\r\n });\r\n " +
|
|
"</script>\r\n");
|
|
|
|
|
|
#line 207 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
}
|
|
else
|
|
{
|
|
if (string.IsNullOrEmpty(Model.DeviceBatch.Supplier))
|
|
{
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("<span");
|
|
|
|
WriteLiteral(" class=\"smallMessage\"");
|
|
|
|
WriteLiteral("><None Specified></span>");
|
|
|
|
|
|
#line 211 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
}
|
|
else
|
|
{
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 213 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Model.DeviceBatch.Supplier);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 213 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
}
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </td>\r\n </tr>\r\n <tr" +
|
|
">\r\n <th>Unit Cost:\r\n </th>\r\n " +
|
|
" <td>");
|
|
|
|
|
|
#line 220 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
if (canConfig)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 222 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Html.EditorFor(model => model.DeviceBatch.UnitCost));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 222 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 223 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(AjaxHelpers.AjaxSave());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 223 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 224 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(AjaxHelpers.AjaxLoader());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 224 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <script");
|
|
|
|
WriteLiteral(" type=\"text/javascript\"");
|
|
|
|
WriteLiteral(@">
|
|
$(function () {
|
|
document.DiscoFunctions.PropertyChangeHelper(
|
|
$('#DeviceBatch_UnitCost'),
|
|
'Unit Cost',
|
|
'");
|
|
|
|
|
|
#line 230 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Url.Action(MVC.API.DeviceBatch.UpdateUnitCost(Model.DeviceBatch.Id)));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\',\r\n \'UnitCost\'\r\n " +
|
|
" );\r\n });\r\n " +
|
|
"</script>\r\n");
|
|
|
|
|
|
#line 235 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
}
|
|
else
|
|
{
|
|
if (!Model.DeviceBatch.UnitCost.HasValue)
|
|
{
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("<span");
|
|
|
|
WriteLiteral(" class=\"smallMessage\"");
|
|
|
|
WriteLiteral("><None Specified></span>");
|
|
|
|
|
|
#line 239 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
}
|
|
else
|
|
{
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 241 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Model.DeviceBatch.UnitCost.Value.ToString("C"));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 241 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
}
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </td>\r\n </tr>\r\n <tr" +
|
|
">\r\n <th>Quantity:\r\n </th>\r\n " +
|
|
" <td>");
|
|
|
|
|
|
#line 248 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
if (canConfig)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 250 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Html.EditorFor(model => model.DeviceBatch.UnitQuantity));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 250 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 251 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(AjaxHelpers.AjaxSave());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 251 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 252 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(AjaxHelpers.AjaxLoader());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 252 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <script");
|
|
|
|
WriteLiteral(" type=\"text/javascript\"");
|
|
|
|
WriteLiteral(@">
|
|
$(function () {
|
|
document.DiscoFunctions.PropertyChangeHelper(
|
|
$('#DeviceBatch_UnitQuantity'),
|
|
'Quantity',
|
|
'");
|
|
|
|
|
|
#line 258 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Url.Action(MVC.API.DeviceBatch.UpdateUnitQuantity(Model.DeviceBatch.Id)));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\',\r\n \'UnitQuantity\'\r\n " +
|
|
" );\r\n });\r\n " +
|
|
" </script>\r\n");
|
|
|
|
|
|
#line 263 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
}
|
|
else
|
|
{
|
|
if (!Model.DeviceBatch.UnitQuantity.HasValue)
|
|
{
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("<span");
|
|
|
|
WriteLiteral(" class=\"smallMessage\"");
|
|
|
|
WriteLiteral("><None Specified></span>");
|
|
|
|
|
|
#line 267 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
}
|
|
else
|
|
{
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 269 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Model.DeviceBatch.UnitQuantity.Value.ToString("n0"));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 269 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
}
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </td>\r\n </tr>\r\n </table" +
|
|
">\r\n <div");
|
|
|
|
WriteLiteral(" id=\"DeviceBatch_PurchaseDetails_Container\"");
|
|
|
|
WriteLiteral(">\r\n <div>\r\n Details ");
|
|
|
|
|
|
#line 276 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(AjaxHelpers.AjaxLoader("ajaxPurchaseDetails"));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n </div>\r\n");
|
|
|
|
|
|
#line 278 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 278 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
if (canConfig)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 280 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Html.EditorFor(model => model.DeviceBatch.PurchaseDetails));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 280 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <script");
|
|
|
|
WriteLiteral(" type=\"text/javascript\"");
|
|
|
|
WriteLiteral(@">
|
|
$(function () {
|
|
var model = {
|
|
$field: $('#DeviceBatch_PurchaseDetails'),
|
|
fieldName: 'PurchaseDetails',
|
|
$ajax_loading: null,
|
|
$ajax_ok: null,
|
|
updated: function () {
|
|
if (!model.$ajax_loading)
|
|
model.$ajax_loading = $('#ajax' + model.fieldName + '_loading');
|
|
if (!model.$ajax_ok)
|
|
model.$ajax_ok = $('#ajax' + model.fieldName + '_ok');
|
|
model.$ajax_loading.show();
|
|
var data = {};
|
|
data[model.fieldName] = model.$field.tinymce().getContent();
|
|
$.ajax({
|
|
url: '");
|
|
|
|
|
|
#line 297 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Url.Action(MVC.API.DeviceBatch.UpdatePurchaseDetails(Model.DeviceBatch.Id)));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\',\r\n dataType: \'json\',\r\n " +
|
|
" data: data,\r\n " +
|
|
" traditional: true,\r\n type: \'PO" +
|
|
"ST\',\r\n success: function (d) {\r\n " +
|
|
" if (d == \'OK\') {\r\n " +
|
|
" model.$ajax_loading.hide();\r\n " +
|
|
" model.$ajax_ok.show().delay(\'fast\').fadeOut(\'s" +
|
|
"low\');\r\n } else {\r\n " +
|
|
" model.$ajax_loading.hide();\r\n " +
|
|
" alert(\'Unable to update purchase details:" +
|
|
" \' + d);\r\n }\r\n " +
|
|
" },\r\n error: " +
|
|
"function (jqXHR, textStatus, errorThrown) {\r\n " +
|
|
" alert(\'Unable to update purchase details: \' + errorThrown);\r\n " +
|
|
" model.$ajax_loading.hide();\r\n " +
|
|
" }\r\n })" +
|
|
"\r\n }\r\n };\r\n\r\n " +
|
|
" model.$field.tinymce({\r\n " +
|
|
" theme: \'simple\',\r\n add_unload_trig" +
|
|
"ger: false,\r\n schema: \"html5\",\r\n " +
|
|
" statusbar: false,\r\n se" +
|
|
"tup: function (ed) {\r\n ed.on(\'init\', func" +
|
|
"tion () {\r\n $(ed.getWin()).blur(model" +
|
|
".updated);\r\n });\r\n " +
|
|
" }\r\n });\r\n " +
|
|
" });\r\n </script>\r\n");
|
|
|
|
|
|
#line 332 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
}
|
|
else
|
|
{
|
|
if (string.IsNullOrEmpty(Model.DeviceBatch.PurchaseDetails))
|
|
{
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("<span");
|
|
|
|
WriteLiteral(" class=\"smallMessage\"");
|
|
|
|
WriteLiteral("><None Specified></span>");
|
|
|
|
|
|
#line 336 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
}
|
|
else
|
|
{
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 338 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(new HtmlString(Model.DeviceBatch.PurchaseDetails));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 338 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
}
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </div>\r\n </td>\r\n </tr>\r\n <tr>\r\n " +
|
|
" <th>Warranty:\r\n </th>\r\n <td");
|
|
|
|
WriteLiteral(" class=\"details\"");
|
|
|
|
WriteLiteral(">\r\n <table");
|
|
|
|
WriteLiteral(" class=\"sub\"");
|
|
|
|
WriteLiteral(">\r\n <tr>\r\n <th");
|
|
|
|
WriteLiteral(" class=\"name\"");
|
|
|
|
WriteLiteral(" style=\"width: 100px\"");
|
|
|
|
WriteLiteral(">Valid Until:\r\n </th>\r\n <td>\r\n");
|
|
|
|
|
|
#line 352 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 352 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
if (canConfig)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 354 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Html.EditorFor(model => model.DeviceBatch.WarrantyValidUntil));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 354 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 355 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(AjaxHelpers.AjaxLoader());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 355 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(@" <script>
|
|
$(function () {
|
|
var dateField = $('#DeviceBatch_WarrantyValidUntil');
|
|
document.DiscoFunctions.DateChangeHelper(
|
|
dateField,
|
|
'Warranty Valid Until',
|
|
'");
|
|
|
|
|
|
#line 362 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Url.Action(MVC.API.DeviceBatch.UpdateWarrantyValidUntil(Model.DeviceBatch.Id)));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(@"',
|
|
'WarrantyValidUntil',
|
|
null,
|
|
true
|
|
);
|
|
});
|
|
</script>
|
|
");
|
|
|
|
|
|
#line 369 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
}
|
|
else
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 372 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(CommonHelpers.FriendlyDate(Model.DeviceBatch.WarrantyValidUntil, "Unknown"));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 372 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </td>\r\n </tr>\r\n </table" +
|
|
">\r\n <div");
|
|
|
|
WriteLiteral(" id=\"DeviceBatch_WarrantyDetails_Container\"");
|
|
|
|
WriteLiteral(">\r\n <div>\r\n Details ");
|
|
|
|
|
|
#line 379 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(AjaxHelpers.AjaxLoader("ajaxWarrantyDetails"));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n </div>\r\n");
|
|
|
|
|
|
#line 381 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 381 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
if (canConfig)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 383 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Html.EditorFor(model => model.DeviceBatch.WarrantyDetails));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 383 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <script");
|
|
|
|
WriteLiteral(" type=\"text/javascript\"");
|
|
|
|
WriteLiteral(@">
|
|
$(function () {
|
|
var model = {
|
|
$field: $('#DeviceBatch_WarrantyDetails'),
|
|
fieldName: 'WarrantyDetails',
|
|
$ajax_loading: null,
|
|
$ajax_ok: null,
|
|
updated: function () {
|
|
if (!model.$ajax_loading)
|
|
model.$ajax_loading = $('#ajax' + model.fieldName + '_loading');
|
|
if (!model.$ajax_ok)
|
|
model.$ajax_ok = $('#ajax' + model.fieldName + '_ok');
|
|
model.$ajax_loading.show();
|
|
var data = {};
|
|
data[model.fieldName] = model.$field.tinymce().getContent();
|
|
$.ajax({
|
|
url: '");
|
|
|
|
|
|
#line 400 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Url.Action(MVC.API.DeviceBatch.UpdateWarrantyDetails(Model.DeviceBatch.Id)));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\',\r\n dataType: \'json\',\r\n " +
|
|
" data: data,\r\n " +
|
|
" traditional: true,\r\n type: \'PO" +
|
|
"ST\',\r\n success: function (d) {\r\n " +
|
|
" if (d == \'OK\') {\r\n " +
|
|
" model.$ajax_loading.hide();\r\n " +
|
|
" model.$ajax_ok.show().delay(\'fast\').fadeOut(\'s" +
|
|
"low\');\r\n } else {\r\n " +
|
|
" model.$ajax_loading.hide();\r\n " +
|
|
" alert(\'Unable to update warranty details:" +
|
|
" \' + d);\r\n }\r\n " +
|
|
" },\r\n error: " +
|
|
"function (jqXHR, textStatus, errorThrown) {\r\n " +
|
|
" alert(\'Unable to update warranty details: \' + errorThrown);\r\n " +
|
|
" model.$ajax_loading.hide();\r\n " +
|
|
" }\r\n })" +
|
|
"\r\n }\r\n };\r\n\r\n " +
|
|
" model.$field.tinymce({\r\n " +
|
|
" theme: \'simple\',\r\n add_unload_trig" +
|
|
"ger: false,\r\n schema: \"html5\",\r\n " +
|
|
" statusbar: false,\r\n se" +
|
|
"tup: function (ed) {\r\n ed.on(\'init\', func" +
|
|
"tion () {\r\n $(ed.getWin()).blur(model" +
|
|
".updated);\r\n });\r\n " +
|
|
" }\r\n });\r\n " +
|
|
" });\r\n </script>\r\n");
|
|
|
|
|
|
#line 435 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
}
|
|
else
|
|
{
|
|
if (string.IsNullOrEmpty(Model.DeviceBatch.WarrantyDetails))
|
|
{
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("<span");
|
|
|
|
WriteLiteral(" class=\"smallMessage\"");
|
|
|
|
WriteLiteral("><None Specified></span>");
|
|
|
|
|
|
#line 439 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
}
|
|
else
|
|
{
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 441 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(new HtmlString(Model.DeviceBatch.WarrantyDetails));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 441 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
}
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </div>\r\n </td>\r\n </tr>\r\n <tr>\r\n " +
|
|
" <th>Insurance:\r\n </th>\r\n <td");
|
|
|
|
WriteLiteral(" class=\"details\"");
|
|
|
|
WriteLiteral(">\r\n <table");
|
|
|
|
WriteLiteral(" class=\"sub\"");
|
|
|
|
WriteLiteral(">\r\n <tr>\r\n <th");
|
|
|
|
WriteLiteral(" class=\"name\"");
|
|
|
|
WriteLiteral(" style=\"width: 100px\"");
|
|
|
|
WriteLiteral(">Supplier:\r\n </th>\r\n <td>");
|
|
|
|
|
|
#line 454 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
if (canConfig)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 456 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Html.EditorFor(model => model.DeviceBatch.InsuranceSupplier));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 456 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 457 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(AjaxHelpers.AjaxSave());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 457 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 458 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(AjaxHelpers.AjaxLoader());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 458 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <script");
|
|
|
|
WriteLiteral(" type=\"text/javascript\"");
|
|
|
|
WriteLiteral(@">
|
|
$(function () {
|
|
document.DiscoFunctions.PropertyChangeHelper(
|
|
$('#DeviceBatch_InsuranceSupplier'),
|
|
'Insurance Supplier',
|
|
'");
|
|
|
|
|
|
#line 464 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Url.Action(MVC.API.DeviceBatch.UpdateInsuranceSupplier(Model.DeviceBatch.Id)));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\',\r\n \'InsuranceSupplier\'\r\n " +
|
|
" );\r\n });\r\n " +
|
|
" </script>\r\n");
|
|
|
|
|
|
#line 469 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
}
|
|
else
|
|
{
|
|
if (string.IsNullOrEmpty(Model.DeviceBatch.InsuranceSupplier))
|
|
{
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("<span");
|
|
|
|
WriteLiteral(" class=\"smallMessage\"");
|
|
|
|
WriteLiteral("><None Specified></span>");
|
|
|
|
|
|
#line 473 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
}
|
|
else
|
|
{
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 475 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Model.DeviceBatch.InsuranceSupplier);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 475 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
;
|
|
}
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </td>\r\n </tr>\r\n <tr" +
|
|
">\r\n <th");
|
|
|
|
WriteLiteral(" class=\"name\"");
|
|
|
|
WriteLiteral(">Insured Date:\r\n </th>\r\n <td>");
|
|
|
|
|
|
#line 483 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
if (canConfig)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 485 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Html.EditorFor(model => model.DeviceBatch.InsuredDate));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 485 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 486 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(AjaxHelpers.AjaxLoader());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 486 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(@" <script>
|
|
$(function () {
|
|
var dateField = $('#DeviceBatch_InsuredDate');
|
|
document.DiscoFunctions.DateChangeHelper(
|
|
dateField,
|
|
'Insured Date',
|
|
'");
|
|
|
|
|
|
#line 493 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Url.Action(MVC.API.DeviceBatch.UpdateInsuredDate(Model.DeviceBatch.Id)));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(@"',
|
|
'InsuredDate',
|
|
null,
|
|
true
|
|
);
|
|
});
|
|
</script>
|
|
");
|
|
|
|
|
|
#line 500 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
}
|
|
else
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 503 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(CommonHelpers.FriendlyDate(Model.DeviceBatch.InsuredDate, "Unknown"));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 503 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </td>\r\n </tr>\r\n <tr" +
|
|
">\r\n <th");
|
|
|
|
WriteLiteral(" class=\"name\"");
|
|
|
|
WriteLiteral(">Insured Until:\r\n </th>\r\n <td>");
|
|
|
|
|
|
#line 510 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
if (canConfig)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 512 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Html.EditorFor(model => model.DeviceBatch.InsuredUntil));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 512 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 513 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(AjaxHelpers.AjaxLoader());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 513 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(@" <script>
|
|
$(function () {
|
|
var dateField = $('#DeviceBatch_InsuredUntil');
|
|
document.DiscoFunctions.DateChangeHelper(
|
|
dateField,
|
|
'Insured Until',
|
|
'");
|
|
|
|
|
|
#line 520 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Url.Action(MVC.API.DeviceBatch.UpdateInsuredUntil(Model.DeviceBatch.Id)));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(@"',
|
|
'InsuredUntil',
|
|
null,
|
|
true
|
|
);
|
|
});
|
|
</script>
|
|
");
|
|
|
|
|
|
#line 527 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
}
|
|
else
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 530 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(CommonHelpers.FriendlyDate(Model.DeviceBatch.InsuredUntil, "Unknown"));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 530 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </td>\r\n </tr>\r\n </table" +
|
|
">\r\n <div");
|
|
|
|
WriteLiteral(" id=\"DeviceBatch_InsuranceDetails_Container\"");
|
|
|
|
WriteLiteral(">\r\n <div>\r\n Details ");
|
|
|
|
|
|
#line 537 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(AjaxHelpers.AjaxLoader("ajaxInsuranceDetails"));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n </div>\r\n");
|
|
|
|
|
|
#line 539 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 539 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
if (canConfig)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 541 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Html.EditorFor(model => model.DeviceBatch.InsuranceDetails));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 541 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <script");
|
|
|
|
WriteLiteral(" type=\"text/javascript\"");
|
|
|
|
WriteLiteral(@">
|
|
$(function () {
|
|
var model = {
|
|
$field: $('#DeviceBatch_InsuranceDetails'),
|
|
$ajax_loading: null,
|
|
$ajax_ok: null,
|
|
updated: function () {
|
|
if (!model.$ajax_loading)
|
|
model.$ajax_loading = $('#ajaxInsuranceDetails_loading');
|
|
if (!model.$ajax_ok)
|
|
model.$ajax_ok = $('#ajaxInsuranceDetails_ok');
|
|
model.$ajax_loading.show();
|
|
var data = { InsuranceDetails: model.$field.tinymce().getContent() };
|
|
$.ajax({
|
|
url: '");
|
|
|
|
|
|
#line 556 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Url.Action(MVC.API.DeviceBatch.UpdateInsuranceDetails(Model.DeviceBatch.Id)));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\',\r\n dataType: \'json\',\r\n " +
|
|
" data: data,\r\n " +
|
|
" traditional: true,\r\n type: \'PO" +
|
|
"ST\',\r\n success: function (d) {\r\n " +
|
|
" if (d == \'OK\') {\r\n " +
|
|
" model.$ajax_loading.hide();\r\n " +
|
|
" model.$ajax_ok.show().delay(\'fast\').fadeOut(\'s" +
|
|
"low\');\r\n } else {\r\n " +
|
|
" model.$ajax_loading.hide();\r\n " +
|
|
" alert(\'Unable to update insurance details" +
|
|
": \' + d);\r\n }\r\n " +
|
|
" },\r\n error:" +
|
|
" function (jqXHR, textStatus, errorThrown) {\r\n " +
|
|
" alert(\'Unable to update insurance details: \' + errorThrown);\r\n " +
|
|
" model.$ajax_loading.hide();\r\n " +
|
|
" }\r\n " +
|
|
"})\r\n }\r\n };\r\n\r" +
|
|
"\n model.$field.tinymce({\r\n " +
|
|
" theme: \'simple\',\r\n add_unload_tr" +
|
|
"igger: false,\r\n schema: \"html5\",\r\n " +
|
|
" statusbar: false,\r\n " +
|
|
"setup: function (ed) {\r\n ed.on(\'init\', fu" +
|
|
"nction () {\r\n $(ed.getWin()).blur(mod" +
|
|
"el.updated);\r\n });\r\n " +
|
|
" }\r\n });\r\n " +
|
|
" });\r\n </script>\r\n");
|
|
|
|
|
|
#line 591 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
}
|
|
else
|
|
{
|
|
if (string.IsNullOrEmpty(Model.DeviceBatch.InsuranceDetails))
|
|
{
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("<span");
|
|
|
|
WriteLiteral(" class=\"smallMessage\"");
|
|
|
|
WriteLiteral("><None Specified></span>");
|
|
|
|
|
|
#line 595 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
}
|
|
else
|
|
{
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 597 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(new HtmlString(Model.DeviceBatch.InsuranceDetails));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 597 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
}
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </div>\r\n </td>\r\n </tr>\r\n <tr>\r\n " +
|
|
" <th>Comments:<br />\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 604 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(AjaxHelpers.AjaxLoader("ajaxComments"));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n </th>\r\n <td>");
|
|
|
|
|
|
#line 606 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
if (canConfig)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 608 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Html.EditorFor(model => model.DeviceBatch.Comments));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 608 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <script");
|
|
|
|
WriteLiteral(" type=\"text/javascript\"");
|
|
|
|
WriteLiteral(@">
|
|
$(function () {
|
|
var model = {
|
|
$field: $('#DeviceBatch_Comments'),
|
|
$ajax_loading: null,
|
|
$ajax_ok: null,
|
|
updated: function () {
|
|
if (!model.$ajax_loading)
|
|
model.$ajax_loading = $('#ajaxComments_loading');
|
|
if (!model.$ajax_ok)
|
|
model.$ajax_ok = $('#ajaxComments_ok');
|
|
model.$ajax_loading.show();
|
|
var data = { Comments: model.$field.tinymce().getContent() };
|
|
$.ajax({
|
|
url: '");
|
|
|
|
|
|
#line 623 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Url.Action(MVC.API.DeviceBatch.UpdateComments(Model.DeviceBatch.Id)));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\',\r\n dataType: \'json\',\r\n " +
|
|
" data: data,\r\n traditional: true" +
|
|
",\r\n type: \'POST\',\r\n " +
|
|
" success: function (d) {\r\n if (d" +
|
|
" == \'OK\') {\r\n model.$ajax_loading.hid" +
|
|
"e();\r\n model.$ajax_ok.show().delay(\'f" +
|
|
"ast\').fadeOut(\'slow\');\r\n } else {\r\n " +
|
|
" model.$ajax_loading.hide();\r\n " +
|
|
" alert(\'Unable to update comments: \' + d);\r\n " +
|
|
" }\r\n },\r\n " +
|
|
" error: function (jqXHR, textStatus, errorThrown" +
|
|
") {\r\n alert(\'Unable to update comments: \'" +
|
|
" + errorThrown);\r\n model.$ajax_loading.hi" +
|
|
"de();\r\n }\r\n })" +
|
|
"\r\n }\r\n };\r\n\r\n " +
|
|
" model.$field.tinymce({\r\n theme: \'simple\',\r\n " +
|
|
" add_unload_trigger: false,\r\n " +
|
|
" schema: \"html5\",\r\n statusbar: false,\r\n " +
|
|
" setup: function (ed) {\r\n ed.on(\'ini" +
|
|
"t\', function () {\r\n $(ed.getWin()).blur(model" +
|
|
".updated);\r\n });\r\n }\r\n" +
|
|
" });\r\n });\r\n </script>\r" +
|
|
"\n");
|
|
|
|
|
|
#line 658 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
}
|
|
else
|
|
{
|
|
if (string.IsNullOrEmpty(Model.DeviceBatch.Comments))
|
|
{
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("<span");
|
|
|
|
WriteLiteral(" class=\"smallMessage\"");
|
|
|
|
WriteLiteral("><None Specified></span>");
|
|
|
|
|
|
#line 662 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
}
|
|
else
|
|
{
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 664 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(new HtmlString(Model.DeviceBatch.Comments));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 664 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
}
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </td>\r\n </tr>\r\n <tr>\r\n <th>Attachments:</th>" +
|
|
"\r\n <td>\r\n <div");
|
|
|
|
WriteLiteral(" id=\"DeviceBatch_Attachments\"");
|
|
|
|
WriteAttribute("class", Tuple.Create(" class=\"", 34485), Tuple.Create("\"", 34552)
|
|
|
|
#line 671 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
, Tuple.Create(Tuple.Create("", 34493), Tuple.Create<System.Object, System.Int32>(canConfig ? "canAddAttachments" : "cannotAddAttachments"
|
|
|
|
#line default
|
|
#line hidden
|
|
, 34493), false)
|
|
);
|
|
|
|
WriteLiteral(" data-uploadurl=\"");
|
|
|
|
|
|
#line 671 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Url.Action(MVC.API.DeviceBatch.AttachmentUpload(Model.DeviceBatch.Id, null)));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\"");
|
|
|
|
WriteLiteral(">\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 672 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Html.AntiForgeryToken());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n <div");
|
|
|
|
WriteLiteral(" class=\"Disco-AttachmentUpload-DropTarget\"");
|
|
|
|
WriteLiteral(">\r\n <h2>Drop Attachments Here</h2>\r\n </" +
|
|
"div>\r\n <div");
|
|
|
|
WriteLiteral(" class=\"attachmentOutput\"");
|
|
|
|
WriteLiteral(">\r\n");
|
|
|
|
|
|
#line 677 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 677 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
if (Model.DeviceBatch.DeviceBatchAttachments != null)
|
|
{
|
|
foreach (var attachment in Model.DeviceBatch.DeviceBatchAttachments)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <a");
|
|
|
|
WriteAttribute("href", Tuple.Create(" href=\"", 35174), Tuple.Create("\"", 35247)
|
|
|
|
#line 681 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
, Tuple.Create(Tuple.Create("", 35181), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.DeviceBatch.AttachmentDownload(attachment.Id))
|
|
|
|
#line default
|
|
#line hidden
|
|
, 35181), false)
|
|
);
|
|
|
|
WriteLiteral(" data-attachmentid=\"");
|
|
|
|
|
|
#line 681 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(attachment.Id);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\"");
|
|
|
|
WriteLiteral(" data-mimetype=\"");
|
|
|
|
|
|
#line 681 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(attachment.MimeType);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\"");
|
|
|
|
WriteLiteral(">\r\n <span");
|
|
|
|
WriteLiteral(" class=\"icon\"");
|
|
|
|
WriteAttribute("title", Tuple.Create(" title=\"", 35377), Tuple.Create("\"", 35405)
|
|
|
|
#line 682 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
, Tuple.Create(Tuple.Create("", 35385), Tuple.Create<System.Object, System.Int32>(attachment.Filename
|
|
|
|
#line default
|
|
#line hidden
|
|
, 35385), false)
|
|
);
|
|
|
|
WriteLiteral(">\r\n <img");
|
|
|
|
WriteLiteral(" alt=\"Attachment Thumbnail\"");
|
|
|
|
WriteAttribute("src", Tuple.Create(" src=\"", 35480), Tuple.Create("\"", 35555)
|
|
|
|
#line 683 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
, Tuple.Create(Tuple.Create("", 35486), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.DeviceBatch.AttachmentThumbnail(attachment.Id))
|
|
|
|
#line default
|
|
#line hidden
|
|
, 35486), false)
|
|
);
|
|
|
|
WriteLiteral(" />\r\n </span>\r\n " +
|
|
" <span");
|
|
|
|
WriteLiteral(" class=\"comments\"");
|
|
|
|
WriteAttribute("title", Tuple.Create(" title=\"", 35664), Tuple.Create("\"", 35692)
|
|
|
|
#line 685 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
, Tuple.Create(Tuple.Create("", 35672), Tuple.Create<System.Object, System.Int32>(attachment.Comments
|
|
|
|
#line default
|
|
#line hidden
|
|
, 35672), false)
|
|
);
|
|
|
|
WriteLiteral(">\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 686 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(attachment.Comments);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n </span><span");
|
|
|
|
WriteLiteral(" class=\"author\"");
|
|
|
|
WriteLiteral(">");
|
|
|
|
|
|
#line 687 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(attachment.TechUser.ToString());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("</span>");
|
|
|
|
|
|
#line 687 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
if (canConfig)
|
|
{
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("<span");
|
|
|
|
WriteLiteral(" class=\"remove fa fa-times-circle\"");
|
|
|
|
WriteLiteral("></span>");
|
|
|
|
|
|
#line 688 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
}
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("<span");
|
|
|
|
WriteLiteral(" class=\"timestamp\"");
|
|
|
|
WriteAttribute("title", Tuple.Create(" title=\"", 35998), Tuple.Create("\"", 36044)
|
|
|
|
#line 688 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
, Tuple.Create(Tuple.Create("", 36006), Tuple.Create<System.Object, System.Int32>(attachment.Timestamp.ToFullDateTime()
|
|
|
|
#line default
|
|
#line hidden
|
|
, 36006), false)
|
|
);
|
|
|
|
WriteLiteral(" data-livestamp=\"");
|
|
|
|
|
|
#line 688 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(attachment.Timestamp.ToUnixEpoc());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\"");
|
|
|
|
WriteLiteral(">");
|
|
|
|
|
|
#line 688 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(attachment.Timestamp.ToFullDateTime());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("</span>\r\n </a>\r\n");
|
|
|
|
|
|
#line 690 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
}
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </div>\r\n");
|
|
|
|
|
|
#line 693 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 693 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
if (canConfig)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <div");
|
|
|
|
WriteLiteral(" class=\"Disco-AttachmentUpload-Progress\"");
|
|
|
|
WriteLiteral("></div>\r\n");
|
|
|
|
WriteLiteral(" <div");
|
|
|
|
WriteLiteral(" class=\"attachmentInput clearfix\"");
|
|
|
|
WriteLiteral(">\r\n <span");
|
|
|
|
WriteLiteral(" class=\"action enabled upload fa fa-upload disabled\"");
|
|
|
|
WriteLiteral(" title=\"Attach File\"");
|
|
|
|
WriteLiteral("></span><span");
|
|
|
|
WriteLiteral(" class=\"action enabled photo fa fa-camera disabled\"");
|
|
|
|
WriteLiteral(" title=\"Capture Image\"");
|
|
|
|
WriteLiteral("></span>\r\n </div>\r\n");
|
|
|
|
WriteLiteral(" <div");
|
|
|
|
WriteLiteral(" id=\"dialogRemoveAttachment\"");
|
|
|
|
WriteLiteral(" class=\"dialog\"");
|
|
|
|
WriteLiteral(" title=\"Remove this Attachment?\"");
|
|
|
|
WriteLiteral(">\r\n <p>\r\n <i");
|
|
|
|
WriteLiteral(" class=\"fa fa-exclamation-triangle fa-lg\"");
|
|
|
|
WriteLiteral("></i> Are you sure?\r\n </p>\r\n " +
|
|
" </div>\r\n");
|
|
|
|
|
|
#line 704 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <script");
|
|
|
|
WriteLiteral(" type=\"text/javascript\"");
|
|
|
|
WriteLiteral(@">
|
|
Shadowbox.init({
|
|
skipSetup: true,
|
|
modal: true
|
|
});
|
|
$(function () {
|
|
var $Attachments = $('#DeviceBatch_Attachments');
|
|
var $attachmentOutput = $Attachments.find('.attachmentOutput');
|
|
var $attachmentDownloadHost;
|
|
|
|
var $dialogRemoveAttachment = null;
|
|
|
|
// Connect to Hub
|
|
var hub = $.connection.deviceBatchUpdates;
|
|
|
|
// Map Functions
|
|
hub.client.addAttachment = onAddAttachment;
|
|
hub.client.removeAttachment = onRemoveAttachment;
|
|
|
|
$.connection.hub.qs = { DeviceBatchId: '");
|
|
|
|
|
|
#line 724 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Model.DeviceBatch.Id);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\' };\r\n $.connection.hub.error(onHubFailed);\r\n " +
|
|
" $.connection.hub.disconnected(onHubFailed);\r\n\r\n " +
|
|
" $.connection.hub.reconnecting(function () {\r\n " +
|
|
" $Attachments.find(\'span.action.enabled\').addClass(\'disabled\');\r\n " +
|
|
" });\r\n $.connection.hub.reconne" +
|
|
"cted(function () {\r\n $Attachments.find(\'span.acti" +
|
|
"on.enabled\').removeClass(\'disabled\');\r\n });\r\n\r\n " +
|
|
" // Start Connection\r\n $.connect" +
|
|
"ion.hub.start(function () {\r\n $Attachments.find(\'" +
|
|
"span.action.enabled\').removeClass(\'disabled\');\r\n }).f" +
|
|
"ail(onHubFailed);\r\n\r\n function onHubFailed(error) {\r\n" +
|
|
" // Disable UI\r\n $" +
|
|
"Attachments.find(\'span.action.enabled\').addClass(\'disabled\');\r\n\r\n " +
|
|
" // Show Dialog Message\r\n if ($(\'" +
|
|
".disconnected-dialog\').length == 0) {\r\n $(\'<d" +
|
|
"iv>\')\r\n .addClass(\'dialog disconnected-di" +
|
|
"alog\')\r\n .html(\'<h3><span class=\"fa-stack" +
|
|
" fa-lg\"><i class=\"fa fa-wifi fa-stack-1x\"></i><i class=\"fa fa-ban fa-stack-2x er" +
|
|
"ror\"></i></span>Disconnected from the Disco ICT Server</h3><div>This page is not" +
|
|
" receiving live updates. Please ensure you are connected to the server, then ref" +
|
|
"resh this page to enable features.</div>\')\r\n " +
|
|
" .dialog({\r\n resizable: false,\r\n " +
|
|
" title: \'Disconnected\',\r\n " +
|
|
" width: 400,\r\n " +
|
|
" modal: true,\r\n buttons: {\r\n " +
|
|
" \'Refresh Now\': function () {\r\n " +
|
|
" $(this).dialog(\'option\', \'buttons" +
|
|
"\', null);\r\n window.location.r" +
|
|
"eload(true);\r\n },\r\n " +
|
|
" \'Close\': function () {\r\n " +
|
|
" $(this).dialog(\'destroy\');\r\n " +
|
|
" }\r\n }\r\n " +
|
|
" });\r\n }\r\n " +
|
|
" }\r\n\r\n function onAddAttachmen" +
|
|
"t(id, quick) {\r\n var data = { id: id };\r\n " +
|
|
" $.ajax({\r\n url: \'");
|
|
|
|
|
|
#line 770 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Url.Action(MVC.API.DeviceBatch.Attachment()));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(@"',
|
|
dataType: 'json',
|
|
data: data,
|
|
success: function (d) {
|
|
if (d.Result == 'OK') {
|
|
var a = d.Attachment;
|
|
");
|
|
|
|
|
|
#line 776 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 776 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
if (canConfig)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" ");
|
|
|
|
WriteLiteral("buildAttachment(a, true, quick);");
|
|
|
|
WriteLiteral("\r\n");
|
|
|
|
|
|
#line 779 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
}
|
|
else
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" ");
|
|
|
|
WriteLiteral("buildAttachment(a, false, quick);");
|
|
|
|
WriteLiteral("\r\n");
|
|
|
|
|
|
#line 783 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(@" } else {
|
|
alert('Unable to add attachment: ' + d.Result);
|
|
}
|
|
},
|
|
error: function (jqXHR, textStatus, errorThrown) {
|
|
alert('Unable to add attachment: ' + textStatus);
|
|
}
|
|
});
|
|
}
|
|
|
|
function buildAttachment(a, canRemove, quick) {
|
|
var t = '<a><span class=""icon""><img alt=""Attachment Thumbnail"" /></span><span class=""comments""></span><span class=""author""></span>';
|
|
if (canRemove)
|
|
t += '<span class=""remove fa fa-times-circle""></span>';
|
|
t += '<span class=""timestamp""></span></a>';
|
|
|
|
var e = $(t);
|
|
|
|
e.attr('data-attachmentid', a.Id).attr('data-mimetype', a.MimeType).attr('href', '");
|
|
|
|
|
|
#line 802 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Url.Action(MVC.API.DeviceBatch.AttachmentDownload()));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(@"/' + a.Id);
|
|
e.find('.comments').text(a.Description);
|
|
e.find('.author').text(a.Author);
|
|
e.find('.timestamp').text(a.TimestampFull).attr('title', a.TimestampFull).livestamp(a.TimestampUnixEpoc);
|
|
if (canRemove)
|
|
e.find('.remove').click(removeAttachment);
|
|
if (!quick)
|
|
e.hide();
|
|
$attachmentOutput.append(e);
|
|
if (!quick)
|
|
e.show('slow');
|
|
if (a.MimeType.toLowerCase().indexOf('image/') == 0)
|
|
e.shadowbox({ gallery: 'attachments', player: 'img', title: a.Description });
|
|
else
|
|
e.click(onDownload);
|
|
|
|
// Add Thumbnail
|
|
var buildThumbnail = function () {
|
|
var retryCount = 0;
|
|
var img = e.find('.icon img');
|
|
|
|
var setThumbnailUrl = function () {
|
|
img.attr('src', '");
|
|
|
|
|
|
#line 824 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Url.Action(MVC.API.DeviceBatch.AttachmentThumbnail()));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("/\' + a.Id + \'?v=\' + retryCount);\r\n };\r\n " +
|
|
" img.on(\'error\', function () {\r\n " +
|
|
" img.addClass(\'loading\');\r\n " +
|
|
" retryCount++;\r\n if (retryCount < 6)" +
|
|
"\r\n window.setTimeout(setThumbnailUrl," +
|
|
" retryCount * 250);\r\n });\r\n " +
|
|
" img.on(\'load\', function () {\r\n " +
|
|
" img.removeClass(\'loading\');\r\n });\r\n " +
|
|
" window.setTimeout(setThumbnailUrl, 100);\r\n " +
|
|
" };\r\n buildThumbnail()" +
|
|
";\r\n }\r\n\r\n function onRemov" +
|
|
"eAttachment(id) {\r\n var a = $attachmentOutput.fin" +
|
|
"d(\'a[data-attachmentid=\' + id + \']\');\r\n\r\n a.hide(" +
|
|
"300).delay(300).queue(function () {\r\n var $th" +
|
|
"is = $(this);\r\n if ($this.attr(\'data-mimetype" +
|
|
"\').toLowerCase().indexOf(\'image/\') == 0)\r\n " +
|
|
" Shadowbox.removeCache(this);\r\n $this.find(\'" +
|
|
".timestamp\').livestamp(\'destroy\');\r\n $this.re" +
|
|
"move();\r\n });\r\n }\r\n\r\n " +
|
|
" function onDownload() {\r\n " +
|
|
" var $this = $(this);\r\n var url = $this.attr(\'" +
|
|
"href\');\r\n\r\n if ($.connection && $.connection.hub " +
|
|
"&& $.connection.hub.transport &&\r\n " +
|
|
" $.connection.hub.transport.name == \'foreverFrame\') {\r\n " +
|
|
" // SignalR active with foreverFrame transport - use popup window" +
|
|
"\r\n window.open(url, \'_blank\', \'height=150,wid" +
|
|
"th=250,location=no,menubar=no,resizable=no,scrollbars=no,status=no,toolbar=no\');" +
|
|
"\r\n } else {\r\n " +
|
|
"// use iFrame\r\n if (!$attachmentDownloadHost)" +
|
|
" {\r\n $attachmentDownloadHost = $(\'<iframe" +
|
|
">\')\r\n .attr({ \'src\': url, \'title\': \'A" +
|
|
"ttachment Download Host\' })\r\n .addCla" +
|
|
"ss(\'hidden\')\r\n .appendTo(\'body\')\r\n " +
|
|
" .contents();\r\n " +
|
|
" } else {\r\n $attachmentDownload" +
|
|
"Host[0].location.href = url;\r\n }\r\n " +
|
|
" }\r\n\r\n return false;\r\n " +
|
|
" }\r\n\r\n");
|
|
|
|
|
|
#line 876 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 876 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
if (canConfig)
|
|
{
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n //#region Add Attachments\r\n " +
|
|
" var attachmentUploader = new document.Disco.AttachmentUploader($Attachments)" +
|
|
";\r\n\r\n var $attachmentInput = $Attachments.find(\'.atta" +
|
|
"chmentInput\');\r\n if (window.location.protocol != \'htt" +
|
|
"ps:\') {\r\n $attachmentInput.find(\'.photo\')\r\n " +
|
|
" .removeClass(\'enabled\')\r\n " +
|
|
" .addClass(\'disabled\')\r\n .attr(\'tit" +
|
|
"le\', \'Capture Image: this functionality is only available over a HTTPS connectio" +
|
|
"n\');\r\n }\r\n $attachmentInpu" +
|
|
"t.find(\'.photo\').click(function () {\r\n if (!$(thi" +
|
|
"s).hasClass(\'enabled\'))\r\n alert(\'This functio" +
|
|
"nality is only available over a HTTPS connection\');\r\n " +
|
|
" else if ($(this).hasClass(\'disabled\'))\r\n " +
|
|
" alert(\'Disconnected from the Disco ICT Server, please refresh this page and try" +
|
|
" again\');\r\n else\r\n " +
|
|
" attachmentUploader.uploadImage();\r\n });\r\n " +
|
|
" $attachmentInput.find(\'.upload\').click(function () {\r\n " +
|
|
" if ($(this).hasClass(\'disabled\'))\r\n " +
|
|
" alert(\'Disconnected from the Disco ICT Server, please refresh " +
|
|
"this page and try again\');\r\n else\r\n " +
|
|
" attachmentUploader.uploadFiles();\r\n " +
|
|
" });\r\n //#endregion\r\n " +
|
|
"//#region Remove Attachments\r\n $attachmentOutput.find" +
|
|
"(\'span.remove\').click(removeAttachment);\r\n\r\n function" +
|
|
" removeAttachment() {\r\n $this = $(this).closest(\'" +
|
|
"a\');\r\n\r\n var data = { id: $this.attr(\'data-attach" +
|
|
"mentid\') };\r\n\r\n if (!$dialogRemoveAttachment) {\r\n" +
|
|
" $dialogRemoveAttachment = $(\'#dialogRemoveAt" +
|
|
"tachment\').dialog({\r\n resizable: false,\r\n" +
|
|
" height: 140,\r\n " +
|
|
" modal: true,\r\n autoOpen: fa" +
|
|
"lse\r\n });\r\n }\r" +
|
|
"\n\r\n $dialogRemoveAttachment.dialog(\"enable\");\r\n " +
|
|
" $dialogRemoveAttachment.dialog(\'option\', \'buttons\'" +
|
|
", {\r\n \"Remove\": function () {\r\n " +
|
|
" $dialogRemoveAttachment.dialog(\"disable\");\r\n " +
|
|
" $dialogRemoveAttachment.dialog(\"option\", \"buttons\"" +
|
|
", null);\r\n $.ajax({\r\n " +
|
|
" url: \'");
|
|
|
|
|
|
#line 926 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Url.Action(MVC.API.DeviceBatch.AttachmentRemove()));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\',\r\n dataType: \'json\',\r\n " +
|
|
" data: data,\r\n " +
|
|
" success: function (d) {\r\n " +
|
|
"if (d == \'OK\') {\r\n // Do noth" +
|
|
"ing, await SignalR notification\r\n " +
|
|
" } else {\r\n alert(\'Unable to " +
|
|
"remove attachment: \' + d);\r\n }\r\n " +
|
|
" $dialogRemoveAttachment.dialog(\"c" +
|
|
"lose\");\r\n },\r\n " +
|
|
" error: function (jqXHR, textStatus, errorThrown) {\r\n " +
|
|
" alert(\'Unable to remove attachment: \' +" +
|
|
" textStatus);\r\n $dialogRemoveAtta" +
|
|
"chment.dialog(\"close\");\r\n }\r\n " +
|
|
" });\r\n },\r\n " +
|
|
" Cancel: function () {\r\n " +
|
|
" $dialogRemoveAttachment.dialog(\"close\");\r\n " +
|
|
" }\r\n });\r\n\r\n " +
|
|
" $dialogRemoveAttachment.dialog(\'open\');\r\n\r\n " +
|
|
" return false;\r\n }\r\n //#" +
|
|
"endregion\r\n ");
|
|
|
|
|
|
#line 953 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(@"
|
|
$attachmentOutput.children('a').each(function () {
|
|
$this = $(this);
|
|
if ($this.attr('data-mimetype').toLowerCase().indexOf('image/') == 0)
|
|
$this.shadowbox({ gallery: 'attachments', player: 'img', title: $this.find('.comments').text() });
|
|
else
|
|
$this.click(onDownload);
|
|
});
|
|
});
|
|
</script>
|
|
</div>
|
|
|
|
</td>
|
|
</tr>
|
|
");
|
|
|
|
|
|
#line 968 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 968 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
if (hideAdvanced)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <tr>\r\n <td");
|
|
|
|
WriteLiteral(" colspan=\"2\"");
|
|
|
|
WriteLiteral(" style=\"text-align: right;\"");
|
|
|
|
WriteLiteral(">\r\n <button");
|
|
|
|
WriteLiteral(" id=\"Config_HideAdvanced_Show\"");
|
|
|
|
WriteLiteral(" class=\"button small\"");
|
|
|
|
WriteLiteral(@">Show Advanced Options</button>
|
|
<script>
|
|
$(function () {
|
|
$('#Config_HideAdvanced_Show').click(function () {
|
|
var $this = $(this);
|
|
$this.closest('.Config_HideAdvanced').removeClass('Config_HideAdvanced');
|
|
$this.closest('tr').remove();
|
|
});
|
|
});
|
|
</script>
|
|
</td>
|
|
</tr>
|
|
");
|
|
|
|
|
|
#line 984 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <tr");
|
|
|
|
WriteLiteral(" class=\"Config_HideAdvanced_Item\"");
|
|
|
|
WriteLiteral(">\r\n <th>Linked Groups:\r\n </th>\r\n <td>\r\n " +
|
|
" <div>\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 990 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Html.Partial(MVC.Config.Shared.Views.LinkedGroupInstance, new LinkedGroupModel()
|
|
{
|
|
CanConfigure = canConfig,
|
|
CategoryDescription = DeviceBatchDevicesManagedGroup.GetCategoryDescription(Model.DeviceBatch),
|
|
Description = DeviceBatchDevicesManagedGroup.GetDescription(Model.DeviceBatch),
|
|
ManagedGroup = Model.DevicesLinkedGroup,
|
|
UpdateUrl = Url.Action(MVC.API.DeviceBatch.UpdateDevicesLinkedGroup(Model.DeviceBatch.Id, redirect: true))
|
|
}));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 998 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Html.Partial(MVC.Config.Shared.Views.LinkedGroupInstance, new LinkedGroupModel()
|
|
{
|
|
CanConfigure = canConfig,
|
|
CategoryDescription = DeviceBatchAssignedUsersManagedGroup.GetCategoryDescription(Model.DeviceBatch),
|
|
Description = DeviceBatchAssignedUsersManagedGroup.GetDescription(Model.DeviceBatch),
|
|
ManagedGroup = Model.AssignedUsersLinkedGroup,
|
|
UpdateUrl = Url.Action(MVC.API.DeviceBatch.UpdateAssignedUsersLinkedGroup(Model.DeviceBatch.Id, redirect: true))
|
|
}));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n");
|
|
|
|
|
|
#line 1006 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 1006 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
if (canConfig)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 1008 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Html.Partial(MVC.Config.Shared.Views.LinkedGroupShared));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 1008 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </div>\r\n </td>\r\n </tr>\r\n </table>\r\n</div>\r\n");
|
|
|
|
|
|
#line 1015 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Html.Partial(MVC.Config.Shared.Views._DeviceGroupDocumentBulkGenerate, Model));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n<div");
|
|
|
|
WriteLiteral(" class=\"actionBar\"");
|
|
|
|
WriteLiteral(">\r\n");
|
|
|
|
|
|
#line 1017 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 1017 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
if (Model.CanDelete)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 1019 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Html.ActionLinkButton("Delete", MVC.API.DeviceBatch.Delete(Model.DeviceBatch.Id, true), "buttonDelete"));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 1019 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 1021 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
if (Model.DeviceCount > 0)
|
|
{
|
|
if (Authorization.Has(Claims.Device.Actions.Export))
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 1025 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Html.ActionLinkButton("Export Devices", MVC.Device.Export(null, Disco.Models.Services.Devices.DeviceExportTypes.Batch, Model.DeviceBatch.Id)));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 1025 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
|
|
}
|
|
if (Authorization.Has(Claims.Device.Search) && Model.DeviceCount > 0)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 1029 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Html.ActionLinkButton(string.Format("View {0} Device{1}", Model.DeviceCount, (Model.DeviceCount != 1 ? "s" : null)), MVC.Search.Query(Model.DeviceBatch.Id.ToString(), "DeviceBatch")));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 1029 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
|
|
}
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("</div>\r\n");
|
|
|
|
}
|
|
}
|
|
}
|
|
#pragma warning restore 1591
|