Update: Device UI Corrections

This commit is contained in:
Gary Sharp
2013-06-20 16:51:15 +10:00
parent 6f7f3336b3
commit 7353c7c6b3
16 changed files with 63 additions and 973 deletions
-116
View File
@@ -90,122 +90,6 @@
}
#Device_Show #Device_Show_Subjects {
table-layout: fixed;
/*#Device_Show_Job
{
#Device_Show_Device_Type
{
&>table
{
table-layout: fixed;
}
}
#Device_Show_Device_SubTypes_1, #Device_Show_Device_SubTypes_2
{
padding-left: 16px;
font-weight: bold;
}
#Device_Show_Device_SubTypes_Update
{
margin-left: 16px;
font-size: 0.9em;
}
#Device_Show_Device_SubTypes_Update_Dialog
{
display: none;
}
#Device_Show_Device_Dates
{
padding-bottom: 6px;
table
{
table-layout: fixed;
&>tbody > tr > td
{
vertical-align: middle;
}
&>tbody > tr > td:first-child
{
font-weight: bold;
width: 60px;
}
}
}
#Device_Show_GenerateDocument_Container
{
padding-top: 4px;
#Device_Show_GenerateDocument
{
padding: 0;
}
}
}
#Device_Show_Device
{
&>div
{
padding-left: 102px;
min-height: 100px;
}
#Device_Show_Device_Model_Image
{
position: absolute;
left: 0;
top: 0;
height: 96px;
width: 96px;
}
#Device_Show_Device_Details
{
float: left;
}
#Device_Show_Device_Details_HWar, #Device_Show_Device_Details_HNWar
{
float: right;
border-left: 1px dashed #ddd;
padding-left: 4px;
margin-right: 2px;
}
#Device_Show_Device_Details_HWar_Details_Button, #Device_Show_Device_Details_HNWar_Details_Button
{
font-size: .9em;
}
#Device_Show_Device_DeviceHeld
{
table
{
table-layout: fixed;
&>tbody > tr > td:first-child
{
width: 62px;
}
}
}
}
#Device_Show_User
{
#Device_Show_User_Type
{
font-style: italic;
}
}*/
}
#Device_Show #Device_Show_Subjects > tbody > tr > td {
padding-top: 0;
-114
View File
@@ -98,121 +98,7 @@
margin: 0 auto;
}
}
/*#Device_Show_Job
{
#Device_Show_Device_Type
{
&>table
{
table-layout: fixed;
}
}
#Device_Show_Device_SubTypes_1, #Device_Show_Device_SubTypes_2
{
padding-left: 16px;
font-weight: bold;
}
#Device_Show_Device_SubTypes_Update
{
margin-left: 16px;
font-size: 0.9em;
}
#Device_Show_Device_SubTypes_Update_Dialog
{
display: none;
}
#Device_Show_Device_Dates
{
padding-bottom: 6px;
table
{
table-layout: fixed;
&>tbody > tr > td
{
vertical-align: middle;
}
&>tbody > tr > td:first-child
{
font-weight: bold;
width: 60px;
}
}
}
#Device_Show_GenerateDocument_Container
{
padding-top: 4px;
#Device_Show_GenerateDocument
{
padding: 0;
}
}
}
#Device_Show_Device
{
&>div
{
padding-left: 102px;
min-height: 100px;
}
#Device_Show_Device_Model_Image
{
position: absolute;
left: 0;
top: 0;
height: 96px;
width: 96px;
}
#Device_Show_Device_Details
{
float: left;
}
#Device_Show_Device_Details_HWar, #Device_Show_Device_Details_HNWar
{
float: right;
border-left: 1px dashed #ddd;
padding-left: 4px;
margin-right: 2px;
}
#Device_Show_Device_Details_HWar_Details_Button, #Device_Show_Device_Details_HNWar_Details_Button
{
font-size: .9em;
}
#Device_Show_Device_DeviceHeld
{
table
{
table-layout: fixed;
&>tbody > tr > td:first-child
{
width: 62px;
}
}
}
}
#Device_Show_User
{
#Device_Show_User_Type
{
font-style: italic;
}
}*/
#Device_Show_Subjects_Actions {
& > td {
padding-top: 4px;
@@ -1,43 +0,0 @@
@model IEnumerable<Disco.Models.Repository.DeviceCertificate>
<div class="genericData certificateTable">
@if (Model.Count() > 0)
{
<table class="genericData certificateTable">
<tr>
<th>
Name
</th>
<th>
Enabled
</th>
<th>
Allocated
</th>
<th>
Expires
</th>
</tr>
@foreach (var item in Model)
{
<tr>
<td>
@Html.ActionLink(item.Name, MVC.API.DeviceCertificate.Download(item.Id))
</td>
<td>
@item.Enabled
</td>
<td>
@CommonHelpers.FriendlyDate(item.AllocatedDate)
</td>
<td>
@CommonHelpers.FriendlyDate(item.ExpirationDate)
</td>
</tr>
}
</table>
}
else
{
<span class="smallMessage">No Certificates Allocated</span>
}
</div>
@@ -1,124 +0,0 @@
@model Disco.Models.Repository.Device
<div class="actionBar">
@if (Model.CanDecommission())
{
@Html.ActionLinkButton("Decommission", MVC.API.Device.Decommission(Model.SerialNumber, true), "buttonDeviceDecommission")
<div id="dialogConfirmDecommission" title="Decommission this Device?">
<p>
<span class="ui-icon ui-icon-alert" style="float: left; margin: 0 7px 20px 0;"></span>
Are you sure?</p>
</div>
<script type="text/javascript">
$(function () {
var button = $('#buttonDeviceDecommission');
var buttonDialog = $('#dialogConfirmDecommission');
var buttonLink = button.attr('href');
button.attr('href', '#');
button.click(function () {
buttonDialog.dialog('open');
return false;
});
buttonDialog.dialog({
resizable: false,
height: 140,
modal: true,
autoOpen: false,
buttons: {
"Decommission": function () {
var $this = $(this);
$this.dialog("disable");
$this.dialog("option", "buttons", null);
window.location.href = buttonLink;
},
Cancel: function () {
$(this).dialog("close");
}
}
});
});
</script>
}
@if (Model.CanRecommission())
{
@Html.ActionLinkButton("Recommission", MVC.API.Device.Recommission(Model.SerialNumber, true), "buttonDeviceRecommission")
<div id="dialogConfirmRecommission" title="Recommission this Device?">
<p>
<span class="ui-icon ui-icon-alert" style="float: left; margin: 0 7px 20px 0;"></span>
Are you sure?</p>
</div>
<script type="text/javascript">
$(function () {
var button = $('#buttonDeviceRecommission');
var buttonDialog = $('#dialogConfirmRecommission');
var buttonLink = button.attr('href');
button.attr('href', '#');
button.click(function () {
buttonDialog.dialog('open');
return false;
});
buttonDialog.dialog({
resizable: false,
height: 140,
modal: true,
autoOpen: false,
buttons: {
"Recommission": function () {
var $this = $(this);
$this.dialog("disable");
$this.dialog("option", "buttons", null);
window.location.href = buttonLink;
},
Cancel: function () {
$(this).dialog("close");
}
}
});
});
</script>
}
@if (Model.CanDelete())
{
@Html.ActionLinkButton("Delete Device", MVC.API.Device.Delete(Model.SerialNumber, true), "buttonDeviceDelete")
<div id="dialogConfirmDelete" title="Delete this Device?">
<p>
<span class="ui-icon ui-icon-alert" style="float: left; margin: 0 7px 20px 0;"></span>
This item will be permanently deleted and cannot be recovered.<br />
Jobs linked to this Device (but not to a User) will be deleted also.<br />
Are you sure?</p>
</div>
<script type="text/javascript">
$(function () {
var button = $('#buttonDeviceDelete');
var buttonDialog = $('#dialogConfirmDelete');
var buttonLink = button.attr('href');
button.attr('href', '#');
button.click(function () {
buttonDialog.dialog('open');
return false;
});
buttonDialog.dialog({
resizable: false,
height: 200,
modal: true,
autoOpen: false,
buttons: {
"Delete": function () {
var $this = $(this);
$this.dialog("disable");
$this.dialog("option", "buttons", null);
window.location.href = buttonLink;
},
Cancel: function () {
$(this).dialog("close");
}
}
});
});
</script>
}
@if (Model.CanCreateJob())
{
Html.BundleDeferred("~/ClientScripts/Modules/Disco-CreateJob");
@Html.ActionLinkButton("Create Job", MVC.Job.Create(Model.SerialNumber, Model.AssignedUserId), "buttonCreateJob")
}
</div>
@@ -1,35 +0,0 @@
@model Disco.Models.Repository.Device
@if (Model.DeviceUserAssignments.Count > 0)
{
<table class="genericData smallTable">
<tr>
<th>
User
</th>
<th>
Assigned
</th>
<th>
Unassigned
</th>
</tr>
@foreach (var dua in Model.DeviceUserAssignments.OrderByDescending(m => m.AssignedDate))
{
<tr>
<td>
@Html.ActionLink(dua.AssignedUser.ToString(), MVC.User.Show(dua.AssignedUserId))
</td>
<td>
@CommonHelpers.FriendlyDate(dua.AssignedDate)
</td>
<td>
@CommonHelpers.FriendlyDate(dua.UnassignedDate, "Current")
</td>
</tr>
}
</table>
}
else
{
<span class="smallMessage">No Assignment History Available</span>
}
-478
View File
@@ -1,478 +0,0 @@
@model Disco.Web.Models.Device.ShowModel
@{
ViewBag.Title = Html.ToBreadcrumb("Devices", MVC.Device.Index(), string.Format("{0} ({1})", Model.Device.ComputerName, Model.Device.SerialNumber));
Html.BundleDeferred("~/ClientScripts/Modules/Silverlight");
}
<table class="deviceShow">
<tr>
<td class="details">
<table>
<tr>
<th class="name">
Computer Name:
</th>
<td class="value">
@if (string.IsNullOrWhiteSpace(Model.Device.ComputerName))
{
<span class="smallMessage">&lt;Unknown/Not Allocated&gt;</span>
}
else
{
@Model.Device.ComputerName
}
</td>
</tr>
<tr>
<th class="name">
Asset Number:
</th>
<td class="value">
@Html.TextBoxFor(m => m.Device.AssetNumber)
@AjaxHelpers.AjaxSave()
@AjaxHelpers.AjaxLoader()
<script type="text/javascript">
$(function () {
var $ajaxSave = $('#Device_AssetNumber').next('.ajaxSave');
$('#Device_AssetNumber').watermark('Asset Number').keydown(function (e) {
$ajaxSave.show();
if (e.which == 13) {
$(this).blur();
}
}).change(function () {
var $this = $(this);
$ajaxSave.hide();
var $ajaxLoading = $ajaxSave.next('.ajaxLoading').show();
var data = { AssetNumber: $this.val() };
$.getJSON('@(Url.Action(@MVC.API.Device.UpdateAssetNumber(Model.Device.SerialNumber)))', data, function (response, result) {
if (result != 'success' || response != 'OK') {
alert('Unable to change Asset Number:\n' + response);
$ajaxLoading.hide();
} else {
$ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow');
}
});
}).blur(function () {
$ajaxSave.hide();
}).focus(function () {
$(this).select();
});
});
</script>
</td>
</tr>
<tr>
<th class="name">
Location:
</th>
<td class="value">
@Html.TextBoxFor(m => m.Device.Location)
@AjaxHelpers.AjaxSave()
@AjaxHelpers.AjaxLoader()
<script type="text/javascript">
$(function () {
var $ajaxSave = $('#Device_Location').next('.ajaxSave');
$('#Device_Location').watermark('Location').keydown(function (e) {
$ajaxSave.show();
if (e.which == 13) {
$(this).blur();
}
}).change(function () {
var $this = $(this);
$ajaxSave.hide();
var $ajaxLoading = $ajaxSave.next('.ajaxLoading').show();
var data = { Location: $this.val() };
$.getJSON('@(Url.Action(@MVC.API.Device.UpdateLocation(Model.Device.SerialNumber)))', data, function (response, result) {
if (result != 'success' || response != 'OK') {
alert('Unable to change Location:\n' + response);
$ajaxLoading.hide();
} else {
$ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow');
}
});
}).blur(function () {
$ajaxSave.hide();
}).focus(function () {
$(this).select();
});
});
</script>
</td>
</tr>
<tr>
<th class="name">
Batch:
</th>
<td class="value">
@Html.DropDownListFor(m => m.Device.DeviceBatchId, Model.DeviceBatches.ToSelectListItems(Model.Device.DeviceBatchId))
@AjaxHelpers.AjaxLoader() <span id="deviceBatchDetails" class="icon16" title="Batch Details"></span>
<script type="text/javascript">
$(function () {
var $DeviceBatchId = $('#Device_DeviceBatchId');
var $DeviceBatchDetails = $('#deviceBatchDetails');
var $DeviceBatchSummary = $('#deviceBatchSummary');
var initUpdate = false;
var jsonDate = function (json, unknownValue) {
if (json && json.indexOf('') == 0) {
return $.datepicker.formatDate('yy-mm-dd', new Date(parseInt(json.substr(6, json.length - 8))));
} else
return unknownValue;
}
var updateDetails = function (deviceBatchId) {
$.getJSON('@(Url.Action(MVC.API.DeviceBatch.Index()))/' + deviceBatchId, function (response, result) {
if (result == 'success') {
if (response.Supplier)
$DeviceBatchSummary.find('.supplier').text(response.Supplier);
else
$DeviceBatchSummary.find('.supplier').text('Unknown');
$DeviceBatchSummary.find('.purchaseDate').text(jsonDate(response.PurchaseDate, 'Unknown'));
$DeviceBatchSummary.find('.warrantyValidUntil').text(jsonDate(response.WarrantyValidUntil, 'Unknown'));
if (response.InsuranceSupplier)
$DeviceBatchSummary.find('.insuranceSupplier').text(response.InsuranceSupplier);
else
$DeviceBatchSummary.find('.insuranceSupplier').text('Unknown');
$DeviceBatchSummary.find('.insuredUntil').text(jsonDate(response.InsuredUntil, 'Unknown'));
if (initUpdate){
$DeviceBatchSummary.show();
$DeviceBatchDetails.show();
initUpdate = false;
}else{
$DeviceBatchSummary.slideDown('fast');
$DeviceBatchDetails.fadeIn();
}
} else {
alert('Unable to load Device Batch details:\n' + response);
}
});
};
$DeviceBatchDetails.click(function () {
window.location.href = '@(Url.Action(MVC.Config.DeviceBatch.Index(null)))/' + $DeviceBatchId.val();
});
$DeviceBatchId.change(function () {
var $this = $(this);
var $ajaxLoading = $this.next('.ajaxLoading').show();
$DeviceBatchSummary.hide();
$DeviceBatchDetails.hide();
var data = { DeviceBatchId: $this.val() };
$.getJSON('@(Url.Action(MVC.API.Device.UpdateDeviceBatchId(Model.Device.SerialNumber)))', data, function (response, result) {
if (result != 'success' || response != 'OK') {
alert('Unable to change Device Batch:\n' + response);
$ajaxLoading.hide();
} else {
$ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow');
if ($DeviceBatchId.val())
updateDetails($DeviceBatchId.val());
}
});
});
$DeviceBatchSummary.hide();
if ($DeviceBatchId.val()){
initUpdate = true;
updateDetails($DeviceBatchId.val());
}
});
</script>
<div id="deviceBatchSummary">
<table class="sub">
<tr>
<th style="width: 50px">
<strong>Purchased:</strong>
</th>
<td>
Supplier: <span class="supplier"></span>
<br />
On: <span class="purchaseDate"></span>
</td>
<th style="width: 50px">
<strong>Warranty:</strong>
</th>
<td>
Valid Until: <span class="warrantyValidUntil"></span>
</td>
<th style="width: 50px">
<strong>Insurance:</strong>
</th>
<td>
Supplier: <span class="insuranceSupplier"></span>
<br />
Until: <span class="insuredUntil"></span>
</td>
</tr>
</table>
</div>
</td>
</tr>
<tr>
<th class="name">
Profile:
</th>
<td class="value">
@if (Model.Device.DecommissionedDate.HasValue)
{
@Model.Device.DeviceProfile.ToString()
}
else
{
@Html.DropDownListFor(m => m.Device.DeviceProfileId, Model.DeviceProfiles.ToSelectListItems(Model.Device.DeviceProfile))
@AjaxHelpers.AjaxLoader()<span id="deviceProfileDetails" class="icon16" title="Profile Details"></span>
<script type="text/javascript">
$(function () {
$('#Device_DeviceProfileId').change(function () {
var $this = $(this);
var $ajaxLoading = $this.next('.ajaxLoading').show();
var data = { DeviceProfileId: $this.val() };
$.getJSON('@(Url.Action(MVC.API.Device.UpdateDeviceProfileId(Model.Device.SerialNumber)))', data, function (response, result) {
if (result != 'success' || response != 'OK') {
alert('Unable to change Device Profile:\n' + response);
$ajaxLoading.hide();
} else {
$ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow');
}
});
});
$('#deviceProfileDetails').click(function(){
window.location.href = '@(Url.Action(MVC.Config.DeviceProfile.Index(null)))/' + $('#Device_DeviceProfileId').val();
});
});
</script>
}
</td>
</tr>
<tr>
<th class="name">
Created:
</th>
<td class="value">
@CommonHelpers.FriendlyDate(Model.Device.CreatedDate)
</td>
</tr>
<tr>
<th class="name">
Enrolment:
</th>
<td class="value">
First:
@CommonHelpers.FriendlyDate(Model.Device.EnrolledDate)
@if (Model.Device.AllowUnauthenticatedEnrol)
{
<a class="unlocked16" href="@Url.Action(MVC.API.Device.UpdateAllowUnauthenticatedEnrol(Model.Device.SerialNumber, "false", true))" title="Unauthenticated Enrolment is Allowed">
&nbsp;</a>
}
else
{
<a class="locked16" href="@Url.Action(MVC.API.Device.UpdateAllowUnauthenticatedEnrol(Model.Device.SerialNumber, "true", true))" title="Unauthenticated Enrolment is Blocked">
&nbsp;</a>
}
<br />
Last:
@CommonHelpers.FriendlyDate(Model.Device.LastEnrolDate)
</td>
</tr>
<tr>
<th class="name">
Decommissioned:
</th>
<td class="value">
@CommonHelpers.FriendlyDate(Model.Device.DecommissionedDate)
</td>
</tr>
<tr>
<th class="name">
Last Network Logon:
</th>
<td class="value">
<span id="lastNetworkLogonDate" class="nowrap">@CommonHelpers.FriendlyDate(Model.Device.LastNetworkLogonDate)</span>
@if (!string.IsNullOrEmpty(Model.Device.ComputerName))
{
<script type="text/javascript">
$(function () {
var span = $('#lastNetworkLogonDate');
$('<span>').addClass('ajaxHelperIcon ajaxLoading ajaxShowInitially').attr('title', 'Loading...').appendTo(span);
$.getJSON('@(Url.Action(MVC.API.Device.LastNetworkLogonDate(Model.Device.SerialNumber)))', function (response, result) {
if (result != 'success') {
alert('Unable to retrieve latest network logon date:\n' + response);
$('<span>').addClass('smallMessage').text('[may not be current]').appendTo(span);
} else {
span.find('.ajaxLoading').hide();
span.attr('title', response.Formatted).text(response.Friendly);
}
});
});
</script>
}
</td>
</tr>
@if (!Model.Device.DecommissionedDate.HasValue)
{
<tr>
<th class="name">
Assigned User:
</th>
<td class="value">
@Html.TextBoxFor(m => m.Device.AssignedUser, new { userId = Model.Device.AssignedUserId })
@AjaxHelpers.AjaxRemove()
@AjaxHelpers.AjaxLoader()
<br />
<a href="#" id="Device_AssignedUser_History_Trigger" class="smallLink">Show Assignment
History (<span id="Device_AssignedUser_History_RecordCount"></span>)</a> <span id="Device_AssignedUser_History_None"
class="smallMessage" style="display: none">No Assignment History Available</span>
<div id="dialogRemoveAssignedUser" title="Remove this Device Assignment?">
<p>
<span class="ui-icon ui-icon-alert" style="float: left; margin: 0 7px 20px 0;"></span>
Are you sure?</p>
</div>
<script type="text/javascript">
$(function () {
// Common Objects
var $assignedUser = $('#Device_AssignedUser');
var $ajaxLoading = $assignedUser.nextAll('.ajaxLoading').first();
var $ajaxRemove = $assignedUser.nextAll('.ajaxRemove').first();
// Assign User
$assignedUser
.watermark('No Assigned User')
.focus(function () { $assignedUser.select() })
.autocomplete({
source: '@(Url.Action(MVC.API.User.UpstreamUsers()))',
minLength: 2,
focus: function (e, ui) {
$assignedUser.val(ui.item.DisplayName + ' (' + ui.item.Id + ')');
return false;
},
select: function (e, ui) {
updateAssignedUser(ui.item.Id);
$assignedUser.val(ui.item.DisplayName + ' (' + ui.item.Id + ')');
return false;
}
})
.data('ui-autocomplete')._renderItem = function (ul, item) {
return $("<li></li>")
.data("item.autocomplete", item)
.append("<a><strong>" + item.DisplayName + "</strong><br>" + item.Id + " (" + item.Type + ")</a>")
.appendTo(ul);
};
var $dialogRemoveAssignedUser = $('#dialogRemoveAssignedUser');
$dialogRemoveAssignedUser.dialog({
resizable: false,
height: 140,
modal: true,
autoOpen: false,
buttons: {
"Remove": function () {
updateAssignedUser('');
$assignedUser.val('');
$dialogRemoveAssignedUser.dialog("close");
},
"Cancel": function () {
$dialogRemoveAssignedUser.dialog("close");
}
}
});
// Un-Assign User
if ($assignedUser.val() != '')
$ajaxRemove.show();
$ajaxRemove.click(function () {
$dialogRemoveAssignedUser.dialog('open');
return false;
});
// History
var deviceUserAssignmentCount = @(Model.Device.DeviceUserAssignments.Count);
if (deviceUserAssignmentCount > 0) {
$('#Device_AssignedUser_History_Trigger').click(function () {
$(this).hide();
$('#Device_AssignedUser_History_Host').show();
$('#Device_AssignedUser_History').slideDown('slow');
return false;
});
var recordCountText = deviceUserAssignmentCount + ' record';
if (deviceUserAssignmentCount != 1)
recordCountText += 's';
$('#Device_AssignedUser_History_RecordCount').text(recordCountText)
}
else {
$('#Device_AssignedUser_History_Trigger').hide();
$('#Device_AssignedUser_History_None').show();
};
function updateAssignedUser(userId) {
$ajaxLoading.show();
$ajaxRemove.hide();
var data = { AssignedUserId: userId };
$.getJSON('@(Url.Action(MVC.API.Device.UpdateAssignedUserId(Model.Device.SerialNumber)))', data, function (response, result) {
if (result != 'success' || response != 'OK') {
alert('Unable to change Assigned User:\n' + response);
$ajaxLoading.hide();
} else {
$ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow');
if (userId != '')
$ajaxRemove.fadeIn('fast');
}
});
}
});
</script>
</td>
</tr>
}
<tr id="Device_AssignedUser_History_Host" style="@(Model.Device.DecommissionedDate.HasValue ? "" : "display: none")">
<td colspan="2">
<div id="Device_AssignedUser_History" style="@(Model.Device.DecommissionedDate.HasValue ? "" : "display: none")">
<h2>
Assigned User History</h2>
@Html.Partial(MVC.Device.Views._DeviceUserAssignmentHistoryTable, Model.Device)
</div>
</td>
</tr>
<tr>
<th class="name">
Generate Documents:
</th>
<td class="value" colspan="3">
@Html.DropDownList("DocumentTemplates", Model.DocumentTemplatesSelectListItems)
<script type="text/javascript">
$(function () {
var generatePdfUrl = '@Url.Action(MVC.API.Device.GeneratePdf(Model.Device.SerialNumber, null))?DocumentTemplateId=';
var $documentTemplates = $('#DocumentTemplates');
$documentTemplates.change(function () {
var v = $documentTemplates.val();
if (v) {
window.location.href = generatePdfUrl + v;
$documentTemplates.val('');
}
});
});
</script>
</td>
</tr>
</table>
</td>
<td class="model">
<table>
<tr>
<td class="subtleHighlight">
<img alt="Model Image" src="@Url.Action(MVC.API.DeviceModel.Image(Model.Device.DeviceModelId, Model.Device.DeviceModel.ImageHash()))" />
<h2>
<a href="@(Url.Action(MVC.Config.DeviceModel.Index(Model.Device.DeviceModelId)))">@Model.Device.DeviceModel.ToString()</a></h2>
</td>
</tr>
</table>
</td>
</tr>
</table>
<h2>
Certificates</h2>
@Html.Partial(MVC.Device.Views._CertificateTable, Model.Certificates)
<h2>
Attachments</h2>
@Html.Partial(MVC.Device.Views.DeviceParts.Resources, Model)
<h2>
Jobs</h2>
@Html.Partial(MVC.Shared.Views._JobTable, Model.Jobs)
@Html.Partial(MVC.Device.Views._DeviceActions, Model.Device)
@@ -32,7 +32,7 @@ namespace Disco.Web.Views.Device.DeviceParts
using Disco.Web.Extensions;
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "2.0.0.0")]
[System.Web.WebPages.PageVirtualPathAttribute("~/Views/Device/DeviceParts/AssignmentHistory.cshtml")]
[System.Web.WebPages.PageVirtualPathAttribute("~/Views/Device/DeviceParts/_AssignmentHistory.cshtml")]
public partial class AssignmentHistory : System.Web.Mvc.WebViewPage<Disco.Web.Models.Device.ShowModel>
{
public AssignmentHistory()
@@ -49,13 +49,13 @@ WriteLiteral(" class=\"DevicePart\"");
WriteLiteral(">\r\n");
#line 3 "..\..\Views\Device\DeviceParts\AssignmentHistory.cshtml"
#line 3 "..\..\Views\Device\DeviceParts\_AssignmentHistory.cshtml"
#line default
#line hidden
#line 3 "..\..\Views\Device\DeviceParts\AssignmentHistory.cshtml"
#line 3 "..\..\Views\Device\DeviceParts\_AssignmentHistory.cshtml"
if (Model.Device.DeviceUserAssignments.Count > 0)
{
@@ -71,13 +71,13 @@ WriteLiteral(">\r\n <tr>\r\n <th>User\r\n
" </th>\r\n </tr>\r\n");
#line 14 "..\..\Views\Device\DeviceParts\AssignmentHistory.cshtml"
#line 14 "..\..\Views\Device\DeviceParts\_AssignmentHistory.cshtml"
#line default
#line hidden
#line 14 "..\..\Views\Device\DeviceParts\AssignmentHistory.cshtml"
#line 14 "..\..\Views\Device\DeviceParts\_AssignmentHistory.cshtml"
foreach (var dua in Model.Device.DeviceUserAssignments.OrderByDescending(m => m.AssignedDate))
{
@@ -89,7 +89,7 @@ WriteLiteral(" <tr>\r\n <td>\r\n");
WriteLiteral(" ");
#line 18 "..\..\Views\Device\DeviceParts\AssignmentHistory.cshtml"
#line 18 "..\..\Views\Device\DeviceParts\_AssignmentHistory.cshtml"
Write(Html.ActionLink(dua.AssignedUser.ToString(), MVC.User.Show(dua.AssignedUserId)));
@@ -100,7 +100,7 @@ WriteLiteral("\r\n </td>\r\n <td>\r\n");
WriteLiteral(" ");
#line 21 "..\..\Views\Device\DeviceParts\AssignmentHistory.cshtml"
#line 21 "..\..\Views\Device\DeviceParts\_AssignmentHistory.cshtml"
Write(CommonHelpers.FriendlyDate(dua.AssignedDate));
@@ -111,7 +111,7 @@ WriteLiteral("\r\n </td>\r\n <td>\r\n");
WriteLiteral(" ");
#line 24 "..\..\Views\Device\DeviceParts\AssignmentHistory.cshtml"
#line 24 "..\..\Views\Device\DeviceParts\_AssignmentHistory.cshtml"
Write(CommonHelpers.FriendlyDate(dua.UnassignedDate, "Current"));
@@ -120,7 +120,7 @@ WriteLiteral(" ");
WriteLiteral("\r\n </td>\r\n </tr>\r\n");
#line 27 "..\..\Views\Device\DeviceParts\AssignmentHistory.cshtml"
#line 27 "..\..\Views\Device\DeviceParts\_AssignmentHistory.cshtml"
}
@@ -129,7 +129,7 @@ WriteLiteral("\r\n </td>\r\n </tr>\r\n");
WriteLiteral(" </table>\r\n");
#line 29 "..\..\Views\Device\DeviceParts\AssignmentHistory.cshtml"
#line 29 "..\..\Views\Device\DeviceParts\_AssignmentHistory.cshtml"
}
else
{
@@ -144,7 +144,7 @@ WriteLiteral(" class=\"smallMessage\"");
WriteLiteral(">No Assignment History Available</span>\r\n");
#line 33 "..\..\Views\Device\DeviceParts\AssignmentHistory.cshtml"
#line 33 "..\..\Views\Device\DeviceParts\_AssignmentHistory.cshtml"
}
@@ -154,7 +154,7 @@ WriteLiteral(" <script>\r\n $(\'#DeviceDetailTabItems\').append(\'<li>
"ilTab-AssignmentHistory\">Assignment History [");
#line 35 "..\..\Views\Device\DeviceParts\AssignmentHistory.cshtml"
#line 35 "..\..\Views\Device\DeviceParts\_AssignmentHistory.cshtml"
Write(Model.Device.DeviceUserAssignments.Count);
@@ -32,7 +32,7 @@ namespace Disco.Web.Views.Device.DeviceParts
using Disco.Web.Extensions;
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "2.0.0.0")]
[System.Web.WebPages.PageVirtualPathAttribute("~/Views/Device/DeviceParts/Certificates.cshtml")]
[System.Web.WebPages.PageVirtualPathAttribute("~/Views/Device/DeviceParts/_Certificates.cshtml")]
public partial class Certificates : System.Web.Mvc.WebViewPage<Disco.Web.Models.Device.ShowModel>
{
public Certificates()
@@ -53,13 +53,13 @@ WriteLiteral(" class=\"genericData certificateTable\"");
WriteLiteral(">\r\n");
#line 4 "..\..\Views\Device\DeviceParts\Certificates.cshtml"
#line 4 "..\..\Views\Device\DeviceParts\_Certificates.cshtml"
#line default
#line hidden
#line 4 "..\..\Views\Device\DeviceParts\Certificates.cshtml"
#line 4 "..\..\Views\Device\DeviceParts\_Certificates.cshtml"
if (Model.Certificates.Count() > 0)
{
@@ -84,13 +84,13 @@ WriteLiteral(@">
");
#line 17 "..\..\Views\Device\DeviceParts\Certificates.cshtml"
#line 17 "..\..\Views\Device\DeviceParts\_Certificates.cshtml"
#line default
#line hidden
#line 17 "..\..\Views\Device\DeviceParts\Certificates.cshtml"
#line 17 "..\..\Views\Device\DeviceParts\_Certificates.cshtml"
foreach (var item in Model.Certificates)
{
@@ -102,7 +102,7 @@ WriteLiteral(" <tr>\r\n <td>\r\n");
WriteLiteral(" ");
#line 21 "..\..\Views\Device\DeviceParts\Certificates.cshtml"
#line 21 "..\..\Views\Device\DeviceParts\_Certificates.cshtml"
Write(Html.ActionLink(item.Name, MVC.API.DeviceCertificate.Download(item.Id)));
@@ -113,7 +113,7 @@ WriteLiteral("\r\n </td>\r\n <td>\
WriteLiteral(" ");
#line 24 "..\..\Views\Device\DeviceParts\Certificates.cshtml"
#line 24 "..\..\Views\Device\DeviceParts\_Certificates.cshtml"
Write(item.Enabled);
@@ -124,7 +124,7 @@ WriteLiteral("\r\n </td>\r\n <td>\
WriteLiteral(" ");
#line 27 "..\..\Views\Device\DeviceParts\Certificates.cshtml"
#line 27 "..\..\Views\Device\DeviceParts\_Certificates.cshtml"
Write(CommonHelpers.FriendlyDate(item.AllocatedDate));
@@ -135,7 +135,7 @@ WriteLiteral("\r\n </td>\r\n <td>\
WriteLiteral(" ");
#line 30 "..\..\Views\Device\DeviceParts\Certificates.cshtml"
#line 30 "..\..\Views\Device\DeviceParts\_Certificates.cshtml"
Write(CommonHelpers.FriendlyDate(item.ExpirationDate));
@@ -144,7 +144,7 @@ WriteLiteral(" ");
WriteLiteral("\r\n </td>\r\n </tr>\r\n");
#line 33 "..\..\Views\Device\DeviceParts\Certificates.cshtml"
#line 33 "..\..\Views\Device\DeviceParts\_Certificates.cshtml"
}
@@ -153,7 +153,7 @@ WriteLiteral("\r\n </td>\r\n </tr>\r\n
WriteLiteral(" </table>\r\n");
#line 35 "..\..\Views\Device\DeviceParts\Certificates.cshtml"
#line 35 "..\..\Views\Device\DeviceParts\_Certificates.cshtml"
}
else
{
@@ -168,7 +168,7 @@ WriteLiteral(" class=\"smallMessage\"");
WriteLiteral(">No Certificates Allocated</span>\r\n");
#line 39 "..\..\Views\Device\DeviceParts\Certificates.cshtml"
#line 39 "..\..\Views\Device\DeviceParts\_Certificates.cshtml"
}
@@ -178,7 +178,7 @@ WriteLiteral(" </div>\r\n <script>\r\n $(\'#DeviceDetailTabItems\')
"\"#DeviceDetailTab-Certificates\">Certificates [");
#line 42 "..\..\Views\Device\DeviceParts\Certificates.cshtml"
#line 42 "..\..\Views\Device\DeviceParts\_Certificates.cshtml"
Write(Model.Certificates.Count);
@@ -32,7 +32,7 @@ namespace Disco.Web.Views.Device.DeviceParts
using Disco.Web.Extensions;
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "2.0.0.0")]
[System.Web.WebPages.PageVirtualPathAttribute("~/Views/Device/DeviceParts/Jobs.cshtml")]
[System.Web.WebPages.PageVirtualPathAttribute("~/Views/Device/DeviceParts/_Jobs.cshtml")]
public partial class Jobs : System.Web.Mvc.WebViewPage<Disco.Web.Models.Device.ShowModel>
{
public Jobs()
@@ -55,7 +55,7 @@ WriteLiteral(">\r\n");
WriteLiteral(" ");
#line 4 "..\..\Views\Device\DeviceParts\Jobs.cshtml"
#line 4 "..\..\Views\Device\DeviceParts\_Jobs.cshtml"
Write(Html.Partial(MVC.Shared.Views._JobTable, Model.Jobs));
@@ -65,7 +65,7 @@ WriteLiteral("\r\n </div>\r\n <script>\r\n $(\'#DeviceDetailTabItem
"f=\"#DeviceDetailTab-Jobs\">Jobs [");
#line 7 "..\..\Views\Device\DeviceParts\Jobs.cshtml"
#line 7 "..\..\Views\Device\DeviceParts\_Jobs.cshtml"
Write(Model.Device.Jobs == null ? 0 : Model.Device.Jobs.Count);
@@ -32,7 +32,7 @@ namespace Disco.Web.Views.Device.DeviceParts
using Disco.Web.Extensions;
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "2.0.0.0")]
[System.Web.WebPages.PageVirtualPathAttribute("~/Views/Device/DeviceParts/Resources.cshtml")]
[System.Web.WebPages.PageVirtualPathAttribute("~/Views/Device/DeviceParts/_Resources.cshtml")]
public partial class Resources : System.Web.Mvc.WebViewPage<Disco.Web.Models.Device.ShowModel>
{
public Resources()
@@ -41,7 +41,7 @@ namespace Disco.Web.Views.Device.DeviceParts
public override void Execute()
{
#line 2 "..\..\Views\Device\DeviceParts\Resources.cshtml"
#line 2 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
Html.BundleDeferred("~/Style/Shadowbox");
Html.BundleDeferred("~/ClientScripts/Modules/Shadowbox");
@@ -71,13 +71,13 @@ WriteLiteral(" class=\"attachmentOutput\"");
WriteLiteral(">\r\n");
#line 12 "..\..\Views\Device\DeviceParts\Resources.cshtml"
#line 12 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
#line default
#line hidden
#line 12 "..\..\Views\Device\DeviceParts\Resources.cshtml"
#line 12 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
if (Model.Device.DeviceAttachments != null)
{
foreach (var da in Model.Device.DeviceAttachments)
@@ -90,7 +90,7 @@ WriteLiteral(" <a");
WriteAttribute("href", Tuple.Create(" href=\"", 634), Tuple.Create("\"", 694)
#line 16 "..\..\Views\Device\DeviceParts\Resources.cshtml"
#line 16 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
, Tuple.Create(Tuple.Create("", 641), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.Device.AttachmentDownload(da.Id))
#line default
@@ -101,7 +101,7 @@ WriteAttribute("href", Tuple.Create(" href=\"", 634), Tuple.Create("\"", 694)
WriteLiteral(" data-attachmentid=\"");
#line 16 "..\..\Views\Device\DeviceParts\Resources.cshtml"
#line 16 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
Write(da.Id);
@@ -112,7 +112,7 @@ WriteLiteral("\"");
WriteLiteral(" data-mimetype=\"");
#line 16 "..\..\Views\Device\DeviceParts\Resources.cshtml"
#line 16 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
Write(da.MimeType);
@@ -126,7 +126,7 @@ WriteLiteral(" class=\"icon\"");
WriteAttribute("title", Tuple.Create(" title=\"", 800), Tuple.Create("\"", 820)
#line 17 "..\..\Views\Device\DeviceParts\Resources.cshtml"
#line 17 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
, Tuple.Create(Tuple.Create("", 808), Tuple.Create<System.Object, System.Int32>(da.Filename
#line default
@@ -140,7 +140,7 @@ WriteLiteral(" alt=\"Attachment Thumbnail\"");
WriteAttribute("src", Tuple.Create(" src=\"", 887), Tuple.Create("\"", 949)
#line 18 "..\..\Views\Device\DeviceParts\Resources.cshtml"
#line 18 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
, Tuple.Create(Tuple.Create("", 893), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.Device.AttachmentThumbnail(da.Id))
#line default
@@ -154,7 +154,7 @@ WriteLiteral(" class=\"comments\"");
WriteAttribute("title", Tuple.Create(" title=\"", 1012), Tuple.Create("\"", 1032)
#line 19 "..\..\Views\Device\DeviceParts\Resources.cshtml"
#line 19 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
, Tuple.Create(Tuple.Create("", 1020), Tuple.Create<System.Object, System.Int32>(da.Comments
#line default
@@ -165,27 +165,27 @@ WriteAttribute("title", Tuple.Create(" title=\"", 1012), Tuple.Create("\"", 1032
WriteLiteral(">\r\n");
#line 20 "..\..\Views\Device\DeviceParts\Resources.cshtml"
#line 20 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
#line default
#line hidden
#line 20 "..\..\Views\Device\DeviceParts\Resources.cshtml"
#line 20 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
if (!string.IsNullOrEmpty(da.DocumentTemplateId))
{
#line default
#line hidden
#line 21 "..\..\Views\Device\DeviceParts\Resources.cshtml"
#line 21 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
Write(da.DocumentTemplate.Description);
#line default
#line hidden
#line 21 "..\..\Views\Device\DeviceParts\Resources.cshtml"
#line 21 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
}
else
{
@@ -193,14 +193,14 @@ WriteLiteral(">\r\n");
#line default
#line hidden
#line 23 "..\..\Views\Device\DeviceParts\Resources.cshtml"
#line 23 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
Write(da.Comments);
#line default
#line hidden
#line 23 "..\..\Views\Device\DeviceParts\Resources.cshtml"
#line 23 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
}
#line default
@@ -212,7 +212,7 @@ WriteLiteral(" class=\"author\"");
WriteLiteral(">");
#line 24 "..\..\Views\Device\DeviceParts\Resources.cshtml"
#line 24 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
Write(da.TechUser.ToString());
@@ -228,7 +228,7 @@ WriteLiteral(" class=\"timestamp\"");
WriteAttribute("title", Tuple.Create(" title=\"", 1422), Tuple.Create("\"", 1460)
#line 24 "..\..\Views\Device\DeviceParts\Resources.cshtml"
#line 24 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
, Tuple.Create(Tuple.Create("", 1430), Tuple.Create<System.Object, System.Int32>(da.Timestamp.ToFullDateTime()
#line default
@@ -239,7 +239,7 @@ WriteAttribute("title", Tuple.Create(" title=\"", 1422), Tuple.Create("\"", 1460
WriteLiteral(">");
#line 24 "..\..\Views\Device\DeviceParts\Resources.cshtml"
#line 24 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
Write(da.Timestamp.ToFuzzy());
@@ -248,7 +248,7 @@ WriteLiteral(">");
WriteLiteral("</span>\r\n </a> \r\n");
#line 26 "..\..\Views\Device\DeviceParts\Resources.cshtml"
#line 26 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
}
}
@@ -294,7 +294,7 @@ WriteLiteral(">\r\n Shadowbox.init({\r\n
" \'");
#line 70 "..\..\Views\Device\DeviceParts\Resources.cshtml"
#line 70 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
Write(Links.ClientBin.Disco_Silverlight_AttachmentUpload_xap);
@@ -315,7 +315,7 @@ WriteLiteral(@"',
'UploadUrl=");
#line 82 "..\..\Views\Device\DeviceParts\Resources.cshtml"
#line 82 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
Write(Url.Action(MVC.API.Device.AttachmentUpload(Model.Device.SerialNumber, null)));
@@ -347,7 +347,7 @@ WriteLiteral(@"'
url: '");
#line 105 "..\..\Views\Device\DeviceParts\Resources.cshtml"
#line 105 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
Write(Url.Action(MVC.API.Device.Attachment()));
@@ -365,7 +365,7 @@ WriteLiteral(@"',
e.attr('data-attachmentid', a.Id).attr('data-mimetype', a.MimeType).attr('href', '");
#line 114 "..\..\Views\Device\DeviceParts\Resources.cshtml"
#line 114 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
Write(Url.Action(MVC.API.Device.AttachmentDownload()));
@@ -375,7 +375,7 @@ WriteLiteral("/\' + a.Id);\r\n e.find(\'.icon
"\'");
#line 115 "..\..\Views\Device\DeviceParts\Resources.cshtml"
#line 115 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
Write(Url.Action(MVC.API.Device.AttachmentThumbnail()));
@@ -408,7 +408,7 @@ WriteLiteral("/\' + a.Id);\r\n e.find(\'.comm
" $.ajax({\r\n url: \'");
#line 147 "..\..\Views\Device\DeviceParts\Resources.cshtml"
#line 147 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
Write(Url.Action(MVC.API.Device.AttachmentRemove()));
@@ -468,7 +468,7 @@ WriteLiteral("></span>\r\n Are you sure?\r\n </p>\r\n </div
"id=\"DeviceDetailTab-ResourcesLink\">Attachments [");
#line 200 "..\..\Views\Device\DeviceParts\Resources.cshtml"
#line 200 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
Write(Model.Device.DeviceAttachments == null ? 0 : Model.Device.DeviceAttachments.Count);
+4 -4
View File
@@ -45,9 +45,9 @@
</script>
<div id="DeviceDetailTabs">
<ul id="DeviceDetailTabItems"></ul>
@Html.Partial(MVC.Device.Views.DeviceParts.Jobs, Model)
@Html.Partial(MVC.Device.Views.DeviceParts.AssignmentHistory, Model)
@Html.Partial(MVC.Device.Views.DeviceParts.Resources, Model)
@Html.Partial(MVC.Device.Views.DeviceParts.Certificates, Model)
@Html.Partial(MVC.Device.Views.DeviceParts._Jobs, Model)
@Html.Partial(MVC.Device.Views.DeviceParts._AssignmentHistory, Model)
@Html.Partial(MVC.Device.Views.DeviceParts._Resources, Model)
@Html.Partial(MVC.Device.Views.DeviceParts._Certificates, Model)
</div>
</div>
+4 -4
View File
@@ -144,7 +144,7 @@ WriteLiteral(" ");
#line 48 "..\..\Views\Device\Show.cshtml"
Write(Html.Partial(MVC.Device.Views.DeviceParts.Jobs, Model));
Write(Html.Partial(MVC.Device.Views.DeviceParts._Jobs, Model));
#line default
@@ -155,7 +155,7 @@ WriteLiteral(" ");
#line 49 "..\..\Views\Device\Show.cshtml"
Write(Html.Partial(MVC.Device.Views.DeviceParts.AssignmentHistory, Model));
Write(Html.Partial(MVC.Device.Views.DeviceParts._AssignmentHistory, Model));
#line default
@@ -166,7 +166,7 @@ WriteLiteral(" ");
#line 50 "..\..\Views\Device\Show.cshtml"
Write(Html.Partial(MVC.Device.Views.DeviceParts.Resources, Model));
Write(Html.Partial(MVC.Device.Views.DeviceParts._Resources, Model));
#line default
@@ -177,7 +177,7 @@ WriteLiteral(" ");
#line 51 "..\..\Views\Device\Show.cshtml"
Write(Html.Partial(MVC.Device.Views.DeviceParts.Certificates, Model));
Write(Html.Partial(MVC.Device.Views.DeviceParts._Certificates, Model));
#line default