#pragma warning disable 1591 //------------------------------------------------------------------------------ // // 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. // //------------------------------------------------------------------------------ namespace Disco.Web.Views.Device.DeviceParts { 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("~/Views/Device/DeviceParts/_Comments.cshtml")] public partial class _Comments : Disco.Services.Web.WebViewPage { public _Comments() { } public override void Execute() { #line 2 "..\..\Views\Device\DeviceParts\_Comments.cshtml" Authorization.Require(Claims.Device.ShowComments); var canAddComments = Authorization.Has(Claims.Device.Actions.AddComments); var canRemoveAnyComments = Authorization.Has(Claims.Device.Actions.RemoveAnyComments); var canRemoveOwnComments = Authorization.Has(Claims.Device.Actions.RemoveOwnComments); #line default #line hidden WriteLiteral("\r\n(canAddComments ? "canAddComments" : "cannotAddComments" #line default #line hidden , 395), false) #line 8 "..\..\Views\Device\DeviceParts\_Comments.cshtml" , Tuple.Create(Tuple.Create(" ", 453), Tuple.Create(canRemoveAnyComments ? "canRemoveAnyComments" : "cannotRemoveAnyComments" #line default #line hidden , 454), false) #line 8 "..\..\Views\Device\DeviceParts\_Comments.cshtml" , Tuple.Create(Tuple.Create(" ", 530), Tuple.Create(canRemoveOwnComments ? "canRemoveOwnComments" : "cannotRemoveOwnComments" #line default #line hidden , 531), false) ); WriteLiteral(" data-id=\""); #line 8 "..\..\Views\Device\DeviceParts\_Comments.cshtml" Write(Model.Device.SerialNumber); #line default #line hidden WriteLiteral("\""); WriteLiteral(" data-userid=\""); #line 8 "..\..\Views\Device\DeviceParts\_Comments.cshtml" Write(CurrentUser.UserId); #line default #line hidden WriteLiteral("\""); WriteLiteral(" data-addurl=\""); #line 8 "..\..\Views\Device\DeviceParts\_Comments.cshtml" Write(Url.Action(MVC.API.Device.CommentAdd(Model.Device.SerialNumber))); #line default #line hidden WriteLiteral("\""); WriteLiteral(" data-removeurl=\""); #line 8 "..\..\Views\Device\DeviceParts\_Comments.cshtml" Write(Url.Action(MVC.API.Device.CommentRemove())); #line default #line hidden WriteLiteral("\""); WriteLiteral(" data-geturl=\""); #line 8 "..\..\Views\Device\DeviceParts\_Comments.cshtml" Write(Url.Action(MVC.API.Device.Comment())); #line default #line hidden WriteLiteral("\""); WriteLiteral(">\r\n"); #line 9 "..\..\Views\Device\DeviceParts\_Comments.cshtml" #line default #line hidden #line 9 "..\..\Views\Device\DeviceParts\_Comments.cshtml" if (canAddComments) { #line default #line hidden WriteLiteral(" \r\n \r\n \r\n \r\n"); #line 15 "..\..\Views\Device\DeviceParts\_Comments.cshtml" } #line default #line hidden WriteLiteral(" \r\n"); #line 17 "..\..\Views\Device\DeviceParts\_Comments.cshtml" #line default #line hidden #line 17 "..\..\Views\Device\DeviceParts\_Comments.cshtml" foreach (var c in Model.Device.DeviceComments.OrderBy(m => m.Timestamp)) { #line default #line hidden WriteLiteral("