#pragma warning disable 1591
//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//     Runtime Version:4.0.30319.34014
//
//     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.JobQueue
{
    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.BI.Extensions;
    using Disco.Models.Repository;
    using Disco.Services;
    using Disco.Services.Authorization;
    
    #line 2 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
    using Disco.Services.Jobs.JobQueues;
    
    #line default
    #line hidden
    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/JobQueue/Show.cshtml")]
    public partial class Show : Disco.Services.Web.WebViewPage<Disco.Web.Areas.Config.Models.JobQueue.ShowModel>
    {
        public Show()
        {
        }
        public override void Execute()
        {
            
            #line 3 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
  
    Authorization.Require(Claims.Config.JobQueue.Show);

    ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Job Queues", MVC.Config.JobQueue.Index(null), Model.Token.JobQueue.ToString());

    var canConfig = Authorization.Has(Claims.Config.JobQueue.Configure);
    var canDelete = (Authorization.Has(Claims.Config.JobQueue.Delete) && Model.CanDelete);
    var canShowJobs = Model.OpenJobCount > 0 && Authorization.Has(Claims.Job.Lists.JobQueueLists);

    Html.BundleDeferred("~/ClientScripts/Modules/Disco-PropertyChangeHelpers");

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

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

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

WriteLiteral(" style=\"width: 550px\"");

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

WriteLiteral(" style=\"width: 150px\"");

WriteLiteral(">Id:\r\n            </th>\r\n            <td>\r\n");

WriteLiteral("                ");

            
            #line 20 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
           Write(Html.DisplayFor(model => model.Token.JobQueue.Id));

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

            
            #line 26 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
                 if (canConfig)
                {
            
            #line default
            #line hidden
            
            #line 27 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
            Write(Html.EditorFor(model => model.Token.JobQueue.Name));

            
            #line default
            #line hidden
            
            #line 27 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
                                                                    
                
            
            #line default
            #line hidden
            
            #line 28 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
           Write(AjaxHelpers.AjaxSave());

            
            #line default
            #line hidden
            
            #line 28 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
                                       
                
            
            #line default
            #line hidden
            
            #line 29 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
           Write(AjaxHelpers.AjaxLoader());

            
            #line default
            #line hidden
            
            #line 29 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
                                         

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

WriteLiteral(" type=\"text/javascript\"");

WriteLiteral(">\r\n                    $(function () {\r\n                        document.DiscoFun" +
"ctions.PropertyChangeHelper(\r\n                            $(\'#Token_JobQueue_Nam" +
"e\'),\r\n                            \'Invalid Name\',\r\n                            \'" +
"");

            
            #line 35 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
                         Write(Url.Action(MVC.API.JobQueue.UpdateName(Model.Token.JobQueue.Id)));

            
            #line default
            #line hidden
WriteLiteral("\',\r\n                            \'QueueName\'\r\n                        );\r\n        " +
"            });\r\n                </script>\r\n");

            
            #line 40 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
                }
                else
                {
                
            
            #line default
            #line hidden
            
            #line 43 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
           Write(Model.Token.JobQueue.Name);

            
            #line default
            #line hidden
            
            #line 43 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
                                          
                }

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

            
            #line 50 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
                 if (canConfig)
                {
            
            #line default
            #line hidden
            
            #line 51 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
            Write(Html.EditorFor(model => model.Token.JobQueue.Description));

            
            #line default
            #line hidden
            
            #line 51 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
                                                                           
                
            
            #line default
            #line hidden
            
            #line 52 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
           Write(AjaxHelpers.AjaxSave());

            
            #line default
            #line hidden
            
            #line 52 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
                                       
                
            
            #line default
            #line hidden
            
            #line 53 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
           Write(AjaxHelpers.AjaxLoader());

            
            #line default
            #line hidden
            
            #line 53 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
                                         

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

WriteLiteral(" type=\"text/javascript\"");

WriteLiteral(">\r\n                    $(function () {\r\n                        document.DiscoFun" +
"ctions.PropertyChangeHelper(\r\n                            $(\'#Token_JobQueue_Des" +
"cription\'),\r\n                            \'Invalid Description\',\r\n               " +
"             \'");

            
            #line 59 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
                         Write(Url.Action(MVC.API.JobQueue.UpdateDescription(Model.Token.JobQueue.Id)));

            
            #line default
            #line hidden
WriteLiteral("\',\r\n                            \'Description\'\r\n                        );\r\n      " +
"              });\r\n                </script>\r\n");

            
            #line 64 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
                }
                else
                {

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

            
            #line 67 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
                      if (string.IsNullOrEmpty(Model.Token.JobQueue.Description))
                     {

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

WriteLiteral("&lt;None&gt;");

WriteLiteral("\r\n");

            
            #line 70 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
                     }
                     else
                     {
                        
            
            #line default
            #line hidden
            
            #line 73 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
                   Write(Model.Token.JobQueue.Description.ToHtmlComment());

            
            #line default
            #line hidden
            
            #line 73 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
                                                                         
                     }

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

            
            #line 76 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
                }

            
            #line default
            #line hidden
WriteLiteral("            </td>\r\n        </tr>\r\n        <tr>\r\n            <th>Statistics:\r\n    " +
"        </th>\r\n            <td>\r\n                <div><strong>");

            
            #line 83 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
                        Write(Model.OpenJobCount);

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

            
            #line 83 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
                                                Write(Model.OpenJobCount != 1 ? "s" : null);

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

            
            #line 84 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
                Write(Model.TotalJobCount);

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

            
            #line 84 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
                                               Write(Model.TotalJobCount != 1 ? "s" : null);

            
            #line default
            #line hidden
WriteLiteral("</div>\r\n            </td>\r\n        </tr>\r\n        <tr>\r\n            <th>Icon:\r\n  " +
"          </th>\r\n            <td>\r\n                <i");

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

WriteLiteral(" data-icon=\"");

            
            #line 91 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
                                                     Write(Model.Token.JobQueue.Icon);

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

WriteLiteral(" data-colour=\"");

            
            #line 91 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
                                                                                                Write(Model.Token.JobQueue.IconColour);

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

WriteAttribute("class", Tuple.Create(" class=\"", 3595), Tuple.Create("\"", 3680)
, Tuple.Create(Tuple.Create("", 3603), Tuple.Create("fa", 3603), true)
, Tuple.Create(Tuple.Create(" ", 3605), Tuple.Create("fa-", 3606), true)
            
            #line 91 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
                                                                      , Tuple.Create(Tuple.Create("", 3609), Tuple.Create<System.Object, System.Int32>(Model.Token.JobQueue.Icon
            
            #line default
            #line hidden
, 3609), false)
, Tuple.Create(Tuple.Create(" ", 3637), Tuple.Create("fa-4x", 3638), true)
, Tuple.Create(Tuple.Create(" ", 3643), Tuple.Create("d-", 3644), true)
            
            #line 91 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
                                                                                                           , Tuple.Create(Tuple.Create("", 3646), Tuple.Create<System.Object, System.Int32>(Model.Token.JobQueue.IconColour
            
            #line default
            #line hidden
, 3646), false)
);

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

            
            #line 92 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
                
            
            #line default
            #line hidden
            
            #line 92 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
                 if (canConfig)
                {

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

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

WriteLiteral(" href=\"#\"");

WriteLiteral(" class=\"button small\"");

WriteLiteral(">Update</a>\r\n                        <div");

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

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

WriteLiteral(" title=\"Job Queue Icon\"");

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

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

WriteLiteral(">\r\n");

            
            #line 99 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
                                    
            
            #line default
            #line hidden
            
            #line 99 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
                                     foreach (var icon in Model.Icons)
                                    {

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

WriteLiteral(" data-icon=\"");

            
            #line 101 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
                                                  Write(icon.Key);

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

WriteAttribute("class", Tuple.Create(" class=\"", 4245), Tuple.Create("\"", 4270)
, Tuple.Create(Tuple.Create("", 4253), Tuple.Create("fa", 4253), true)
, Tuple.Create(Tuple.Create(" ", 4255), Tuple.Create("fa-", 4256), true)
            
            #line 101 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
 , Tuple.Create(Tuple.Create("", 4259), Tuple.Create<System.Object, System.Int32>(icon.Key
            
            #line default
            #line hidden
, 4259), false)
);

WriteAttribute("title", Tuple.Create(" title=\"", 4271), Tuple.Create("\"", 4290)
            
            #line 101 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
                    , Tuple.Create(Tuple.Create("", 4279), Tuple.Create<System.Object, System.Int32>(icon.Value
            
            #line default
            #line hidden
, 4279), false)
);

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

            
            #line 102 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
                                    }

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

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

WriteLiteral(">\r\n");

            
            #line 105 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
                                    
            
            #line default
            #line hidden
            
            #line 105 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
                                     foreach (var colour in Model.ThemeColours)
                                    {

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

WriteLiteral(" data-colour=\"");

            
            #line 107 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
                                                    Write(colour.Key);

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

WriteAttribute("class", Tuple.Create(" class=\"", 4622), Tuple.Create("\"", 4658)
, Tuple.Create(Tuple.Create("", 4630), Tuple.Create("fa", 4630), true)
, Tuple.Create(Tuple.Create(" ", 4632), Tuple.Create("fa-square", 4633), true)
, Tuple.Create(Tuple.Create(" ", 4642), Tuple.Create("d-", 4643), true)
            
            #line 107 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
              , Tuple.Create(Tuple.Create("", 4645), Tuple.Create<System.Object, System.Int32>(colour.Key
            
            #line default
            #line hidden
, 4645), false)
);

WriteAttribute("title", Tuple.Create(" title=\"", 4659), Tuple.Create("\"", 4680)
            
            #line 107 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
                                   , Tuple.Create(Tuple.Create("", 4667), Tuple.Create<System.Object, System.Int32>(colour.Value
            
            #line default
            #line hidden
, 4667), false)
);

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

            
            #line 108 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
                                    }

            
            #line default
            #line hidden
WriteLiteral("                                </div>\r\n                            </div>\r\n     " +
"                   </div>\r\n                        <script>\r\n                   " +
"         (function () {\r\n                                var dialog, icon, colou" +
"rs, icons;\r\n\r\n                                function showDialog() {\r\n         " +
"                           if (!dialog) {\r\n                                     " +
"   dialog = $(\'#Config_JobQueues_Icon_Update_Dialog\').dialog({\r\n                " +
"                            resizable: false,\r\n                                 " +
"           modal: true,\r\n                                            autoOpen: f" +
"alse,\r\n                                            width: 750,\r\n                " +
"                            height: 650,\r\n                                      " +
"      buttons: {\r\n                                                \"Save\": save,\r" +
"\n                                                Cancel: cancel\r\n               " +
"                             }\r\n                                        });\r\n\r\n " +
"                                       colours = dialog.find(\'.colours\');\r\n     " +
"                                   icons = dialog.find(\'.icons\');\r\n\r\n           " +
"                             colours.on(\'click\', \'i\', selectColour);\r\n          " +
"                              icons.on(\'click\', \'i\', selectIcon);\r\n             " +
"                       }\r\n\r\n                                    colours.find(\'i[" +
"data-colour=\"\' + icon.attr(\'data-colour\') + \'\"]\').each(selectColour);\r\n         " +
"                           icons.find(\'i[data-icon=\"\' + icon.attr(\'data-icon\') +" +
" \'\"]\').each(selectIcon);\r\n\r\n                                    dialog.dialog(\'o" +
"pen\');\r\n\r\n                                    return false;\r\n                   " +
"             }\r\n\r\n                                function selectColour() {\r\n   " +
"                                 var $this = $(this),\r\n                         " +
"               colourCode = $this.attr(\'data-colour\'),\r\n                        " +
"                previousColourCode = icons.attr(\'data-colour\');\r\n\r\n\r\n           " +
"                         colours.find(\'i\').removeClass(\'selected fa-check-square" +
"\').addClass(\'fa-square\');\r\n                                    $this.removeClass" +
"(\'fa-square\').addClass(\'fa-check-square selected\');\r\n\r\n                         " +
"           if (previousColourCode)\r\n                                        icon" +
"s.removeClass(\'d-\' + previousColourCode);\r\n                                    i" +
"cons.attr(\'data-colour\', colourCode)\r\n                                    icons." +
"addClass(\'d-\' + colourCode);\r\n                                }\r\n               " +
"                 function selectIcon() {\r\n                                    va" +
"r $this = $(this),\r\n                                        iconCode = $this.att" +
"r(\'data-icon\');\r\n\r\n                                    icons.find(\'i\').removeCla" +
"ss(\'selected\');\r\n                                    $this.addClass(\'selected\');" +
"\r\n                                }\r\n\r\n                                function " +
"save() {\r\n                                    var url = \'");

            
            #line 168 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
                                           Write(Url.Action(MVC.API.JobQueue.UpdateIconAndColour(id: Model.Token.JobQueue.Id, redirect: true)));

            
            #line default
            #line hidden
WriteLiteral(@"',
                                        data = {
                                            Icon: icons.find('i.selected').attr('data-icon'),
                                            IconColour: colours.find('i.selected').attr('data-colour')
                                        };
                                    window.location.href = url + '&' + $.param(data);

                                    dialog.dialog(""disable"");
                                    dialog.dialog(""option"", ""buttons"", null);
                                }

                                function cancel() {
                                    $(this).dialog(""close"");
                                }

                                $(function () {
                                    icon = $('#Config_JobQueues_Icon');
                                    $('#Config_JobQueues_Icon_Update').click(showDialog);
                                });
                            }());
                        </script>
                    </div>
");

            
            #line 190 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
                }

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

            
            #line 196 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
                 if (canConfig)
                {
                    var priorityValue = Model.Token.JobQueue.Priority.ToString();
                    var priorityItems = Enum.GetNames(typeof(JobQueuePriority)).Select(i => new SelectListItem() { Text = i, Value = i, Selected = (i == priorityValue) }).ToList();

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

WriteAttribute("class", Tuple.Create(" class=\"", 9434), Tuple.Create("\"", 9482)
, Tuple.Create(Tuple.Create("", 9442), Tuple.Create("fa", 9442), true)
, Tuple.Create(Tuple.Create(" ", 9444), Tuple.Create("d-priority-", 9445), true)
            
            #line 200 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
, Tuple.Create(Tuple.Create("", 9456), Tuple.Create<System.Object, System.Int32>(priorityValue.ToLower()
            
            #line default
            #line hidden
, 9456), false)
);

WriteAttribute("title", Tuple.Create(" title=\"", 9483), Tuple.Create("\"", 9516)
            
            #line 200 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
, Tuple.Create(Tuple.Create("", 9491), Tuple.Create<System.Object, System.Int32>(priorityValue
            
            #line default
            #line hidden
, 9491), false)
, Tuple.Create(Tuple.Create(" ", 9507), Tuple.Create("Priority", 9508), true)
);

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

            
            #line 201 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
                
            
            #line default
            #line hidden
            
            #line 201 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
           Write(Html.DropDownListFor(m => m.Token.JobQueue.Priority, priorityItems));

            
            #line default
            #line hidden
            
            #line 201 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
                                                                                    
                
            
            #line default
            #line hidden
            
            #line 202 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
           Write(AjaxHelpers.AjaxSave());

            
            #line default
            #line hidden
            
            #line 202 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
                                       
                
            
            #line default
            #line hidden
            
            #line 203 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
           Write(AjaxHelpers.AjaxLoader());

            
            #line default
            #line hidden
            
            #line 203 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
                                         

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

WriteLiteral(" type=\"text/javascript\"");

WriteLiteral(@">
                    $(function () {
                        var element = $('#Token_JobQueue_Priority');

                        document.DiscoFunctions.PropertyChangeHelper(
                            element,
                            'Invalid Priority',
                            '");

            
            #line 211 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
                         Write(Url.Action(MVC.API.JobQueue.UpdatePriority(Model.Token.JobQueue.Id)));

            
            #line default
            #line hidden
WriteLiteral(@"',
                            'Priority'
                        );

                        element.change(function () {
                            var icon = element.closest('td').find('i').first();
                            icon[0].className = '';
                            icon.addClass('fa d-priority-' + element.val().toLowerCase()).attr('title', element.val() + ' Priority');
                        });
                    });
                </script>
");

            
            #line 222 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
                }
                else
                {
                
            
            #line default
            #line hidden
            
            #line 225 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
           Write(Model.Token.JobQueue.Priority.ToString());

            
            #line default
            #line hidden
            
            #line 225 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
                                                         
                }

            
            #line default
            #line hidden
WriteLiteral("            </td>\r\n        </tr>\r\n        <tr>\r\n            <th>Default SLA:\r\n   " +
"         </th>\r\n            <td>");

            
            #line 232 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
                 if (canConfig)
                {
                    var slaOptions = JobQueueService.SlaOptions.Select(o => new SelectListItem() { Text = o.Value, Value = o.Key.ToString() }).ToList();

                    if (this.Model.Token.JobQueue.DefaultSLAExpiry.HasValue)
                    {
                        var slaValue = this.Model.Token.JobQueue.DefaultSLAExpiry.Value;
                        if (JobQueueService.SlaOptions.Where(o => o.Key == slaValue).Count() == 0)
                        {
                            string slaValueText;
                            if (slaValue % (60 * 24 * 7 * 4) == 0)
                            { slaValueText = string.Format("{0} months", slaValue / (60 * 24 * 7 * 4)); }
                            else if (slaValue % (60 * 24 * 7) == 0)
                            { slaValueText = string.Format("{0} weeks", slaValue / (60 * 24 * 7)); }
                            else if (slaValue % (60 * 24) == 0)
                            { slaValueText = string.Format("{0} days", slaValue / (60 * 24)); }
                            else if (slaValue % (60) == 0)
                            { slaValueText = string.Format("{0} hours", slaValue / 60); }
                            else
                            { slaValueText = string.Format("{0} minutes", slaValue); }

                            slaOptions.Insert(0, new SelectListItem() { Text = string.Format("{0} <Custom>", slaValueText), Value = slaValue.ToString() });
                        }
                    }
                
            
            #line default
            #line hidden
            
            #line 256 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
           Write(Html.DropDownListFor(m => m.Token.JobQueue.DefaultSLAExpiry, slaOptions));

            
            #line default
            #line hidden
            
            #line 256 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
                                                                                         
                
            
            #line default
            #line hidden
            
            #line 257 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
           Write(AjaxHelpers.AjaxSave());

            
            #line default
            #line hidden
            
            #line 257 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
                                       
                
            
            #line default
            #line hidden
            
            #line 258 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
           Write(AjaxHelpers.AjaxLoader());

            
            #line default
            #line hidden
            
            #line 258 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
                                         

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

WriteLiteral(" type=\"text/javascript\"");

WriteLiteral(@">
                    $(function () {
                        document.DiscoFunctions.PropertyChangeHelper(
                            $('#Token_JobQueue_DefaultSLAExpiry'),
                            'Invalid Default SLA',
                            '");

            
            #line 264 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
                         Write(Url.Action(MVC.API.JobQueue.UpdateDefaultSLAExpiry(Model.Token.JobQueue.Id)));

            
            #line default
            #line hidden
WriteLiteral("\',\r\n                            \'DefaultSLAExpiry\'\r\n                        );\r\n " +
"                   });\r\n                </script>\r\n");

            
            #line 269 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
                }
                else
                {
                    if (this.Model.Token.JobQueue.DefaultSLAExpiry.HasValue)
                    {
                        var slaValue = this.Model.Token.JobQueue.DefaultSLAExpiry.Value;
                        var slaOption = JobQueueService.SlaOptions.Where(o => o.Key == slaValue).ToArray();
                        if (slaOption.Length > 0)
                        {
                
            
            #line default
            #line hidden
            
            #line 278 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
           Write(slaOption[0].Value);

            
            #line default
            #line hidden
            
            #line 278 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
                                   
                        }
                        else
                        {

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

WriteLiteral("&lt;None&gt;");

WriteLiteral("\r\n");

            
            #line 283 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
                        }
                    }
                    else
                    {

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

WriteLiteral("&lt;None&gt;");

WriteLiteral("\r\n");

            
            #line 288 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
                    }
                }

            
            #line default
            #line hidden
WriteLiteral("            </td>\r\n        </tr>\r\n        <tr>\r\n            <th>Member Groups/Use" +
"rs:</th>\r\n            <td>\r\n");

            
            #line 295 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
                
            
            #line default
            #line hidden
            
            #line 295 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
                 if (Model.Token.SubjectIds.Count == 0)
                {

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

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

WriteLiteral(">None Associated</span>\r\n");

            
            #line 298 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
                }
                else
                {

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

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

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

WriteLiteral(">\r\n");

            
            #line 302 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
                        
            
            #line default
            #line hidden
            
            #line 302 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
                         foreach (var sg in Model.Subjects)
                        {
                            var displayName = sg.Id == sg.Name ? sg.Id : string.Format("{0} [{1}]", sg.Name, sg.Id);

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

WriteAttribute("class", Tuple.Create(" class=\"", 14490), Tuple.Create("\"", 14530)
            
            #line 305 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
, Tuple.Create(Tuple.Create("", 14498), Tuple.Create<System.Object, System.Int32>(sg.IsGroup ? "group" : "user"
            
            #line default
            #line hidden
, 14498), false)
);

WriteLiteral(">");

            
            #line 305 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
                                                                          if (sg.IsGroup)
                                                                         {

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

WriteLiteral(" class=\"fa fa-users fa-lg\"");

WriteLiteral("></i>");

            
            #line 307 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
                                                                 
            
            #line default
            #line hidden
            
            #line 307 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
                                                            Write(displayName);

            
            #line default
            #line hidden
            
            #line 307 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
                                                                             
                                                                         }
                                                                         else
                                                                         {

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

WriteAttribute("href", Tuple.Create(" href=\"", 14970), Tuple.Create("\"", 15012)
            
            #line 311 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
, Tuple.Create(Tuple.Create("", 14977), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.User.Show(sg.Id))
            
            #line default
            #line hidden
, 14977), false)
);

WriteLiteral("><i");

WriteLiteral(" class=\"fa fa-user fa-lg\"");

WriteLiteral("></i>");

            
            #line 311 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
                                                                                                         Write(displayName);

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

            
            #line 312 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
                                                                         }
            
            #line default
            #line hidden
WriteLiteral("</li>\r\n");

            
            #line 313 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
                        }

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

            
            #line 315 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
                }

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

            
            #line 316 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
                 if (canConfig)
                {

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

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

WriteLiteral(" href=\"#\"");

WriteLiteral(" class=\"button small\"");

WriteLiteral(">Update</a>\r\n                        <div");

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

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

WriteLiteral(" title=\"Job Queue Member Groups/Users\"");

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

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

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

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

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

WriteLiteral(">None Associated</span>\r\n                                <ul");

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

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

WriteLiteral(">\r\n");

            
            #line 324 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
                                    
            
            #line default
            #line hidden
            
            #line 324 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
                                     foreach (var sg in Model.Subjects)
                                    {
                                        var displayName = sg.Id == sg.Name ? sg.Id : string.Format("{0} [{1}]", sg.Name, sg.Id);

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

WriteAttribute("class", Tuple.Create(" class=\"", 16146), Tuple.Create("\"", 16186)
            
            #line 327 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
, Tuple.Create(Tuple.Create("", 16154), Tuple.Create<System.Object, System.Int32>(sg.IsGroup ? "group" : "user"
            
            #line default
            #line hidden
, 16154), false)
);

WriteLiteral(" data-subjectid=\"");

            
            #line 327 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
                                                                                                Write(sg.Id);

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

WriteLiteral(">");

            
            #line 327 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
                                                                                                              if (sg.IsGroup)
                                                                                                             {

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

WriteLiteral(" class=\"fa fa-users fa-lg\"");

WriteLiteral("></i>");

            
            #line 329 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
                                                                             
            
            #line default
            #line hidden
            
            #line 329 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
                                                                        Write(displayName);

            
            #line default
            #line hidden
            
            #line 329 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
                                                                                         
                                                                                                             }
                                                                                                             else
                                                                                                             {

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

WriteLiteral(" class=\"fa fa-user fa-lg\"");

WriteLiteral("></i>");

            
            #line 333 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
                                                                            
            
            #line default
            #line hidden
            
            #line 333 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
                                                                       Write(displayName);

            
            #line default
            #line hidden
            
            #line 333 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
                                                                                        
                                                                                                             }
            
            #line default
            #line hidden
WriteLiteral("<i");

WriteLiteral(" class=\"fa fa-times-circle remove\"");

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

            
            #line 335 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
                                    }

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

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

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

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

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

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

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

WriteLiteral(" href=\"#\"");

WriteLiteral(" class=\"button small\"");

WriteLiteral(">Add</a>\r\n                            </div>\r\n                            <form");

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

WriteAttribute("action", Tuple.Create(" action=\"", 17577), Tuple.Create("\"", 17669)
            
            #line 342 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
            , Tuple.Create(Tuple.Create("", 17586), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.JobQueue.UpdateSubjects(Model.Token.JobQueue.Id, null, true))
            
            #line default
            #line hidden
, 17586), false)
);

WriteLiteral(" method=\"post\"");

WriteLiteral("></form>\r\n                        </div>\r\n                        <script>\r\n     " +
"                       (function () {\r\n                                var dialo" +
"g, textAdd, list, noSubjects, form;\r\n\r\n                                function " +
"showDialog() {\r\n                                    if (!dialog) {\r\n            " +
"                            dialog = $(\'#Config_JobQueues_Subjects_Update_Dialog" +
"\').dialog({\r\n                                            resizable: false,\r\n    " +
"                                        modal: true,\r\n                          " +
"                  autoOpen: false,\r\n                                            " +
"width: 350,\r\n                                            height: 420,\r\n         " +
"                                   buttons: {\r\n                                 " +
"               \"Save Changes\": saveChanges,\r\n                                   " +
"             Cancel: cancel\r\n                                            }\r\n    " +
"                                    });\r\n\r\n                                     " +
"   dialog.on(\'click\', \'.remove\', remove);\r\n\r\n                                   " +
"     list = $(\'#Config_JobQueues_Subjects_Update_Dialog_List\');\r\n               " +
"                         noSubjects = $(\'#Config_JobQueues_Subjects_Update_Dialo" +
"g_None\');\r\n\r\n                                        textAdd = $(\'#Config_JobQue" +
"ues_Subjects_Update_Dialog_TextAdd\');\r\n\r\n                                       " +
" textAdd.watermark(\'Search Subjects\')\r\n                                         " +
"   .autocomplete({\r\n                                                source: \'");

            
            #line 371 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
                                                     Write(Url.Action(MVC.API.System.SearchSubjects()));

            
            #line default
            #line hidden
WriteLiteral("\',\r\n                                                minLength: 2,\r\n              " +
"                                  focus: function (e, ui) {\r\n                   " +
"                                 textAdd.val(ui.item.Id);\r\n                     " +
"                               return false;\r\n                                  " +
"              },\r\n                                                select: functi" +
"on (e, ui) {\r\n                                                    textAdd.val(ui" +
".item.Id).blur();\r\n                                                    return fa" +
"lse;\r\n                                                }\r\n                       " +
"                     }).data(\'ui-autocomplete\')._renderItem = function (ul, item" +
") {\r\n                                                return $(\"<li></li>\")\r\n    " +
"                                                .data(\"item.autocomplete\", item)" +
"\r\n                                                    .append(\"<a><strong>\" + it" +
"em.Name + \"</strong><br>\" + item.Id + \" (\" + item.Type + \")</a>\")\r\n             " +
"                                       .appendTo(ul);\r\n                         " +
"                   };\r\n\r\n                                        $(\'#Config_JobQ" +
"ueues_Subjects_Update_Dialog_Add\').click(add);\r\n                                " +
"    }\r\n\r\n                                    dialog.dialog(\'open\');\r\n\r\n         " +
"                           updateNoSubjects();\r\n                                " +
"    return false;\r\n                                }\r\n\r\n                        " +
"        function cancel() {\r\n                                    $(this).dialog(" +
"\"close\");\r\n\r\n                                    list.find(\'li\').each(function (" +
") {\r\n                                        $this = $(this);\r\n                 " +
"                       if ($this.is(\'[data-subjectstatus=\"new\"]\')) {\r\n          " +
"                                  $this.remove();\r\n                             " +
"           } else {\r\n                                            if ($this.is(\'[" +
"data-subjectstatus=\"removed\"]\')) {\r\n                                            " +
"    $this.show();\r\n                                                $this.attr(\'d" +
"ata-status\', \'\')\r\n                                            }\r\n               " +
"                         }\r\n                                    });\r\n           " +
"                     }\r\n\r\n                                function remove() {\r\n " +
"                                   $this = $(this).closest(\'li\');\r\n\r\n           " +
"                         if ($this.is(\'[data-subjectstatus=\"new\"]\')) {\r\n        " +
"                                $this.remove();\r\n                               " +
"     } else {\r\n                                        $this.attr(\'data-subjects" +
"tatus\', \'removed\').hide();\r\n                                    }\r\n\r\n           " +
"                         updateNoSubjects();\r\n                                }\r" +
"\n\r\n                                function add() {\r\n\r\n                         " +
"           var id = textAdd.val();\r\n\r\n                                    $.ajax" +
"({\r\n                                        url: \'");

            
            #line 430 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
                                         Write(Url.Action(MVC.API.System.Subject()));

            
            #line default
            #line hidden
WriteLiteral("\',\r\n                                        method: \'post\',\r\n                    " +
"                    data: { Id: id }\r\n                                    }).don" +
"e(function (response) {\r\n                                        if (response) {" +
"\r\n                                            if (response.IsGroup || response.I" +
"sUserAccount) {\r\n                                                if (list.find(\'" +
"li[data-subjectid=\"\' + response.Id + \'\"]\').filter(\'[data-status!=\"removed\"]\').le" +
"ngth == 0) {\r\n\r\n                                                    var liIcon =" +
" $(\'<i>\').addClass(\'fa fa-lg\');\r\n                                               " +
"     if (response.Type === \'user\')\r\n                                            " +
"            liIcon.addClass(\'fa-user\');\r\n                                       " +
"             else\r\n                                                        liIco" +
"n.addClass(\'fa-users\');\r\n\r\n                                                    v" +
"ar li = $(\'<li>\')\r\n                                                        .appe" +
"nd(liIcon)\r\n                                                        .append($(\'<" +
"span>\').text(response.Id == response.Name ? response.Id : response.Name + \' [\' +" +
" response.Id + \']\'))\r\n                                                        .a" +
"ppend($(\'<i>\').addClass(\'fa fa-times-circle remove\'))\r\n                         " +
"                               .addClass(response.Type)\r\n                       " +
"                                 .attr(\'data-subjectid\', response.Id)\r\n         " +
"                                               .attr(\'data-subjectstatus\', \'new\'" +
");\r\n\r\n                                                    list.append(li);\r\n\r\n  " +
"                                                  updateNoSubjects();\r\n         " +
"                                       } else {\r\n                               " +
"                     alert(\'That subject has already been added\');\r\n            " +
"                                    }\r\n                                         " +
"   } else {\r\n                                                alert(response.Name" +
" + \' [\' + response.Id + \'] is a \' + response.Type + \'. Only users and groups can" +
" be added.\');\r\n                                            }\r\n                  " +
"                      } else {\r\n                                            aler" +
"t(\'Unknown Id\');\r\n                                        }\r\n                   " +
"                 }).fail(function (jqXHR, textStatus, errorThrown) {\r\n          " +
"                              alert(\'Error: \' + errorThrown);\r\n                 " +
"                   });\r\n                                    }\r\n\r\n               " +
"                 function updateNoSubjects() {\r\n                                " +
"    if (list.find(\'li:visible\').length > 0)\r\n                                   " +
"     noSubjects.hide();\r\n                                    else\r\n             " +
"                           noSubjects.show();\r\n                                }" +
"\r\n\r\n                                function saveChanges() {\r\n                  " +
"                  var form = $(\'#Config_JobQueues_Subjects_Update_Dialog_Form\')." +
"empty();\r\n\r\n                                    list.find(\'li[data-subjectstatus" +
"!=\"removed\"]\').each(function () {\r\n                                        var s" +
"ubjectId = $(this).attr(\'data-subjectid\');\r\n\r\n                                  " +
"      form.append($(\'<input>\').attr({\r\n                                         " +
"   \'name\': \'Subjects\',\r\n                                            \'type\': \'hid" +
"den\'\r\n                                        }).val(subjectId));\r\n\r\n           " +
"                         }).get();\r\n\r\n                                    form.s" +
"ubmit();\r\n\r\n                                    dialog.dialog(\"disable\");\r\n     " +
"                               dialog.dialog(\"option\", \"buttons\", null);\r\n      " +
"                          }\r\n\r\n                                $(function () {\r\n" +
"                                    $(\'#Config_JobQueues_Subjects_Update\').click" +
"(showDialog);\r\n                                });\r\n\r\n                          " +
"  })();\r\n                        </script>\r\n                    </div>\r\n");

            
            #line 502 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
                }

            
            #line default
            #line hidden
WriteLiteral("            </td>\r\n        </tr>\r\n        <tr>\r\n            <th>Automatically Add" +
" Jobs:</th>\r\n            <td>\r\n                <div>\r\n");

            
            #line 509 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
                    
            
            #line default
            #line hidden
            
            #line 509 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
                     if (Model.Token.JobQueue.JobSubTypes.Count > 0)
                    {

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

            
            #line 512 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
                            
            
            #line default
            #line hidden
            
            #line 512 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
                             foreach (var jobType in Model.Token.JobQueue.JobSubTypes.GroupBy(jst => jst.JobType).OrderBy(jtg => jtg.Key.Description))
                            {

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

WriteLiteral("                                    ");

            
            #line 515 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
                               Write(jobType.Key.Description);

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

            
            #line 517 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
                                        
            
            #line default
            #line hidden
            
            #line 517 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
                                         if (jobType.Count() == Model.JobTypes.FirstOrDefault(jt => jt.Id == jobType.Key.Id).JobSubTypes.Count)
                                        {

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

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

WriteLiteral(">[All Sub Types]</span></li>\r\n");

            
            #line 520 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
                                        }
                                        else
                                        {
                                            foreach (var jobSubType in jobType)
                                            {

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

            
            #line 525 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
                                           Write(jobSubType.Description);

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

            
            #line 526 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
                                            }
                                        }

            
            #line default
            #line hidden
WriteLiteral("                                    </ul>\r\n                                </li>\r" +
"\n");

            
            #line 530 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
                            }

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

            
            #line 532 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
                    }
                    else
                    {

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

WriteLiteral("&lt;None&gt;");

WriteLiteral("\r\n");

            
            #line 536 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
                    }

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

            
            #line 538 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
                
            
            #line default
            #line hidden
            
            #line 538 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
                 if (canConfig)
                {

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

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

WriteLiteral(" href=\"#\"");

WriteLiteral(" class=\"button small\"");

WriteLiteral(">Update</a>\r\n");

WriteLiteral("                    <div");

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

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

WriteLiteral(" title=\"Job Queue Automatic Types\"");

WriteLiteral(">\r\n");

            
            #line 542 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
                        
            
            #line default
            #line hidden
            
            #line 542 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
                         using (Html.BeginForm(MVC.API.JobQueue.UpdateJobSubTypes(Model.Token.JobQueue.Id, null, true)))
                        {
                            var selectedTypes = Model.Token.JobQueue.JobSubTypes.Select(jst => jst.JobType).Distinct().ToList();
                            foreach (var jt in Model.JobTypes)
                            {

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

WriteAttribute("id", Tuple.Create(" id=\"", 28933), Tuple.Create("\"", 28955)
, Tuple.Create(Tuple.Create("", 28938), Tuple.Create("trJobType", 28938), true)
            
            #line 547 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
, Tuple.Create(Tuple.Create("", 28947), Tuple.Create<System.Object, System.Int32>(jt.Id
            
            #line default
            #line hidden
, 28947), false)
);

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

WriteLiteral(">\r\n                                <h4>\r\n                                    <inp" +
"ut");

WriteAttribute("id", Tuple.Create(" id=\"", 29056), Tuple.Create("\"", 29075)
, Tuple.Create(Tuple.Create("", 29061), Tuple.Create("Types_", 29061), true)
            
            #line 549 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
, Tuple.Create(Tuple.Create("", 29067), Tuple.Create<System.Object, System.Int32>(jt.Id
            
            #line default
            #line hidden
, 29067), false)
);

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

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

WriteAttribute("value", Tuple.Create(" value=\"", 29108), Tuple.Create("\"", 29124)
            
            #line 549 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
                      , Tuple.Create(Tuple.Create("", 29116), Tuple.Create<System.Object, System.Int32>(jt.Id
            
            #line default
            #line hidden
, 29116), false)
);

WriteLiteral(" ");

            
            #line 549 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
                                                                                                            Write(selectedTypes.Contains(jt) ? "checked=\"checked\"" : null);

            
            #line default
            #line hidden
WriteLiteral(" /><label");

WriteAttribute("for", Tuple.Create(" for=\"", 29195), Tuple.Create("\"", 29215)
, Tuple.Create(Tuple.Create("", 29201), Tuple.Create("Types_", 29201), true)
            
            #line 549 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
                                                                                                                 , Tuple.Create(Tuple.Create("", 29207), Tuple.Create<System.Object, System.Int32>(jt.Id
            
            #line default
            #line hidden
, 29207), false)
);

WriteLiteral(">");

            
            #line 549 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
                                                                                                                                                                                                      Write(jt.Description);

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

WriteAttribute("id", Tuple.Create(" id=\"", 29283), Tuple.Create("\"", 29305)
, Tuple.Create(Tuple.Create("", 29288), Tuple.Create("SubTypes_", 29288), true)
            
            #line 550 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
, Tuple.Create(Tuple.Create("", 29297), Tuple.Create<System.Object, System.Int32>(jt.Id
            
            #line default
            #line hidden
, 29297), false)
);

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

WriteLiteral(">\r\n");

WriteLiteral("                                    ");

            
            #line 551 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
                               Write(CommonHelpers.CheckboxBulkSelect(string.Format("CheckboxBulkSelect_{0}", jt.Id), "div"));

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

WriteLiteral("                                    ");

            
            #line 552 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
                               Write(CommonHelpers.CheckBoxList("JobSubTypes", jt.JobSubTypes.OrderBy(jst => jst.Description).ToSelectListItems(Model.Token.JobQueue.JobSubTypes), 2));

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

            
            #line 555 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
                            }
                        }

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

WriteLiteral("                    <script>\r\n                        (function () {\r\n           " +
"                 var dialog;\r\n\r\n                            function showDialog(" +
") {\r\n                                if (!dialog) {\r\n                           " +
"         dialog = $(\'#Config_JobQueues_JobSubTypes_Update_Dialog\').dialog({\r\n   " +
"                                     resizable: false,\r\n                        " +
"                modal: true,\r\n                                        autoOpen: " +
"false,\r\n                                        width: 750,\r\n                   " +
"                     height: 620,\r\n                                        butto" +
"ns: {\r\n                                            \"Save Changes\": saveChanges,\r" +
"\n                                            Cancel: cancel\r\n                   " +
"                     }\r\n                                    });\r\n\r\n             " +
"                       dialog.find(\'.jobSubTypes\').hide();\r\n                    " +
"                dialog.on(\'change\', \'input.jobType\', function () {\r\n            " +
"                            var $this = $(this);\r\n                              " +
"          if ($this.is(\':checked\'))\r\n                                           " +
" $(\'#SubTypes_\' + $this.val()).slideDown(\'fast\');\r\n                             " +
"           else\r\n                                            $(\'#SubTypes_\' + $t" +
"his.val()).slideUp(\'fast\');\r\n                                    }).find(\'input." +
"jobType:checked\').each(function () {\r\n                                        $(" +
"\'#SubTypes_\' + $(this).val()).show();\r\n                                    });\r\n" +
"                                }\r\n\r\n                                dialog.dial" +
"og(\'open\');\r\n\r\n                                return false;\r\n                  " +
"          }\r\n\r\n                            function cancel() {\r\n                " +
"                dialog.dialog(\"disable\");\r\n                                dialo" +
"g.dialog(\"option\", \"buttons\", null);\r\n\r\n                                // Refre" +
"sh Page\r\n                                window.location.href = window.location." +
"href;\r\n                            }\r\n\r\n                            function sav" +
"eChanges() {\r\n                                var form = dialog.find(\'form\');\r\n\r" +
"\n                                $(\'input.jobType:unchecked\').each(function () {" +
"\r\n                                    $(\'#SubTypes_\' + $(this).val()).find(\'inpu" +
"t\').prop(\'checked\', false);\r\n                                });\r\n\r\n            " +
"                    form.submit();\r\n\r\n                                dialog.dia" +
"log(\"disable\");\r\n                                dialog.dialog(\"option\", \"button" +
"s\", null);\r\n                            }\r\n\r\n                            $(funct" +
"ion () {\r\n                                $(\'#Config_JobQueues_JobSubTypes_Updat" +
"e\').click(showDialog);\r\n                            });\r\n\r\n                     " +
"   })();\r\n                    </script>\r\n");

            
            #line 620 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
                }

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

WriteLiteral(" class=\"info-box\"");

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

WriteLiteral(" class=\"fa-p\"");

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

WriteLiteral(" class=\"fa fa-info-circle\"");

WriteLiteral("></i>When jobs of these types are created, they will automatically be added into " +
"this queue.\r\n                    </p>\r\n                </div>\r\n            </td>" +
"\r\n        </tr>\r\n    </table>\r\n</div>\r\n");

            
            #line 630 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
 if (canDelete || canShowJobs)
{

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

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

WriteLiteral(">\r\n");

            
            #line 633 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
        
            
            #line default
            #line hidden
            
            #line 633 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
         if (canDelete)
        {
            
            
            #line default
            #line hidden
            
            #line 635 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
       Write(Html.ActionLinkButton("Delete", MVC.API.JobQueue.Delete(Model.Token.JobQueue.Id, true), "Config_JobQueues_Actions_Delete_Button"));

            
            #line default
            #line hidden
            
            #line 635 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
                                                                                                                                              

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

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

WriteLiteral(" title=\"Delete this Job Queue?\"");

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

WriteLiteral(" class=\"fa fa-exclamation-triangle fa-lg warning\"");

WriteLiteral("></i>\r\n                    This item will be permanently deleted and cannot be re" +
"covered.<br />\r\n                    <br />\r\n                    Are you sure?\r\n " +
"               </p>\r\n            </div>\r\n");

WriteLiteral("            <script");

WriteLiteral(" type=\"text/javascript\"");

WriteLiteral(@">
                $(function () {
                    var button = $('#Config_JobQueues_Actions_Delete_Button');
                    var buttonDialog = $('#Config_JobQueues_Actions_Delete_Dialog');
                    var buttonLink = button.attr('href');
                    button.attr('href', '#');
                    button.click(function () {
                        buttonDialog.dialog('open');
                        return false;
                    });
                    buttonDialog.dialog({
                        resizable: false,
                        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>
");

            
            #line 672 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
        }

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

            
            #line 673 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
         if (canShowJobs)
        {
            
            
            #line default
            #line hidden
            
            #line 675 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
       Write(Html.ActionLinkButton(string.Format("Show {0} job{1}", Model.OpenJobCount, (Model.OpenJobCount == 1 ? null : "s")), MVC.Job.Queue(Model.Token.JobQueue.Id), "Config_JobQueues_Actions_ShowJobs_Button"));

            
            #line default
            #line hidden
            
            #line 675 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
                                                                                                                                                                                                                    
        }

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

            
            #line 678 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
}
            
            #line default
            #line hidden
        }
    }
}
#pragma warning restore 1591
