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

namespace Disco.Web.Areas.Config.Views.DeviceProfile
{
    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("~/Areas/Config/Views/DeviceProfile/_TableRender.cshtml")]
    public partial class _TableRender : Disco.Services.Web.WebViewPage<IEnumerable<Disco.Web.Areas.Config.Models.DeviceProfile._IndexModelItem>>
    {
        public _TableRender()
        {
        }
        public override void Execute()
        {
            
            #line 2 "..\..\Areas\Config\Views\DeviceProfile\_TableRender.cshtml"
  
    Authorization.Require(Claims.Config.DeviceProfile.Show);
    var showTags = Model.Any(i => i.IsLinked);

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

WriteLiteral(" class=\"tableData deviceProfileTable\"");

WriteLiteral(">\r\n    <tr>\r\n        <th");

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

WriteLiteral(">\r\n            Name\r\n        </th>\r\n        <th");

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

WriteLiteral(">\r\n            Description\r\n        </th>\r\n        <th");

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

WriteLiteral(">\r\n            Type\r\n        </th>\r\n        <th");

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

WriteLiteral(">\r\n            Device Count\r\n        </th>\r\n");

            
            #line 20 "..\..\Areas\Config\Views\DeviceProfile\_TableRender.cshtml"
        
            
            #line default
            #line hidden
            
            #line 20 "..\..\Areas\Config\Views\DeviceProfile\_TableRender.cshtml"
         if (showTags)
        {

            
            #line default
            #line hidden
WriteLiteral("            <th>&nbsp;</th>\r\n");

            
            #line 23 "..\..\Areas\Config\Views\DeviceProfile\_TableRender.cshtml"
        }

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

            
            #line 25 "..\..\Areas\Config\Views\DeviceProfile\_TableRender.cshtml"
    
            
            #line default
            #line hidden
            
            #line 25 "..\..\Areas\Config\Views\DeviceProfile\_TableRender.cshtml"
     foreach (var item in Model)
    {
        var isDecommissioned = item.DeviceCount > 0 && item.DeviceDecommissionedCount >= item.DeviceCount;

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

WriteAttribute("class", Tuple.Create(" class=\"", 769), Tuple.Create("\"", 814)
            
            #line 28 "..\..\Areas\Config\Views\DeviceProfile\_TableRender.cshtml"
, Tuple.Create(Tuple.Create("", 777), Tuple.Create<System.Object, System.Int32>(isDecommissioned ? "hidden" : null
            
            #line default
            #line hidden
, 777), false)
);

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

WriteLiteral("                ");

            
            #line 30 "..\..\Areas\Config\Views\DeviceProfile\_TableRender.cshtml"
           Write(Html.ActionLink(item.Name, MVC.Config.DeviceProfile.Index(item.Id)));

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

WriteLiteral("                ");

            
            #line 33 "..\..\Areas\Config\Views\DeviceProfile\_TableRender.cshtml"
           Write(Html.DisplayFor(modelItem => item.Description));

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

WriteLiteral("                ");

            
            #line 36 "..\..\Areas\Config\Views\DeviceProfile\_TableRender.cshtml"
           Write(Html.DisplayFor(modelItem => item.DistributionType));

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

            
            #line 39 "..\..\Areas\Config\Views\DeviceProfile\_TableRender.cshtml"
                
            
            #line default
            #line hidden
            
            #line 39 "..\..\Areas\Config\Views\DeviceProfile\_TableRender.cshtml"
                 if (item.DeviceCount > 0 && Authorization.Has(Claims.Device.Search))
                {

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

            
            #line 41 "..\..\Areas\Config\Views\DeviceProfile\_TableRender.cshtml"
                     Write(Html.ActionLink(string.Format("View {0}", item.DeviceCount), MVC.Search.Query(item.Id.ToString(), "DeviceProfile")));

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

            
            #line 42 "..\..\Areas\Config\Views\DeviceProfile\_TableRender.cshtml"
                }
                else
                {

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

            
            #line 45 "..\..\Areas\Config\Views\DeviceProfile\_TableRender.cshtml"
                     Write(item.DeviceCount.ToString("n0"));

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

            
            #line 46 "..\..\Areas\Config\Views\DeviceProfile\_TableRender.cshtml"
                }

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

            
            #line 47 "..\..\Areas\Config\Views\DeviceProfile\_TableRender.cshtml"
                 if (item.DeviceDecommissionedCount > 0)
                {

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

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

WriteAttribute("title", Tuple.Create(" title=\"", 1694), Tuple.Create("\"", 1765)
            
            #line 49 "..\..\Areas\Config\Views\DeviceProfile\_TableRender.cshtml"
, Tuple.Create(Tuple.Create("", 1702), Tuple.Create<System.Object, System.Int32>(item.DeviceDecommissionedCount.ToString("n0")
            
            #line default
            #line hidden
, 1702), false)
, Tuple.Create(Tuple.Create(" ", 1750), Tuple.Create("Decommissioned", 1751), true)
);

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

            
            #line 50 "..\..\Areas\Config\Views\DeviceProfile\_TableRender.cshtml"
                     Write(item.DeviceDecommissionedCount.ToString("n0"));

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

            
            #line 52 "..\..\Areas\Config\Views\DeviceProfile\_TableRender.cshtml"
                }

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

            
            #line 54 "..\..\Areas\Config\Views\DeviceProfile\_TableRender.cshtml"
            
            
            #line default
            #line hidden
            
            #line 54 "..\..\Areas\Config\Views\DeviceProfile\_TableRender.cshtml"
             if (showTags)
            {

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

            
            #line 57 "..\..\Areas\Config\Views\DeviceProfile\_TableRender.cshtml"
                    
            
            #line default
            #line hidden
            
            #line 57 "..\..\Areas\Config\Views\DeviceProfile\_TableRender.cshtml"
                     if (item.IsLinked)
                    {

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

WriteLiteral(" class=\"fa fa-link fa-lg success\"");

WriteLiteral(" title=\"Is Linked\"");

WriteLiteral("></i>\r\n");

            
            #line 60 "..\..\Areas\Config\Views\DeviceProfile\_TableRender.cshtml"
                    }
                    else
                    {

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

WriteLiteral("&nbsp;");

WriteLiteral("\r\n");

            
            #line 64 "..\..\Areas\Config\Views\DeviceProfile\_TableRender.cshtml"
                    }

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

            
            #line 66 "..\..\Areas\Config\Views\DeviceProfile\_TableRender.cshtml"
            }

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

            
            #line 68 "..\..\Areas\Config\Views\DeviceProfile\_TableRender.cshtml"
        if (isDecommissioned)
        {

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

WriteLiteral(" class=\"hidden decommissioned-padding\"");

WriteLiteral("></tr>\r\n");

            
            #line 71 "..\..\Areas\Config\Views\DeviceProfile\_TableRender.cshtml"
        }
    }

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

        }
    }
}
#pragma warning restore 1591
