#pragma warning disable 1591
//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//     Runtime Version:4.0.30319.42000
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

namespace Disco.Web.Areas.Public.Views.HeldDevices
{
    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.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("~/Areas/Public/Views/HeldDevices/Index.cshtml")]
    public partial class Index : Disco.Services.Web.WebViewPage<IEnumerable<Disco.Models.Services.Jobs.Noticeboards.IHeldDeviceItem>>
    {
        public Index()
        {
        }
        public override void Execute()
        {
            
            #line 2 "..\..\Areas\Public\Views\HeldDevices\Index.cshtml"
  
    ViewBag.Title = Html.ToBreadcrumb("Public Reports", MVC.Public.Public.Index(), "Held Devices", null);
    Html.BundleDeferred("~/Style/Public/HeldDevices");

            
            #line default
            #line hidden
WriteLiteral("\r\n<div");

WriteLiteral(" class=\"clearfix page\"");

WriteLiteral(">\r\n    <div");

WriteLiteral(" class=\"column1\"");

WriteLiteral(">\r\n");

            
            #line 8 "..\..\Areas\Public\Views\HeldDevices\Index.cshtml"
        
            
            #line default
            #line hidden
            
            #line 8 "..\..\Areas\Public\Views\HeldDevices\Index.cshtml"
          
            var DevicesInProcess = Model.Where(i => !i.ReadyForReturn && !i.WaitingForUserAction).ToArray();
        
            
            #line default
            #line hidden
WriteLiteral("\r\n        <h2>In Process (");

            
            #line 11 "..\..\Areas\Public\Views\HeldDevices\Index.cshtml"
                   Write(DevicesInProcess.Length);

            
            #line default
            #line hidden
WriteLiteral(")</h2>\r\n        <table");

WriteLiteral(" class=\"dataTable\"");

WriteLiteral(">\r\n");

            
            #line 13 "..\..\Areas\Public\Views\HeldDevices\Index.cshtml"
            
            
            #line default
            #line hidden
            
            #line 13 "..\..\Areas\Public\Views\HeldDevices\Index.cshtml"
             foreach (var item in DevicesInProcess.OrderBy(i => i.DeviceComputerNameFriendly))
            {

            
            #line default
            #line hidden
WriteLiteral("                <tr>\r\n                    <td");

WriteLiteral(" class=\"id\"");

WriteLiteral(">\r\n");

WriteLiteral("                        ");

            
            #line 17 "..\..\Areas\Public\Views\HeldDevices\Index.cshtml"
                   Write(item.DeviceComputerNameFriendly);

            
            #line default
            #line hidden
WriteLiteral("\r\n                    </td>\r\n                    <td");

WriteLiteral(" class=\"description\"");

WriteLiteral(">\r\n");

            
            #line 20 "..\..\Areas\Public\Views\HeldDevices\Index.cshtml"
                        
            
            #line default
            #line hidden
            
            #line 20 "..\..\Areas\Public\Views\HeldDevices\Index.cshtml"
                         if (item.UserId != null)
                        {

            
            #line default
            #line hidden
WriteLiteral("                            <span");

WriteLiteral(" class=\"user\"");

WriteLiteral(">");

            
            #line 22 "..\..\Areas\Public\Views\HeldDevices\Index.cshtml"
                                          Write(item.UserDisplayName);

            
            #line default
            #line hidden
WriteLiteral(" (");

            
            #line 22 "..\..\Areas\Public\Views\HeldDevices\Index.cshtml"
                                                                 Write(item.UserIdFriendly);

            
            #line default
            #line hidden
WriteLiteral(")</span>\r\n");

            
            #line 23 "..\..\Areas\Public\Views\HeldDevices\Index.cshtml"
                        }

            
            #line default
            #line hidden
WriteLiteral("                        ");

            
            #line 24 "..\..\Areas\Public\Views\HeldDevices\Index.cshtml"
                         if (!string.IsNullOrWhiteSpace(item.DeviceLocation))
                        {
                            if (item.UserId != null)
                            {

            
            #line default
            #line hidden
WriteLiteral("                            ");

WriteLiteral(" - ");

WriteLiteral("\r\n");

            
            #line 29 "..\..\Areas\Public\Views\HeldDevices\Index.cshtml"
                            }
                            
            
            #line default
            #line hidden
            
            #line 30 "..\..\Areas\Public\Views\HeldDevices\Index.cshtml"
                       Write(item.DeviceLocation);

            
            #line default
            #line hidden
            
            #line 30 "..\..\Areas\Public\Views\HeldDevices\Index.cshtml"
                                                
                        }
                        else
                        {
                            if (item.UserId == null)
                            {
                            
            
            #line default
            #line hidden
            
            #line 36 "..\..\Areas\Public\Views\HeldDevices\Index.cshtml"
                       Write(item.DeviceSerialNumber);

            
            #line default
            #line hidden
            
            #line 36 "..\..\Areas\Public\Views\HeldDevices\Index.cshtml"
                                                    
                            }
                        }

            
            #line default
            #line hidden
WriteLiteral("                        ");

            
            #line 39 "..\..\Areas\Public\Views\HeldDevices\Index.cshtml"
                         if (item.EstimatedReturnTime.HasValue)
                        { 

            
            #line default
            #line hidden
WriteLiteral("                            <span");

WriteLiteral(" class=\"smallMessage\"");

WriteLiteral(">(Expected: ");

            
            #line 41 "..\..\Areas\Public\Views\HeldDevices\Index.cshtml"
                                                             Write(CommonHelpers.FriendlyDate(item.EstimatedReturnTime));

            
            #line default
            #line hidden
WriteLiteral(")</span>\r\n");

            
            #line 42 "..\..\Areas\Public\Views\HeldDevices\Index.cshtml"
                        }

            
            #line default
            #line hidden
WriteLiteral("                    </td>\r\n                </tr>\r\n");

            
            #line 45 "..\..\Areas\Public\Views\HeldDevices\Index.cshtml"
            }

            
            #line default
            #line hidden
WriteLiteral("        </table>\r\n    </div>\r\n    <div");

WriteLiteral(" class=\"column2\"");

WriteLiteral(">\r\n");

            
            #line 49 "..\..\Areas\Public\Views\HeldDevices\Index.cshtml"
        
            
            #line default
            #line hidden
            
            #line 49 "..\..\Areas\Public\Views\HeldDevices\Index.cshtml"
          
            var WaitingForUserActionJobs = Model.Where(i => i.WaitingForUserAction).ToArray();
        
            
            #line default
            #line hidden
WriteLiteral("\r\n        <h2>Waiting for User Action (");

            
            #line 52 "..\..\Areas\Public\Views\HeldDevices\Index.cshtml"
                                Write(WaitingForUserActionJobs.Length);

            
            #line default
            #line hidden
WriteLiteral(")</h2>\r\n        <table");

WriteLiteral(" class=\"dataTable\"");

WriteLiteral(">\r\n");

            
            #line 54 "..\..\Areas\Public\Views\HeldDevices\Index.cshtml"
            
            
            #line default
            #line hidden
            
            #line 54 "..\..\Areas\Public\Views\HeldDevices\Index.cshtml"
             foreach (var item in WaitingForUserActionJobs.OrderBy(i => i.DeviceComputerNameFriendly))
            {

            
            #line default
            #line hidden
WriteLiteral("                <tr>\r\n                    <td");

WriteLiteral(" class=\"id\"");

WriteLiteral(">\r\n");

WriteLiteral("                        ");

            
            #line 58 "..\..\Areas\Public\Views\HeldDevices\Index.cshtml"
                   Write(item.DeviceComputerNameFriendly);

            
            #line default
            #line hidden
WriteLiteral("\r\n                    </td>\r\n                    <td");

WriteLiteral(" class=\"description\"");

WriteLiteral(">\r\n");

            
            #line 61 "..\..\Areas\Public\Views\HeldDevices\Index.cshtml"
                        
            
            #line default
            #line hidden
            
            #line 61 "..\..\Areas\Public\Views\HeldDevices\Index.cshtml"
                         if (item.UserId != null)
                        {

            
            #line default
            #line hidden
WriteLiteral("                            <span");

WriteLiteral(" class=\"user\"");

WriteLiteral(">");

            
            #line 63 "..\..\Areas\Public\Views\HeldDevices\Index.cshtml"
                                          Write(item.UserDisplayName);

            
            #line default
            #line hidden
WriteLiteral(" (");

            
            #line 63 "..\..\Areas\Public\Views\HeldDevices\Index.cshtml"
                                                                 Write(item.UserIdFriendly);

            
            #line default
            #line hidden
WriteLiteral(")</span>\r\n");

            
            #line 64 "..\..\Areas\Public\Views\HeldDevices\Index.cshtml"
                        }

            
            #line default
            #line hidden
WriteLiteral("                        ");

            
            #line 65 "..\..\Areas\Public\Views\HeldDevices\Index.cshtml"
                         if (!string.IsNullOrWhiteSpace(item.DeviceLocation))
                        {
                            if (item.UserId != null)
                            {

            
            #line default
            #line hidden
WriteLiteral("                            ");

WriteLiteral(" - ");

WriteLiteral("\r\n");

            
            #line 70 "..\..\Areas\Public\Views\HeldDevices\Index.cshtml"
                            }
                            
            
            #line default
            #line hidden
            
            #line 71 "..\..\Areas\Public\Views\HeldDevices\Index.cshtml"
                       Write(item.DeviceLocation);

            
            #line default
            #line hidden
            
            #line 71 "..\..\Areas\Public\Views\HeldDevices\Index.cshtml"
                                                
                        }
                        else
                        {
                            if (item.UserId == null)
                            {
                            
            
            #line default
            #line hidden
            
            #line 77 "..\..\Areas\Public\Views\HeldDevices\Index.cshtml"
                       Write(item.DeviceSerialNumber);

            
            #line default
            #line hidden
            
            #line 77 "..\..\Areas\Public\Views\HeldDevices\Index.cshtml"
                                                    
                            }
                        }

            
            #line default
            #line hidden
WriteLiteral("                    </td>\r\n                    <td");

WriteAttribute("class", Tuple.Create(" class=\"", 3397), Tuple.Create("\"", 3455)
, Tuple.Create(Tuple.Create("", 3405), Tuple.Create("timestamp", 3405), true)
            
            #line 81 "..\..\Areas\Public\Views\HeldDevices\Index.cshtml"
, Tuple.Create(Tuple.Create("", 3414), Tuple.Create<System.Object, System.Int32>(item.IsAlert ? " Alert" : string.Empty
            
            #line default
            #line hidden
, 3414), false)
);

WriteLiteral(">Since ");

            
            #line 81 "..\..\Areas\Public\Views\HeldDevices\Index.cshtml"
                                                                                    Write(CommonHelpers.FriendlyDate(item.WaitingForUserActionSince));

            
            #line default
            #line hidden
WriteLiteral("\r\n                    </td>\r\n                </tr>\r\n");

            
            #line 84 "..\..\Areas\Public\Views\HeldDevices\Index.cshtml"
            }

            
            #line default
            #line hidden
WriteLiteral("        </table>\r\n        <hr />\r\n");

            
            #line 87 "..\..\Areas\Public\Views\HeldDevices\Index.cshtml"
        
            
            #line default
            #line hidden
            
            #line 87 "..\..\Areas\Public\Views\HeldDevices\Index.cshtml"
          
            var DevicesReadyForReturn = Model.Where(i => i.ReadyForReturn && !i.WaitingForUserAction).ToArray();
        
            
            #line default
            #line hidden
WriteLiteral("\r\n        <h2>Ready for Return (");

            
            #line 90 "..\..\Areas\Public\Views\HeldDevices\Index.cshtml"
                         Write(DevicesReadyForReturn.Length);

            
            #line default
            #line hidden
WriteLiteral(")</h2>\r\n        <table");

WriteLiteral(" class=\"dataTable\"");

WriteLiteral(">\r\n");

            
            #line 92 "..\..\Areas\Public\Views\HeldDevices\Index.cshtml"
            
            
            #line default
            #line hidden
            
            #line 92 "..\..\Areas\Public\Views\HeldDevices\Index.cshtml"
             foreach (var item in DevicesReadyForReturn.OrderBy(i => i.DeviceComputerNameFriendly))
            {

            
            #line default
            #line hidden
WriteLiteral("                <tr>\r\n                    <td");

WriteLiteral(" class=\"id\"");

WriteLiteral(">\r\n");

WriteLiteral("                        ");

            
            #line 96 "..\..\Areas\Public\Views\HeldDevices\Index.cshtml"
                   Write(item.DeviceComputerNameFriendly);

            
            #line default
            #line hidden
WriteLiteral("\r\n                    </td>\r\n                    <td");

WriteLiteral(" class=\"description\"");

WriteLiteral(">\r\n");

            
            #line 99 "..\..\Areas\Public\Views\HeldDevices\Index.cshtml"
                        
            
            #line default
            #line hidden
            
            #line 99 "..\..\Areas\Public\Views\HeldDevices\Index.cshtml"
                         if (item.UserId != null)
                        {

            
            #line default
            #line hidden
WriteLiteral("                            <span");

WriteLiteral(" class=\"user\"");

WriteLiteral(">");

            
            #line 101 "..\..\Areas\Public\Views\HeldDevices\Index.cshtml"
                                          Write(item.UserDisplayName);

            
            #line default
            #line hidden
WriteLiteral(" (");

            
            #line 101 "..\..\Areas\Public\Views\HeldDevices\Index.cshtml"
                                                                 Write(item.UserIdFriendly);

            
            #line default
            #line hidden
WriteLiteral(")</span>\r\n");

            
            #line 102 "..\..\Areas\Public\Views\HeldDevices\Index.cshtml"
                        }

            
            #line default
            #line hidden
WriteLiteral("                        ");

            
            #line 103 "..\..\Areas\Public\Views\HeldDevices\Index.cshtml"
                         if (!string.IsNullOrWhiteSpace(item.DeviceLocation))
                        {
                            if (item.UserId != null)
                            {

            
            #line default
            #line hidden
WriteLiteral("                            ");

WriteLiteral(" - ");

WriteLiteral("\r\n");

            
            #line 108 "..\..\Areas\Public\Views\HeldDevices\Index.cshtml"
                            }
                            
            
            #line default
            #line hidden
            
            #line 109 "..\..\Areas\Public\Views\HeldDevices\Index.cshtml"
                       Write(item.DeviceLocation);

            
            #line default
            #line hidden
            
            #line 109 "..\..\Areas\Public\Views\HeldDevices\Index.cshtml"
                                                
                        }
                        else
                        {
                            if (item.UserId == null)
                            {
                            
            
            #line default
            #line hidden
            
            #line 115 "..\..\Areas\Public\Views\HeldDevices\Index.cshtml"
                       Write(item.DeviceSerialNumber);

            
            #line default
            #line hidden
            
            #line 115 "..\..\Areas\Public\Views\HeldDevices\Index.cshtml"
                                                    
                            }
                        }

            
            #line default
            #line hidden
WriteLiteral("                    </td>\r\n                    <td");

WriteAttribute("class", Tuple.Create(" class=\"", 5022), Tuple.Create("\"", 5080)
, Tuple.Create(Tuple.Create("", 5030), Tuple.Create("timestamp", 5030), true)
            
            #line 119 "..\..\Areas\Public\Views\HeldDevices\Index.cshtml"
, Tuple.Create(Tuple.Create("", 5039), Tuple.Create<System.Object, System.Int32>(item.IsAlert ? " Alert" : string.Empty
            
            #line default
            #line hidden
, 5039), false)
);

WriteLiteral(">Ready ");

            
            #line 119 "..\..\Areas\Public\Views\HeldDevices\Index.cshtml"
                                                                                    Write(CommonHelpers.FriendlyDate(item.ReadyForReturnSince));

            
            #line default
            #line hidden
WriteLiteral("\r\n                    </td>\r\n                </tr>\r\n");

            
            #line 122 "..\..\Areas\Public\Views\HeldDevices\Index.cshtml"
            }

            
            #line default
            #line hidden
WriteLiteral("        </table>\r\n    </div>\r\n</div>\r\n");

        }
    }
}
#pragma warning restore 1591
