#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.DeviceFlag
{
    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/DeviceFlag/Index.cshtml")]
    public partial class Index : Disco.Services.Web.WebViewPage<Disco.Web.Areas.Config.Models.DeviceFlag.IndexModel>
    {
        public Index()
        {
        }
        public override void Execute()
        {
            
            #line 2 "..\..\Areas\Config\Views\DeviceFlag\Index.cshtml"
  
    Authorization.Require(Claims.Config.DeviceFlag.Show);
    ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Device Flags");
    var showTags = Model.DeviceFlags.Keys.Any(i => i.DevicesLinkedGroup != null || i.DeviceUsersLinkedGroup != null ||
        i.OnAssignmentExpression != null || i.OnUnassignmentExpression != null);

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

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

WriteLiteral(">\r\n");

            
            #line 9 "..\..\Areas\Config\Views\DeviceFlag\Index.cshtml"
    
            
            #line default
            #line hidden
            
            #line 9 "..\..\Areas\Config\Views\DeviceFlag\Index.cshtml"
     if (Model.DeviceFlags.Count == 0)
    {

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

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

WriteLiteral(" style=\"width: 450px; padding: 100px 0;\"");

WriteLiteral(">\r\n            <h2>No device flags are configured</h2>\r\n        </div>\r\n");

            
            #line 14 "..\..\Areas\Config\Views\DeviceFlag\Index.cshtml"
    }
    else
    {

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

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

WriteLiteral(">\r\n            <tr>\r\n                <th>Name</th>\r\n                <th>Descripti" +
"on</th>\r\n                <th>Current&nbsp;Assignments</th>\r\n");

            
            #line 22 "..\..\Areas\Config\Views\DeviceFlag\Index.cshtml"
                
            
            #line default
            #line hidden
            
            #line 22 "..\..\Areas\Config\Views\DeviceFlag\Index.cshtml"
                 if (showTags)
                {

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

            
            #line 25 "..\..\Areas\Config\Views\DeviceFlag\Index.cshtml"
                }

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

            
            #line 27 "..\..\Areas\Config\Views\DeviceFlag\Index.cshtml"
            
            
            #line default
            #line hidden
            
            #line 27 "..\..\Areas\Config\Views\DeviceFlag\Index.cshtml"
             foreach (var pair in Model.DeviceFlags.OrderBy(i => i.Key.Name))
            {
                var item = pair.Key;
                var assignmentCount = pair.Value;

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

WriteAttribute("href", Tuple.Create(" href=\"", 1229), Tuple.Create("\"", 1285)
            
            #line 33 "..\..\Areas\Config\Views\DeviceFlag\Index.cshtml"
, Tuple.Create(Tuple.Create("", 1236), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.Config.DeviceFlag.Index(item.Id))
            
            #line default
            #line hidden
, 1236), false)
);

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

WriteAttribute("class", Tuple.Create(" class=\"", 1319), Tuple.Create("\"", 1372)
, Tuple.Create(Tuple.Create("", 1327), Tuple.Create("fa", 1327), true)
, Tuple.Create(Tuple.Create(" ", 1329), Tuple.Create("fa-", 1330), true)
            
            #line 34 "..\..\Areas\Config\Views\DeviceFlag\Index.cshtml"
, Tuple.Create(Tuple.Create("", 1333), Tuple.Create<System.Object, System.Int32>(item.Icon
            
            #line default
            #line hidden
, 1333), false)
, Tuple.Create(Tuple.Create(" ", 1345), Tuple.Create("fa-lg", 1346), true)
, Tuple.Create(Tuple.Create(" ", 1351), Tuple.Create("d-", 1352), true)
            
            #line 34 "..\..\Areas\Config\Views\DeviceFlag\Index.cshtml"
, Tuple.Create(Tuple.Create("", 1354), Tuple.Create<System.Object, System.Int32>(item.IconColour
            
            #line default
            #line hidden
, 1354), false)
);

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

WriteLiteral("                            ");

            
            #line 35 "..\..\Areas\Config\Views\DeviceFlag\Index.cshtml"
                       Write(item.Name);

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

            
            #line 39 "..\..\Areas\Config\Views\DeviceFlag\Index.cshtml"
                        
            
            #line default
            #line hidden
            
            #line 39 "..\..\Areas\Config\Views\DeviceFlag\Index.cshtml"
                         if (string.IsNullOrWhiteSpace(item.Description))
                        {

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

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

WriteLiteral(">&lt;none&gt;</span>\r\n");

            
            #line 42 "..\..\Areas\Config\Views\DeviceFlag\Index.cshtml"
                        }
                        else
                        {
                            
            
            #line default
            #line hidden
            
            #line 45 "..\..\Areas\Config\Views\DeviceFlag\Index.cshtml"
                       Write(item.Description.ToHtmlComment());

            
            #line default
            #line hidden
            
            #line 45 "..\..\Areas\Config\Views\DeviceFlag\Index.cshtml"
                                                             
                        }

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

WriteLiteral("                        ");

            
            #line 49 "..\..\Areas\Config\Views\DeviceFlag\Index.cshtml"
                   Write(assignmentCount.ToString("N0"));

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

            
            #line 51 "..\..\Areas\Config\Views\DeviceFlag\Index.cshtml"
                    
            
            #line default
            #line hidden
            
            #line 51 "..\..\Areas\Config\Views\DeviceFlag\Index.cshtml"
                     if (showTags)
                    {

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

            
            #line 54 "..\..\Areas\Config\Views\DeviceFlag\Index.cshtml"
                            
            
            #line default
            #line hidden
            
            #line 54 "..\..\Areas\Config\Views\DeviceFlag\Index.cshtml"
                             if (item.DevicesLinkedGroup != null || item.DeviceUsersLinkedGroup != null)
                            {

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

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

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

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

            
            #line 57 "..\..\Areas\Config\Views\DeviceFlag\Index.cshtml"
                            }

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

            
            #line 58 "..\..\Areas\Config\Views\DeviceFlag\Index.cshtml"
                             if (item.OnAssignmentExpression != null || item.OnUnassignmentExpression != null)
                            {

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

WriteLiteral(" class=\"fa fa-bolt fa-lg alert\"");

WriteLiteral(" title=\"Has Expressions\"");

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

            
            #line 61 "..\..\Areas\Config\Views\DeviceFlag\Index.cshtml"
                            }

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

            
            #line 63 "..\..\Areas\Config\Views\DeviceFlag\Index.cshtml"
                    }

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

            
            #line 65 "..\..\Areas\Config\Views\DeviceFlag\Index.cshtml"
            }

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

            
            #line 67 "..\..\Areas\Config\Views\DeviceFlag\Index.cshtml"
    }

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

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

WriteLiteral(">\r\n");

            
            #line 69 "..\..\Areas\Config\Views\DeviceFlag\Index.cshtml"
    
            
            #line default
            #line hidden
            
            #line 69 "..\..\Areas\Config\Views\DeviceFlag\Index.cshtml"
     if (Authorization.Has(Claims.Config.DeviceFlag.Export) && Model.DeviceFlags.Count > 0)
    {
        
            
            #line default
            #line hidden
            
            #line 71 "..\..\Areas\Config\Views\DeviceFlag\Index.cshtml"
   Write(Html.ActionLinkButton("Export", MVC.Config.DeviceFlag.Export()));

            
            #line default
            #line hidden
            
            #line 71 "..\..\Areas\Config\Views\DeviceFlag\Index.cshtml"
                                                                        
    }

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

            
            #line 73 "..\..\Areas\Config\Views\DeviceFlag\Index.cshtml"
     if (Authorization.Has(Claims.Config.DeviceFlag.Create))
    {
        
            
            #line default
            #line hidden
            
            #line 75 "..\..\Areas\Config\Views\DeviceFlag\Index.cshtml"
   Write(Html.ActionLinkButton("Create Device Flag", MVC.Config.DeviceFlag.Create()));

            
            #line default
            #line hidden
            
            #line 75 "..\..\Areas\Config\Views\DeviceFlag\Index.cshtml"
                                                                                    
    }

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

        }
    }
}
#pragma warning restore 1591
