@model Disco.Models.Services.Jobs.JobLists.JobTableModel @using Disco.Models.Services.Jobs.JobLists; @{ Html.BundleDeferred("~/ClientScripts/Modules/Disco-DataTableHelpers"); }
| Ref | } @if (Model.ShowStatus) {Status | } @if (Model.ShowLastActivityDate) {Last Active | } @if (Model.ShowDates) {When | } @if (Model.ShowType) {Type | } @if (Model.ShowDevice) {Device | } @if (Model.ShowUser) {User | } @if (Model.ShowTechnician) {Technician | } @if (Model.ShowLocation) {Location | }
|---|---|---|---|---|---|---|---|---|
| @if (Authorization.Has(Claims.Job.Show)) {@Html.ActionLink(item.JobId.ToString(), MVC.Job.Show(item.JobId))} else {@item.JobId.ToString()} | } @if (Model.ShowStatus) { var statusItem = (JobTableStatusItemModel)item; @item.StatusDescription
@if (statusItem.ActiveJobQueues != null)
{
@foreach (var jqToken in ((JobTableStatusItemModel)item).ActiveJobQueues.Select(jqj => new Tuple }
| }
@if (Model.ShowLastActivityDate)
{@CommonHelpers.FriendlyDate(item.LastActivityDate) | } @if (Model.ShowDates) {@if (item.ClosedDate.HasValue) {@CommonHelpers.FriendlyDate(item.ClosedDate.Value)} else {@CommonHelpers.FriendlyDate(item.OpenedDate)} | } @if (Model.ShowType) {@item.JobTypeId | } @if (Model.ShowDevice) {@if (item.DeviceSerialNumber != null) { if (Authorization.Has(Claims.Device.Show)) {@Html.ActionLink(item.DeviceSerialNumber, MVC.Device.Show(item.DeviceSerialNumber), new { Title = item.DeviceModelDescription })} else {@item.DeviceSerialNumber} } else {N/A} | } @if (Model.ShowUser) {@if (item.UserId != null) { if (Authorization.Has(Claims.User.Show)) {@Html.ActionLink(string.Format("{0} ({1})", item.UserDisplayName, item.UserFriendlyId), MVC.User.Show(item.UserId))} else {@(string.Format("{0} ({1})", item.UserDisplayName, item.UserFriendlyId))} } else {N/A} | } @if (Model.ShowTechnician) {@item.OpenedTechUserFriendlyId | } @if (Model.ShowLocation) {@(item.DeviceHeldLocation ?? "Unknown") | }