#pragma warning disable 1591 //------------------------------------------------------------------------------ // // This code was generated by a tool. // Runtime Version:4.0.30319.34003 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // //------------------------------------------------------------------------------ namespace Disco.Web.Areas.Config.Views.AuthorizationRole { 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; #line 2 "..\..\Areas\Config\Views\AuthorizationRole\Show.cshtml" using Disco.Models.Authorization; #line default #line hidden using Disco.Models.Repository; 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/AuthorizationRole/Show.cshtml")] public partial class Show : Disco.Services.Web.WebViewPage { public Show() { } public override void Execute() { #line 3 "..\..\Areas\Config\Views\AuthorizationRole\Show.cshtml" Authorization.Require(Claims.DiscoAdminAccount); ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Authorization Roles", MVC.Config.AuthorizationRole.Index(null), Model.Token.Role.Name); Html.BundleDeferred("~/ClientScripts/Modules/Disco-PropertyChangeHelpers"); Html.BundleDeferred("~/ClientScripts/Modules/Disco-AjaxHelperIcons"); Html.BundleDeferred("~/Style/Fancytree"); Html.BundleDeferred("~/ClientScripts/Modules/jQuery-Fancytree"); #line default #line hidden WriteLiteral("\r\n\r\n \r\n \r\n Id:\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n " + " \r\n \r\n
\r\n"); WriteLiteral(" "); #line 17 "..\..\Areas\Config\Views\AuthorizationRole\Show.cshtml" Write(Html.DisplayFor(model => model.Token.Role.Id)); #line default #line hidden WriteLiteral("\r\n
Name:\r\n " + " "); #line 23 "..\..\Areas\Config\Views\AuthorizationRole\Show.cshtml" Write(Html.EditorFor(model => model.Token.Role.Name)); #line default #line hidden WriteLiteral("\r\n"); WriteLiteral(" "); #line 24 "..\..\Areas\Config\Views\AuthorizationRole\Show.cshtml" Write(AjaxHelpers.AjaxSave()); #line default #line hidden WriteLiteral("\r\n"); WriteLiteral(" "); #line 25 "..\..\Areas\Config\Views\AuthorizationRole\Show.cshtml" Write(AjaxHelpers.AjaxLoader()); #line default #line hidden WriteLiteral("\r\n \r\n $(function () {\r\n document.DiscoFun" + "ctions.PropertyChangeHelper(\r\n $(\'#Token_Role_Name\')," + "\r\n \'Invalid Name\',\r\n \'"); #line 31 "..\..\Areas\Config\Views\AuthorizationRole\Show.cshtml" Write(Url.Action(MVC.API.AuthorizationRole.UpdateName(Model.Token.Role.Id))); #line default #line hidden WriteLiteral("\',\r\n \'RoleName\'\r\n );\r\n " + " });\r\n \r\n
Linked Groups/Users:\r\n"); #line 41 "..\..\Areas\Config\Views\AuthorizationRole\Show.cshtml" #line default #line hidden #line 41 "..\..\Areas\Config\Views\AuthorizationRole\Show.cshtml" if (Model.Token.SubjectIds.Count == 0) { #line default #line hidden WriteLiteral(" None Associated\r\n"); #line 44 "..\..\Areas\Config\Views\AuthorizationRole\Show.cshtml" } else { #line default #line hidden WriteLiteral(" \r\n"); #line 48 "..\..\Areas\Config\Views\AuthorizationRole\Show.cshtml" #line default #line hidden #line 48 "..\..\Areas\Config\Views\AuthorizationRole\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(" (sg.IsGroup ? "group" : "user" #line default #line hidden , 2195), false) ); WriteLiteral(">"); #line 51 "..\..\Areas\Config\Views\AuthorizationRole\Show.cshtml" if (sg.IsGroup) { #line default #line hidden #line 53 "..\..\Areas\Config\Views\AuthorizationRole\Show.cshtml" Write(displayName); #line default #line hidden #line 53 "..\..\Areas\Config\Views\AuthorizationRole\Show.cshtml" } else { #line default #line hidden WriteLiteral(" (Url.Action(MVC.User.Show(sg.Id)) #line default #line hidden , 2731), false) , Tuple.Create(Tuple.Create("", 2766), Tuple.Create("#UserDetailTab-Authorization", 2766), true) ); WriteLiteral(">"); #line 57 "..\..\Areas\Config\Views\AuthorizationRole\Show.cshtml" Write(displayName); #line default #line hidden WriteLiteral("\r\n"); #line 58 "..\..\Areas\Config\Views\AuthorizationRole\Show.cshtml" } #line default #line hidden WriteLiteral("\r\n"); #line 59 "..\..\Areas\Config\Views\AuthorizationRole\Show.cshtml" } #line default #line hidden WriteLiteral(" \r\n"); #line 61 "..\..\Areas\Config\Views\AuthorizationRole\Show.cshtml" } #line default #line hidden WriteLiteral("
\r\n Update\r\n \r\n \r\n None Associated\r\n \r\n"); #line 68 "..\..\Areas\Config\Views\AuthorizationRole\Show.cshtml" #line default #line hidden #line 68 "..\..\Areas\Config\Views\AuthorizationRole\Show.cshtml" foreach (var sg in Model.Subjects) { #line default #line hidden WriteLiteral(" (sg.IsGroup ? "group" : "user" #line default #line hidden , 3695), false) ); WriteLiteral(" data-subjectid=\""); #line 70 "..\..\Areas\Config\Views\AuthorizationRole\Show.cshtml" Write(sg.Id); #line default #line hidden WriteLiteral("\""); WriteLiteral(">"); #line 70 "..\..\Areas\Config\Views\AuthorizationRole\Show.cshtml" Write(sg.Id == sg.Name ? sg.Id : string.Format("{0} [{1}]", sg.Name, sg.Id)); #line default #line hidden WriteLiteral(" \r\n"); #line 71 "..\..\Areas\Config\Views\AuthorizationRole\Show.cshtml" } #line default #line hidden WriteLiteral(" \r\n
\r\n " + " \r\n \r\n Add\r\n \r\n (Url.Action(MVC.API.AuthorizationRole.UpdateSubjects(Model.Token.Role.Id, null, true)) #line default #line hidden , 4395), false) ); WriteLiteral(" method=\"post\""); WriteLiteral(">\r\n \r\n
\r\n"); WriteLiteral(" "); #line 292 "..\..\Areas\Config\Views\AuthorizationRole\Show.cshtml" Write(Html.ActionLinkButton("Delete", MVC.API.AuthorizationRole.Delete(Model.Token.Role.Id, true), "Config_AuthRoles_Actions_Delete_Button")); #line default #line hidden WriteLiteral("\r\n \r\n

\r\n \r\n This item will be permanently deleted and cannot be recover" + "ed.
\r\n
\r\n Are you sure?\r\n

\r\n \r\n $(function () { var button = $('#Config_AuthRoles_Actions_Delete_Button'); var buttonDialog = $('#Config_AuthRoles_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""); } } }); }); "); } } } #pragma warning restore 1591