#145 add comments for devices
This commit is contained in:
@@ -0,0 +1,185 @@
|
||||
#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.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/_CommentsAndJobs.cshtml")]
|
||||
public partial class _CommentsAndJobs : Disco.Services.Web.WebViewPage<Disco.Web.Models.Device.ShowModel>
|
||||
{
|
||||
public _CommentsAndJobs()
|
||||
{
|
||||
}
|
||||
public override void Execute()
|
||||
{
|
||||
|
||||
#line 2 "..\..\Views\Device\DeviceParts\_CommentsAndJobs.cshtml"
|
||||
|
||||
var canShowComments = Authorization.Has(Claims.Device.ShowComments);
|
||||
var canShowJobs = Authorization.Has(Claims.Device.ShowJobs);
|
||||
|
||||
var jobCount = (Model.Device.Jobs == null ? 0 : Model.Device.Jobs.Count).ToString();
|
||||
string label;
|
||||
if (canShowComments & canShowJobs)
|
||||
{
|
||||
label = "Comments and Jobs [" + jobCount + "]";
|
||||
}
|
||||
else if (canShowComments)
|
||||
{
|
||||
label = "Comments";
|
||||
}
|
||||
else if (canShowJobs)
|
||||
{
|
||||
label = "Jobs [" + jobCount + "]";
|
||||
}
|
||||
else
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n<div");
|
||||
|
||||
WriteLiteral(" id=\"DeviceDetailTab-CommentsAndJobs\"");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 652), Tuple.Create("\"", 782)
|
||||
, Tuple.Create(Tuple.Create("", 660), Tuple.Create("DevicePart", 660), true)
|
||||
|
||||
#line 25 "..\..\Views\Device\DeviceParts\_CommentsAndJobs.cshtml"
|
||||
, Tuple.Create(Tuple.Create(" ", 670), Tuple.Create<System.Object, System.Int32>(canShowComments ? "canShowComments" : "cannotShowComments"
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 671), false)
|
||||
|
||||
#line 25 "..\..\Views\Device\DeviceParts\_CommentsAndJobs.cshtml"
|
||||
, Tuple.Create(Tuple.Create(" ", 732), Tuple.Create<System.Object, System.Int32>(canShowJobs ? "canShowJobs" : "cannotShowJobs"
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 733), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 26 "..\..\Views\Device\DeviceParts\_CommentsAndJobs.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 26 "..\..\Views\Device\DeviceParts\_CommentsAndJobs.cshtml"
|
||||
if (canShowComments)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteLiteral(" id=\"DeviceDetailTab-CommentsContainer\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 29 "..\..\Views\Device\DeviceParts\_CommentsAndJobs.cshtml"
|
||||
Write(Html.Partial(MVC.Device.Views.DeviceParts._Comments, Model));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 31 "..\..\Views\Device\DeviceParts\_CommentsAndJobs.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 32 "..\..\Views\Device\DeviceParts\_CommentsAndJobs.cshtml"
|
||||
if (canShowJobs)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteLiteral(" id=\"DeviceDetailTab-JobsContainer\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 35 "..\..\Views\Device\DeviceParts\_CommentsAndJobs.cshtml"
|
||||
Write(Html.Partial(MVC.Shared.Views._JobTable, Model.Jobs));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 37 "..\..\Views\Device\DeviceParts\_CommentsAndJobs.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <script>\r\n $(\'#DeviceDetailTabItems\').append(\'<li><a href=\"#DeviceDeta" +
|
||||
"ilTab-CommentsAndJobs\">");
|
||||
|
||||
|
||||
#line 39 "..\..\Views\Device\DeviceParts\_CommentsAndJobs.cshtml"
|
||||
Write(label);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</a></li>\');\r\n </script>\r\n</div>\r\n");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
Reference in New Issue
Block a user