maintenance unify document generation ui
This commit is contained in:
@@ -69,7 +69,7 @@
|
||||
</tr>
|
||||
</table>
|
||||
@if (Authorization.HasAny(Claims.Device.Properties.AssetNumber, Claims.Device.Properties.Location))
|
||||
{
|
||||
{
|
||||
<script>
|
||||
$(function () {
|
||||
@if (Authorization.Has(Claims.Device.Properties.AssetNumber))
|
||||
@@ -279,46 +279,7 @@
|
||||
@if (Authorization.Has(Claims.Device.Actions.GenerateDocuments))
|
||||
{
|
||||
<div id="Device_Show_GenerateDocument_Container" class="status">
|
||||
@Html.DropDownList("Device_Show_GenerateDocument", Model.DocumentTemplatesSelectListItems)
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
var generatePdfUrl = '@Url.Action(MVC.API.Device.GeneratePdf(Model.Device.SerialNumber, null))?DocumentTemplateId=';
|
||||
var generatePackageUrl = '@Url.Action(MVC.API.Device.GeneratePdfPackage(Model.Device.SerialNumber, null))?DocumentTemplatePackageId=';
|
||||
var $documentTemplates = $('#Device_Show_GenerateDocument');
|
||||
var $generationHost;
|
||||
|
||||
$documentTemplates.change(function () {
|
||||
var v = $documentTemplates.val();
|
||||
if (v) {
|
||||
var url;
|
||||
if (v.lastIndexOf('Package:', 0) === 0) {
|
||||
url = generatePackageUrl + v.substring(8);
|
||||
} else {
|
||||
url = generatePdfUrl + v;
|
||||
}
|
||||
|
||||
if ($.connection && $.connection.hub && $.connection.hub.transport &&
|
||||
$.connection.hub.transport.name == 'foreverFrame') {
|
||||
// SignalR active with foreverFrame transport - use popup window
|
||||
window.open(url, '_blank', 'height=150,width=250,location=no,menubar=no,resizable=no,scrollbars=no,status=no,toolbar=no');
|
||||
} else {
|
||||
// use iFrame
|
||||
if (!$generationHost) {
|
||||
$generationHost = $('<iframe>')
|
||||
.attr({ 'src': url, 'title': 'Document Generation Host' })
|
||||
.addClass('hidden')
|
||||
.appendTo('body')
|
||||
.contents();
|
||||
} else {
|
||||
$generationHost[0].location.href = url;
|
||||
}
|
||||
}
|
||||
|
||||
$documentTemplates.val('').blur();
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@Html.Partial(MVC.Shared.Views._GenerateDocumentControl, Model.GenerateDocumentControlModel)
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
@@ -328,7 +289,7 @@
|
||||
<div id="Device_Show_Policies_Profile">
|
||||
<h2 title="Device Profile">
|
||||
@if (Authorization.Has(Claims.Config.DeviceProfile.Show))
|
||||
{
|
||||
{
|
||||
@Html.ActionLink(Model.Device.DeviceProfile.Name, MVC.Config.DeviceProfile.Index(Model.Device.DeviceProfileId))
|
||||
}
|
||||
else
|
||||
@@ -394,7 +355,7 @@
|
||||
<div>
|
||||
<ul class="none">
|
||||
@foreach (var dp in Model.DeviceProfiles.OrderBy(i => i.Name))
|
||||
{
|
||||
{
|
||||
<li>
|
||||
<input type="radio" data-deviceprofileid="@dp.Id" name="DeviceProfile" id="DeviceProfile_@(dp.Id)" /><label for="DeviceProfile_@(dp.Id)" title="Distribution: @(dp.DistributionType)">@dp.Name</label>
|
||||
</li>
|
||||
@@ -595,7 +556,7 @@
|
||||
<div id="Device_Show_Aspects_Model" class="clearfix">
|
||||
<h2 id="Device_Show_Aspects_Model_Description" title="Model Description">
|
||||
@if (Authorization.Has(Claims.Config.DeviceModel.Show))
|
||||
{
|
||||
{
|
||||
@Html.ActionLink(Model.Device.DeviceModel.ToString(), MVC.Config.DeviceModel.Index(Model.Device.DeviceModelId))
|
||||
}
|
||||
else
|
||||
@@ -698,7 +659,7 @@
|
||||
|
||||
});
|
||||
</script>
|
||||
}
|
||||
}
|
||||
@if (Model.Device.CanUpdateTrustEnrol())
|
||||
{
|
||||
@Html.ActionLinkSmallButton("Trust Enrol", MVC.API.Device.UpdateAllowUnauthenticatedEnrol(Model.Device.SerialNumber, true.ToString(), true), "Device_Show_Device_Actions_TrustEnrol_Button")
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -11,7 +11,8 @@
|
||||
<div id="Job_Show_Job_Dates">
|
||||
<table class="none">
|
||||
<tr>
|
||||
<td>Opened:
|
||||
<td>
|
||||
Opened:
|
||||
</td>
|
||||
<td><span id="Job_Show_Job_Dates_Opened">@CommonHelpers.FriendlyDateAndTitleUser(Model.Job.OpenedDate, Model.Job.OpenedTechUser)</span></td>
|
||||
</tr>
|
||||
@@ -21,10 +22,11 @@
|
||||
<td>
|
||||
<span title="Expected to Close">Expected:</span>
|
||||
</td>
|
||||
<td>@if (Authorization.Has(Claims.Job.Properties.ExpectedClosedDate))
|
||||
<td>
|
||||
@if (Authorization.Has(Claims.Job.Properties.ExpectedClosedDate))
|
||||
{
|
||||
@Html.TextBoxFor(m => m.Job.ExpectedClosedDate, "{0:yyyy/MM/dd hh:mm tt}", new { @class = "small discreet" }) @AjaxHelpers.AjaxSave() @AjaxHelpers.AjaxLoader()
|
||||
<script type="text/javascript">
|
||||
@Html.TextBoxFor(m => m.Job.ExpectedClosedDate, "{0:yyyy/MM/dd hh:mm tt}", new { @class = "small discreet" }) @AjaxHelpers.AjaxSave() @AjaxHelpers.AjaxLoader()
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
var $ajaxSave = $('#Job_ExpectedClosedDate').next('.ajaxSave');
|
||||
var dateFieldChangeToken = null;
|
||||
@@ -63,19 +65,20 @@
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</script>
|
||||
}
|
||||
else
|
||||
{
|
||||
@CommonHelpers.FriendlyDate(Model.Job.ExpectedClosedDate)
|
||||
@CommonHelpers.FriendlyDate(Model.Job.ExpectedClosedDate)
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
@if (Model.Job.ClosedDate.HasValue)
|
||||
{
|
||||
<tr>
|
||||
<td>Closed:
|
||||
<td>
|
||||
Closed:
|
||||
</td>
|
||||
<td><span id="Job_Show_Job_Dates_Closed">@CommonHelpers.FriendlyDateAndTitleUser(Model.Job.ClosedDate, Model.Job.ClosedTechUser)</span></td>
|
||||
</tr>
|
||||
@@ -116,20 +119,21 @@
|
||||
<div id="Job_Show_Job_SubTypes_Update_Dialog" title="Update Job Types">
|
||||
<div>
|
||||
<h2>
|
||||
@Model.Job.JobType.Description</h2>
|
||||
@Model.Job.JobType.Description
|
||||
</h2>
|
||||
@using (Html.BeginForm(MVC.API.Job.UpdateSubTypes(Model.Job.Id, redirect: true), FormMethod.Post, new { id = "formUpdateJobTypes" }))
|
||||
{
|
||||
@CommonHelpers.CheckBoxList("SubTypes", Model.UpdatableJobSubTypes.ToSelectListItems(Model.Job.JobSubTypes.ToList()), 3)
|
||||
@CommonHelpers.CheckBoxList("SubTypes", Model.UpdatableJobSubTypes.ToSelectListItems(Model.Job.JobSubTypes.ToList()), 3)
|
||||
<hr />
|
||||
<div>
|
||||
<input type="checkbox" value="true" id="UpdateJobTypesAddComponents" name="AddComponents"
|
||||
checked="checked" /><label for="UpdateJobTypesAddComponents">Add Components for newly added Sub Types</label>
|
||||
checked="checked" /><label for="UpdateJobTypesAddComponents">Add Components for newly added Sub Types</label>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(function(){
|
||||
$(function () {
|
||||
var $Job_Show_Job_SubTypes_Update_Dialog = null;
|
||||
|
||||
$('#Job_Show_Job_SubTypes_Update').click(function () {
|
||||
@@ -162,46 +166,7 @@
|
||||
@if (Authorization.Has(Claims.Job.Actions.GenerateDocuments))
|
||||
{
|
||||
<div id="Job_Show_GenerateDocument_Container" class="status">
|
||||
@Html.DropDownList("Job_Show_GenerateDocument", Model.DocumentTemplatesSelectListItems)
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
var generatePdfUrl = '@Url.Action(MVC.API.Job.GeneratePdf(Model.Job.Id, null))?DocumentTemplateId=';
|
||||
var generatePackageUrl = '@Url.Action(MVC.API.Job.GeneratePdfPackage(Model.Job.Id, null))?DocumentTemplatePackageId=';
|
||||
var $documentTemplates = $('#Job_Show_GenerateDocument');
|
||||
var $generationHost;
|
||||
|
||||
$documentTemplates.change(function () {
|
||||
var v = $documentTemplates.val();
|
||||
if (v) {
|
||||
var url;
|
||||
if (v.lastIndexOf('Package:', 0) === 0) {
|
||||
url = generatePackageUrl + v.substring(8);
|
||||
} else {
|
||||
url = generatePdfUrl + v;
|
||||
}
|
||||
|
||||
if ($.connection && $.connection.hub && $.connection.hub.transport &&
|
||||
$.connection.hub.transport.name == 'foreverFrame') {
|
||||
// SignalR active with foreverFrame transport - use popup window
|
||||
window.open(url, '_blank', 'height=150,width=250,location=no,menubar=no,resizable=no,scrollbars=no,status=no,toolbar=no');
|
||||
} else {
|
||||
// use iFrame
|
||||
if (!$generationHost) {
|
||||
$generationHost = $('<iframe>')
|
||||
.attr({ 'src': url, 'title': 'Document Generation Host' })
|
||||
.addClass('hidden')
|
||||
.appendTo('body')
|
||||
.contents();
|
||||
} else {
|
||||
$generationHost[0].location.href = url;
|
||||
}
|
||||
}
|
||||
|
||||
$documentTemplates.val('').blur();
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@Html.Partial(MVC.Shared.Views._GenerateDocumentControl, Model.GenerateDocumentControlModel)
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
@@ -210,24 +175,26 @@
|
||||
{
|
||||
<td id="Job_Show_Device">
|
||||
<div>
|
||||
<h2 id="Job_Show_Device_SerialNumber" title="Serial Number">@if (Authorization.Has(Claims.Device.Show))
|
||||
{@Html.ActionLink(Model.Job.DeviceSerialNumber, MVC.Device.Show(Model.Job.DeviceSerialNumber))}
|
||||
else
|
||||
{@Model.Job.DeviceSerialNumber}</h2>
|
||||
<div class="clearfix">
|
||||
<div id="Job_Show_Device_Details">
|
||||
<img id="Job_Show_Device_Model_Image" alt="Model Image" src="@Url.Action(MVC.API.DeviceModel.Image(Model.Job.Device.DeviceModelId, Model.Job.Device.DeviceModel.ImageHash()))" />
|
||||
<div id="Job_Show_Device_ComputerName" title="Computer Name">@Model.Job.Device.ComputerName</div>
|
||||
<div id="Job_Show_Device_Model" title="Model">@Html.ActionLink(Model.Job.Device.DeviceModel.ToString(), MVC.Config.DeviceModel.Index(Model.Job.Device.DeviceModelId))</div>
|
||||
@if (Model.Job.Device.DeviceBatch != null)
|
||||
{
|
||||
<div id="Job_Show_Device_Batch" title="Batch">@Html.ActionLink(Model.Job.Device.DeviceBatch.Name, MVC.Config.DeviceBatch.Index(Model.Job.Device.DeviceBatchId))</div>
|
||||
}
|
||||
</div>
|
||||
<h2 id="Job_Show_Device_SerialNumber" title="Serial Number">
|
||||
@if (Authorization.Has(Claims.Device.Show))
|
||||
{@Html.ActionLink(Model.Job.DeviceSerialNumber, MVC.Device.Show(Model.Job.DeviceSerialNumber))}
|
||||
else
|
||||
{@Model.Job.DeviceSerialNumber}
|
||||
</h2>
|
||||
<div class="clearfix">
|
||||
<div id="Job_Show_Device_Details">
|
||||
<img id="Job_Show_Device_Model_Image" alt="Model Image" src="@Url.Action(MVC.API.DeviceModel.Image(Model.Job.Device.DeviceModelId, Model.Job.Device.DeviceModel.ImageHash()))" />
|
||||
<div id="Job_Show_Device_ComputerName" title="Computer Name">@Model.Job.Device.ComputerName</div>
|
||||
<div id="Job_Show_Device_Model" title="Model">@Html.ActionLink(Model.Job.Device.DeviceModel.ToString(), MVC.Config.DeviceModel.Index(Model.Job.Device.DeviceModelId))</div>
|
||||
@if (Model.Job.Device.DeviceBatch != null)
|
||||
{
|
||||
if (Model.Job.JobTypeId == JobType.JobTypeIds.HWar)
|
||||
{
|
||||
<div id="Job_Show_Device_Batch" title="Batch">@Html.ActionLink(Model.Job.Device.DeviceBatch.Name, MVC.Config.DeviceBatch.Index(Model.Job.Device.DeviceBatchId))</div>
|
||||
}
|
||||
</div>
|
||||
@if (Model.Job.Device.DeviceBatch != null)
|
||||
{
|
||||
if (Model.Job.JobTypeId == JobType.JobTypeIds.HWar)
|
||||
{
|
||||
<div id="Job_Show_Device_Details_HWar">
|
||||
<div>DEVICE WARRANTY</div>
|
||||
<div>Until: <span id="Job_Show_Device_Details_HWar_ValidUntil" data-livestamp="@Model.Job.Device.DeviceBatch.WarrantyValidUntil.ToUnixEpoc()">@Model.Job.Device.DeviceBatch.WarrantyValidUntil.ToFullDateTime("Unknown")</span></div>
|
||||
@@ -253,10 +220,10 @@
|
||||
});
|
||||
</script>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
if (Model.Job.JobTypeId == JobType.JobTypeIds.HNWar)
|
||||
{
|
||||
</div>
|
||||
}
|
||||
if (Model.Job.JobTypeId == JobType.JobTypeIds.HNWar)
|
||||
{
|
||||
<div id="Job_Show_Device_Details_HNWar">
|
||||
<div>INSURANCE</div>
|
||||
<div id="Job_Show_Device_Details_HNWar_InsuranceSupplier">@Model.Job.Device.DeviceBatch.InsuranceSupplier</div>
|
||||
@@ -283,72 +250,72 @@
|
||||
});
|
||||
</script>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
@if (Model.Job.DeviceHeld.HasValue)
|
||||
{
|
||||
var canEditLocation = Authorization.Has(Claims.Job.Properties.DeviceHeldLocation);
|
||||
<div id="Job_Show_Device_DeviceHeld" class="status">
|
||||
<table class="none">
|
||||
<tr>
|
||||
<td>Location:</td>
|
||||
<td>
|
||||
<span id="Job_Show_Device_DeviceHeld_Location">
|
||||
@if (canEditLocation)
|
||||
}
|
||||
</div>
|
||||
@if (Model.Job.DeviceHeld.HasValue)
|
||||
{
|
||||
var canEditLocation = Authorization.Has(Claims.Job.Properties.DeviceHeldLocation);
|
||||
<div id="Job_Show_Device_DeviceHeld" class="status">
|
||||
<table class="none">
|
||||
<tr>
|
||||
<td>Location:</td>
|
||||
<td>
|
||||
<span id="Job_Show_Device_DeviceHeld_Location">
|
||||
@if (canEditLocation)
|
||||
{
|
||||
switch (Model.LocationMode)
|
||||
{
|
||||
switch (Model.LocationMode)
|
||||
{
|
||||
case LocationModes.Unrestricted:
|
||||
case LocationModes.OptionalList:
|
||||
@Html.TextBoxFor(m => m.Job.DeviceHeldLocation, new { @class = "small discreet" })
|
||||
break;
|
||||
case LocationModes.RestrictedList:
|
||||
List<SelectListItem> listOptions = new List<SelectListItem>() { new SelectListItem() { Value = "", Text = "<Unknown>" } };
|
||||
if (!string.IsNullOrWhiteSpace(Model.Job.DeviceHeldLocation) && !Model.LocationOptions.Any(l => l.Location.Equals(Model.Job.DeviceHeldLocation)))
|
||||
{
|
||||
listOptions.Add(new SelectListItem() { Value = Model.Job.DeviceHeldLocation, Text = string.Format("Custom: {0}", Model.Job.DeviceHeldLocation) });
|
||||
}
|
||||
listOptions.AddRange(Model.LocationOptions.Select(l => new SelectListItem() { Value = l.Location, Text = (l.References.Count == 0 ? l.Location : (l.References.Count == 1 ? string.Format("{0} [Job {1}]", l.Location, l.References[0].JobId) : string.Format("{0} [{1} jobs]", l.Location, l.References.Count))) }));
|
||||
@Html.DropDownListFor(m => m.Job.DeviceHeldLocation, listOptions, new { @class = "small discreet" });
|
||||
break;
|
||||
}
|
||||
@AjaxHelpers.AjaxSave() @AjaxHelpers.AjaxLoader()
|
||||
case LocationModes.Unrestricted:
|
||||
case LocationModes.OptionalList:
|
||||
@Html.TextBoxFor(m => m.Job.DeviceHeldLocation, new { @class = "small discreet" })
|
||||
break;
|
||||
case LocationModes.RestrictedList:
|
||||
List<SelectListItem> listOptions = new List<SelectListItem>() { new SelectListItem() { Value = "", Text = "<Unknown>" } };
|
||||
if (!string.IsNullOrWhiteSpace(Model.Job.DeviceHeldLocation) && !Model.LocationOptions.Any(l => l.Location.Equals(Model.Job.DeviceHeldLocation)))
|
||||
{
|
||||
listOptions.Add(new SelectListItem() { Value = Model.Job.DeviceHeldLocation, Text = string.Format("Custom: {0}", Model.Job.DeviceHeldLocation) });
|
||||
}
|
||||
listOptions.AddRange(Model.LocationOptions.Select(l => new SelectListItem() { Value = l.Location, Text = (l.References.Count == 0 ? l.Location : (l.References.Count == 1 ? string.Format("{0} [Job {1}]", l.Location, l.References[0].JobId) : string.Format("{0} [{1} jobs]", l.Location, l.References.Count))) }));
|
||||
@Html.DropDownListFor(m => m.Job.DeviceHeldLocation, listOptions, new { @class = "small discreet" });
|
||||
break;
|
||||
}
|
||||
else if (string.IsNullOrEmpty(Model.Job.DeviceHeldLocation))
|
||||
{
|
||||
<span class="smallMessage"><None/Unknown></span>
|
||||
}
|
||||
else
|
||||
{
|
||||
@Model.Job.DeviceHeldLocation
|
||||
}
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Held Since:</td>
|
||||
<td><span id="Job_Show_Device_DeviceHeld_DeviceHeld">@CommonHelpers.FriendlyDateAndTitleUser(Model.Job.DeviceHeld, Model.Job.DeviceHeldTechUser)</span></td>
|
||||
</tr>
|
||||
@if (Model.Job.DeviceReadyForReturn.HasValue)
|
||||
{
|
||||
<tr>
|
||||
<td>Ready:</td>
|
||||
<td><span id="Job_Show_Device_DeviceHeld_DeviceReadyForReturn">@CommonHelpers.FriendlyDateAndTitleUser(Model.Job.DeviceReadyForReturn, Model.Job.DeviceReadyForReturnTechUser)</span></td>
|
||||
</tr>
|
||||
}
|
||||
@if (Model.Job.DeviceReturnedDate.HasValue)
|
||||
{
|
||||
<tr>
|
||||
<td>Returned:</td>
|
||||
<td><span id="Job_Show_Device_DeviceHeld_DeviceReturnedDate">@CommonHelpers.FriendlyDateAndTitleUser(Model.Job.DeviceReturnedDate, Model.Job.DeviceReturnedTechUser)</span></td>
|
||||
</tr>
|
||||
}
|
||||
</table>
|
||||
@if (canEditLocation)
|
||||
@AjaxHelpers.AjaxSave() @AjaxHelpers.AjaxLoader()
|
||||
}
|
||||
else if (string.IsNullOrEmpty(Model.Job.DeviceHeldLocation))
|
||||
{
|
||||
<span class="smallMessage"><None/Unknown></span>
|
||||
}
|
||||
else
|
||||
{
|
||||
@Model.Job.DeviceHeldLocation
|
||||
}
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Held Since:</td>
|
||||
<td><span id="Job_Show_Device_DeviceHeld_DeviceHeld">@CommonHelpers.FriendlyDateAndTitleUser(Model.Job.DeviceHeld, Model.Job.DeviceHeldTechUser)</span></td>
|
||||
</tr>
|
||||
@if (Model.Job.DeviceReadyForReturn.HasValue)
|
||||
{
|
||||
<script type="text/javascript">
|
||||
<tr>
|
||||
<td>Ready:</td>
|
||||
<td><span id="Job_Show_Device_DeviceHeld_DeviceReadyForReturn">@CommonHelpers.FriendlyDateAndTitleUser(Model.Job.DeviceReadyForReturn, Model.Job.DeviceReadyForReturnTechUser)</span></td>
|
||||
</tr>
|
||||
}
|
||||
@if (Model.Job.DeviceReturnedDate.HasValue)
|
||||
{
|
||||
<tr>
|
||||
<td>Returned:</td>
|
||||
<td><span id="Job_Show_Device_DeviceHeld_DeviceReturnedDate">@CommonHelpers.FriendlyDateAndTitleUser(Model.Job.DeviceReturnedDate, Model.Job.DeviceReturnedTechUser)</span></td>
|
||||
</tr>
|
||||
}
|
||||
</table>
|
||||
@if (canEditLocation)
|
||||
{
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
@switch (Model.LocationMode)
|
||||
{
|
||||
@@ -396,7 +363,7 @@
|
||||
.append(anchor);
|
||||
return item.appendTo(ul);
|
||||
};
|
||||
|
||||
|
||||
$deviceHeldLocation.autocomplete('search', '');
|
||||
}
|
||||
});
|
||||
@@ -448,146 +415,151 @@
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
|
||||
});
|
||||
</script>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</td>
|
||||
}
|
||||
</script>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</td>
|
||||
}
|
||||
@if (Model.Job.User != null)
|
||||
{
|
||||
<td id="Job_Show_User">
|
||||
<div>
|
||||
<h2 id="Job_Show_User_DisplayName" title="Display Name">@if (Authorization.Has(Claims.User.Show))
|
||||
{@Html.ActionLink(Model.Job.User.DisplayName, MVC.User.Show(Model.Job.UserId))}
|
||||
else
|
||||
{@Model.Job.User.DisplayName}
|
||||
</h2>
|
||||
<div id="Job_Show_User_Id" title="Id">@Model.Job.User.FriendlyId()</div>
|
||||
@if (Authorization.Has(Claims.User.ShowDetails))
|
||||
{
|
||||
if (!string.IsNullOrWhiteSpace(Model.Job.User.PhoneNumber))
|
||||
{<div id="Job_Show_User_PhoneNumber" title="Phone Number">Phone: @Model.Job.User.PhoneNumber</div>}
|
||||
if (!string.IsNullOrWhiteSpace(Model.Job.User.EmailAddress))
|
||||
{<div id="Job_Show_User_EmailAddress" title="Email Address">Email: <a href="mailto:@(Model.Job.User.EmailAddress)">@Model.Job.User.EmailAddress</a></div>}
|
||||
}
|
||||
@if (Authorization.Has(Claims.User.ShowFlagAssignments))
|
||||
{
|
||||
<div id="Job_Show_User_Flags">
|
||||
@foreach (var flag in Model.Job.User.UserFlagAssignments.Where(f => !f.RemovedDate.HasValue).Select(f => Tuple.Create(f, UserFlagService.GetUserFlag(f.UserFlagId))))
|
||||
{
|
||||
<i class="flag fa fa-@(flag.Item2.Icon) fa-fw d-@(flag.Item2.IconColour)"><span class="details"><span class="name">@flag.Item2.Name</span>@if (flag.Item1.Comments != null)
|
||||
{<span class="comments">@flag.Item1.Comments.ToHtmlComment()</span>}<span class="added">@CommonHelpers.FriendlyDateAndUser(flag.Item1.AddedDate, flag.Item1.AddedUserId)</span></span></i>
|
||||
}
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
$('#Job_Show_User_Flags')
|
||||
.tooltip({
|
||||
items: 'i.flag',
|
||||
content: function () {
|
||||
var $this = $(this);
|
||||
return $this.children('.details').html();
|
||||
},
|
||||
tooltipClass: 'User_FlagAssignment_Tooltip',
|
||||
position: {
|
||||
my: "right top",
|
||||
at: "right bottom",
|
||||
collision: "flipfit flip"
|
||||
},
|
||||
hade: {
|
||||
effect: ''
|
||||
},
|
||||
close: function (e, ui) {
|
||||
ui.tooltip.hover(
|
||||
function () {
|
||||
$(this).stop(true).fadeTo(100, 1);
|
||||
},
|
||||
function () {
|
||||
$(this).fadeOut(100, function () { $(this).remove(); });
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
}
|
||||
@if (Model.Job.WaitingForUserAction.HasValue)
|
||||
{
|
||||
<div id="Job_Show_User_WaitingForUserAction" class="status">
|
||||
<h4>Awaiting Action</h4>
|
||||
Since: <span data-livestamp="@Model.Job.WaitingForUserAction.ToUnixEpoc()">@Model.Job.WaitingForUserAction.ToFullDateTime()</span>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</td>
|
||||
<h2 id="Job_Show_User_DisplayName" title="Display Name">
|
||||
@if (Authorization.Has(Claims.User.Show))
|
||||
{@Html.ActionLink(Model.Job.User.DisplayName, MVC.User.Show(Model.Job.UserId))}
|
||||
else
|
||||
{@Model.Job.User.DisplayName}
|
||||
</h2>
|
||||
<div id="Job_Show_User_Id" title="Id">@Model.Job.User.FriendlyId()</div>
|
||||
@if (Authorization.Has(Claims.User.ShowDetails))
|
||||
{
|
||||
if (!string.IsNullOrWhiteSpace(Model.Job.User.PhoneNumber))
|
||||
{<div id="Job_Show_User_PhoneNumber" title="Phone Number">Phone: @Model.Job.User.PhoneNumber</div>}
|
||||
if (!string.IsNullOrWhiteSpace(Model.Job.User.EmailAddress))
|
||||
{<div id="Job_Show_User_EmailAddress" title="Email Address">Email: <a href="mailto:@(Model.Job.User.EmailAddress)">@Model.Job.User.EmailAddress</a></div>}
|
||||
}
|
||||
@if (Authorization.Has(Claims.User.ShowFlagAssignments))
|
||||
{
|
||||
<div id="Job_Show_User_Flags">
|
||||
@foreach (var flag in Model.Job.User.UserFlagAssignments.Where(f => !f.RemovedDate.HasValue).Select(f => Tuple.Create(f, UserFlagService.GetUserFlag(f.UserFlagId))))
|
||||
{
|
||||
<i class="flag fa fa-@(flag.Item2.Icon) fa-fw d-@(flag.Item2.IconColour)">
|
||||
<span class="details">
|
||||
<span class="name">@flag.Item2.Name</span>@if (flag.Item1.Comments != null)
|
||||
{<span class="comments">@flag.Item1.Comments.ToHtmlComment()</span>}<span class="added">@CommonHelpers.FriendlyDateAndUser(flag.Item1.AddedDate, flag.Item1.AddedUserId)</span>
|
||||
</span>
|
||||
</i>
|
||||
}
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
$('#Job_Show_User_Flags')
|
||||
.tooltip({
|
||||
items: 'i.flag',
|
||||
content: function () {
|
||||
var $this = $(this);
|
||||
return $this.children('.details').html();
|
||||
},
|
||||
tooltipClass: 'User_FlagAssignment_Tooltip',
|
||||
position: {
|
||||
my: "right top",
|
||||
at: "right bottom",
|
||||
collision: "flipfit flip"
|
||||
},
|
||||
hade: {
|
||||
effect: ''
|
||||
},
|
||||
close: function (e, ui) {
|
||||
ui.tooltip.hover(
|
||||
function () {
|
||||
$(this).stop(true).fadeTo(100, 1);
|
||||
},
|
||||
function () {
|
||||
$(this).fadeOut(100, function () { $(this).remove(); });
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
}
|
||||
@if (Model.Job.WaitingForUserAction.HasValue)
|
||||
{
|
||||
<div id="Job_Show_User_WaitingForUserAction" class="status">
|
||||
<h4>Awaiting Action</h4>
|
||||
Since: <span data-livestamp="@Model.Job.WaitingForUserAction.ToUnixEpoc()">@Model.Job.WaitingForUserAction.ToFullDateTime()</span>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</td>
|
||||
}
|
||||
</tr>
|
||||
<tr id="Job_Show_Subjects_Actions">
|
||||
<td id="Job_Show_Job_Actions">
|
||||
@{
|
||||
List<string> CanCloseForcedReasons;
|
||||
if (Model.Job.CanCloseForced(out CanCloseForcedReasons))
|
||||
{
|
||||
@Html.ActionLinkSmallButton("Forcibly Close", MVC.API.Job.Close(Model.Job.Id, true), "Job_Show_Job_Actions_ForceClose_Button")
|
||||
<div id="Job_Show_Job_Actions_ForceClose_Dialog" class="dialog" title="Forcibly Close this Job?">
|
||||
<div class="info-box error">
|
||||
<p class="fa-p">
|
||||
<i class="fa fa-exclamation-circle"></i><strong>Are you sure?</strong>
|
||||
</p>
|
||||
<ul>
|
||||
@foreach (var reason in CanCloseForcedReasons)
|
||||
{
|
||||
<li>@reason</li>
|
||||
}
|
||||
</ul>
|
||||
{
|
||||
@Html.ActionLinkSmallButton("Forcibly Close", MVC.API.Job.Close(Model.Job.Id, true), "Job_Show_Job_Actions_ForceClose_Button")
|
||||
<div id="Job_Show_Job_Actions_ForceClose_Dialog" class="dialog" title="Forcibly Close this Job?">
|
||||
<div class="info-box error">
|
||||
<p class="fa-p">
|
||||
<i class="fa fa-exclamation-circle"></i><strong>Are you sure?</strong>
|
||||
</p>
|
||||
<ul>
|
||||
@foreach (var reason in CanCloseForcedReasons)
|
||||
{
|
||||
<li>@reason</li>
|
||||
}
|
||||
</ul>
|
||||
</div>
|
||||
@using (Html.BeginForm(MVC.API.Job.ForceClose(Model.Job.Id, null, true)))
|
||||
{
|
||||
<h3>Reason:</h3>
|
||||
<p>
|
||||
<textarea name="Reason" class="block"></textarea>
|
||||
</p>
|
||||
}
|
||||
</div>
|
||||
@using (Html.BeginForm(MVC.API.Job.ForceClose(Model.Job.Id, null, true)))
|
||||
{
|
||||
<h3>Reason:</h3>
|
||||
<p>
|
||||
<textarea name="Reason" class="block"></textarea>
|
||||
</p>
|
||||
}
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
var button = $('#Job_Show_Job_Actions_ForceClose_Button');
|
||||
var buttonDialog = null;
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
var button = $('#Job_Show_Job_Actions_ForceClose_Button');
|
||||
var buttonDialog = null;
|
||||
|
||||
button.click(function () {
|
||||
if (!buttonDialog) {
|
||||
buttonDialog = $('#Job_Show_Job_Actions_ForceClose_Dialog');
|
||||
buttonDialog.dialog({
|
||||
resizable: false,
|
||||
modal: true,
|
||||
autoOpen: false,
|
||||
buttons: {
|
||||
"Forcibly Close Job": function () {
|
||||
var $this = $(this);
|
||||
$this.dialog("disable");
|
||||
$this.dialog("option", "buttons", null);
|
||||
$this.find('form').submit();
|
||||
},
|
||||
Cancel: function () {
|
||||
$(this).dialog("close");
|
||||
button.click(function () {
|
||||
if (!buttonDialog) {
|
||||
buttonDialog = $('#Job_Show_Job_Actions_ForceClose_Dialog');
|
||||
buttonDialog.dialog({
|
||||
resizable: false,
|
||||
modal: true,
|
||||
autoOpen: false,
|
||||
buttons: {
|
||||
"Forcibly Close Job": function () {
|
||||
var $this = $(this);
|
||||
$this.dialog("disable");
|
||||
$this.dialog("option", "buttons", null);
|
||||
$this.find('form').submit();
|
||||
},
|
||||
Cancel: function () {
|
||||
$(this).dialog("close");
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
buttonDialog.dialog('open');
|
||||
return false;
|
||||
buttonDialog.dialog('open');
|
||||
return false;
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
}
|
||||
</script>
|
||||
}
|
||||
}
|
||||
|
||||
@if (Model.Job.CanCloseNormally())
|
||||
{
|
||||
{
|
||||
@Html.ActionLinkSmallButton("Close", MVC.API.Job.Close(Model.Job.Id, true), "Job_Show_Job_Actions_Close_Button")
|
||||
<div id="Job_Show_Job_Actions_Close_Dialog" class="dialog" title="Close this Job?">
|
||||
<p>
|
||||
@@ -600,7 +572,7 @@
|
||||
var buttonDialog = null;
|
||||
var buttonLink = button.attr('href');
|
||||
button.attr('href', '#').click(function () {
|
||||
if (!buttonDialog){
|
||||
if (!buttonDialog) {
|
||||
buttonDialog = $('#Job_Show_Job_Actions_Close_Dialog');
|
||||
buttonDialog.dialog({
|
||||
resizable: false,
|
||||
@@ -627,7 +599,7 @@
|
||||
</script>
|
||||
}
|
||||
@if (Model.Job.CanReopen())
|
||||
{
|
||||
{
|
||||
@Html.ActionLinkSmallButton("Reopen Job", MVC.API.Job.Reopen(Model.Job.Id, true), "Job_Show_Job_Actions_Reopen_Button")
|
||||
<div id="Job_Show_Job_Actions_Reopen_Dialog" class="dialog" title="Reopen this Job?">
|
||||
<p>
|
||||
@@ -641,7 +613,7 @@
|
||||
var buttonLink = button.attr('href');
|
||||
button.attr('href', '#');
|
||||
button.click(function () {
|
||||
if (!buttonDialog){
|
||||
if (!buttonDialog) {
|
||||
buttonDialog = $('#Job_Show_Job_Actions_Reopen_Dialog');
|
||||
buttonDialog.dialog({
|
||||
resizable: false,
|
||||
@@ -660,7 +632,7 @@
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
buttonDialog.dialog('open');
|
||||
return false;
|
||||
});
|
||||
@@ -668,7 +640,7 @@
|
||||
</script>
|
||||
}
|
||||
@if (Model.Job.CanDelete())
|
||||
{
|
||||
{
|
||||
@Html.ActionLinkSmallButton("Delete", MVC.API.Job.Delete(Model.Job.Id, true), "Job_Show_Job_Actions_Delete_Button")
|
||||
<div id="Job_Show_Job_Actions_Delete_Dialog" class="dialog" title="Delete this Job?">
|
||||
<p>
|
||||
@@ -682,7 +654,7 @@
|
||||
var buttonLink = button.attr('href');
|
||||
button.attr('href', '#');
|
||||
button.click(function () {
|
||||
if (!buttonDialog){
|
||||
if (!buttonDialog) {
|
||||
buttonDialog = $('#Job_Show_Job_Actions_Delete_Dialog');
|
||||
buttonDialog.dialog({
|
||||
resizable: false,
|
||||
@@ -715,7 +687,7 @@
|
||||
var priorityItems = Enum.GetNames(typeof(JobQueuePriority)).Select(i => new SelectListItem() { Text = i, Value = i, Selected = (i == priorityValue) }).ToList();
|
||||
|
||||
var slaOptions = Disco.Services.Jobs.JobQueues.JobQueueService.SlaOptions.Select(o => new SelectListItem() { Text = o.Value, Value = o.Key.ToString() }).ToList();
|
||||
|
||||
|
||||
@Html.ActionLinkSmallButton("Add to Queue", MVC.API.JobQueueJob.AddJob(), "Job_Show_Job_Actions_AddQueue_Button")
|
||||
<div id="Job_Show_Job_Actions_AddQueue_Dialog" class="dialog" title="Add Job to Queue">
|
||||
@using (Html.BeginForm(MVC.API.JobQueueJob.AddJob()))
|
||||
@@ -751,12 +723,12 @@
|
||||
var button = $('#Job_Show_Job_Actions_AddQueue_Button');
|
||||
var buttonDialog = null;
|
||||
var buttonLink = button.attr('href');
|
||||
|
||||
|
||||
var queuePicker = null;
|
||||
var queueId = null;
|
||||
var details = null;
|
||||
|
||||
function queueSelected(){
|
||||
function queueSelected() {
|
||||
var queue = $(this);
|
||||
|
||||
queuePicker.children().removeClass('selected');
|
||||
@@ -775,11 +747,11 @@
|
||||
|
||||
$('#Job_Show_Job_Actions_AddQueue_Comment').focus().select();
|
||||
}
|
||||
|
||||
|
||||
button.attr('href', '#').click(function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
if (!buttonDialog){
|
||||
if (!buttonDialog) {
|
||||
buttonDialog = $('#Job_Show_Job_Actions_AddQueue_Dialog');
|
||||
buttonDialog.dialog({
|
||||
width: 600,
|
||||
@@ -792,12 +764,12 @@
|
||||
$(this).dialog("close");
|
||||
},
|
||||
"Add to Queue": function () {
|
||||
if (!!queueId.val()){
|
||||
if (!!queueId.val()) {
|
||||
var $this = $(this);
|
||||
$this.dialog("disable");
|
||||
$this.dialog("option", "buttons", null);
|
||||
buttonDialog.find('form').submit();
|
||||
}else{
|
||||
} else {
|
||||
alert('Select a Job Queue');
|
||||
}
|
||||
}
|
||||
@@ -825,27 +797,27 @@
|
||||
</script>
|
||||
}
|
||||
@if (Model.Job.CanLogWarranty())
|
||||
{
|
||||
{
|
||||
@Html.ActionLinkSmallButton("Log Warranty", MVC.Job.LogWarranty(Model.Job.Id, null, null), "Job_Show_Job_Actions_LogWarranty_Button")
|
||||
}
|
||||
@if (Model.Job.CanWarrantyCompleted())
|
||||
{
|
||||
{
|
||||
@Html.ActionLinkSmallButton("Warranty Complete", MVC.API.Job.UpdateWarrantyExternalCompletedDate(Model.Job.Id, "Now", true), "Job_Show_Job_Actions_WarrantyComplete_Button", "alert")
|
||||
}
|
||||
@if (Model.Job.CanInsuranceClaimFormSent())
|
||||
{
|
||||
{
|
||||
@Html.ActionLinkSmallButton("Insurance Claim Sent", MVC.API.Job.UpdateInsuranceClaimFormSentDate(Model.Job.Id, "Now", true), "Job_Show_Job_Actions_InsuranceClaimSent_Button", "alert")
|
||||
}
|
||||
@if (Model.Job.CanLogRepair())
|
||||
{
|
||||
{
|
||||
@Html.ActionLinkSmallButton("Log Repair", MVC.Job.LogRepair(Model.Job.Id, null, null), "Job_Show_Job_Actions_LogRepair_Button")
|
||||
}
|
||||
@if (Model.Job.CanRepairComplete())
|
||||
{
|
||||
{
|
||||
@Html.ActionLinkSmallButton("Repairs Complete", MVC.API.Job.UpdateNonWarrantyRepairerCompletedDate(Model.Job.Id, "Now", true), "Job_Show_Job_Actions_RepairComplete_Button", "alert")
|
||||
}
|
||||
@if (Model.Job.CanConvertHWarToHNWar())
|
||||
{
|
||||
{
|
||||
@Html.ActionLinkSmallButton("Convert to Non-Warranty", MVC.API.Job.ConvertHWarToHNWar(Model.Job.Id, true), "Job_Show_Job_Actions_ConvertToHNWar_Button")
|
||||
<div id="Job_Show_Job_Actions_ConvertToHNWar_Dialog" class="dialog" title="Convert this Job?">
|
||||
<p>
|
||||
@@ -860,7 +832,7 @@
|
||||
var buttonLink = button.attr('href');
|
||||
button.attr('href', '#');
|
||||
button.click(function () {
|
||||
if (!buttonDialog){
|
||||
if (!buttonDialog) {
|
||||
buttonDialog = $('#Job_Show_Job_Actions_ConvertToHNWar_Dialog');
|
||||
buttonDialog.dialog({
|
||||
resizable: false,
|
||||
@@ -883,7 +855,7 @@
|
||||
buttonDialog.dialog('open');
|
||||
return false;
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
</script>
|
||||
}
|
||||
@@ -892,15 +864,15 @@
|
||||
{
|
||||
<td id="Job_Show_Device_Actions">
|
||||
@if (Model.Job.CanDeviceHeld())
|
||||
{
|
||||
{
|
||||
@Html.ActionLinkSmallButton("Device Held", MVC.API.Job.DeviceHeld(Model.Job.Id, true), "Job_Show_Device_Actions_Held_Button")
|
||||
}
|
||||
@if (Model.Job.CanDeviceReadyForReturn())
|
||||
{
|
||||
{
|
||||
@Html.ActionLinkSmallButton("Device Ready For Return", MVC.API.Job.DeviceReadyForReturn(Model.Job.Id, true), "Job_Show_Device_Actions_DeviceReadyForReturn_Button", "alert")
|
||||
}
|
||||
@if (Model.Job.CanDeviceReturned())
|
||||
{
|
||||
{
|
||||
@Html.ActionLinkSmallButton("Device Returned", MVC.API.Job.DeviceReturned(Model.Job.Id, true), "Job_Show_Device_Actions_DeviceReturned_Button", Model.Job.CanDeviceReadyForReturn() ? null : "alert")
|
||||
}
|
||||
</td>
|
||||
@@ -911,7 +883,7 @@
|
||||
|
||||
|
||||
@if (Model.Job.CanWaitingForUserAction())
|
||||
{
|
||||
{
|
||||
<a id="Job_Show_User_Actions_WaitingForUserAction_Button" href="#" class="button small">Awaiting User Action</a>
|
||||
<div id="Job_Show_User_Actions_WaitingForUserAction_Dialog" class="dialog" title="Waiting for User Action">
|
||||
@using (Html.BeginForm(MVC.API.Job.WaitingForUserAction(Model.Job.Id, null, true)))
|
||||
@@ -955,7 +927,7 @@
|
||||
</script>
|
||||
}
|
||||
@if (Model.Job.CanNotWaitingForUserAction())
|
||||
{
|
||||
{
|
||||
<a id="Job_Show_User_Actions_NotWaitingForUserAction_Button" href="#" class="button alert small">User Action Resolved</a>
|
||||
<div id="Job_Show_User_Actions_NotWaitingForUserAction_Dialog" class="dialog" title="Not Waiting for User Action">
|
||||
@using (Html.BeginForm(MVC.API.Job.NotWaitingForUserAction(Model.Job.Id, null, true)))
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,58 @@
|
||||
@model Disco.Web.Models.Shared.GenerateDocumentControlModel
|
||||
@if (Model.Templates.Count > 0 || Model.TemplatePackages.Count > 0)
|
||||
{
|
||||
var selectListItems = new List<SelectListItem>();
|
||||
selectListItems.Add(new SelectListItem() { Selected = true, Value = string.Empty, Text = "Generate Document" });
|
||||
selectListItems.AddRange(Model.Templates.ToSelectListItems());
|
||||
selectListItems.AddRange(Model.TemplatePackages.ToSelectListItems());
|
||||
<div id="Document_Generation_Container">
|
||||
@Html.DropDownList("Document_Generate", selectListItems)
|
||||
<div id="Document_Generation_Dialog" class="dialog" title="Generate Document">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
var generatePdfUrl = '@Url.Action(MVC.API.DocumentTemplate.Generate())/';
|
||||
var generatePackageUrl = '@Url.Action(MVC.API.DocumentTemplatePackage.Generate())/';
|
||||
var generateTargetId = '@HttpUtility.UrlEncode(Model.Target.AttachmentReferenceId)';
|
||||
var $control = $('#Document_Generate');
|
||||
var $generationHost;
|
||||
|
||||
var downloadDocument = function (templateId) {
|
||||
|
||||
var url;
|
||||
if (templateId.lastIndexOf('Package:', 0) === 0)
|
||||
url = generatePackageUrl + templateId.substring(8);
|
||||
else
|
||||
url = generatePdfUrl + templateId;
|
||||
url = url + '?TargetId=' + generateTargetId;
|
||||
|
||||
if ($.connection && $.connection.hub && $.connection.hub.transport &&
|
||||
$.connection.hub.transport.name == 'foreverFrame') {
|
||||
// SignalR active with foreverFrame transport - use popup window
|
||||
window.open(url, '_blank', 'height=150,width=250,location=no,menubar=no,resizable=no,scrollbars=no,status=no,toolbar=no');
|
||||
} else {
|
||||
// use iFrame
|
||||
if (!$generationHost) {
|
||||
$generationHost = $('<iframe>')
|
||||
.attr({ 'src': url, 'title': 'Document Generation Host' })
|
||||
.addClass('hidden')
|
||||
.appendTo('body')
|
||||
.contents();
|
||||
} else {
|
||||
$generationHost[0].location.href = url;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$control.change(function () {
|
||||
var templateId = $control.val();
|
||||
if (templateId) {
|
||||
downloadDocument(templateId);
|
||||
|
||||
$control.val('').blur();
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
}
|
||||
@@ -0,0 +1,146 @@
|
||||
#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.Views.Shared
|
||||
{
|
||||
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;
|
||||
using Disco.Services.Web;
|
||||
using Disco.Web;
|
||||
using Disco.Web.Extensions;
|
||||
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "2.0.0.0")]
|
||||
[System.Web.WebPages.PageVirtualPathAttribute("~/Views/Shared/_GenerateDocumentControl.cshtml")]
|
||||
public partial class _GenerateDocumentControl : Disco.Services.Web.WebViewPage<Disco.Web.Models.Shared.GenerateDocumentControlModel>
|
||||
{
|
||||
public _GenerateDocumentControl()
|
||||
{
|
||||
}
|
||||
public override void Execute()
|
||||
{
|
||||
|
||||
#line 2 "..\..\Views\Shared\_GenerateDocumentControl.cshtml"
|
||||
if (Model.Templates.Count > 0 || Model.TemplatePackages.Count > 0)
|
||||
{
|
||||
var selectListItems = new List<SelectListItem>();
|
||||
selectListItems.Add(new SelectListItem() { Selected = true, Value = string.Empty, Text = "Generate Document" });
|
||||
selectListItems.AddRange(Model.Templates.ToSelectListItems());
|
||||
selectListItems.AddRange(Model.TemplatePackages.ToSelectListItems());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteLiteral(" id=\"Document_Generation_Container\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 9 "..\..\Views\Shared\_GenerateDocumentControl.cshtml"
|
||||
Write(Html.DropDownList("Document_Generate", selectListItems));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n <div");
|
||||
|
||||
WriteLiteral(" id=\"Document_Generation_Dialog\"");
|
||||
|
||||
WriteLiteral(" class=\"dialog\"");
|
||||
|
||||
WriteLiteral(" title=\"Generate Document\"");
|
||||
|
||||
WriteLiteral(">\r\n </div>\r\n </div>\r\n");
|
||||
|
||||
WriteLiteral(" <script");
|
||||
|
||||
WriteLiteral(" type=\"text/javascript\"");
|
||||
|
||||
WriteLiteral(">\r\n $(function () {\r\n var generatePdfUrl = \'");
|
||||
|
||||
|
||||
#line 15 "..\..\Views\Shared\_GenerateDocumentControl.cshtml"
|
||||
Write(Url.Action(MVC.API.DocumentTemplate.Generate()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("/\';\r\n var generatePackageUrl = \'");
|
||||
|
||||
|
||||
#line 16 "..\..\Views\Shared\_GenerateDocumentControl.cshtml"
|
||||
Write(Url.Action(MVC.API.DocumentTemplatePackage.Generate()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("/\';\r\n var generateTargetId = \'");
|
||||
|
||||
|
||||
#line 17 "..\..\Views\Shared\_GenerateDocumentControl.cshtml"
|
||||
Write(HttpUtility.UrlEncode(Model.Target.AttachmentReferenceId));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\';\r\n var $control = $(\'#Document_Generate\');\r\n var $generat" +
|
||||
"ionHost;\r\n\r\n var downloadDocument = function (templateId) {\r\n\r\n " +
|
||||
" var url;\r\n if (templateId.lastIndexOf(\'Package:\', 0) ==" +
|
||||
"= 0)\r\n url = generatePackageUrl + templateId.substring(8);\r\n " +
|
||||
" else\r\n url = generatePdfUrl + templateId;\r\n " +
|
||||
" url = url + \'?TargetId=\' + generateTargetId;\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,width=250,location=no,menubar=no," +
|
||||
"resizable=no,scrollbars=no,status=no,toolbar=no\');\r\n } else {\r\n " +
|
||||
" // use iFrame\r\n if (!$generationHost) {\r\n " +
|
||||
" $generationHost = $(\'<iframe>\')\r\n " +
|
||||
" .attr({ \'src\': url, \'title\': \'Document Generation Host\' })\r\n " +
|
||||
" .addClass(\'hidden\')\r\n .appendTo(\'body\')\r\n " +
|
||||
" .contents();\r\n } else {\r\n " +
|
||||
" $generationHost[0].location.href = url;\r\n }\r\n " +
|
||||
" }\r\n }\r\n\r\n $control.change(function () {\r\n " +
|
||||
" var templateId = $control.val();\r\n if (templateId) " +
|
||||
"{\r\n downloadDocument(templateId);\r\n\r\n $con" +
|
||||
"trol.val(\'\').blur();\r\n }\r\n });\r\n });\r\n </scr" +
|
||||
"ipt>\r\n");
|
||||
|
||||
|
||||
#line 58 "..\..\Views\Shared\_GenerateDocumentControl.cshtml"
|
||||
}
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
@@ -69,46 +69,7 @@
|
||||
@if (Authorization.Has(Claims.User.Actions.GenerateDocuments))
|
||||
{
|
||||
<div id="User_Show_GenerateDocument_Container" class="status">
|
||||
@Html.DropDownList("User_Show_GenerateDocument", Model.DocumentTemplatesSelectListItems)
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
var generatePdfUrl = '@Url.Action(MVC.API.User.GeneratePdf(Model.User.UserId, null))?DocumentTemplateId=';
|
||||
var generatePackageUrl = '@Url.Action(MVC.API.User.GeneratePdfPackage(Model.User.UserId, null))?DocumentTemplatePackageId=';
|
||||
var $documentTemplates = $('#User_Show_GenerateDocument');
|
||||
var $generationHost;
|
||||
|
||||
$documentTemplates.change(function () {
|
||||
var v = $documentTemplates.val();
|
||||
if (v) {
|
||||
var url;
|
||||
if (v.lastIndexOf('Package:', 0) === 0) {
|
||||
url = generatePackageUrl + v.substring(8);
|
||||
} else {
|
||||
url = generatePdfUrl + v;
|
||||
}
|
||||
|
||||
if ($.connection && $.connection.hub && $.connection.hub.transport &&
|
||||
$.connection.hub.transport.name == 'foreverFrame') {
|
||||
// SignalR active with foreverFrame transport - use popup window
|
||||
window.open(url, '_blank', 'height=150,width=250,location=no,menubar=no,resizable=no,scrollbars=no,status=no,toolbar=no');
|
||||
} else {
|
||||
// use iFrame
|
||||
if (!$generationHost) {
|
||||
$generationHost = $('<iframe>')
|
||||
.attr({ 'src': url, 'title': 'Document Generation Host' })
|
||||
.addClass('hidden')
|
||||
.appendTo('body')
|
||||
.contents();
|
||||
} else {
|
||||
$generationHost[0].location.href = url;
|
||||
}
|
||||
}
|
||||
|
||||
$documentTemplates.val('').blur();
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@Html.Partial(MVC.Shared.Views._GenerateDocumentControl, Model.GenerateDocumentControlModel)
|
||||
</div>
|
||||
}
|
||||
<div id="User_Show_Details_Actions">
|
||||
|
||||
@@ -313,69 +313,15 @@ WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 72 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
Write(Html.DropDownList("User_Show_GenerateDocument", Model.DocumentTemplatesSelectListItems));
|
||||
Write(Html.Partial(MVC.Shared.Views._GenerateDocumentControl, Model.GenerateDocumentControlModel));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n <script");
|
||||
|
||||
WriteLiteral(" type=\"text/javascript\"");
|
||||
|
||||
WriteLiteral(">\r\n $(function () {\r\n " +
|
||||
" var generatePdfUrl = \'");
|
||||
WriteLiteral("\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 75 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
Write(Url.Action(MVC.API.User.GeneratePdf(Model.User.UserId, null)));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("?DocumentTemplateId=\';\r\n var generatePackageUr" +
|
||||
"l = \'");
|
||||
|
||||
|
||||
#line 76 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
Write(Url.Action(MVC.API.User.GeneratePdfPackage(Model.User.UserId, null)));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("?DocumentTemplatePackageId=\';\r\n var $documentT" +
|
||||
"emplates = $(\'#User_Show_GenerateDocument\');\r\n " +
|
||||
" var $generationHost;\r\n\r\n $documentTemplates" +
|
||||
".change(function () {\r\n var v = $document" +
|
||||
"Templates.val();\r\n if (v) {\r\n " +
|
||||
" var url;\r\n " +
|
||||
" if (v.lastIndexOf(\'Package:\', 0) === 0) {\r\n " +
|
||||
" url = generatePackageUrl + v.substring(8);\r\n " +
|
||||
" } else {\r\n " +
|
||||
" url = generatePdfUrl + v;\r\n }\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,width=250,location=no,menubar=no,resizable=no,scrollbars=no" +
|
||||
",status=no,toolbar=no\');\r\n } else {\r\n" +
|
||||
" // use iFrame\r\n " +
|
||||
" if (!$generationHost) {\r\n " +
|
||||
" $generationHost = $(\'<iframe>\')\r\n " +
|
||||
" .attr({ \'src\': url, \'title\': \'Document Gene" +
|
||||
"ration Host\' })\r\n .addCla" +
|
||||
"ss(\'hidden\')\r\n .appendTo(" +
|
||||
"\'body\')\r\n .contents();\r\n " +
|
||||
" } else {\r\n " +
|
||||
" $generationHost[0].location.href = url;\r\n " +
|
||||
" }\r\n " +
|
||||
" }\r\n\r\n $documentTemplates.val(\'\')" +
|
||||
".blur();\r\n }\r\n " +
|
||||
" });\r\n });\r\n <" +
|
||||
"/script>\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 113 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 74 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -388,13 +334,13 @@ WriteLiteral(" id=\"User_Show_Details_Actions\"");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 115 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 76 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 115 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 76 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
if (Model.User.CanCreateJob())
|
||||
{
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/Disco-CreateJob");
|
||||
@@ -403,14 +349,14 @@ WriteLiteral(">\r\n");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 118 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 79 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
Write(Html.ActionLinkSmallButton("Create Job", MVC.Job.Create(Model.PrimaryDeviceSerialNumber, Model.User.UserId), "User_Show_Details_Actions_CreateJob_Button"));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 118 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 79 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
|
||||
if (currentDeviceAssignments.Count > 1)
|
||||
{
|
||||
@@ -450,13 +396,13 @@ WriteLiteral(" class=\"none\"");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 131 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 92 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 131 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 92 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
foreach (var assignment in currentDeviceAssignments)
|
||||
{
|
||||
|
||||
@@ -470,7 +416,7 @@ WriteLiteral(" class=\"CreateJob_Assignment clearfix\"");
|
||||
WriteLiteral(" data-createjoburl=\"");
|
||||
|
||||
|
||||
#line 133 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 94 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
Write(Url.Action(MVC.Job.Create(assignment.DeviceSerialNumber, Model.User.UserId)));
|
||||
|
||||
|
||||
@@ -494,14 +440,14 @@ WriteLiteral(" class=\"CreateJob_Assignment_Image\"");
|
||||
|
||||
WriteLiteral(" alt=\"Model Image\"");
|
||||
|
||||
WriteAttribute("src", Tuple.Create(" src=\"", 8795), Tuple.Create("\"", 8916)
|
||||
WriteAttribute("src", Tuple.Create(" src=\"", 6003), Tuple.Create("\"", 6124)
|
||||
|
||||
#line 138 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 8801), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.DeviceModel.Image(assignment.Device.DeviceModel.Id, assignment.Device.DeviceModel.ImageHash()))
|
||||
#line 99 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 6009), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.DeviceModel.Image(assignment.Device.DeviceModel.Id, assignment.Device.DeviceModel.ImageHash()))
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 8801), false)
|
||||
, 6009), false)
|
||||
);
|
||||
|
||||
WriteLiteral(@" />
|
||||
@@ -515,7 +461,7 @@ WriteLiteral(@" />
|
||||
<span>");
|
||||
|
||||
|
||||
#line 146 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 107 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
Write(assignment.Device.SerialNumber);
|
||||
|
||||
|
||||
@@ -524,7 +470,7 @@ WriteLiteral(@" />
|
||||
WriteLiteral("</span> (<span>");
|
||||
|
||||
|
||||
#line 146 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 107 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
Write(assignment.Device.ComputerName);
|
||||
|
||||
|
||||
@@ -541,7 +487,7 @@ WriteLiteral(@"</span>)
|
||||
<span>");
|
||||
|
||||
|
||||
#line 154 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 115 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
Write(assignment.Device.DeviceModel.ToString());
|
||||
|
||||
|
||||
@@ -556,13 +502,13 @@ WriteLiteral(@"</span>
|
||||
");
|
||||
|
||||
|
||||
#line 160 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 121 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 160 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 121 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
if (!string.IsNullOrEmpty(assignment.Device.AssetNumber))
|
||||
{
|
||||
|
||||
@@ -572,7 +518,7 @@ WriteLiteral(@"</span>
|
||||
WriteLiteral(" <span>");
|
||||
|
||||
|
||||
#line 162 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 123 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
Write(assignment.Device.AssetNumber);
|
||||
|
||||
|
||||
@@ -581,7 +527,7 @@ WriteLiteral(" <s
|
||||
WriteLiteral("</span>\r\n");
|
||||
|
||||
|
||||
#line 163 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 124 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -596,7 +542,7 @@ WriteLiteral(" class=\"smallMessage\"");
|
||||
WriteLiteral(">Unknown</span>\r\n");
|
||||
|
||||
|
||||
#line 167 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 128 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -610,7 +556,7 @@ WriteLiteral(@" </td>
|
||||
<span>");
|
||||
|
||||
|
||||
#line 173 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 134 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
Write(CommonHelpers.FriendlyDate(assignment.AssignedDate));
|
||||
|
||||
|
||||
@@ -624,7 +570,7 @@ WriteLiteral(@"</span>
|
||||
</li>");
|
||||
|
||||
|
||||
#line 178 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 139 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -662,7 +608,7 @@ WriteLiteral(" <script>\r\n
|
||||
";\r\n </script>\r\n");
|
||||
|
||||
|
||||
#line 218 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 179 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -685,7 +631,7 @@ WriteLiteral(@" <script>
|
||||
");
|
||||
|
||||
|
||||
#line 233 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 194 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -695,7 +641,7 @@ WriteLiteral(@" <script>
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 235 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 196 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
if (Model.User.CanAddUserFlags() && Model.AvailableUserFlags != null && Model.AvailableUserFlags.Count > 0)
|
||||
{
|
||||
|
||||
@@ -703,14 +649,14 @@ WriteLiteral(" ");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 237 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 198 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
Write(Html.ActionLinkSmallButton("Add Flag", MVC.API.UserFlagAssignment.AddUser(), "User_Show_Details_Actions_AddFlag_Button"));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 237 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 198 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
|
||||
|
||||
|
||||
@@ -727,13 +673,13 @@ WriteLiteral(" title=\"Add User Flag\"");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 239 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 200 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 239 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 200 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
using (Html.BeginForm(MVC.API.UserFlagAssignment.AddUser()))
|
||||
{
|
||||
|
||||
@@ -758,14 +704,14 @@ WriteLiteral(" type=\"hidden\"");
|
||||
|
||||
WriteLiteral(" name=\"UserId\"");
|
||||
|
||||
WriteAttribute("value", Tuple.Create(" value=\"", 15615), Tuple.Create("\"", 15641)
|
||||
WriteAttribute("value", Tuple.Create(" value=\"", 12823), Tuple.Create("\"", 12849)
|
||||
|
||||
#line 242 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 15623), Tuple.Create<System.Object, System.Int32>(Model.User.UserId
|
||||
#line 203 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 12831), Tuple.Create<System.Object, System.Int32>(Model.User.UserId
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 15623), false)
|
||||
, 12831), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" />\r\n");
|
||||
@@ -777,13 +723,13 @@ WriteLiteral(" class=\"flagPicker\"");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 244 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 205 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 244 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 205 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
foreach (var userFlag in Model.AvailableUserFlags.OrderBy(jq => jq.Name))
|
||||
{
|
||||
|
||||
@@ -797,7 +743,7 @@ WriteLiteral(" class=\"flag\"");
|
||||
WriteLiteral(" data-userflagid=\"");
|
||||
|
||||
|
||||
#line 246 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 207 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
Write(userFlag.Id);
|
||||
|
||||
|
||||
@@ -807,32 +753,32 @@ WriteLiteral("\"");
|
||||
|
||||
WriteLiteral(">\r\n <i");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 16015), Tuple.Create("\"", 16082)
|
||||
, Tuple.Create(Tuple.Create("", 16023), Tuple.Create("fa", 16023), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 16025), Tuple.Create("fa-", 16026), true)
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 13223), Tuple.Create("\"", 13290)
|
||||
, Tuple.Create(Tuple.Create("", 13231), Tuple.Create("fa", 13231), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 13233), Tuple.Create("fa-", 13234), true)
|
||||
|
||||
#line 247 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 16029), Tuple.Create<System.Object, System.Int32>(userFlag.Icon
|
||||
#line 208 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 13237), Tuple.Create<System.Object, System.Int32>(userFlag.Icon
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 16029), false)
|
||||
, Tuple.Create(Tuple.Create(" ", 16045), Tuple.Create("fa-fw", 16046), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 16051), Tuple.Create("fa-lg", 16052), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 16057), Tuple.Create("d-", 16058), true)
|
||||
, 13237), false)
|
||||
, Tuple.Create(Tuple.Create(" ", 13253), Tuple.Create("fa-fw", 13254), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 13259), Tuple.Create("fa-lg", 13260), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 13265), Tuple.Create("d-", 13266), true)
|
||||
|
||||
#line 247 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 16060), Tuple.Create<System.Object, System.Int32>(userFlag.IconColour
|
||||
#line 208 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 13268), Tuple.Create<System.Object, System.Int32>(userFlag.IconColour
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 16060), false)
|
||||
, 13268), false)
|
||||
);
|
||||
|
||||
WriteLiteral("></i>");
|
||||
|
||||
|
||||
#line 247 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 208 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
Write(userFlag.Name);
|
||||
|
||||
|
||||
@@ -841,7 +787,7 @@ WriteLiteral("></i>");
|
||||
WriteLiteral("\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 249 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 210 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -865,7 +811,7 @@ WriteLiteral("></textarea>\r\n </div>\r\n
|
||||
" </div>\r\n");
|
||||
|
||||
|
||||
#line 257 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 218 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -926,7 +872,7 @@ WriteLiteral(">\r\n $(function () {\r\n
|
||||
"\r\n });\r\n </script>\r\n");
|
||||
|
||||
|
||||
#line 324 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 285 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -935,13 +881,13 @@ WriteLiteral(">\r\n $(function () {\r\n
|
||||
WriteLiteral(" </div>\r\n </div>\r\n </td>\r\n");
|
||||
|
||||
|
||||
#line 328 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 289 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 328 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 289 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
if (Authorization.Has(Claims.User.ShowAssignments))
|
||||
{
|
||||
|
||||
@@ -959,13 +905,13 @@ WriteLiteral(" id=\"User_Show_AssignedDevices_Active\"");
|
||||
WriteLiteral(">\r\n <h3>Current Device Assignments</h3>\r\n");
|
||||
|
||||
|
||||
#line 334 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 295 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 334 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 295 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
if (currentDeviceAssignments.Count > 0)
|
||||
{
|
||||
foreach (var assignment in currentDeviceAssignments)
|
||||
@@ -981,7 +927,7 @@ WriteLiteral(" class=\"User_Show_AssignedDevices_CurrentAssignment clearfix\"");
|
||||
WriteLiteral(" data-deviceserialnumber=\"");
|
||||
|
||||
|
||||
#line 338 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 299 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
Write(assignment.DeviceSerialNumber);
|
||||
|
||||
|
||||
@@ -992,13 +938,13 @@ WriteLiteral("\"");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 339 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 300 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 339 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 300 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
if (Authorization.Has(Claims.Device.Show))
|
||||
{
|
||||
|
||||
@@ -1007,14 +953,14 @@ WriteLiteral(">\r\n");
|
||||
#line hidden
|
||||
WriteLiteral(" <a");
|
||||
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 21480), Tuple.Create("\"", 21547)
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 18688), Tuple.Create("\"", 18755)
|
||||
|
||||
#line 341 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 21487), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.Device.Show(assignment.Device.SerialNumber))
|
||||
#line 302 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 18695), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.Device.Show(assignment.Device.SerialNumber))
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 21487), false)
|
||||
, 18695), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">\r\n <img");
|
||||
@@ -1023,20 +969,20 @@ WriteLiteral(" class=\"User_Show_AssignedDevices_CurrentAssignment_Image\"");
|
||||
|
||||
WriteLiteral(" alt=\"Model Image\"");
|
||||
|
||||
WriteAttribute("src", Tuple.Create(" src=\"", 21679), Tuple.Create("\"", 21800)
|
||||
WriteAttribute("src", Tuple.Create(" src=\"", 18887), Tuple.Create("\"", 19008)
|
||||
|
||||
#line 342 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 21685), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.DeviceModel.Image(assignment.Device.DeviceModel.Id, assignment.Device.DeviceModel.ImageHash()))
|
||||
#line 303 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 18893), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.DeviceModel.Image(assignment.Device.DeviceModel.Id, assignment.Device.DeviceModel.ImageHash()))
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 21685), false)
|
||||
, 18893), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" />\r\n </a>\r\n");
|
||||
|
||||
|
||||
#line 344 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 305 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1050,20 +996,20 @@ WriteLiteral(" class=\"User_Show_AssignedDevices_CurrentAssignment_Image\"");
|
||||
|
||||
WriteLiteral(" alt=\"Model Image\"");
|
||||
|
||||
WriteAttribute("src", Tuple.Create(" src=\"", 22112), Tuple.Create("\"", 22233)
|
||||
WriteAttribute("src", Tuple.Create(" src=\"", 19320), Tuple.Create("\"", 19441)
|
||||
|
||||
#line 347 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 22118), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.DeviceModel.Image(assignment.Device.DeviceModel.Id, assignment.Device.DeviceModel.ImageHash()))
|
||||
#line 308 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 19326), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.DeviceModel.Image(assignment.Device.DeviceModel.Id, assignment.Device.DeviceModel.ImageHash()))
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 22118), false)
|
||||
, 19326), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" />\r\n");
|
||||
|
||||
|
||||
#line 348 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 309 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -1091,13 +1037,13 @@ WriteLiteral(" class=\"User_Show_AssignedDevices_CurrentAssignment_SerialNumber\
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 358 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 319 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 358 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 319 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
if (Authorization.Has(Claims.Device.Show))
|
||||
{
|
||||
|
||||
@@ -1105,14 +1051,14 @@ WriteLiteral(">\r\n");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 360 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 321 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
Write(Html.ActionLink(assignment.Device.SerialNumber, MVC.Device.Show(assignment.Device.SerialNumber)));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 360 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 321 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
|
||||
}
|
||||
else
|
||||
@@ -1122,14 +1068,14 @@ WriteLiteral(">\r\n");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 364 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 325 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
Write(assignment.Device.SerialNumber);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 364 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 325 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
|
||||
}
|
||||
|
||||
@@ -1139,13 +1085,13 @@ WriteLiteral(">\r\n");
|
||||
WriteLiteral(" </span>\r\n");
|
||||
|
||||
|
||||
#line 367 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 328 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 367 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 328 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
if (!string.IsNullOrWhiteSpace(assignment.Device.ComputerName))
|
||||
{
|
||||
|
||||
@@ -1161,7 +1107,7 @@ WriteLiteral(" class=\"User_Show_AssignedDevices_CurrentAssignment_ComputerName\
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 369 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 330 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
Write(assignment.Device.ComputerName);
|
||||
|
||||
|
||||
@@ -1172,7 +1118,7 @@ WriteLiteral("</span>)");
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
|
||||
#line 370 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 331 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -1182,13 +1128,13 @@ WriteLiteral(" </td>\r\n
|
||||
" </tr>\r\n");
|
||||
|
||||
|
||||
#line 373 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 334 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 373 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 334 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
if (!string.IsNullOrEmpty(assignment.Device.AssetNumber))
|
||||
{
|
||||
|
||||
@@ -1205,7 +1151,7 @@ WriteLiteral(" class=\"User_Show_AssignedDevices_CurrentAssignment_Asset\"");
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 378 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 339 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
Write(assignment.Device.AssetNumber);
|
||||
|
||||
|
||||
@@ -1215,7 +1161,7 @@ WriteLiteral("</span>\r\n
|
||||
" </tr>\r\n");
|
||||
|
||||
|
||||
#line 381 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 342 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -1224,7 +1170,7 @@ WriteLiteral("</span>\r\n
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 382 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 343 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
if (assignment.Device.DeviceModelId.HasValue)
|
||||
{
|
||||
|
||||
@@ -1243,7 +1189,7 @@ WriteLiteral(" class=\"User_Show_AssignedDevices_CurrentAssignment_Model\"");
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 389 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 350 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
Write(assignment.Device.DeviceModel.ToString());
|
||||
|
||||
|
||||
@@ -1253,7 +1199,7 @@ WriteLiteral("</span>\r\n
|
||||
" </tr>\r\n");
|
||||
|
||||
|
||||
#line 392 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 353 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -1271,7 +1217,7 @@ WriteLiteral(" class=\"User_Show_AssignedDevices_CurrentAssignment_Profile\"");
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 398 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 359 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
Write(assignment.Device.DeviceProfile.ToString());
|
||||
|
||||
|
||||
@@ -1281,13 +1227,13 @@ WriteLiteral("</span>\r\n
|
||||
" </tr>\r\n");
|
||||
|
||||
|
||||
#line 401 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 362 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 401 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 362 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
if (assignment.Device.DeviceBatchId.HasValue)
|
||||
{
|
||||
|
||||
@@ -1306,7 +1252,7 @@ WriteLiteral(" class=\"User_Show_AssignedDevices_CurrentAssignment_Batch\"");
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 408 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 369 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
Write(assignment.Device.DeviceBatch.ToString());
|
||||
|
||||
|
||||
@@ -1316,7 +1262,7 @@ WriteLiteral("</span>\r\n
|
||||
" </tr>\r\n");
|
||||
|
||||
|
||||
#line 411 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 372 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -1332,7 +1278,7 @@ WriteLiteral(" class=\"User_Show_AssignedDevices_CurrentAssignment_Assigned\"");
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 415 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 376 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
Write(CommonHelpers.FriendlyDate(assignment.AssignedDate));
|
||||
|
||||
|
||||
@@ -1348,7 +1294,7 @@ WriteLiteral(@"</span>
|
||||
");
|
||||
|
||||
|
||||
#line 422 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 383 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -1364,7 +1310,7 @@ WriteLiteral(" class=\"smallMessage\"");
|
||||
WriteLiteral(">No Current Device Assignments</span>\r\n");
|
||||
|
||||
|
||||
#line 427 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 388 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -1374,7 +1320,7 @@ WriteLiteral(" </div>\r\n </div>\r\n
|
||||
"\r\n");
|
||||
|
||||
|
||||
#line 431 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 392 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user